Bug 239919

Summary: Add option to JSC shell to wait for a USR2 signal before exiting to aid in collection of vmmaps
Product: WebKit Reporter: Justin Michaud <justin_michaud>
Component: New BugsAssignee: Justin Michaud <justin_michaud>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, cdumez, cmarcelo, ews-watchlist, keith_miller, mark.lam, msaboff, saam, tzagallo, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
ews-feeder: commit-queue-
Patch
none
Patch
none
Patch none

Justin Michaud
Reported 2022-04-29 17:29:06 PDT
Add option to JSC shell to wait for a USR2 signal before exiting to aid in collection of vmmaps
Attachments
Patch (3.89 KB, patch)
2022-04-29 17:30 PDT, Justin Michaud
ews-feeder: commit-queue-
Patch (3.76 KB, patch)
2022-04-29 18:10 PDT, Justin Michaud
no flags
Patch (3.77 KB, patch)
2022-04-29 20:57 PDT, Justin Michaud
no flags
Patch (3.69 KB, patch)
2022-05-02 14:19 PDT, Justin Michaud
no flags
Justin Michaud
Comment 1 2022-04-29 17:30:16 PDT
Justin Michaud
Comment 2 2022-04-29 17:31:22 PDT
Comment on attachment 458620 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=458620&action=review > Source/WTF/wtf/threads/Signals.h:66 > + case Signal::Usr: return std::make_tuple(SIGUSR2, std::nullopt); Either I fixed a happy little bug, or I am about to feel the wrath of some deep horrible bug that this works around
Yusuke Suzuki
Comment 3 2022-04-29 17:42:26 PDT
Comment on attachment 458620 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=458620&action=review r=me with comments. > Source/JavaScriptCore/jsc.cpp:3041 > + Lock waitToExitLock; > + Condition waitToExitCondition; > + bool mustWaitToExit = true; > + You can use WTF::BinarySemaphore instead. > Source/JavaScriptCore/jsc.cpp:3049 > + { > + Locker locker { waitToExitLock }; > + mustWaitToExit = false; > + waitToExitCondition.notifyAll(); > + } Ditto. > Source/JavaScriptCore/jsc.cpp:3078 > + { > + Locker locker { waitToExitLock }; > + while (mustWaitToExit) > + waitToExitCondition.wait(waitToExitLock); > + } > + Ditto. >> Source/WTF/wtf/threads/Signals.h:66 >> + case Signal::Usr: return std::make_tuple(SIGUSR2, std::nullopt); > > Either I fixed a happy little bug, or I am about to feel the wrath of some deep horrible bug that this works around Currently, Signal::Usr is not used. So yeah, it is a bug, but it will not affect on the existing code :)
Justin Michaud
Comment 4 2022-04-29 18:10:39 PDT
Justin Michaud
Comment 5 2022-04-29 18:11:09 PDT
I'm going to land once EWS finishes.
Justin Michaud
Comment 6 2022-04-29 20:57:08 PDT
EWS
Comment 7 2022-05-02 14:08:57 PDT
ChangeLog entry in Source/JavaScriptCore/ChangeLog contains OOPS!.
Justin Michaud
Comment 8 2022-05-02 14:19:08 PDT
EWS
Comment 9 2022-05-02 15:35:04 PDT
Committed r293688 (250186@main): <https://commits.webkit.org/250186@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 458705 [details].
Radar WebKit Bug Importer
Comment 10 2022-05-02 15:36:13 PDT
Note You need to log in before you can comment on or make changes to this bug.