[Ecls-list] Deadlock while compiling with threads (OpenBSD)

Timo Myyrä timo.myyra at wickedbsd.net
Mon Jul 22 07:55:51 UTC 2013


Hi,

Now that OpenBSD has rthreads enabled ECL could be made to use them.
I tried to compile ECL with --enable-threads=yes but the compiling process seems
to cause deadlock in the code somewhere.

The compilation process completes compilation of C code but when it tries to
load the lisp files with minimal ecl it seems to deadlock on predlib.lsp.

Here's snippet of the part where it gets stuck:
head -8 config.log | tail -6 >> build-stamp
if [ -f CROSS-COMPILER ]; then  ./CROSS-COMPILER compile;  else  ECLDIR=`pwd`/ ./ecl_min compile;  fi
;*** Lisp core booted ****
ECL (Embeddable Common Lisp)

;;;
;;; Welcome to bare.lsp. Let's bring this instance up!
;;;
;;;
;;; About to load lsp/load.lsp
;;;
;;; Loading src:lsp;export.lsp
;;; Loading src:lsp;defmacro.lsp
;;; Loading src:lsp;helpfile.lsp
;;; Loading src:lsp;evalmacros.lsp
;;; Loading src:lsp;cmuutil.lsp
;;; Loading src:lsp;setf.lsp
;;; Loading src:lsp;predlib.lsp


While compiling the C sources I get following warnings, not sure if relevant but
I'll include those here:

dpp: /usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/file.d -> file.o.c
cc -DECLDIR="\"/usr/local/lib/ecl-13.5.1\"" -I. -I/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/build -I/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c -I../ecl/gc -DECL_API -DECL_NO_LEGACY  -I/usr/local/include -I/usr/local/include -O2 -pipe -fPIC  -Dopenbsd -c -o file.o file.o.c
/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/file.d: In function 'ecl_off_t_to_integer':
/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/file.d:5341: warning: right shift count >= width of type
/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/file.d: In function 'ecl_integer_to_off_t':
/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/file.d:5368: warning: left shift count >= width of type
/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/file.d: In function 'not_a_file_stream':
/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/file.d:5416: warning: function declared 'noreturn' has a 'return' statement
/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/file.d: In function 'file_libc_error':
/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/file.d:5480: warning: 'noreturn' function does return


dpp: /usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/error.d -> error.o.c
cc -DECLDIR="\"/usr/local/lib/ecl-13.5.1\"" -I. -I/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/build -I/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c -I../ecl/gc -DECL_API -DECL_NO_LEGACY  -I/usr/local/include -I/usr/local/include -O2 -pipe -fPIC  -Dopenbsd -c -o error.o error.o.c
/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/error.d: In function 'si_signal_type_error':
/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/error.d:251: warning: function declared 'noreturn' has a 'return' statement
/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/error.d: In function 'cl_error':
/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/error.d:535: warning: function declared 'noreturn' has a 'return' statement
/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/error.d: In function 'FEwrong_type_key_arg':
/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/error.d:329: warning: 'noreturn' function does return
/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/error.d: In function 'FEwrong_type_nth_arg':
/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/error.d:305: warning: 'noreturn' function does return
/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/error.d: In function 'FEwrong_type_only_arg':
/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/error.d:281: warning: 'noreturn' function does return
/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/error.d: In function 'FEreader_error':
/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/error.d:226: warning: 'noreturn' function does return
/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/error.d: In function 'FEcontrol_error':
/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/error.d:195: warning: 'noreturn' function does return
/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/error.d: In function 'FEprogram_error_noreturn':
/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/error.d:183: warning: 'noreturn' function does return
/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/error.d: In function 'FEprogram_error':
/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/error.d:158: warning: 'noreturn' function does return
/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/error.d: In function 'ecl_unrecoverable_error':
/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/error.d:100: warning: 'noreturn' function does return

...

/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/ffi/backtrace.d: In function 'backtrace_symbols':
/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/ffi/backtrace.d:87: warning: assignment discards qualifiers from pointer target type
...

dpp: /usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/hash.d -> hash.o.c
cc -DECLDIR="\"/usr/local/lib/ecl-13.5.1\"" -I. -I/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/build -I/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c -I../ecl/gc -DECL_API -DECL_NO_LEGACY  -I/usr/local/include -I/usr/local/include -O2 -pipe -fPIC  -Dopenbsd -c -o hash.o hash.o.c
/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/hash.d: In function 'copy_entry':
/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/hash.d:507: warning: passing argument 1 of 'GC_call_with_alloc_lock' from incompatible pointer type
/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/hash.d:513: warning: passing argument 1 of 'GC_call_with_alloc_lock' from incompatible pointer type
/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/hash.d:519: warning: passing argument 1 of 'GC_call_with_alloc_lock' from incompatible pointer type

...

dpp: /usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/unixsys.d -> unixsys.o.c
cc -DECLDIR="\"/usr/local/lib/ecl-13.5.1\"" -I. -I/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/build -I/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c -I../ecl/gc -DECL_API -DECL_NO_LEGACY  -I/usr/local/include -I/usr/local/include -O2 -pipe -fPIC  -Dopenbsd -c -o unixsys.o unixsys.o.c
/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/unixsys.d: In function 'si_run_program':
/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/unixsys.d:762: warning: passing argument 2 of 'execve' from incompatible pointer type
/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/unixsys.d:764: warning: passing argument 2 of 'execvp' from incompatible pointer type


...

dpp: /usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/serialize.d -> serialize.o.c
cc -DECLDIR="\"/usr/local/lib/ecl-13.5.1\"" -I. -I/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/build -I/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c -I../ecl/gc -DECL_API -DECL_NO_LEGACY  -I/usr/local/include -I/usr/local/include -O2 -pipe -fPIC  -Dopenbsd -c -o serialize.o serialize.o.c
/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/serialize.d: In function 'serialize_one':
/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/serialize.d:314: warning: assignment makes pointer from integer without a cast

...

dpp: /usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/threads/process.d -> threads/process.o.c
cc -DECLDIR="\"/usr/local/lib/ecl-13.5.1\"" -I. -I/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/build -I/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c -I../ecl/gc -DECL_API -DECL_NO_LEGACY  -I/usr/local/include -I/usr/local/include -O2 -pipe -fPIC  -Dopenbsd -c -o threads/process.o threads/process.o.c
/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/threads/process.d: In function 'mp_exit_process':
/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/threads/process.d:598: warning: 'noreturn' function does return

...

dpp: /usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/threads/queue.d -> threads/queue.o.c
cc -DECLDIR="\"/usr/local/lib/ecl-13.5.1\"" -I. -I/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/build -I/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c -I../ecl/gc -DECL_API -DECL_NO_LEGACY  -I/usr/local/include -I/usr/local/include -O2 -pipe -fPIC  -Dopenbsd -c -o threads/queue.o threads/queue.o.c
/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/threads/queue.d: In function 'ecl_wait_on':
/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/threads/queue.d:253: warning: passing argument 3 of 'pthread_sigmask' discards qualifiers from pointer target type
/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/threads/queue.d:274: warning: passing argument 1 of 'sigsuspend' discards qualifiers from pointer target type
/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/threads/queue.d:297: warning: passing argument 2 of 'pthread_sigmask' discards qualifiers from pointer target type

...

/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/unicode/ucd-0000.c:4129:3: warning: no newline at end of file

...

/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/unicode/ucd-0096.c:3613:3: warning: no newline at end of file

...

/usr/ports/pobj/ecl-13.5.1/ecl-13.5.1/src/c/unicode/ucd_names_codes.c:32923:3: warning: no newline at end of file


Any suggestions what could cause the lock up and how to get threading working?

One quick fix to reduce warnings would be to include the newlines to the end of files on the
src/c/unicode/ directory.

Timo




More information about the ecl-devel mailing list