Package: gnuplot Version: 4.4.0-1.1 Severity: normal gnuplot hangs on the following small script
plot x pause -1 set term post if the X11 window (default terminal wxt) is killed with xkill (or the X11 connection gets disconnected by other means ...). "Hangs" means being unresponsive to <RETURN> (e.g. end the pause command) or <Ctrl>-<C>. I have to use <Ctrl>-<Z> and kill %1 to terminate the process. The problem did not occur in 4.2.2-1.2 (wxt terminal). The problem does not happen with the x11 terminal (only tested 4.4.0-1.1). The problem still exists in 4.4.2 (the packaging of 4.4.0-1.1 worked without changes for 4.4.2, too). I also rebuilt gnuplot 4.2.2-1.2 on sid using libwxgtk2.8-dev instead of libwxgtk2.6-dev. The problem does not appear in this configuration, so it is not a wxgtk 2.6 vs. 2.8 issue. Andreas ---------- Following is the original report I wanted to send until I found a much simpler way to reproduce it. The details should still apply ... I use gnuplot w/ default wxt terminal often on remote hosts (accessed via ssh with X11 forwarding) inside screen (i.e. SCREEN(1)). Whenever I loose the connection to the remote machine (e.g. moving the notebook between home and office) while there is an X window open, the running gnuplot command (which is not affected by the disconnect because it is running inside screen) hangs. There is an error message about the lost X11 connection (as expected) and the gnuplot process is no longer responding to either <Return> or <Ctrl>-<C>. I have to <Ctrl>-<Z> it and kill %1 to terminate it. This was working much smoother in 4.2.x where this connection loss just worked like a closed window. Checking with strace shows that the process is hanging doing some futex(...) call. This is not neccessarily a problem in gnuplot, but could be in the WX libraries (2.6 vs. 2.8) as well. It is not a problem in X11 libraries - this I just verified by downgrading 4.4.0-1.1 to 4.2.2-1.2 while keeping everything else at the same same version and upgrading later on again. Package changes I did during the upgrade back to 4.4: before, i.e. removed: ii libwxbase2.6-0 2.6.3.2.2-3+lenny1 wxBase library (runtime) - ii libwxgtk2.6-0 2.6.3.2.2-3+lenny1 wxWidgets Cross-platform C++ ii gnuplot 4.2.2-1.2 A command-line driven ii gnuplot-nox 4.2.2-1.2 A command-line driven ii gnuplot-x11 4.2.2-1.2 X11-terminal driver for after, e.g. installed: ii gnuplot 4.4.0-1.1 A command-line driven ii gnuplot-nox 4.4.0-1.1+b1 A command-line driven ii gnuplot-x11 4.4.0-1.1+b1 A command-line driven ii groff 1.20.1-10 GNU troff text-formatting The problem is easily reproducible the following way: local$ ssh remote remote$ screen # start screen remote $ cat something.gnuplot plot sin(x) pause -1 set term png size 800,600 remote_screen$ gnuplot something.gnuplot # opens X11 window ^A^D # detach from screen remote$ ^D # close shell, X11 window is still open ^C # terminate ssh connection (which stayed open # because the X11 channel is still open) local$ ssh remote remote$ screen -x # reconnect to screen # shows up the old terminal content, ending with <unknown>: Fatal IO error 11 (Resource temporarily unavailable) on X server localhost:10.0. <RETURN> # no reaction ^C # no reaction in separate screen windows I started strace on both threads and issued <RETURN> and ^C again: $ strace -p 2120 Process 2120 attached - interrupt to quit futex(0x2752e60, FUTEX_WAIT_PRIVATE, 2, NULL) = ? ERESTARTSYS (To be restarted) --- SIGINT (Interrupt) @ 0 (0) --- rt_sigaction(SIGINT, {0x4e16c0, [INT], SA_RESTORER|SA_RESTART, 0x2b23ad4891e0}, {0x4e16c0, [INT], SA_RESTORER|SA_RESTART, 0x2b23ad4891e0}, 8) = 0 rt_sigreturn(0x2) = 202 futex(0x2752e60, FUTEX_WAIT_PRIVATE, 2, NULL $ strace -p 2121 Process 2121 attached - interrupt to quit futex(0x2752e60, FUTEX_WAIT_PRIVATE, 2, NULL This intensive testing and testcase generation revealed that if I remove the third line (set term png) and any further code from my gnuplot file, this problem does not occur. I also tried updating to 4.4.2 (the 4.4.0-1.1 packaging worked without changes for 4.4.2, too), but this does not fix the problem. And we can now greatly simplify the reproduction process of this problem to use the local machine and xkill ... Andreas -- System Information: Debian Release: squeeze/sid APT prefers stable APT policy: (800, 'stable'), (700, 'testing'), (600, 'unstable'), (130, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores) Locale: LANG=C, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages gnuplot depends on: ii gnuplot-nox 4.4.0-1.1+b1 A command-line driven interactive ii gnuplot-x11 4.4.0-1.1+b1 A command-line driven interactive gnuplot recommends no packages. Versions of packages gnuplot suggests: pn gnuplot-doc <none> (no description available) -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org