@parallel (+) segmentation fault on arm #13508 Closed dasGringuen opened this Issue on Oct 9, 2015 · 4 comments Projects None yet Labels arm parallel Milestone No milestone Assignees No one assigned 4 participants @dasGringuen @tkelman @ViralBShah @yuyichao Notifications You’re not receiving notifications from this thread. @dasGringuen dasGringuen commented on Oct 9, 2015 Hello we are running Julia on the Red Pitaya platform using Debian Jessie armhf. Were are getting a segmentation fault while running the next code. You can find the code and the error log while running it with gdb. Any hints? Many thanks, Adrian Julia version: root@red-pitaya:~/julia# ./julia _ _ _ _(_)_ | A fresh approach to technical computing (_) | (_) (_) | Documentation: http://docs.julialang.org _ _ _| |_ __ _ | Type "?help" for help. | | | | | | |/ _` | | | | |_| | | | (_| | | Version 0.4.0-rc4 (2015-10-04 03:14 UTC) _/ |\__'_|_|_|\__'_| | |__/ | arm-linux-gnueabihf julia> Code: root@red-pitaya:~/julia# cat multicore_forloop.jl #A microbenchmark to demonstrate the effect of parallel for loops # #$author: Manfred Mücke #$created: 20.9.2015 #$lastchange: 29.9.2015 # println ("==== multicore_forloop.jl ====") println ("Julia version: $VERSION") #remove all workers which might be around rmprocs(workers()) println("Sequential run - available processes: $(nprocs()) ") @everywhere n=5000000 # to scale test size #------------------sequential s_s=0 for i = 1:n #first run s_s += i^2 end s_s=0 t_seq = @elapsed for i = 1:n #measure s_s += i^2 end #add four worker processes on local machine addprocs(4) println("Parallel run - available workers: ",nworkers()) #------------------parallel @everywhere s_p=0 s_p = @parallel (+) for i = 1:n # first run i^2 end @sync @everywhere sleep(1) # global barrier t_par = @elapsed @parallel (+) for i = 1:n # measure i^2 end if (myid() == 1) println ("Results match: $(s_p == s_s) ($s_p, $s_s)") println (" Sequential: \t$t_seq\n Parallel: \t$t_par\n Speed-Up: \t$(t_seq/t_par)\n") println ("===============================================") end #remove all workers which might be around #rmprocs(workers()) Gdb log root@red-pitaya:~/julia# gdb --args ./julia ./multicore_forloop.jl GNU gdb (Debian 7.7.1+dfsg-5) 7.7.1 Copyright (C) 2014 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "arm-linux-gnueabihf". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from ./julia...done. (gdb) r Starting program: /root/julia/julia ./multicore_forloop.jl [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1". [New Thread 0x12d20450 (LWP 10644)] WARNING: deprecated syntax "println (" at /root/julia/multicore_forloop.jl:15. Use "println(" instead. ==== multicore_forloop.jl ==== WARNING: deprecated syntax "println (" at /root/julia/multicore_forloop.jl:17. Use "println(" instead. Julia version: 0.4.0-rc4 WARNING: rmprocs: process 1 not removed Sequential run - available processes: 1 signal (11): Segmentation fault signal (11): Segmentation fault signal (11): Segmentation fault signal (11): Segmentation fault [New Thread 0x10d4a450 (LWP 10653)] [New Thread 0x1054a450 (LWP 10654)] [New Thread 0xfd4a450 (LWP 10655)] [New Thread 0xf54a450 (LWP 10656)] ERROR: LoadError: connect: connection refused (ECONNREFUSED) ...and 3 other exceptions. while loading /root/julia/multicore_forloop.jl, in expression starting on line 55 UndefRefError() [Thread 0xf54a450 (LWP 10656) exited] [Thread 0x1054a450 (LWP 10654) exited] [Thread 0xfd4a450 (LWP 10655) exited] [Thread 0x10d4a450 (LWP 10653) exited] [Thread 0x36ff1000 (LWP 10641) exited] [Inferior 1 (process 10641) exited with code 01] @tkelman tkelman added the arm label on Oct 9, 2015 @dasGringuen dasGringuen commented on Oct 15, 2015 Hello, I have tried also with a Raspberry pi and I'm getting the same segmentation fault errors. I followed the ARM compilation guide, enabled the debugging information and run it with GDB. Next you can find a more detailed output. Could you please suggest how to proceed. We are looking forward on tracking this issue and fixing it. Regards, Adrian Versioninfo() julia> versioninfo() Julia Version 0.4.0 Commit 0ff703b (2015-10-08 06:20 UTC) DEBUG build Platform Info: System: Linux (arm-linux-gnueabihf) CPU: ARMv7 Processor rev 5 (v7l) WORD_SIZE: 32 BLAS: libblas LAPACK: liblapack LIBM: libm LLVM: libLLVM-3.6.1 Make.user pi@raspberrypi ~/julia $ cat Make.user FORCE_ARMV7=1 LLVM_ASSERTIONS=1 override USE_SYSTEM_BLAS=1 override USE_SYSTEM_LAPACK=1 override USE_SYSTEM_LIBM=1 override USE_SYSTEM_FFTW=1 override USE_SYSTEM_GMP=1 override USE_SYSTEM_MPFR=1 override USE_SYSTEM_ARPACK=1 @tkelman The Julia Language member tkelman commented on Oct 15, 2015 Best to use something separate like gist.github.com to post long logs, with just links here so this page isn't as bad to scroll through. Someone with access to an arm build will have to look into this. @ViralBShah The Julia Language member ViralBShah commented on Nov 25, 2015 I trimmed the output above. Also, this is easily reproduced just with: viral@julia-arm:~/julia$ ./julia -p 2 WARNING: unable to determine host cpu name. WARNING: unable to determine host cpu name. WARNING: unable to determine host cpu name. signal (11): Segmentation fault while loading no file, in expression starting on line 0 signal (11): Segmentation fault while loading no file, in expression starting on line 0 @ViralBShah ViralBShah added the parallel label on Nov 25, 2015 @maleadt maleadt referenced this issue on Nov 30, 2015 Merged ARM ABI #14194 @yuyichao The Julia Language member yuyichao commented on Jan 5 Close as a direct dup of #12344 (and almost all of these issues on ARM) are just due to incompatible C ABI. Please feel free to report additional issues with @parallel on ARM after #14194 is merged. @yuyichao yuyichao closed this on Jan 5