Menu

#1780 Gnuplot killed by SIGABRT (wxt terminal)

None
closed-out-of-date
nobody
None
2021-06-11
2016-04-18
deltavoid
No

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.

Discussion

  • Ethan Merritt

    Ethan Merritt - 2016-04-18

    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?

     
  • deltavoid

    deltavoid - 2016-04-19

    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
  • Ethan Merritt

    Ethan Merritt - 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

     
  • deltavoid

    deltavoid - 2016-04-19

    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

     
  • Ethan Merritt

    Ethan Merritt - 2016-04-19

    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.

     
  • Ethan Merritt

    Ethan Merritt - 2017-02-03
    • summary: Gnuplot killed by SIGABRT --> Gnuplot killed by SIGABRT (wxt terminal)
    • Group: -->
    • Priority: -->
     
  • ederag

    ederag - 2017-03-13

    It also happens with wxgtk2.8,
    on openSUSE 13.2 (but custom gcc 6.2.0 toolchain)

    GNUTERM=qt gnuplot --version
    gnuplot 5.0 patchlevel 5
    *** Error in `gnuplot': free(): invalid pointer: 0x00007f23381cafb8 ***
    ======= Backtrace: =========
    /lib64/libc.so.6(+0x727df)[0x7f23376e07df]
    /lib64/libc.so.6(+0x7804e)[0x7f23376e604e]
    /lib64/libc.so.6(+0x78d56)[0x7f23376e6d56]
    /lib64/libc.so.6(__cxa_finalize+0x8f)[0x7f23376a5e9f]
    /usr/lib64/wx-2.8-stl/libwx_gtk2u_core-2.8.so.0(+0x1ec6c3)[0x7f233d30a6c3]
    ======= Memory map: ========
    ...
    7f232db3f000-7f232f501000 r-xp 00000000 00:20 2781961                    /usr/lib64/libnvidia-glcore.so.340.101
    ...
    
    7f233cac8000-7f233ccc7000 ---p 0016a000 00:20 88839                      /usr/lib64/wx-2.8-stl/libwx_baseu-2.8.so.0.8.0
    ...
    

    It is possible to get to the gnuplot command line, but the backtrace is dumped upon exit.

    Setting GNUTERM=qt is not enough.

    How to disable the wxt terminal ?

    ../configure --without-wx ...
      wxt terminal: yes 
    

    (even after a make distclean)

    Note: --without-wxt is not recognized (mind the t). Could it be a typo somewhere ?

    The RELEASE_NOTES file mentions --disable-wxt.

    but

    ../configure --help | grep -i wx
      --disable-wxwidgets      wxWidgets terminal (default enabled)
      --with-wx=DIR   Where to find wx-config, the wxWidgets configuration program
      --with-wx-single-threaded   do not use multithreaded wxgtk even if available
    

    It would be nice to make these more consistent ("wxt" only, and --without-wxt instead of --disable-wxwidgets).

    Finally
    ../configure --disable-wxwidgets ...
    And now
    gnuplot --version does not crash.

    So it does seem related to wxt, but not to version.

     

    Last edit: ederag 2017-03-13
  • Ethan Merritt

    Ethan Merritt - 2018-05-23

    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:

    Fatal Error:
    
    Mismatch between the program and library build versions detected.
    
    The library used 3.0
      (wchar_t, compiler with C++ ABI 1009, wxcontainers, compatible with 2.8),
    
    and your program used 3.0
      (wchar_t, compiler with C++ ABI 1011, wxcontainers, compatible with 2.8).
    
    rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
    tgkill(17432, 17432, SIGABRT)           = 0
    --- SIGABRT {si_signo=SIGABRT, si_code=SI_TKILL, si_pid=17432, si_uid=2505} ---
    +++ killed by SIGABRT (core dumped) +++
    

    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.

     
  • Ethan Merritt

    Ethan Merritt - 2021-06-11
    • status: open --> closed-out-of-date
     

Log in to post a comment.

MongoDB Logo MongoDB