Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: coredump on C-c

On Thu, Sep 26, 2013 at 5:31 PM, Bart Schaefer
<schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Thu, Sep 26, 2013 at 10:52 AM, Eitan Adler <lists@xxxxxxxxxxxxxx> wrote:

> ... we should be queuing signals.  zfree() does it internally, but that's
> not enough to stop corruption in freeparamnode() if the signal arrives
> before all the parts of the node are cleaned p, and we probably ought to be
> queuing signals around the entire "free all the nodes" loop in
> resizehashtable().

I'm hoping to prod about this again, this time with a slightly
different backtrace.

gdb$ bt
#0  0x0000000000493e05 in wait_for_processes () at signals.c:474
#1  0x0000000000493859 in zhandler (sig=0x14) at signals.c:592
#2  0x000000000045ed67 in zfree (p=0x989208, sz=0x0) at mem.c:1481
#3  0x000000000046159a in free (p=0x989208) at mem.c:1487
#4  0x0000000000421bf0 in execrestore () at exec.c:5108
#5  0x0000000000495a28 in dotrapargs (sig=0x2, sigtr=0x8b9778
<sigtrapped+8>, sigfn=0x985ef8) at signals.c:1246
#6  0x0000000000495d23 in dotrap (sig=0x2) at signals.c:1312
#7  0x00000000004943d8 in handletrap (sig=0x2) at signals.c:1060
#8  0x000000000049389b in zhandler (sig=0x2) at signals.c:603
#9  0x000000000044c29c in waitforpid (pid=0xef7d, wait_cmd=0x0) at jobs.c:1291
#10 0x000000000041e9de in getoutput (cmd=0x8008e53fc "__vcs_dir",
qt=0x1) at exec.c:3741
#11 0x0000000000498372 in stringsubst (list=0x7fffffffcfb8,
node=0x7fffffffcfa0, pf_flags=0x4, asssub=0x0) at subst.c:293
#12 0x0000000000497483 in prefork (list=0x7fffffffcfb8, flags=0x6) at subst.c:77
#13 0x0000000000426756 in addvars (state=0x7fffffffd170, pc=0x930468,
addflags=0x0) at exec.c:2199
#14 0x000000000041cd63 in execsimple (state=0x7fffffffd170) at exec.c:1097
#15 0x000000000041c334 in execlist (state=0x7fffffffd170,
dont_change_job=0x1, exiting=0x0) at exec.c:1216
#16 0x000000000041bf07 in execode (p=0x8c6930, dont_change_job=0x1,
exiting=0x0, context=0x62546e "shfunc") at exec.c:1057
#17 0x0000000000421845 in runshfunc (prog=0x8c6930, wrap=0x0,
name=0x8008e50b0 "setCurrentPS1") at exec.c:4849
#18 0x0000000000421438 in doshfunc (shfunc=0x8c6968, doshargs=0x0,
noreturnval=0x1) at exec.c:4742
#19 0x00000000004aaffa in callhookfunc (name=0x62eb2a "precmd",
lnklst=0x0, arrayp=0x1, retval=0x0) at utils.c:1265
#20 0x00000000004ab34e in preprompt () at utils.c:1326
#21 0x0000000000442b97 in loop (toplevel=0x1, justonce=0x0) at init.c:121
#22 0x000000000044778d in zsh_main (argc=0x1, argv=0x7fffffffd6d8) at
#23 0x0000000000400412 in main (argc=0x1, argv=0x7fffffffd6d8) at ./main.c:93

gdb$ info registers
rax            0x700    0x700
rbx            0x0      0x0
rcx            0x98a4a8 0x98a4a8
rdx            0xffffffffffffffff       0xffffffffffffffff
rsi            0x7fffffffc718   0x7fffffffc718
rdi            0xffffffff       0xffffffff
rbp            0x7fffffffc720   0x7fffffffc720
rsp            0x7fffffffc630   0x7fffffffc630
r8             0xffffffff8154e928       0xffffffff8154e928
r9             0xfffffe0231bc1868       0xfffffe0231bc1868
r10            0x7fffffffc650   0x7fffffffc650
r11            0x203    0x203
r12            0x7fffffffd6d8   0x7fffffffd6d8
r13            0x0      0x0
r14            0x1      0x1
r15            0x7fffffffd6e8   0x7fffffffd6e8
rip            0x493e05 0x493e05 <wait_for_processes+309>
eflags         0x10202  [ IF RF ]
cs             0x43     0x43
ss             0x3b     0x3b
ds             *value not available*
es             *value not available*
fs             *value not available*
gs             *value not available*

I don't know zsh internals quite well, but I'm willing to provide
debugging information as well as test patches.

Eitan Adler

Messages sorted by: Reverse Date, Date, Thread, Author