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

Windows build with JULIA_THREADS = 1 segfaults #13975

Closed
mikewl opened this issue Nov 13, 2015 · 10 comments · Fixed by #14083
Closed

Windows build with JULIA_THREADS = 1 segfaults #13975

mikewl opened this issue Nov 13, 2015 · 10 comments · Fixed by #14083
Labels
multithreading Base.Threads and related functionality system:windows Affects only Windows

Comments

@mikewl
Copy link
Contributor

mikewl commented Nov 13, 2015

Make.user has the required XC_HOST = x86_64-w64-mingw32.
I added JULIA_THREADS = 1 as I wanted to test threads. MSYS2 isn't working still from my understanding of #13206 so I used Cygwin. The deps built successfully but when building Julia it failes with:

Copying in usr/share/doc/julia/examples
    JULIA usr/lib/julia/inference0.ji
/bin/sh: line 1: 16180 Segmentation fault      /cygdrive/d/julia/usr/bin/julia.exe -C native --output-ji `cygpath -w /cygdrive/d/julia/usr/lib/julia/inference0.ji` -f coreimg.jl
Makefile:211: recipe for target '/cygdrive/d/julia/usr/lib/julia/inference0.ji' failed
make[1]: *** [/cygdrive/d/julia/usr/lib/julia/inference0.ji] Error 139
Makefile:93: recipe for target 'julia-inference' failed
make: *** [julia-inference] Error 2
@tkelman tkelman added the system:windows Affects only Windows label Nov 13, 2015
@tkelman
Copy link
Contributor

tkelman commented Nov 13, 2015

ref #13970, I suspect you're only the second person to try building with multi-threading on Windows and you only missed first by a few hours. Can you try disabling the -DJULIA_ENABLE_THREADING part but leaving the LLVM svn branch part? I'm not sure whether this is a threading-specific segfault or an LLVM svn branch segfault.

@mikewl
Copy link
Contributor Author

mikewl commented Nov 13, 2015

Can I just set the llvm url to the specific url for threading? Should I do a clean build including deps?

@tkelman
Copy link
Contributor

tkelman commented Nov 13, 2015

Replace the JULIA_THREADS line in Make.user with

LLVM_VER := svn
LLVM_GIT_URL_LLVM := https://github.com/JuliaLang/llvm.git -b jn/tls37

then just make clean Julia source only, leave your LLVM alone. So build non-threading Julia with the jn/tls37 branch of LLVM (that you should already have built).

@vtjnash
Copy link
Member

vtjnash commented Nov 13, 2015

threading support is not currently available on windows (#13970 (comment))

@mikewl
Copy link
Contributor Author

mikewl commented Nov 14, 2015

I can build the jn/tls37 branch fine but Base.runtests has spawn, backtrace, cmdlineargs and parallel fail.
So the segfault is threading-specific.

Exception running test string :
On worker 2:
LoadError: LoadError: could not spawn `iconv --version`: no such file or directory (ENOENT)
 [inlined code] from .\strings\io.jl:43
 in _jl_spawn at .\process.jl:262
 in anonymous at .\process.jl:415
 in setup_stdio at .\process.jl:403
 in spawn at .\process.jl:414
 [inlined code] from .\process.jl:551
 in anonymous at .\no file:4294967295
 [inlined code] from .\essentials.jl:114
 in include_string at .\loading.jl:355
 in include_from_node1 at .\loading.jl:395
 [inlined code] from .\essentials.jl:114
 in include_string at .\loading.jl:355
 in include_from_node1 at .\loading.jl:395
 [inlined code] from .\util.jl:179
 in runtests at D:\Julia\usr\share\julia\test\testdefs.jl:7
 in anonymous at D:\Julia\usr\share\julia\test\runtests.jl:36
 in anonymous at .\multi.jl:913
 in run_work_thunk at .\multi.jl:651
 [inlined code] from .\multi.jl:913
 in anonymous at .\task.jl:63
while loading D:\Julia\usr\share\julia\test\strings/io.jl, in expression starting on line 139
while loading D:\Julia\usr\share\julia\test\string.jl, in expression starting on line 7
Exception running test spawn :
On worker 3:
LoadError: There was an error during testing
 in record at .\test.jl:295
 [inlined code] from .\test.jl:100
 in do_test at .\test.jl:197
 [inlined code] from .\essentials.jl:114
 in include_string at .\loading.jl:355
 in include_from_node1 at .\loading.jl:395
 [inlined code] from .\util.jl:179
 in runtests at D:\Julia\usr\share\julia\test\testdefs.jl:7
 in anonymous at D:\Julia\usr\share\julia\test\runtests.jl:36
 in anonymous at .\multi.jl:913
 in run_work_thunk at .\multi.jl:651
 [inlined code] from .\multi.jl:913
 in anonymous at .\task.jl:63
while loading D:\Julia\usr\share\julia\test\spawn.jl, in expression starting on line 21
Exception running test backtrace :
On worker 5:
LoadError: There was an error during testing
 in record at .\test.jl:295
 [inlined code] from .\test.jl:100
 in do_test at .\test.jl:197
 [inlined code] from D:\Julia\usr\share\julia\test\backtrace.jl:64
 in anonymous at .\no file:4294967295
 [inlined code] from .\essentials.jl:114
 in include_string at .\loading.jl:355
 in include_from_node1 at .\loading.jl:395
 [inlined code] from .\util.jl:179
 in runtests at D:\Julia\usr\share\julia\test\testdefs.jl:7
 in anonymous at D:\Julia\usr\share\julia\test\runtests.jl:36
 in anonymous at .\multi.jl:913
 in run_work_thunk at .\multi.jl:651
 [inlined code] from .\multi.jl:913
 in anonymous at .\task.jl:63
while loading D:\Julia\usr\share\julia\test\backtrace.jl, in expression starting on line 54
Exception running test cmdlineargs :
On worker 6:
LoadError: There was an error during testing
 in record at .\test.jl:295
 [inlined code] from .\test.jl:100
 in do_test at .\test.jl:197
 [inlined code] from D:\Julia\usr\share\julia\test\cmdlineargs.jl:231
 in anonymous at .\no file:4294967295
 [inlined code] from .\essentials.jl:114
 in include_string at .\loading.jl:355
 in include_from_node1 at .\loading.jl:395
 [inlined code] from .\util.jl:179
 in runtests at D:\Julia\usr\share\julia\test\testdefs.jl:7
 in anonymous at D:\Julia\usr\share\julia\test\runtests.jl:36
 in anonymous at .\multi.jl:913
 in run_work_thunk at .\multi.jl:651
 [inlined code] from .\multi.jl:913
 in anonymous at .\task.jl:63
while loading D:\Julia\usr\share\julia\test\cmdlineargs.jl, in expression starting on line 3
Exception running test parallel :
On worker 7:
LoadError: Parallel test failed, cmd : `'D:\Julia\usr\bin\julia' -Cnative '-JD:\Julia\usr\lib\julia\sys.dll' --check-bounds=yes --depwarn=error parallel_exec.jl`
 in error at .\error.jl:21
 [inlined code] from D:\Julia\usr\share\julia\test\parallel.jl:13
 in anonymous at .\no file:4294967295
 [inlined code] from .\essentials.jl:114
 in include_string at .\loading.jl:355
 in include_from_node1 at .\loading.jl:395
 [inlined code] from .\util.jl:179
 in runtests at D:\Julia\usr\share\julia\test\testdefs.jl:7
 in anonymous at D:\Julia\usr\share\julia\test\runtests.jl:36
 in anonymous at .\multi.jl:913
 in run_work_thunk at .\multi.jl:651
 [inlined code] from .\multi.jl:913
 in anonymous at .\task.jl:63
while loading D:\Julia\usr\share\julia\test\parallel.jl, in expression starting on line 12
ERROR: LoadError: Some tests exited with errors.
 in anonymous at D:\Julia\usr\share\julia\test\runtests.jl:64
 in cd at .\file.jl:57
 in include at .\boot.jl:261
 in include_from_node1 at .\loading.jl:392
 in process_options at .\client.jl:277
 in _start at .\client.jl:377
while loading D:\Julia\usr\share\julia\test\runtests.jl, in expression starting on line 13
WARNING: Forcibly interrupting busy workers
write: connection reset by peer (ECONNRESET)
ERROR: A test has failed. Please submit a bug report (https://github.com/JuliaLang/julia/issues)
including error messages above and the output of versioninfo():
Julia Version 0.5.0-dev+1265
Commit f045831 (2015-11-13 08:40 UTC)
Platform Info:
  System: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i7-4500U CPU @ 1.80GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.7.0

 in error at .\error.jl:21
 in runtests at .\interactiveutil.jl:421
 in runtests at .\interactiveutil.jl:410
 in eval at .\boot.jl:264

@tkelman tkelman added the multithreading Base.Threads and related functionality label Nov 14, 2015
@tkelman
Copy link
Contributor

tkelman commented Nov 14, 2015

thanks. better if you post the entire test log to a gist. same failures might be present on unmodified 3.7.0, not sure

@tkelman tkelman changed the title Build issue with cygwin Windows build with JULIA_THREADS = 1 segfaults Nov 18, 2015
@yuyichao
Copy link
Contributor

#14083 should bring threading support on Windows to the same level with other platforms. The SegFault is very likely #14091 and should be fixed by #12904

@alexranaldi
Copy link

I just ran into a same or similar issue today, with a fresh Julia checkout, using the instructions for the Windows build. I built Julia using a single thread. When I run Base.runtests() I get the following output:

     * char                  in   0.90 seconds, maxrss  904.60 MB
     * string               ERROR: LoadError: LoadError: LoadError: could not sp
awn `iconv --version`: no such file or directory (ENOENT)
 [inlined code] from strings/io.jl:43
 in _jl_spawn at process.jl:324
while loading C:\Users\alex\julia\usr\share\julia\test\strings/io.jl, in express
ion starting on line 139
while loading C:\Users\alex\julia\usr\share\julia\test\string.jl, in expression
starting on line 7
 in remotecall_fetch at multi.jl:783
 in sync_end at task.jl:401
 [inlined code] from task.jl:410
 in anonymous at C:\Users\alex\julia\usr\share\julia\test\runtests.jl:31
 in cd at file.jl:57
 in include at boot.jl:260
 in include_from_node1 at loading.jl:392
 in process_options at client.jl:277
 in _start at client.jl:377
while loading C:\Users\alex\julia\usr\share\julia\test\runtests.jl, in expressio
n starting on line 13
ERROR: A test has failed. Please submit a bug report (https://github.com/JuliaLa
ng/julia/issues)
including error messages above and the output of versioninfo():
Julia Version 0.5.0-dev+1583
Commit 34858e3* (2015-12-04 01:28 UTC)
Platform Info:
  System: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM)2 Duo CPU     E6750  @ 2.66GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Core2)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.3

 in error at error.jl:21



@yuyichao
Copy link
Contributor

yuyichao commented Dec 4, 2015

This issue is about bootstrap, segfaults are currently expected and is the reason we don't enable it by default.

@tkelman
Copy link
Contributor

tkelman commented Dec 4, 2015

that's a totally separate issue, not related to multithreading at all. ref #14206, iconv is one of the things we were borrowing from git. in a source build, you should be using the build environment's iconv during the tests, either cygwin or msys2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
multithreading Base.Threads and related functionality system:windows Affects only Windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants