Skip to content

Conversation

@bnoordhuis
Copy link
Member

Linux before kernel 2.6.19 does not support epoll_pwait(). Due to a
logic error in commit 2daf944 ("unix: add flag for blocking SIGPROF
during poll"), the fallback path for ENOSYS was not taken.

This commit also adds epoll_pwait() emulation using pthread_sigmask().
The block/unblock operations are not atomic but that is fine for our
particular use case, to wit, sleep through SIGPROF signals.

R=@saghul

https://jenkins-iojs.nodesource.com/view/libuv/job/libuv+any-pr+multi/55/

@bnoordhuis
Copy link
Member Author

I'll take care of back-porting the fix to v0.10.

The regression itself is rather sad but it's proof that the io.js CI is shaping up rather nicely. It caught it, joyent/node didn't. :-)

bnoordhuis referenced this pull request in nodejs/node-v0.x-archive Jan 24, 2015
Reduce the overhead of the CPU profiler by suppressing SIGPROF signals
when sleeping / polling for events. Avoids unnecessary wakeups when the
CPU profiler is active. Depends on https://github.com/libuv/libuv#15.

Ref: strongloop/strong-agent#3
PR-URL: #8791
Reviewed-by: Trevor Norris <[email protected]>
@saghul
Copy link
Member

saghul commented Jan 24, 2015

LGTM if the CI agrees :-) Also, shoutout to @rvagg for building the awesome CI!

@saghul saghul mentioned this pull request Jan 24, 2015
3 tasks
@saghul
Copy link
Member

saghul commented Jan 24, 2015

I'll take care of back-porting the fix to v0.10.

Since you're here, care to backport the test? It should be straightforward, right? (you can skip it if it's too much trouble)

@rvagg
Copy link

rvagg commented Jan 24, 2015

https://jenkins-iojs.nodesource.com/view/libuv/job/libuv+any-pr+multi/56/

we had a problem with CI earlier today, I've restarted, updated and cleaned a bunch of stuff so I've queued this job again for ya

@bnoordhuis bnoordhuis force-pushed the fix-epoll-pwait-regression branch from 672f442 to 12c30f3 Compare January 24, 2015 13:02
@bnoordhuis
Copy link
Member Author

@saghul Updated uv.gyp as well, PTAL.

The CI is... not much worse than it was before, as far as I can tell. Getting it in good shape is on my TODO list.

@saghul
Copy link
Member

saghul commented Jan 24, 2015

@bnoordhuis LGTM!

About the CI, I also want to get it in good shape, but some of the failures look really weird at a first glance :-(

Linux before kernel 2.6.19 does not support epoll_pwait().  Due to a
logic error in commit 2daf944 ("unix: add flag for blocking SIGPROF
during poll"), the fallback path for ENOSYS was not taken.

This commit also adds epoll_pwait() emulation using pthread_sigmask().
The block/unblock operations are not atomic but that is fine for our
particular use case, to wit, sleep through SIGPROF signals.

PR-URL: libuv#162
Reviewed-By: Saúl Ibarra Corretgé <[email protected]>
Fixes a number of -Wimplicit-function-declaration warnings for functions
that are behind _GNU_SOURCE on old systems, like strndup() and pread().

PR-URL: libuv#162
Reviewed-By: Saúl Ibarra Corretgé <[email protected]>
@bnoordhuis bnoordhuis force-pushed the fix-epoll-pwait-regression branch from 12c30f3 to 965fffc Compare January 24, 2015 17:29
@bnoordhuis bnoordhuis merged commit 965fffc into libuv:v1.x Jan 24, 2015
@bnoordhuis bnoordhuis deleted the fix-epoll-pwait-regression branch January 24, 2015 17:29
bnoordhuis added a commit to bnoordhuis/libuv that referenced this pull request Jan 24, 2015
Linux before kernel 2.6.19 does not support epoll_pwait().  Due to a
logic error in commit 2daf944 ("unix: add flag for blocking SIGPROF
during poll"), the fallback path for ENOSYS was not taken.

This commit also adds epoll_pwait() emulation using pthread_sigmask().
The block/unblock operations are not atomic but that is fine for our
particular use case, to wit, sleep through SIGPROF signals.

This is a back-port of commit 67bb2b5 from the v1.x branch.

Original-PR-URL: libuv#162
Reviewed-By: Saúl Ibarra Corretgé <[email protected]>
bnoordhuis added a commit to bnoordhuis/libuv that referenced this pull request Jan 25, 2015
Linux before kernel 2.6.19 does not support epoll_pwait().  Due to a
logic error in commit 2daf944 ("unix: add flag for blocking SIGPROF
during poll"), the fallback path for ENOSYS was not taken.

This commit also adds epoll_pwait() emulation using pthread_sigmask().
The block/unblock operations are not atomic but that is fine for our
particular use case, to wit, sleep through SIGPROF signals.

This is a back-port of commit 67bb2b5 from the v1.x branch.

Original-PR-URL: libuv#162
Reviewed-By: Saúl Ibarra Corretgé <[email protected]>

PR-URL: libuv#165
Reviewed-By: Saúl Ibarra Corretgé <[email protected]>
Crunkle pushed a commit to Crunkle/libuv that referenced this pull request Aug 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants