Something strange is happening here. When I try to build zsh with "apt-get source -b zsh" in an xterm, during the tests zsh rapidly prints the following messages over and over until it is killed: ,---- | (eval):4: write error: inappropriate ioctl for device | (eval):print:4: write error: broken pipe `---- These are the final messages after I killed the runaway zsh process: ,---- | (eval):4: write error: inappropriate ioctl for device | (eval):print:4: write error: broken pipe | Was testing: Bug regression: piping to anonymous function; piping to backround function | ../../Test/A05execution.ztst: test failed. | The following may (or may not) help identifying the cause: | This test checks for two different bugs, a parser segfault piping to an | anonymous function, and a descriptor leak when backgrounding a pipeline | Makefile:187: recipe for target 'check' failed | make[2]: *** [check] Interrupt | Makefile:263: recipe for target 'test' failed | make[1]: *** [test] Interrupt | dh_auto_test: make -j2 test VERBOSE=1 died with signal 2 | debian/rules:52: recipe for target 'build-arch' failed | make: *** [build-arch] Interrupt | dpkg-buildpackage: error: debian/rules build died from signal 2 | E: Build command 'cd zsh-5.3.1 && dpkg-buildpackage -b -uc' failed. `---- Note that this problem does _not_ manifest itself when running dpkg-buildpackage -b directly instead of under apt-get's control.
By piping the output through tee(1) I could capture the messages before
the endless loop and saw this test failure:
,----
| Running test: Bug regression: piping to anonymous function; piping to backround function
| Pattern match failed:
| <\[<->\] <-> <->
| >[7] 10380 10381
| >[7] + 10380 running ( while :; do; print "This is a line"; done; ) |
| > 10381 done () { ... }
| Test ../../Test/A05execution.ztst failed: output differs from expected as shown above for:
| { setopt MONITOR } 2>/dev/null
| if [[ -o MONITOR ]]
| then
| ( while :; do print "This is a line"; done ) | () : &
| sleep 1
| jobs -l
| else
| print -u $ZTST_fd "Skipping pipe leak test, requires MONITOR option"
| print "[0] 0 0"
| fi
| Error output:
| (eval):print:4: write error: broken pipe
| (eval):4: write error: inappropriate ioctl for device
`----
Cheers,
Sven
Hi Sven, thanks for the bug report. Sven Joachim wrote: When I tried it with the soon to be uploaded zsh 5.4.2-3 (via https://jenkins.grml.org/debian), I couldn't see these messages, but ... ... I still had a runaway zsh process started by the test suite which filled up my /tmp/ rather quickly: Excerpt from lsof output: → lsof | fgrep deleted | fgrep /tmp zsh 12242 abe cwd DIR 0,39 40 153609225 /tmp/zsh-867614/zsh-5.4.2/obj/Test/command.tmp (deleted) zsh 12242 abe txt REG 0,39 3108064 153599609 /tmp/zsh-867614/zsh-5.4.2/obj/Src/zsh (deleted) zsh 12242 abe 0r REG 0,39 0 153617200 /tmp/zsh.ztst.5904/ztst.in (deleted) zsh 12242 abe 2w REG 0,39 2659778560 153608419 /tmp/zsh.ztst.5904/ztst.terr (deleted) ^^^^^^^^^^ = 2.5 GB! → ps auxwww | fgrep 12242 abe 12242 99.8 0.0 35324 3020 pts/15 RN 16:02 6:55 ../Src/zsh +Z -f ../../Test/ztst.zsh ../../Test/A05execution.ztst Since the log file already has been deleted, I couldn't (easily) look into it, but I assume it has been filled with similar messages. I can confirm that. Regards, Axel