Closed
Bug 1280636
Opened 9 years ago
Closed 9 years ago
subprocess busy-polls the sentinel fd if it is closed unexpectedly
Categories
(Toolkit :: Async Tooling, defect)
Toolkit
Async Tooling
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox50 | --- | fixed |
People
(Reporter: aswan, Assigned: aswan)
Details
Attachments
(1 file)
I don't have an isolated reproduction, but I can try to create one if its helpful.
But I think the sequence that triggers this bug occurs when we have pending reads/writes and the subprocess exits. If the first indication we get is POLLNVAL on the stdin file descriptor, that triggers Pipe.onError() which calls process.wait() which calls waitpid() which returns with an exit code right away which causes the sentintel fd to be closed.
But then the process object remains remains in the io.processes map and continues to return non-zero pollEvents, so we just keep polling and keep triggering errors.
I think the fix is as simple as calling updatePollFds() from Process.onError()
| Assignee | ||
Comment 1•9 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/59504/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/59504/
Attachment #8763234 -
Flags: review?(kmaglione+bmo)
Comment 2•9 years ago
|
||
Comment on attachment 8763234 [details]
Bug 1280636 Call updatePollFds() on error on sentinel fd
https://reviewboard.mozilla.org/r/59504/#review56618
::: toolkit/modules/subprocess/subprocess_worker_unix.js:411
(Diff revision 1)
> *
> * @see pollEvents
> */
> onError() {
> this.wait();
> + io.updatePollFds();
I think it would make more sense to put this after `this.fd.dispose()` in `wait()`.
Attachment #8763234 -
Flags: review?(kmaglione+bmo) → review+
| Assignee | ||
Comment 3•9 years ago
|
||
Comment on attachment 8763234 [details]
Bug 1280636 Call updatePollFds() on error on sentinel fd
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/59504/diff/1-2/
| Assignee | ||
Updated•9 years ago
|
Assignee: nobody → aswan
Iteration: --- → 50.1
Pushed by aswan@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/dc5c9230e418
Call updatePollFds() on error on sentinel fd r=kmag
Comment 5•9 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox50:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
You need to log in
before you can comment on or make changes to this bug.
Description
•