-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
test/file: repeated running test_13559
triggers SystemError randomly
#22566
Conversation
@ararslan I found the pain point, please check it out! |
src/support/ios.c
Outdated
if (fd != -1) | ||
return fd; | ||
if (_enonfatal(errno)) | ||
goto retry; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be implemented at a higher level.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm... I do not get the point "higher level"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you mean replacing goto
statement ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't change this function and check the errno after this function return.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, I modified it. but i'm curious about the reason...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's another open below in the same function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok. I added some comment for it.
589fc7b
to
97d8096
Compare
97d8096
to
f601667
Compare
rebased for changing |
test/file.jl
Outdated
for i ∈ 1:50 | ||
test_22566() | ||
end | ||
end # !is_windows() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice to update the comment as well, though this block is short enough that the comment doesn't seem necessary IMO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌
f601667
to
786abbe
Compare
Awesome. Great work here, thanks! |
to deal with EINTR (interrupted system call) on `open`
786abbe
to
c232329
Compare
rebased for trying FreeBSD CI |
cmd = `$(Base.julia_cmd()) --startup-file=no -e $script` | ||
open(pipeline(cmd, stderr=STDERR)) | ||
|
||
r = open(fn, "r") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any possibility of race condiction between these 2 open
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What would constitute a race condition? Yes, the order in which they occur appears to be undefined, if that matters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(move discussion to #23001 (comment)
It was disabled in #24037 but reportedly seems to work okay when isolated into this separate, node 1 only test group.
It was disabled in #24037 but reportedly seems to work okay when isolated into this separate, node 1 only test group.
The function
test_13559
intest/file.jl
will randomly raise SystemError.but (not sure why) this exception cannot trigger via
(g)make test-file
even I added a loop intest/file.jl
.I just extract the function in a standalone script, found it can be reproduced easily within 10 iters on my Linux and FreeBSD machines.
please checkout this script: https://gist.github.com/iblis17/b39e37071f3d816076e2770b338a8d07
Here is the result on Linux
See also: #20585 (comment)