OS-5521: lxbrand epoll_ctl not allowed to emit EINTR


Issue Type:Bug
Priority:4 - Normal
Created at:2016-07-18T20:44:56.000Z
Updated at:2016-09-28T15:56:25.000Z


Created by:Patrick Mooney [X]
Reported by:Patrick Mooney [X]
Assigned to:Patrick Mooney [X]


Fixed: A fix for this issue is checked into the tree and tested.
(Resolution Date: 2016-09-28T15:56:25.000Z)

Fix Versions

2016-09-29 Ziggy (Release Date: 2016-09-29)

Related Links




OS-5520 highlighted the threat of improper return codes from /dev/poll writes.
The same care should be taken in the LX epoll glue.


Comment by Patrick Mooney [X]
Created at 2016-07-19T00:56:57.000Z

The simple looping-write approach used in OS-5518 is inadequate for this issue since there is no opportunity given to an interrupting signal to be delivered before calling back into devpoll.

Comment by Patrick Mooney [X]
Created at 2016-07-21T14:45:33.000Z

The code proposed in CR118 has one major downside: it requires the acquisition and release of p_lock twice during the course of the syscall in order to block signals. This is counter to efforts like [OS-4953].

I originally designed the logic to perform the signal masking in the contended case, but the way that issig_forreal promotes a queued signal into lwp_cursig prevented it from working. Such an approach may be viable if issig_forreal is updated to filter lwp_cursig against t_hold.

Comment by Bot Bot [X]
Created at 2016-09-28T06:00:48.000Z

illumos-joyent commit 1b275fb (branch master, by Patrick Mooney)

OS-5521 lxbrand epoll_ctl not allowed to emit EINTR
Reviewed by: Ryan Zezeski <rpz@joyent.com>
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Approved by: Jerry Jelinek <jerry.jelinek@joyent.com>