Gnuplot has completely stopped working, this happens with the following versions:
Version 5.0 patchlevel 3 (Gentoo revision r0)
Version 5.0 patchlevel 1 (Gentoo revision r1)
This is what happens:
$ gnuplot
G N U P L O T
Version 5.0 patchlevel 1 (Gentoo revision r1) last modified 2015-06-07
Copyright (C) 1986-1993, 1998, 2004, 2007-2015
Thomas Williams, Colin Kelley and many others
gnuplot home: http://www.gnuplot.info
faq, bugs, etc: type "help FAQ"
immediate help: type "help" (plot window: hit 'h')
Terminal type set to 'wxt'
gnuplot> set yrange[0:2]
gnuplot> f(x) = 1
gnuplot> plot f(x)
Aborted
I have also tried some other functions, including verbatim copy/paste of functions that I know have worked before, but the result is the same. "Aborted".
There are no errors or warnings, dmesg shows nothing abnormal, no segfault.
Strace shows:
rt_sigaction(SIGINT, {0x5089c0, [INT], SA_RESTORER|SA_RESTART, 0x7fbda1f29390}, {0x4706c0, [INT], SA_RESTORER|SA_RESTART, 0x7fbda22a2cb0}, 8) = 0
open("/usr/lib64/gconv/gconv-modules.cache", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=26244, ...}) = 0
mmap(NULL, 26244, PROT_READ, MAP_SHARED, 3, 0) = 0x7fbda2bc7000
close(3) = 0
futex(0x7fbda228d8e8, FUTEX_WAKE_PRIVATE, 2147483647) = 0
open("/usr/lib64/gconv/ISO8859-1.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\6\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=10184, ...}) = 0
mmap(NULL, 2105424, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fbda15d0000
mprotect(0x7fbda15d2000, 2093056, PROT_NONE) = 0
mmap(0x7fbda17d1000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7fbda17d1000
close(3) = 0
mprotect(0x7fbda17d1000, 4096, PROT_READ) = 0
rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
tgkill(11431, 11431, SIGABRT) = 0
--- SIGABRT {si_signo=SIGABRT, si_code=SI_TKILL, si_pid=11431, si_uid=1000} ---
+++ killed by SIGABRT +++
Aborted
This is on Gentoo Stable 2.2, with no other issues.
That's a new one.
First idea:
Does this happen only with the wxt terminal?
I.e., Does it plot normally if your first command is
'set term dumb'
(or x11 or whatever)?
Second idea:
Your trace seems to show that the failure comes from trying to mmap bits of gconv. On my machine that never happens, so I am puzzled why it would ever be the case. Do you have an unusual locale set? Have you seen any other problems with locale or localization?
No difference between ISO-8859-1 and UTF-8.
Setting term to dumb or x11 actually makes it work, I can plot with console output and x11 output. My default term is "wxt 0 enhanced". I have wxwidgets compiled in.
However, I did another world update and now I get this whenever I quit (output still works if I manually set term first):
gnuplot> quit
*** Error in `gnuplot': free(): invalid pointer: 0x0000003be1381238 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x727ec)[0x7f2e3c4057ec]
/lib64/libc.so.6(+0x78246)[0x7f2e3c40b246]
/lib64/libc.so.6(+0x78a3e)[0x7f2e3c40ba3e]
/lib64/libc.so.6(__cxa_finalize+0x8f)[0x7f2e3c3c8fcf]
/usr/lib64/libwx_gtk2u_core-3.0.so.0[0x3beb652673]
======= Memory map: ========
00400000-00577000 r-xp 00000000 fe:00 9989140 /usr/bin/gnuplot
00776000-00777000 r--p 00176000 fe:00 9989140 /usr/bin/gnuplot
00777000-00788000 rw-p 00177000 fe:00 9989140 /usr/bin/gnuplot
00788000-0079e000 rw-p 00000000 00:00 0
008fc000-00980000 rw-p 00000000 00:00 0 [heap]
3bdc800000-3bdc937000 r-xp 00000000 fe:00 13641574 /usr/lib64/libglib-2.0.so.0.4600.2
3bdc937000-3bdcb37000 ---p 00137000 fe:00 13641574 /usr/lib64/libglib-2.0.so.0.4600.2
3bdcb37000-3bdcb38000 r--p 00137000 fe:00 13641574 /usr/lib64/libglib-2.0.so.0.4600.2
3bdcb38000-3bdcb39000 rw-p 00138000 fe:00 13641574 /usr/lib64/libglib-2.0.so.0.4600.2
3bdcb39000-3bdcb3a000 rw-p 00000000 00:00 0
3bdcc00000-3bdcc07000 r-xp 00000000 fe:00 13641644 /usr/lib64/libffi.so.6.0.1
3bdcc07000-3bdce06000 ---p 00007000 fe:00 13641644 /usr/lib64/libffi.so.6.0.1
3bdce06000-3bdce07000 r--p 00006000 fe:00 13641644 /usr/lib64/libffi.so.6.0.1
3bdce07000-3bdce08000 rw-p 00007000 fe:00 13641644 /usr/lib64/libffi.so.6.0.1
3bde000000-3bde015000 r-xp 00000000 fe:00 1836514 /lib64/libz.so.1.2.8
3bde015000-3bde214000 ---p 00015000 fe:00 1836514 /lib64/libz.so.1.2.8
3bde214000-3bde215000 r--p 00014000 fe:00 1836514 /lib64/libz.so.1.2.8
3bde215000-3bde216000 rw-p 00015000 fe:00 1836514 /lib64/libz.so.1.2.8
Last edit: deltavoid 2016-04-19
I am guessing that the problem is a bad gtk library and that gnuplot is an innocent victim. But at this stage it's just a guess.
What version of wxgtk do you have installed?
You could try rebuilding gnuplot with configuration option
./configure --with-wx-single-threaded
That was reported to help some people with early versions of wxgtk3, although your problem does not sound much like those reports.
What libraries are shown by
ldd ./gnuplot
wxgtk version: 3.0.2.0-r1
I have wxwidgets compiled in, but the Gentoo package doesn't offer me control over single or multi-threaded. I could attempt to compile gnuplot from source manually to check.
ldd output: https://bpaste.net/show/7ab480ae2a6f
Sigh. Looks normal to me.
All I can say is that several problems were reported a year or so back when people started using wxgtk3 rather than wxgtk2.8. In some cases the problem went away if gnuplot was built single-threaded, but that was a work-around rather than a real fix.
You might find that building from source fixes everything. Then again, if you are going to configure and build from source my personcal recommendation would be to ditch the wxt terminal and configure in the qt terminal instead. It's faster, free of any known problems, and IMHO nicer.
Sorry I can't think of anything else to try at the moment.
It also happens with wxgtk2.8,
on openSUSE 13.2 (but custom gcc 6.2.0 toolchain)
It is possible to get to the gnuplot command line, but the backtrace is dumped upon exit.
Setting
GNUTERM=qtis not enough.How to disable the wxt terminal ?
(even after a
make distclean)Note:
--without-wxtis not recognized (mind thet). Could it be a typo somewhere ?The
RELEASE_NOTESfile mentions--disable-wxt.but
It would be nice to make these more consistent ("wxt" only, and
--without-wxtinstead of--disable-wxwidgets).Finally
../configure --disable-wxwidgets ...And now
gnuplot --versiondoes not crash.So it does seem related to wxt, but not to version.
Last edit: ederag 2017-03-13
I have just now been hit by this problem myself after a software upgrade. It turns out that the cause is an internal check by the wxgtk library that the compiler version used to compile the user program (gnuplot in this case) is not newer (by API version number) than the compiler used to build the wxgtk libraries. I installed a newer compiler version, rebuilt gnuplot, and started getting the same immediate abort from the wxt terminal.
The internal error message (hard to trap) is:
I fixed the problem by installing a newer build of the wxt libraries as well. This made the gnuplot executable I had already built able to run since there was no longer a version mismatch.