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

Re: Modules on HP-UX (Re: D07multibyte.ztst failure on HP-UX 11.11)



On May 8,  9:34am, Peter Stephenson wrote:
} Subject: Re: Modules on HP-UX (Re: D07multibyte.ztst failure on HP-UX 11.1
}
} On Thu, 07 May 2009 16:30:27 -0700
} Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
} > schaefer<501> zmodload -u $(zmodload)
} > zmodload: module zsh/complete is in use by another module and cannot be unloaded
} > zmodload: module zsh/zle is in use by another module and cannot be unloaded
} > schaefer<502> zmodload -u $(zmodload)
} > Program received signal SIGSEGV, Segmentation fault.
} > 0x081284c7 in resetvideo () at ../../../zsh-4.0/Src/Zle/zle_refresh.c:739
} > 739             if (nbuf[ln]) {
} 
} Does this help?

It moves the segfault somewhere else, at least; now it craps out when
referencing the value of $COLUMNS in my precmd.  (Read more below the
stack trace.)

(gdb) where
#0  0x00462ed0 in _int_malloc () from /lib/tls/libc.so.6
#1  0x00464aa1 in malloc () from /lib/tls/libc.so.6
#2  0x0808ee3d in zshcalloc (size=48) at ../../zsh-4.0/Src/mem.c:601
#3  0x080973fb in createparam (name=0xb7cd63d8 "colno", flags=2097152)
    at ../../zsh-4.0/Src/params.c:841
#4  0x08052923 in typeset_single (cname=0xb7cd63a8 "local", 
    pname=0xb7cd63d8 "colno", pm=0x0, func=0, on=2097152, off=0, roff=0, 
    value=0x0, altpm=0x0, ops=0xbff46650, joinchar=0)
    at ../../zsh-4.0/Src/builtin.c:2168
#5  0x0805429d in bin_typeset (name=0xb7cd63a8 "local", argv=0xbff465fc, 
    ops=0xbff46650, func=0) at ../../zsh-4.0/Src/builtin.c:2521
#6  0x0804d5b7 in execbuiltin (args=0xb7cd6360, bn=0x8153b7c)
    at ../../zsh-4.0/Src/builtin.c:439
#7  0x080679fa in execcmd (state=0xbff46e70, input=0, output=0, how=2, last1=2)
    at ../../zsh-4.0/Src/exec.c:3067
#8  0x08063975 in execpline2 (state=0xbff46e70, pcode=195, how=2, input=0, 
    output=0, last1=0) at ../../zsh-4.0/Src/exec.c:1561
#9  0x08062d76 in execpline (state=0xbff46e70, slcode=7170, how=2, last1=0)
    at ../../zsh-4.0/Src/exec.c:1347
#10 0x080626d4 in execlist (state=0xbff46e70, dont_change_job=1, exiting=0)
    at ../../zsh-4.0/Src/exec.c:1144
#11 0x0806219f in execode (p=0x837e470, dont_change_job=1, exiting=0)
    at ../../zsh-4.0/Src/exec.c:975
#12 0x0806a6bf in runshfunc (prog=0x837e470, wrap=0x0, 
    name=0xb7cd6268 "prompt_bart_precmd") at ../../zsh-4.0/Src/exec.c:4459
#13 0x0806a410 in doshfunc (shfunc=0x837b9a8, doshargs=0x0, noreturnval=1)
    at ../../zsh-4.0/Src/exec.c:4353
#14 0x080be2c3 in callhookfunc (name=0x814796f "precmd", lnklst=0x0, arrayp=1, 
    retval=0x0) at ../../zsh-4.0/Src/utils.c:1184
#15 0x080be425 in preprompt () at ../../zsh-4.0/Src/utils.c:1237
#16 0x0807b006 in loop (toplevel=1, justonce=0) at ../../zsh-4.0/Src/init.c:120
#17 0x0807e001 in zsh_main (argc=1, argv=0xbff47304)
    at ../../zsh-4.0/Src/init.c:1409
#18 0x0804cbea in main (argc=1, argv=0xbff47304) at ../../zsh-4.0/Src/main.c:93

If I turn off the precmd, it dies as soon as I type anything other than
a newline or a history motion at the prompt.  (Still more after this next
stack trace.)

(gdb) where
#0  0x00462ed0 in _int_malloc () from /lib/tls/libc.so.6
#1  0x00464aa1 in malloc () from /lib/tls/libc.so.6
#2  0x0808eccb in zalloc (size=44) at ../../zsh-4.0/Src/mem.c:583
#3  0x0813654f in mkundoent () at ../../../zsh-4.0/Src/Zle/zle_utils.c:1072
#4  0x0813633a in handleundo () at ../../../zsh-4.0/Src/Zle/zle_utils.c:1029
#5  0x0812078d in zlecore () at ../../../zsh-4.0/Src/Zle/zle_main.c:1061
#6  0x08120cb7 in zleread (lp=0x816c9b0, rp=0x0, flags=3, context=0)
    at ../../../zsh-4.0/Src/Zle/zle_main.c:1213
#7  0x08122a48 in zle_main_entry (cmd=1, ap=0xbfe63154 "`1æ¿")
    at ../../../zsh-4.0/Src/Zle/zle_main.c:1866
#8  0x0807dcd0 in zleentry (cmd=1) at ../../zsh-4.0/Src/init.c:1258
#9  0x0807e503 in inputline () at ../../zsh-4.0/Src/input.c:278
#10 0x0807e3b8 in ingetc () at ../../zsh-4.0/Src/input.c:214
#11 0x0807446e in ihgetc () at ../../zsh-4.0/Src/hist.c:263
#12 0x08085c2d in gettok () at ../../zsh-4.0/Src/lex.c:677
#13 0x0808550d in zshlex () at ../../zsh-4.0/Src/lex.c:364
#14 0x080a0140 in parse_event () at ../../zsh-4.0/Src/parse.c:451
#15 0x0807b049 in loop (toplevel=1, justonce=0) at ../../zsh-4.0/Src/init.c:131
#16 0x0807e001 in zsh_main (argc=1, argv=0xbfe63334)
    at ../../zsh-4.0/Src/init.c:1409
#17 0x0804cbea in main (argc=1, argv=0xbfe63334) at ../../zsh-4.0/Src/main.c:93

So I tried something slightly different:

% zmodload -u $(zmodload)
zmodload: module zsh/complete is in use by another module and cannot be
unloaded
zmodload: module zsh/zle is in use by another module and cannot be unloaded
% zmodload -u $(zmodload); zmodload
% zmodload                         
zsh/compctl
zsh/complete
zsh/zle
%  

Note that after the second zmodload -u, all modules really are unloaded,
but as soon as the prompt is printed the zle-based modules all have now
been reloaded again.  It's at this point that it segfaults.  So really
it appears to be a problem with booting up again after unloading, not
with unloading in the first place.

-- 



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