zsh-workers
 help / color / mirror / code / Atom feed
* Zsh 5.0.8 crash
@ 2015-06-27 18:23 Germán M. Bravo
  2015-06-27 18:53 ` Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: Germán M. Bravo @ 2015-06-27 18:23 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 9149 bytes --]

Any idea what this can be?

When I activate the rsync prezto module under a FreeBSD 10.1 jail, I get a
core dump with the following backtrace:

GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-marcel-freebsd"...
Core was generated by `zsh'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libncursesw.so.8...done.
Loaded symbols for /lib/libncursesw.so.8
Reading symbols from /lib/libm.so.5...done.
Loaded symbols for /lib/libm.so.5
Reading symbols from /lib/libc.so.7...done.
Loaded symbols for /lib/libc.so.7
Reading symbols from /usr/local/lib/zsh/5.0.8/zsh/parameter.so...done.
Loaded symbols for /usr/local/lib/zsh/5.0.8/zsh/parameter.so
Reading symbols from /usr/local/lib/zsh/5.0.8/zsh/zle.so...done.
Loaded symbols for /usr/local/lib/zsh/5.0.8/zsh/zle.so
Reading symbols from /usr/local/lib/zsh/5.0.8/zsh/complete.so...done.
Loaded symbols for /usr/local/lib/zsh/5.0.8/zsh/complete.so
Reading symbols from /usr/local/lib/zsh/5.0.8/zsh/zutil.so...done.
Loaded symbols for /usr/local/lib/zsh/5.0.8/zsh/zutil.so
Reading symbols from /usr/local/lib/zsh/5.0.8/zsh/terminfo.so...done.
Loaded symbols for /usr/local/lib/zsh/5.0.8/zsh/terminfo.so
Reading symbols from /usr/local/lib/zsh/5.0.8/zsh/zleparameter.so...done.
Loaded symbols for /usr/local/lib/zsh/5.0.8/zsh/zleparameter.so
Reading symbols from /libexec/ld-elf.so.1...done.
Loaded symbols for /libexec/ld-elf.so.1
#0  0x000000000042f67c in untokenize (s=0x0) at exec.c:1825
1825    if (*s) {
(gdb) bt
#0  0x000000000042f67c in untokenize (s=0x0) at exec.c:1825
#1  0x00000000004bd155 in mb_niceformat (s=0x0, stream=0x8010fdcf0,
outstrp=0x0, heap=0) at utils.c:4702
#2  0x00000000004bcaa3 in zerrmsg (file=0x8010fdcf0, fmt=0x4d0056 ", %e",
ap=0x7fffffff8680) at utils.c:306
#3  0x00000000004bc1ee in zwarning (cmd=0x0, fmt=0x4d0037 "failed to create
named pipe: %s, %e", ap=0x7fffffff8680) at utils.c:155
#4  0x00000000004bbfec in zerr (fmt=0x4d0037 "failed to create named pipe:
%s, %e") at utils.c:175
#5  0x0000000000431a5b in namedpipe () at exec.c:4141
#6  0x000000000043184e in getproc (cmd=0x8007313a0 "\224\210rsync --help
2>&1\212", eptr=0x7fffffff8810) at exec.c:4170
#7  0x00000000004aca58 in stringsubst (list=0x8007312e0, node=0x800731358,
pf_flags=0, asssub=0) at subst.c:166
#8  0x00000000004ac243 in prefork (list=0x8007312e0, flags=0) at subst.c:77
#9  0x0000000000434c07 in execcmd (state=0x7fffffff9bd0, input=0, output=0,
how=18, last1=2) at exec.c:2661
#10 0x0000000000433a68 in execpline2 (state=0x7fffffff9bd0, pcode=1283,
how=18, input=0, output=0, last1=0) at exec.c:1717
#11 0x000000000042e9ce in execpline (state=0x7fffffff9bd0, slcode=7170,
how=18, last1=0) at exec.c:1500
#12 0x000000000042dd3f in execlist (state=0x7fffffff9bd0,
dont_change_job=1, exiting=0) at exec.c:1276
#13 0x000000000046c7e2 in execif (state=0x7fffffff9bd0, do_exec=0) at
loop.c:514
#14 0x0000000000437b12 in execcmd (state=0x7fffffff9bd0, input=0, output=0,
how=18, last1=2) at exec.c:3405
#15 0x0000000000433a68 in execpline2 (state=0x7fffffff9bd0, pcode=1283,
how=18, input=0, output=0, last1=0) at exec.c:1717
#16 0x000000000042e9ce in execpline (state=0x7fffffff9bd0, slcode=18434,
how=18, last1=0) at exec.c:1500
#17 0x000000000042dd3f in execlist (state=0x7fffffff9bd0,
dont_change_job=0, exiting=0) at exec.c:1276
#18 0x000000000042d6a7 in execode (p=0x8007311e0, dont_change_job=0,
exiting=0, context=0x4cff2f "file") at exec.c:1074
#19 0x0000000000456b59 in loop (toplevel=0, justonce=0) at init.c:207
#20 0x0000000000459712 in source (s=0x8018aafd0
"/home/kronuz/.zprezto/modules/rsync/init.zsh") at init.c:1371
#21 0x00000000004243a4 in bin_dot (name=0x800730c10 "source",
argv=0x800730cd0, ops=0x7fffffff9f30, func=0) at builtin.c:5060
#22 0x0000000000411770 in execbuiltin (args=0x800730bc8, bn=0x6e6c50) at
builtin.c:450
#23 0x0000000000437d67 in execcmd (state=0x7fffffffc5c0, input=0, output=0,
how=18, last1=2) at exec.c:3461
#24 0x0000000000433a68 in execpline2 (state=0x7fffffffc5c0, pcode=2115,
how=18, input=0, output=0, last1=0) at exec.c:1717
#25 0x000000000042e9ce in execpline (state=0x7fffffffc5c0, slcode=4098,
how=18, last1=0) at exec.c:1500
#26 0x000000000042dd3f in execlist (state=0x7fffffffc5c0,
dont_change_job=1, exiting=0) at exec.c:1276
#27 0x000000000046c8d4 in execif (state=0x7fffffffc5c0, do_exec=0) at
loop.c:530
#28 0x0000000000437b12 in execcmd (state=0x7fffffffc5c0, input=0, output=0,
how=2, last1=2) at exec.c:3405
#29 0x0000000000433a68 in execpline2 (state=0x7fffffffc5c0, pcode=2051,
how=2, input=0, output=0, last1=0) at exec.c:1717
#30 0x000000000042e9ce in execpline (state=0x7fffffffc5c0, slcode=13314,
how=2, last1=0) at exec.c:1500
#31 0x000000000042dd3f in execlist (state=0x7fffffffc5c0,
dont_change_job=1, exiting=0) at exec.c:1276
#32 0x000000000046c8d4 in execif (state=0x7fffffffc5c0, do_exec=0) at
loop.c:530
#33 0x0000000000437b12 in execcmd (state=0x7fffffffc5c0, input=0, output=0,
how=18, last1=2) at exec.c:3405
#34 0x0000000000433a68 in execpline2 (state=0x7fffffffc5c0, pcode=1667,
how=18, input=0, output=0, last1=0) at exec.c:1717
#35 0x000000000042e9ce in execpline (state=0x7fffffffc5c0, slcode=125954,
how=18, last1=0) at exec.c:1500
#36 0x000000000042dd3f in execlist (state=0x7fffffffc5c0,
dont_change_job=1, exiting=0) at exec.c:1276
#37 0x000000000046b5df in execfor (state=0x7fffffffc5c0, do_exec=0) at
loop.c:167
#38 0x0000000000437b12 in execcmd (state=0x7fffffffc5c0, input=0, output=0,
how=18, last1=2) at exec.c:3405
#39 0x0000000000433a68 in execpline2 (state=0x7fffffffc5c0, pcode=1603,
how=18, input=0, output=0, last1=0) at exec.c:1717
#40 0x000000000042e9ce in execpline (state=0x7fffffffc5c0, slcode=134146,
how=18, last1=0) at exec.c:1500
#41 0x000000000042dd3f in execlist (state=0x7fffffffc5c0,
dont_change_job=1, exiting=0) at exec.c:1276
#42 0x000000000042d6a7 in execode (p=0x801908080, dont_change_job=1,
exiting=0, context=0x4cffad "shfunc") at exec.c:1074
#43 0x0000000000433445 in runshfunc (prog=0x801908080, wrap=0x0,
name=0x80072bfa8 "pmodload") at exec.c:5167
#44 0x0000000000432f94 in doshfunc (shfunc=0x801908180,
doshargs=0x80072bce8, noreturnval=0) at exec.c:5037
#45 0x000000000043b192 in execshfunc (shf=0x801908180, args=0x80072bce8) at
exec.c:4669
#46 0x0000000000437d38 in execcmd (state=0x7fffffffd210, input=0, output=0,
how=18, last1=2) at exec.c:3456
#47 0x0000000000433a68 in execpline2 (state=0x7fffffffd210, pcode=7235,
how=18, input=0, output=0, last1=0) at exec.c:1717
#48 0x000000000042e9ce in execpline (state=0x7fffffffd210, slcode=4098,
how=18, last1=0) at exec.c:1500
  9 0x000000000042dd3f in execlist (state=0x7fffffffd210,
dont_change_job=0, exiting=0) at exec.c:1276
#50 0x000000000042d6a7 in execode (p=0x80072bc60, dont_change_job=0,
exiting=0, context=0x4cff2f "file") at exec.c:1074
#51 0x0000000000456b59 in loop (toplevel=0, justonce=0) at init.c:207
#52 0x0000000000459712 in source (s=0x801907820
"/home/kronuz/.zprezto/init.zsh") at init.c:1371
#53 0x00000000004243a4 in bin_dot (name=0x80072ba90 "source",
argv=0x80072bb00, ops=0x7fffffffd570, func=0) at builtin.c:5060
#54 0x0000000000411770 in execbuiltin (args=0x80072ba48, bn=0x6e6c50) at
builtin.c:450
#55 0x0000000000437d67 in execcmd (state=0x7fffffffe8a0, input=0, output=0,
how=18, last1=2) at exec.c:3461
---Type <return> to continue, or q <return> to quit---
#56 0x0000000000433a68 in execpline2 (state=0x7fffffffe8a0, pcode=707,
how=18, input=0, output=0, last1=0) at exec.c:1717
#57 0x000000000042e9ce in execpline (state=0x7fffffffe8a0, slcode=4098,
how=18, last1=0) at exec.c:1500
#58 0x000000000042dd3f in execlist (state=0x7fffffffe8a0,
dont_change_job=1, exiting=0) at exec.c:1276
#59 0x000000000046c8d4 in execif (state=0x7fffffffe8a0, do_exec=0) at
loop.c:530
#60 0x0000000000437b12 in execcmd (state=0x7fffffffe8a0, input=0, output=0,
how=18, last1=2) at exec.c:3405
#61 0x0000000000433a68 in execpline2 (state=0x7fffffffe8a0, pcode=643,
how=18, input=0, output=0, last1=0) at exec.c:1717
#62 0x000000000042e9ce in execpline (state=0x7fffffffe8a0, slcode=13314,
how=18, last1=0) at exec.c:1500
#63 0x000000000042dd3f in execlist (state=0x7fffffffe8a0,
dont_change_job=0, exiting=0) at exec.c:1276
#64 0x000000000042d6a7 in execode (p=0x80072b920, dont_change_job=0,
exiting=0, context=0x4cff2f "file") at exec.c:1074
#65 0x0000000000456b59 in loop (toplevel=0, justonce=0) at init.c:207
#66 0x0000000000459712 in source (s=0x80072b638 "/home/kronuz/.zshrc") at
init.c:1371
#67 0x0000000000459ac9 in sourcehome (s=0x4d1d48 ".zshrc") at init.c:1439
#68 0x00000000004592d5 in run_init_scripts () at init.c:1245
#69 0x000000000045ad53 in zsh_main (argc=1, argv=0x7fffffffec38) at
init.c:1658
#70 0x0000000000410a02 in main (argc=1, argv=0x7fffffffec38) at main.c:93
Current language:  auto; currently minimal
(gdb)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Zsh 5.0.8 crash
  2015-06-27 18:23 Zsh 5.0.8 crash Germán M. Bravo
@ 2015-06-27 18:53 ` Bart Schaefer
  0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2015-06-27 18:53 UTC (permalink / raw)
  To: zsh-workers

On Jun 27,  1:23pm, German M. Bravo wrote:
} 
} Any idea what this can be?

It probably has something to do with this:

#4  0x00000000004bbfec in zerr (fmt=0x4d0037 "failed to create named pipe: %s, %e") at utils.c:175

The jail is presumably preventing creation of the temporary file for the
named pipe, which is causing the mktemp() library function to return NULL,
which namedpipe() is not prepared to handle.

FreeBSD documents a whole lot of cases where mktemp() can fail which are
not so documented on e.g. Linux.

In any case, the module is not going to work properly in the jail even
with the patch below.  You're going to need to reconfigure the jail to
allow file creation in /tmp (or possibly just change $TMPPREFIX in the
zsh environment).

diff --git a/Src/exec.c b/Src/exec.c
index 50a11eb..39d1326 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -4277,6 +4277,10 @@ namedpipe(void)
 {
     char *tnam = gettempname(NULL, 1);
 
+    if (!tnam) {
+	zerr("failed to create named pipe: %e", errno);
+	return NULL;
+    }
 # ifdef HAVE_MKFIFO
     if (mkfifo(tnam, 0600) < 0){
 # else


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-06-27 18:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-27 18:23 Zsh 5.0.8 crash Germán M. Bravo
2015-06-27 18:53 ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).