Created attachment 526424 [details] Sample gnuplot command file This issue occurs also with gnuplot-5.0.6 on my machine. Whenever I run gnuplot with the --persist argument from the command line and click the save button (the terminal is set to wxt) gnuplot hangs. The CPU usage is still, doesn't rise up and gnuplot simply is frozen and I have to kill it with "kill -TERM" (closing the main window yet leaves the process running, I've just noticed that). This issue does *not* happen when I run gnuplot interactively, any version. My desktop is Xfce. I investigated this issue and found nothing relevant. Still I disabled focus stealing fixes and ICCCM focus "management" but it doesn't change anything. gnuplot was compiled with the following USE flags: X cairo gd readline wxwidgets --- emerge --info: Portage 2.3.13 (python 3.5.4-final-0, default/linux/amd64/17.0/desktop, gcc-6.4.0, glibc-2.25-r9, 4.9.75-gentoo x86_64) ================================================================= System uname: Linux-4.9.75-gentoo-x86_64-Intel-R-_Core-TM-_i5-3230M_CPU_@_2.60GHz-with-gentoo-2.4.1 KiB Mem: 8120484 total, 4515644 free Timestamp of repository gentoo: Sat, 13 Jan 2018 12:00:01 +0000 Head commit of repository gentoo: 77a76f06fa3634c041757e324ee9f583f4a2fb03 sh bash 4.4_p12 ld GNU ld (Gentoo 2.29.1 p3) 2.29.1 ccache version 3.2.4 [enabled] app-shells/bash: 4.4_p12::gentoo dev-java/java-config: 2.2.0-r3::gentoo dev-lang/perl: 5.24.3::gentoo dev-lang/python: 2.7.14-r1::gentoo, 3.4.5-r1::gentoo, 3.5.4-r1::gentoo dev-util/ccache: 3.2.4::gentoo dev-util/cmake: 3.9.6::gentoo dev-util/pkgconfig: 0.29.2::gentoo sys-apps/baselayout: 2.4.1-r2::gentoo sys-apps/openrc: 0.34.11::gentoo sys-apps/sandbox: 2.10-r4::gentoo sys-devel/autoconf: 2.13::gentoo, 2.69-r4::gentoo sys-devel/automake: 1.11.6-r2::gentoo, 1.15.1-r1::gentoo sys-devel/binutils: 2.29.1-r1::gentoo sys-devel/gcc: 6.4.0-r1::gentoo sys-devel/gcc-config: 1.8-r1::gentoo sys-devel/libtool: 2.4.6-r3::gentoo sys-devel/make: 4.2.1::gentoo sys-kernel/linux-headers: 4.13::gentoo (virtual/os-headers) sys-libs/glibc: 2.25-r9::gentoo Repositories: gentoo location: /portage.d/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 sync-rsync-extra-opts: local location: /portage.d/overlays/local masters: gentoo crossdev location: /portage.d/overlays/crossdev masters: gentoo priority: 10 Installed sets: @electronics, @media, @themes, @xfce4, @xorg-test ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=native -fomit-frame-pointer" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -pipe -march=native -fomit-frame-pointer" DISTDIR="/portage.d/distfiles" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs ccache config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="en_GB.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="en fr fr_FR fr_BE" MAKEOPTS="-j3" PKGDIR="/portage.d/packages/x86_64-pc-linux-gnu" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/portage.d/tmp" USE="X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cdr cli consolekit crypt cups cxx dbus dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif glamor gnome-keyring gnutls gpm gtk iconv ipv6 jpeg lcms libnotify lzma mad mng modules mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp opus pam pango pcre pdf png policykit ppds qt3support readline sdl seccomp spell ssl startup-notification svg tcpd theora threads tiff truetype udev udisks unicode upower usb v4l vorbis vpx wxwidgets x264 xattr xcb xml xv xvid zeroconf zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 ssse3 sse3 sse4 sse4_1 sse4_2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput synaptics wacom evdev" KERNEL="linux" L10N="en fr be" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_5" QEMU_SOFTMMU_TARGETS="arm aarch64 i386 x86_64" QEMU_USER_TARGETS="arm aarch64 i386 x86_64" RUBY_TARGETS="ruby22" USERLAND="GNU" VIDEO_CARDS="vesa fbdev nouveau" XFCE_PLUGINS="clock power trash" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Created attachment 526426 [details] Sample data for example2.gp
I shall add: there's no "Save" dialog window that shows up, gnuplot immediately hangs upon clicking the "Save" button.
By "save button" you mean "Export plot to file", I suppose? (It shows in the second position from the left here, but only if I uncomment the "set term wxt ..." line in example2.gp.) Can you run gnuplot under gdb and produce a backtrace, so we can see where it hangs?
Created attachment 530774 [details] GDB execution I'm sorry, I've just seen your comment. Fact is I absolutely have no idea how to do what you're asking (I've never used gdb, not a single time, don't even know how to use it). I have emerged gdb and run gnuplot through it. Attached is what it does. Note that gdb says, if I've got it right, that the main process exited normally and I even quit gdb... but the plot window is still visible! How come? BTW, yes, that's the «Export plot to file» that I was talking about.
This looks like gnuplot is forking, and gdb is following the wrong process. You can try the following: 1. Start "gdb --args gnuplot ..." 2. At the (gdb) prompt, type "set follow-fork-mode child" 3. Type "run" 4. Reproduce the error in gnuplot 5. When gnuplot hangs, press Ctrl-C in gdb 6. Get a backtrace with "bt" or "bt full" If the above doesn't work, you can alternatively try to attach to the running process: 1a. Start gnuplot (without gdb) 2a. Reproduce the error 3a. Look up gnuplot's process id with "ps" 4a. Attach to the running gnuplot process with "gdb -p <pid>" 5a. Get a backtrace
Created attachment 531026 [details] gnuplot trace while hung Thanks a lot for the hint. Something interesting though. I've tried to attach gdb to the forked, running process (so I typed "continue") and clicked the export button, which made gnuplot hang as expected. But then even pressing Ctrl-C in gdb didn't work; all it did was to output "^C" and then nothing, no prompt — it's a deadlock, I presume. So I've had to attach gdb to the *hung* process instead. Now I've got a full trace, 84 nested calls. Also note (I always forget that) forcibly closing the gnuplot window is not enough. I must "killall gnuplot" anyway. That's probably a consequence of the alleged deadlock.
(In reply to Vince C. from comment #6) > [...] I always forget that) forcibly closing the gnuplot window is not > enough. I must "killall gnuplot" anyway. Erm... looks like I forgot that I didn't forget to add that to the initial description. They must have taken my marbles away. Can you call the sanatorium for me please...?
Thank you for the backtrace. This looks like the following upstream issue: https://sourceforge.net/p/gnuplot/bugs/1513/
Problem still present with gnuplot-5.2.6 and gvfs-1.38.2. Issue closed upstream anyway...
Issue reopened upstream: https://sourceforge.net/p/gnuplot/bugs/2185/
Closing, because the upstream bug is fixed. Please reopen if the problem still exists with >=gnuplot-5.4.3.