[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#696757: ecl: FTBFS: hang in sigsuspend



Code in question:

#if defined(ECL_THREADS) && defined(HAVE_SIGPROCMASK)
static cl_object
asynchronous_signal_servicing_thread()
{
        sigset_t handled_set;
        cl_object signal_code;
        int signo;
        int interrupt_signal = 0;
        if (ecl_get_option(ECL_OPT_TRAP_INTERRUPT_SIGNAL)) {
                interrupt_signal = ecl_get_option(ECL_OPT_THREAD_INTERRUPT_SIGNAL);
        }
        /*
         * We wait here for all signals that are blocked in all other
         * threads. It would be desirable to be able to wait for _all_
         * signals, but this can not be done for SIGFPE, SIGSEGV, etc.
         */
        pthread_sigmask(SIG_SETMASK, NULL, &handled_set);
        /*
         * Under OS X we also have to explicitely add the signal we
         * use to communicate process interrupts. For some unknown
         * reason those signals may get lost.
         */
        if (interrupt_signal) {
                sigaddset(&handled_set, interrupt_signal);
                pthread_sigmask(SIG_SETMASK, &handled_set, NULL);
        }
        CL_CATCH_ALL_BEGIN(ecl_process_env()) {
        for (;;) {
                /* Waiting may fail! */
                int status = sigwait(&handled_set, &signo);
                if (status == 0) {
                        if (interrupt_signal == signo)
                                goto RETURN;
                        signal_code = call_handler(lisp_signal_handler, signo,
                                                   NULL, NULL);
                        if (!Null(signal_code)) {
                                mp_process_run_function(3, @'si::handle-signal',
                                                        @'si::handle-signal',
                                                        signal_code);
                        }
                }
        }
        } CL_CATCH_ALL_END;
 RETURN:
        @(return)
}
#endif



Christoph Egger <christoph at debian.org> writes:
> Package: src:ecl
> Version: 11.1.1+dfsg1-1
> Severity: serious
> Tags: sid wheezy
> User: debian-bsd at lists.debian.org
> Usertags: kfreebsd
> X-Debbugs-Cc: debian-bsd at lists.debian.org
> Justification: fails to build from source (but built successfully in the past)
>
> Hi!
>
> ECL build hangs early in ecl_min compile. It can be made going further
> by pressing C-c repeatedly. I'm open for any -bsd hints!
>
>> head -8 config.log | tail -6 >> build-stamp
>> cp /home/christoph/debian/ecl-stable/src/../contrib/unicode/ucd.dat .
>> 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
>
>
> (gdb) bt full
> #0  0x0000000801651d51 in sigsuspend () at ../sysdeps/unix/syscall-template.S:82
> No locals.
> #1  0x0000000800f865a7 in __pthread_sigwait (set=0x801b6bd40, sig=<optimized out>) at signals.c:184
>         self = 0x718660
>         mask = {{__sigbits = {4294967293, 4294967294, 4294967263, 4294967295}, __bits = {4294967293, 
>               4294967294, 4294967263, 4294967295}}}
>         s = 129
>         jmpbuf = {{__jmpbuf = {129, 2203319721905204293, 34388491584, 34388491472, 34388491440, 
>               34388491452, 2203318780326947909, 2203316146205862981}, __mask_was_saved = 1, __saved_mask = {
>               {__sigbits = {2147483650, 0, 32, 0}, __bits = {2147483650, 0, 32, 0}}}}}
>         sa = {__sigaction_handler = {sa_handler = 0x800f88d50 <__pthread_null_sighandler>, 
>             sa_sigaction = 0x800f88d50 <__pthread_null_sighandler>}, sa_flags = 0, sa_mask = {{__sigbits = {
>                 4294967295, 4294967295, 4294967295, 4294967295}, __bits = {4294967295, 4294967295, 
>                 4294967295, 4294967295}}}}
> #2  0x00000000004598ef in asynchronous_signal_servicing_thread ()
>     at /home/christoph/debian/ecl-stable/src/c/unixint.d:917
>         status = <optimized out>
>         __the_env = 0x8006df000
>         handled_set = {{__sigbits = {2147483650, 0, 32, 0}, __bits = {2147483650, 0, 32, 0}}}
>         signal_code = <optimized out>
>         signo = 0
>         interrupt_signal = <optimized out>
> #3  0x0000000000411517 in cl_apply (narg=<optimized out>, fun=0x73f880, lastarg=<optimized out>)
>     at /home/christoph/debian/ecl-stable/src/c/eval.d:163
>         out = <optimized out>
>         i = <optimized out>
>         frame_aux = {t = 33 '!', m = -32 '\340', padding1 = -11 '\365', padding2 = 0 '\000', 
>           stack = 0xdcb000, base = 0xdcb008, size = 0, env = 0x8006df000}
>         frame = 0x801b6bda0
>         the_env = <optimized out>
>         args = {{args = {{gp_offset = 24, fp_offset = 48, overflow_arg_area = 0x801b6beb0, 
>                 reg_save_area = 0x801b6bdd0}}, sp = 0x0, narg = 0}}
> #4  0x0000000000469e74 in thread_entry_point (arg=0x7056c0)
>     at /home/christoph/debian/ecl-stable/src/c/threads/process.d:179
>         __the_env = 0x8006df000
>         _buffer = {__routine = 0x469fb0 <thread_cleanup>, __arg = 0x7056c0, __canceltype = 4627632, 
>           __prev = 0x801b6bf20}
>         process = 0x7056c0
>         env = 0x8006df000
> #5  0x0000000800d54729 in GC_inner_start_routine () from /usr/lib/libgc.so.1
> No symbol table info available.
> #6  0x0000000800d50348 in GC_call_with_stack_base () from /usr/lib/libgc.so.1
> No symbol table info available.
> #7  0x0000000800f83c4a in pthread_start_thread (arg=<optimized out>) at manager.c:317
>         self = 0x718660
>         request = {req_thread = 0x0, req_kind = REQ_CREATE, req_args = {create = {attr = 0x0, fn = 0, 
>               arg = 0x0, mask = {{__sigbits = {0, 0, 0, 0}, __bits = {0, 0, 0, 0}}}}, free = {
>               thread_id = 0}, exit = {code = 0}, post = 0x0, for_each = {fn = 0, arg = 0x0}}}
>         outcome = <optimized out>
> #8  0x0000000000000000 in ?? ()
> No symbol table info available.
> (gdb) info threads
>   Id   Target Id         Frame 
> * 1    process 15107     0x0000000801651d51 in sigsuspend () at ../sysdeps/unix/syscall-template.S:82
>
>
> Regards
>
>     Christoph

-- 



Reply to: