Bug 183406 - [GTK] Some Amazon ads cause WebKit to hang
Summary: [GTK] Some Amazon ads cause WebKit to hang
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Local Build
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2018-03-07 07:27 PST by Don Swaner
Modified: 2018-04-21 15:51 PDT (History)
3 users (show)

See Also:

Amazon web page files zipped (4.73 MB, text/html)
2018-03-10 04:14 PST, Don Swaner
no flags Details
Amazon web page html (969.55 KB, text/html)
2018-03-10 04:20 PST, Don Swaner
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Don Swaner 2018-03-07 07:27:16 PST
Some Amazon ads cause WebKit to hang with 99% cpu usage - as shown by "top" command for WebKitProces.

Fedora Linux:
RedHat Linux Bugzilla 1551610 - epiphany (WebKit) hangs with 99% cpu for certain web pages

Bug is very reproducible.

Steps to reproduce:
1) Turn off ad blocking in epiphany browser
2) Go to URL https://www.amazon.com/Dragons-Egg-Dragon-Eggs-Book-ebook/dp/B01JOL7BKC/ref=sr_1_1?s=digital-text&ie=UTF8&qid=1520258748&sr=1-1&keywords=dragon%27s+egg+Sorensen

This URL is not unique - it is the ads which are causing the hang - viewing other Kindle books (and probably other items) will also cause a hang (sometimes).  Not all ads may cause a hang.
Comment 1 Michael Catanzaro 2018-03-07 07:45:30 PST
I've seen this before, with ads on other webpages (I don't remember where).

(In reply to Don Swaner from comment #0)
> Not all ads may cause a hang.

But this is the problem. I can't reproduce it now, because Amazon is not sending me the ads that trigger this. So this might be really hard to track down.
Comment 2 Don Swaner 2018-03-07 09:00:00 PST
If in epiphany I clear all Amazon cookies, and if I am not signed in to Amazon, and I click on a Kindle title, such as "True Fiction" by Lee Goldberg, I get the hang.

I'm not sure if Amazon has some mechanism to track my browsing history, in spite of no cookes and in spite of not being signed in - or whether the ads are being randomly assigned (maybe by geographic location) and I just seem to attract ads which WebKit can't handle.  Maybe Amazon is tracking me via hostname or IP address?

On the same PC, I also have Firefox installed, and have an extensive history with Amazon - so maybe it's the .mozilla cookies, that java script (?) is somehow reading?  Or not.
Comment 3 Don Swaner 2018-03-10 04:14:29 PST
Created attachment 335509 [details]
Amazon web page files zipped

Page loads OK
Comment 4 Don Swaner 2018-03-10 04:20:06 PST
Created attachment 335510 [details]
Amazon web page html

This web page was viewed in Firefox and saved as complete web page.  The saved html file loads fine in epiphany - the ads display OK, including animation.  However, when I try to load the same page directly from Amazon in epiphany, it hangs.
Comment 5 Don Swaner 2018-04-15 07:34:32 PDT
With webkitgtk4-2.20.0-1.fc27.x86_64, the problem is fixed, for me.
Comment 6 Don Swaner 2018-04-21 15:51:40 PDT
The WebKit hanging with 99% cpu usage has recurred.  As before, the problem is intermittent, apparently depending on which Amazon kindle ebook is being browsed with epiphany and/or which ads are being shown.

Recently this problem has been occurring only rarely - possibly due to a change in the ads being sent to my browser - so maybe the problem was not really fixed before.

Currently running webkitgtk4-2.20.1-1.fc27.x86_64