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

@threads silently swallows errors / println() segfaults #18220

Closed
rened opened this issue Aug 24, 2016 · 1 comment
Closed

@threads silently swallows errors / println() segfaults #18220

rened opened this issue Aug 24, 2016 · 1 comment

Comments

@rened
Copy link
Member

rened commented Aug 24, 2016

Errors inside the @threads macro are silently ignored. Tested with JULIA_NUM_THREADS=4.

  | | |_| | | | (_| |  |  Version 0.5.0-rc3+0 (2016-08-22 23:43 UTC)
 _/ |\__'_|_|_|\__'_|  |
|__/                   |  x86_64-apple-darwin15.6.0

julia> Threads.@threads for i = 1:10
           error()
       end

julia>

Trying to include debug outputs yields a segfault:

julia> Threads.@threads for i = 1:10
           println("before $i")
           error()
           println("after $i")
       end
before 1before 1before 1before 7before 4


signal (11): Segmentation fault: 11
while loading no file, in expression starting on line 0
uv__write at /Users/rene/local/julia5/deps/srccache/libuv-8d5131b6c1595920dd30644cd1435b4f344b46c8/src/unix/stream.c:890
uv_write2 at /Users/rene/local/julia5/deps/srccache/libuv-8d5131b6c1595920dd30644cd1435b4f344b46c8/src/unix/stream.c:1450
uv_write at /Users/rene/local/julia5/deps/srccache/libuv-8d5131b6c1595920dd30644cd1435b4f344b46c8/src/unix/stream.c:1475
jl_uv_write at /Users/rene/local/julia5/src/jl_uv.c:424
uv_write at ./stream.jl:809
unsafe_write at ./stream.jl:830
write at ./io.jl:175

Note that before 1 gets printed several times.

@yuyichao
Copy link
Contributor

Dup of #17532 and #17388

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

No branches or pull requests

2 participants