Bug 37888 - IDLParser.pm exhausts system resources with open2
Summary: IDLParser.pm exhausts system resources with open2
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows XP
: P2 Minor
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-20 14:21 PDT by Kartikaya Gupta
Modified: 2010-05-02 05:47 PDT (History)
2 users (show)

See Also:


Attachments
Patch that adds a call to waitpid to the parser (669 bytes, patch)
2010-04-21 07:27 PDT, Kartikaya Gupta
darin: review-
Details | Formatted Diff | Diff
Proposed patch, now with change description (1.38 KB, patch)
2010-04-21 16:10 PDT, Kartikaya Gupta
abarth: review-
Details | Formatted Diff | Diff
Now with changelog patch as well (1.31 KB, patch)
2010-04-30 11:42 PDT, Kartikaya Gupta
darin: review+
Details | Formatted Diff | Diff
Patch updated with link to this bug (1.35 KB, patch)
2010-04-30 20:06 PDT, Kartikaya Gupta
no flags Details | Formatted Diff | Diff
Attempt #2, without the missing linebreak this time (1.35 KB, patch)
2010-04-30 20:27 PDT, Kartikaya Gupta
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kartikaya Gupta 2010-04-20 14:21:58 PDT
When building WebCore, IDL files are parsed and binding files are generated using the code in WebCore/bindings/scripts. Specifically, IDLParser.pm in this folder uses the open2 call to invoke a preprocessor on the IDL file. If multiple IDL files are parsed in a tight loop, the code dies after 64 IDL files because it exhausts the process IDs available. The error message that it dies with is "Can't spawn-NOWAIT: resource temporarily unavailable".
Comment 1 George Staikos 2010-04-20 18:34:53 PDT
Please attach the patch :)
Comment 2 Kartikaya Gupta 2010-04-21 07:27:33 PDT
Created attachment 53953 [details]
Patch that adds a call to waitpid to the parser
Comment 3 Darin Adler 2010-04-21 07:52:53 PDT
Comment on attachment 53953 [details]
Patch that adds a call to waitpid to the parser

Change looks good. Needs a change log so review-.
Comment 4 Kartikaya Gupta 2010-04-21 16:10:53 PDT
Created attachment 54000 [details]
Proposed patch, now with change description

Not sure if "git format-patch" is an acceptable patch format here but I don't have webkit set up in svn and it looks like at least some of the other patches in the commit queue are in this format.
Comment 5 Darin Adler 2010-04-21 17:59:45 PDT
Comment on attachment 54000 [details]
Proposed patch, now with change description

The change log entry needs to be in the WebCore/ChangeLog file.
Comment 6 Adam Barth 2010-04-22 12:44:03 PDT
Comment on attachment 54000 [details]
Proposed patch, now with change description

No changelog.
Comment 7 Kartikaya Gupta 2010-04-30 11:42:37 PDT
Created attachment 54814 [details]
Now with changelog patch as well

Updated with Changelog patch
Comment 8 Kartikaya Gupta 2010-04-30 19:59:19 PDT
Comment on attachment 54814 [details]
Now with changelog patch as well

Whoops, noticed my Changelog description doesn't reference this bug. Will upload another patch with the link.
Comment 9 Kartikaya Gupta 2010-04-30 20:06:14 PDT
Created attachment 54845 [details]
Patch updated with link to this bug
Comment 10 Kartikaya Gupta 2010-04-30 20:27:27 PDT
Created attachment 54846 [details]
Attempt #2, without the missing linebreak this time
Comment 11 WebKit Commit Bot 2010-05-02 05:47:16 PDT
Comment on attachment 54846 [details]
Attempt #2, without the missing linebreak this time

Clearing flags on attachment: 54846

Committed r58653: <http://trac.webkit.org/changeset/58653>
Comment 12 WebKit Commit Bot 2010-05-02 05:47:21 PDT
All reviewed patches have been landed.  Closing bug.