Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix mach spawn fail interrupt #19590

Closed
wants to merge 3 commits into from
Closed

Conversation

vtjnash
Copy link
Member

@vtjnash vtjnash commented Dec 14, 2016

I believe this should fix the occasional failure we've seen this past year on the spawn test on macOS where it gets a spurious InterruptException generated by the mach kernel. I guess that's what the man page meant when it said this function could have "unspecified behavior".

@@ -1,2 +1,2 @@
LIBUV_BRANCH=julia-uv1.9.0
LIBUV_SHA1=8d5131b6c1595920dd30644cd1435b4f344b46c8
LIBUV_SHA1=52d72a52cc7ccd570929990f010ed16e2ec604c
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why a partial sha? 52d72a52cc7ccd570929990f010ed16e2ec604c8

jl_sigsetset(&sset);
while (1) {
profile = 0;
sigwait(&sset, &sig);
sig = 0;
errno = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one shouldn't be necessary? Or is this just to help future debugging?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

future debugging

@vtjnash vtjnash force-pushed the jn/fix-mach-spawn-fail-interrupt branch 3 times, most recently from 67cde87 to 15882bc Compare December 24, 2016 18:06
@vtjnash vtjnash force-pushed the jn/fix-mach-spawn-fail-interrupt branch from 15882bc to 713dfad Compare January 3, 2017 18:15
@@ -0,0 +1 @@
0e6ec181c8bfd322a17dbd843b2b8ebb
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

filenames are missing the last char

@vtjnash vtjnash force-pushed the jn/fix-mach-spawn-fail-interrupt branch from 713dfad to 673174b Compare January 6, 2017 05:16
@vtjnash vtjnash force-pushed the jn/fix-mach-spawn-fail-interrupt branch 2 times, most recently from 0c50ccc to af62111 Compare January 10, 2017 01:39
this uses a nonstandard feature of sleep, but seems to be supported on the major systems
if we want to run this test on busybox, we could use its usleep command

using a smaller value for sleep lets us test more iterations,
which is where the issues usually start to appear
this was a bug in our libuv fork triggering a bug in the mach kernel

code must be careful to never use sigprocmask, setjmp, longjmp, or
similar such thread-unsafe functions to avoid this documented unspecified behavior
@vtjnash vtjnash force-pushed the jn/fix-mach-spawn-fail-interrupt branch from af62111 to e941142 Compare January 10, 2017 15:42
@@ -102,7 +102,7 @@ script:
# capture the log, but only print it if `make deps` fails
# try to show the end of the log first, because this log might be very long (> 4MB)
# and thus be truncated by travis
- moreutils/mispipe "make $BUILDOPTS NO_GIT=1 -C deps 2> deps-err.log" "$BAR" > deps.log ||
- moreutils/mispipe "make \$BUILDOPTS NO_GIT=1 -C deps 2> deps-err.log" "$BAR" > deps.log ||
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not merge this unless you've verified that this branch builds from a completely clean cache. The deps should not need the spawn modification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
system:mac Affects only macOS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants