[Ecls-list] [PATCH RESEND] Fix the value of the print-function depth parameter in defstruct.

Alexander Gavrilov angavrilov at gmail.com
Thu Oct 8 17:22:40 UTC 2009


> On Wed, Oct 7, 2009 at 12:09 PM, Alexander Gavrilov
> <angavrilov at gmail.com> wrote:
> > 1. What about :continue after having interrupted a thread?
> 
> It should work. :continue is just calling #'continue I have changed a
> couple of things now to make this work better.


> (mp:process-run-function 'foo (lambda () (loop)))
#<process FOO 0000000001063b40>
> (loop)
^C
;;; Suspending process #<process FOO 0000000001063b40>
;;; Suspending process #<process TOP-LEVEL 0000000001063f60>
Console interrupt

Available restarts:

1. (CONTINUE) CONTINUE
2. (INTERRUPT-PROCESS) Interrupt a certain process.

Broken at NIL. In: #<process SI:HANDLE-SIGNAL 0000000001063ea0>.
>> :r2

(#<process FOO 0000000001063b40> #<process SI:TOP-LEVEL 0000000001063f60>)
Choose the integer code of process to interrupt.
Use special code 0 to cancel this operation.
   1: #<process FOO 0000000001063b40>
   2: #<process SI:TOP-LEVEL 0000000001063f60>
>> 2

Console interrupt

Available restarts:

1. (RESTART-TOPLEVEL) Go back to Top-Level REPL.

Broken at SI:BYTECODES. [Evaluation of: (LOOP)] In: #<process SI:TOP-LEVEL 0000000001063f60>.
>> :continue

NIL
>>

-- CPU load shows that only one thread is running at this moment


> > 2. The second Ctrl-C kills the interpreter in most cases.
> 
> Yes, somehow the POSIX sigmaks was returned to a value in which
> signals were not filtered.
> 

Pressing Ctrl-C when the system is waiting for input,
e.g. immediately after the prompt appears, crashes
with a new stack trace:


Program terminated with signal 6, Aborted.                    
#0  0x00000039268332f5 in raise () from /lib64/libc.so.6
#1  0x0000003926834b20 in abort () from /lib64/libc.so.6
#2  0x00007ff8ff1c70ed in ecl_internal_error (s=0x7ff8ff2438f7 "Cannot grow stack size.")
    at /home/sasha/SysAdm/ProgramAdm/ecl/src/c/error.d:41                                
#3  0x00007ff8ff1eb9ac in ecl_cs_overflow () at /home/sasha/SysAdm/ProgramAdm/ecl/src/c/stacks.d:67
#4  0x00007ff8ff100b29 in si_of_class_p (narg=2, V1=0x7ff8ff495c60, V2=0x7ff8ff486180)
    at /home/sasha/SysAdm/ProgramAdm/ecl/build/lsp/predlib.c:1728
#5  0x00007ff8ff186c3c in L21coerce_to_condition (V1=0x7ff8ff495c60, V2=0x3f9f011, V3=0x7ff8ff48c360, V4=0x7ff8ff487230)
    at /home/sasha/SysAdm/ProgramAdm/ecl/build/clos/conditions.c:1057
#6  0x00007ff8ff1890ed in L45universal_error_handler (V1=0x3f98780, V2=0x7ff8ff495c60, V3=0x3f9f011)
    at /home/sasha/SysAdm/ProgramAdm/ecl/build/clos/conditions.c:1596
#7  0x00007ff8ff1a597a in cl_funcall (narg=44794816, function=0x7ff8ff490920) at /home/sasha/SysAdm/ProgramAdm/ecl/src/c/eval.d:128
#8  0x00007ff8ff1c6d05 in cl_cerror (narg=<value optimized out>, cformat=0x3f98780, eformat=0x7ff8ff495c60)
    at /home/sasha/SysAdm/ProgramAdm/ecl/src/c/error.d:320
#9  0x00007ff8ff1eb980 in ecl_cs_overflow () at /home/sasha/SysAdm/ProgramAdm/ecl/src/c/stacks.d:68
#10 0x00007ff8ff100b29 in si_of_class_p (narg=2, V1=0x7ff8ff495c60, V2=0x7ff8ff486180)
    at /home/sasha/SysAdm/ProgramAdm/ecl/build/lsp/predlib.c:1728
#11 0x00007ff8ff186c3c in L21coerce_to_condition (V1=0x7ff8ff495c60, V2=0x3f9f071, V3=0x7ff8ff48c360, V4=0x7ff8ff487230)
    at /home/sasha/SysAdm/ProgramAdm/ecl/build/clos/conditions.c:1057
#12 0x00007ff8ff1890ed in L45universal_error_handler (V1=0x3f987b0, V2=0x7ff8ff495c60, V3=0x3f9f071)
    at /home/sasha/SysAdm/ProgramAdm/ecl/build/clos/conditions.c:1596
#13 0x00007ff8ff1a597a in cl_funcall (narg=44795920, function=0x7ff8ff490920) at /home/sasha/SysAdm/ProgramAdm/ecl/src/c/eval.d:128
#14 0x00007ff8ff1c6d05 in cl_cerror (narg=<value optimized out>, cformat=0x3f987b0, eformat=0x7ff8ff495c60)
    at /home/sasha/SysAdm/ProgramAdm/ecl/src/c/error.d:320
#15 0x00007ff8ff1eb980 in ecl_cs_overflow () at /home/sasha/SysAdm/ProgramAdm/ecl/src/c/stacks.d:68
#16 0x00007ff8ff11886a in cl_constantly (narg=1, V1=0x7ff8ff483390) at /home/sasha/SysAdm/ProgramAdm/ecl/build/lsp/seqlib.c:3691
#17 0x00007ff8ff1889e2 in L4make_restart (narg=<value optimized out>) at /home/sasha/SysAdm/ProgramAdm/ecl/build/clos/conditions.c:161
#18 0x00007ff8ff1991ce in L12single_threaded_terminal_interrupt () at /home/sasha/SysAdm/ProgramAdm/ecl/build/clos/top.c:451
#19 0x00007ff8ff1a597a in cl_funcall (narg=1, function=0x3f2f240) at /home/sasha/SysAdm/ProgramAdm/ecl/src/c/eval.d:128
#20 0x00007ff8ff1ec778 in sigsegv_handler (sig=<value optimized out>, info=0x2ab8df0, aux=<value optimized out>)
    at /home/sasha/SysAdm/ProgramAdm/ecl/src/c/unixint.d:565
#21 <signal handler called>
#22 restartable_io_error (strm=0x2ac0b40) at /home/sasha/SysAdm/ProgramAdm/ecl/src/c/file.d:4899
#23 0x00007ff8ff1b4633 in io_file_read_byte8 (strm=0x2ac0b40, c=0x7fff36e93320 "", n=1)
    at /home/sasha/SysAdm/ProgramAdm/ecl/src/c/file.d:2561
#24 0x00007ff8ff1b778c in utf_8_decoder (stream=0x2ac0b40, read_byte8=0x7ff8ff1b45a0 <io_file_read_byte8>, source=0x2ac0b40)
    at /home/sasha/SysAdm/ProgramAdm/ecl/src/c/file.d:1068
#25 0x00007ff8ff1b30d5 in eformat_read_char (strm=0x0) at /home/sasha/SysAdm/ProgramAdm/ecl/src/c/file.d:587
#26 0x00007ff8ff1b83ad in generic_peek_char (strm=0x0) at /home/sasha/SysAdm/ProgramAdm/ecl/src/c/file.d:434
#27 0x00007ff8ff1bcbc1 in cl_peek_char (narg=4) at /home/sasha/SysAdm/ProgramAdm/ecl/src/c/read.d:1706
#28 0x00007ff8ff198cb0 in L26tpl_read () at /home/sasha/SysAdm/ProgramAdm/ecl/build/clos/top.c:1097
#29 0x00007ff8ff19b426 in LC19rep (narg=0) at /home/sasha/SysAdm/ProgramAdm/ecl/build/clos/top.c:915
#30 0x00007ff8ff19be48 in L24tpl (narg=0) at /home/sasha/SysAdm/ProgramAdm/ecl/build/clos/top.c:830
#31 0x00007ff8ff19c66d in L1top_level () at /home/sasha/SysAdm/ProgramAdm/ecl/build/clos/top.c:42
#32 0x00007ff8ff1a7b3f in ecl_interpret (frame=<value optimized out>, env=<value optimized out>, bytecodes=<value optimized out>)
    at /home/sasha/SysAdm/ProgramAdm/ecl/src/c/interpreter.d:461
#33 0x00007ff8ff1ab251 in si_eval_with_env (narg=1, form=<value optimized out>) at /home/sasha/SysAdm/ProgramAdm/ecl/src/c/compiler.d:2867
#34 0x00007ff8ff1993e1 in si_safe_eval (narg=3, V1=0x3f8f001, V2=0x1) at /home/sasha/SysAdm/ProgramAdm/ecl/build/clos/top.c:3537
#35 0x0000000000400909 in main (argc=<value optimized out>, argv=<value optimized out>) at /tmp/ECLINITRn1AdM.c:55


The same happens if I disable ext:*interrupt-lonely-threads-p*
and interrupt the thread manually.

Alexander




More information about the ecl-devel mailing list