Closed
Bug 1309681
Opened 8 years ago
Closed 3 years ago
NSPR pipes became non-blocking by default
Categories
(NSPR :: NSPR, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: dwmw2, Assigned: dragana)
References
Details
Attachments
(1 file, 1 obsolete file)
2.42 KB,
patch
|
Details | Diff | Splinter Review |
The patch applied to address bug 1289145 had the effect of making pipes non-blocking by default — which was noted in that bug and an alternative fix proposed, but 4.13 shipped with this incompatible change anyway.
It broke Firefox's automatic NTLM single-sign-on under Linux, because it doesn't cope with getting -EAGAIN when reading from a pipe to the ntlm_auth helper process.
https://bugzilla.redhat.com/show_bug.cgi?id=1383918
![]() |
||
Comment 1•8 years ago
|
||
I assume the change we've made is this:
https://hg.mozilla.org/projects/nspr/rev/c5f7511ed27673f72c9b4bef15b4e476bc98f402
Dragana, there are two more NSPR patches from Wan-Teh in bug 1289145, that seem (at the first look only!) like an alternative solution potentially fixing both bug 1289145 and this bug.
If we don't want to accept those, could we export an API to set the nonblocking flag on secret and use it only for the pollable event? (It seems like the patch at [1] is doing exactly that..)
[1] https://bugzilla.mozilla.org/attachment.cgi?id=8790334&action=diff
Flags: needinfo?(dd.mozilla)
Assignee | ||
Comment 2•8 years ago
|
||
(In reply to Honza Bambas (:mayhemer) from comment #1)
> I assume the change we've made is this:
> https://hg.mozilla.org/projects/nspr/rev/
> c5f7511ed27673f72c9b4bef15b4e476bc98f402
>
> Dragana, there are two more NSPR patches from Wan-Teh in bug 1289145, that
> seem (at the first look only!) like an alternative solution potentially
> fixing both bug 1289145 and this bug.
>
> If we don't want to accept those, could we export an API to set the
> nonblocking flag on secret and use it only for the pollable event? (It
> seems like the patch at [1] is doing exactly that..)
>
> [1] https://bugzilla.mozilla.org/attachment.cgi?id=8790334&action=diff
On solution is to use a socket pair on unix as well, but I prefer not to use it.
The second solution [1] means that we need to use PR_NewPollableEvent, which complicates our PollableEvent and probably need rewriting a large portion of it.
So I think the solution is to expose _PR_MakePipeNonblock(PRFileDesc *fd) function. In the patch [1] it is an internal function.
I will make a patch.
Flags: needinfo?(dd.mozilla)
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → dd.mozilla
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Assignee | ||
Comment 3•8 years ago
|
||
Attachment #8800687 -
Flags: review?(wtc)
Comment 4•8 years ago
|
||
We should assume that there are multiple consumers of NSPR, and that Firefox isn't the only one.
It would be best to restore the original behavior of NSPR, which avoids the regression, and the original bug 1289145 should get fixed in a different way.
Comment 5•8 years ago
|
||
Comment on attachment 8800687 [details] [diff] [review]
bug_1309681.patch
You shouldn't implement PR_MakePipeNonblock twice. Please remove one from one of the .c files.
A better name might be PR_SetPipeNonblocking.
Would it be a better API to allow the caller to specify a parameter, that selects between blocking and nonblocking?
Should optimized builds fail, if the function is called for a non-pipe fd, instead of only debug-build assertion?
Assignee | ||
Comment 7•8 years ago
|
||
incorporate comment #5.
Attachment #8800687 -
Attachment is obsolete: true
Attachment #8800687 -
Flags: review?(wtc)
Attachment #8807124 -
Flags: review?(wtc)
Assignee | ||
Updated•3 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•