Bug 52540

Summary: Regression: Some text-only e-mails causes 100% cpu load
Product: WebKit Reporter: Alexander Zautke <alexander.zautke>
Component: JavaScriptCoreAssignee: Michael Saboff <msaboff>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, barraclough, ggaren, msaboff, oliver
Priority: P1 Keywords: InRadar, Regression
Version: 528+ (Nightly build)   
Hardware: Mac (Intel)   
OS: OS X 10.6   
Attachments:
Description Flags
Screenshot of a top command in terminal
none
Sample of MiniBrowser taken with Activity Monitor
none
Sample of WebProcess taken with Activity Monitor
none
Sample of WebKit taken with Activity Monitor
none
Patch to attach nested sub parens to outer non-capturing parens oliver: review+

Alexander Zautke
Reported 2011-01-16 11:46:22 PST
Created attachment 79105 [details] Screenshot of a top command in terminal 1. I opened a text-only,not a html-email, in MobileMe. 2. WebKit locks down completly (100% cpu). 3. If you try it in the MiniBrowser for WebKit2,WebProcess caues the 100% cpu load (see attachment).
Attachments
Screenshot of a top command in terminal (14.55 KB, image/png)
2011-01-16 11:46 PST, Alexander Zautke
no flags
Sample of MiniBrowser taken with Activity Monitor (23.87 KB, text/plain)
2011-01-17 05:03 PST, Alexander Zautke
no flags
Sample of WebProcess taken with Activity Monitor (26.05 KB, text/plain)
2011-01-17 05:03 PST, Alexander Zautke
no flags
Sample of WebKit taken with Activity Monitor (36.27 KB, text/plain)
2011-01-17 09:18 PST, Alexander Zautke
no flags
Patch to attach nested sub parens to outer non-capturing parens (6.40 KB, patch)
2011-01-18 15:16 PST, Michael Saboff
oliver: review+
Alexey Proskuryakov
Comment 1 2011-01-16 22:12:41 PST
Could you please attach a sample of both MiniBrowser and WebProcess processes, taken with Activity Monitor application? Without a reproducible case or at least samples, there is nothing we can do here.
Alexander Zautke
Comment 2 2011-01-17 05:03:00 PST
Created attachment 79156 [details] Sample of MiniBrowser taken with Activity Monitor
Alexander Zautke
Comment 3 2011-01-17 05:03:54 PST
Created attachment 79157 [details] Sample of WebProcess taken with Activity Monitor
Alexey Proskuryakov
Comment 4 2011-01-17 08:48:03 PST
In JSC::RegExp::match(). It's strange if this doesn't happen in WebKit nightlies, there shouldn't be any difference in JavaScriptCore behavior in WebKit2.
Alexander Zautke
Comment 5 2011-01-17 09:18:56 PST
Created attachment 79181 [details] Sample of WebKit taken with Activity Monitor
Geoffrey Garen
Comment 6 2011-01-17 14:43:54 PST
Michael Saboff
Comment 7 2011-01-17 17:07:29 PST
I am unable to reproduce with either ToT or nightly build with Safari. Please provide a sample email that will cause the problem.
Alexander Zautke
Comment 8 2011-01-18 07:17:34 PST
For example, I can not open the e-mail you get from bugzilla, if someone comment on this bug.
Alexey Proskuryakov
Comment 9 2011-01-18 09:05:10 PST
Confirmed with r75891! I forwarded this e-mail to my MobileMe account with Mail.app's Message->Redirect menu item.
Michael Saboff
Comment 10 2011-01-18 10:25:37 PST
Got it!. The problem RE is /(([\w\-]+:\/\/?|www[.])[^\s()<>]+(?:([\w\d]+)|([^\[:punct:\]\s()<>\W]|\/)))/. I have reduced it to: /([^\s]+(?:([\w]+)|([^\W])))/ with the input of: "https://bugs.webkit.org/show_bug.cgi?id=52540\n" The trailing 'n' is needed for the hang. Debugging now.....
Michael Saboff
Comment 11 2011-01-18 15:16:35 PST
Created attachment 79342 [details] Patch to attach nested sub parens to outer non-capturing parens Directly use backtrack label with parentheses nested under a non-capturing parentheses. Also linked current parentheses tail code object for possible parens nested within a non-capturing parentheses.
Oliver Hunt
Comment 12 2011-01-18 15:22:06 PST
*** Bug 52662 has been marked as a duplicate of this bug. ***
Michael Saboff
Comment 13 2011-01-18 15:31:56 PST
Note You need to log in before you can comment on or make changes to this bug.