[Pkg-julia-devel] Bug#861486: Bug#861486: Bug#861486: Bug#861486: julia: FTBFS on mips64el (segmentation fault)
Aurelien Jarno
aurelien at aurel32.net
Wed May 3 11:17:14 UTC 2017
On 2017-05-02 23:30, Graham Inggs wrote:
> On 2 May 2017 at 18:58, Peter Colberg <peter at colberg.org> wrote:
> > Could you comment all lines and then successively uncomment to see
> > which line triggers the segfault?
>
> I commented out practically your entire program and it still randomly segfaults.
>
> > You could also try querying a symbol in libm other than pow and see
> > whether that changes anything.
>
> No difference with 'exp' or 'SuiteSparse_config'. I also tried
> replacing -lopenlibm with -lm.
>
> I am able to reproduce the problem with the files below. Julia's
> build-dependencies are still required, but not Julia's source.
>
>
> Contents of shlibdeps.c:
> int main(void)
> {
> return 0;
> }
>
>
> Contents of Makefile:
> SHLIBDEPS+=-larpack
> SHLIBDEPS+=-lopenblas
> SHLIBDEPS+=-ldSFMT
> SHLIBDEPS+=-lfftw3_threads
> SHLIBDEPS+=-lfftw3f_threads
> SHLIBDEPS+=-lgmp
> SHLIBDEPS+=-lopenlibm
> SHLIBDEPS+=-lmpfr
> SHLIBDEPS+=-lopenspecfun
> SHLIBDEPS+=-lpcre2-8
> SHLIBDEPS+=-lcholmod
> SHLIBDEPS+=-lspqr
> SHLIBDEPS+=-lsuitesparseconfig
> SHLIBDEPS+=-lumfpack
>
> shlibdeps: shlibdeps.c
> gcc -o shlibdeps shlibdeps.c -ldl $(SHLIBDEPS)
>
> test: shlibdeps
> for n in $(shell seq 1 30); do ./shlibdeps; done
>
>
> $ make test
> for n in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
> 24 25 26 27 28 29 30; do ./shlibdeps; done
> Segmentation fault
> Segmentation fault
> Segmentation fault
> Segmentation fault
The problem only happens when using multiple OpenMP threads, it can be
workarounded by setting OMP_NUM_THREADS=1. The crash happens in
blas_memory_free:
#0 0x000000fff22043e4 in blas_memory_free (free_area=free_area at entry=0xffed415000) at memory.c:1161
#1 0x000000fff2204ee4 in blas_thread_server (arg=<optimized out>) at blas_server.c:461
#2 0x000000fff112f008 in start_thread () from /lib/mips64el-linux-gnuabi64/libpthread.so.0
Note that openblas provides a different blas_thread_server in
blas_server_omp.c when OpenMP is in use. I *guess* therefore that either
openblas should be built with OpenMP support or that suitesparse should
not use OpenMP.
Aurelien
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurelien at aurel32.net http://www.aurel32.net
More information about the Pkg-julia-devel
mailing list