Bug#984975: gedit 3.30.2-2 segmentation fault

Bernhard Übelacker bernhardu at mailbox.org
Sun Mar 28 10:00:32 BST 2021


Hello Nenad Cvetkovic,
I tried to have a look at your core file.
It shows a crash with following backtrace [1].
The reason seems to be an invalid function pointer in variable "prepare".

The upstream issue in [2] shows a similar backtrace, but I
am not sure if they are related about what is causing it.


Investigation with a core file needs the same installed
package version, therefore the inspection at the host
creating the core has less chances for discrepancies.
Therefore, if you have gdb installed, you should be able
to generate a backtrace on your system too by e.g.:
     coredumpctl list
     coredumpctl gdb <PID>
         bt

This gets normally improved by installing the dbgsym packages
or setting the environment DEBUGINFOD_URLS,
both and more described in [3].

Therefore the question, is there a reason for what looks like
local rebuilt packages libenchant1c2a and libxml2
due to the "~1.gbp73138d" version postfix?

Kind regards,
Bernhard


[1]
     Core was generated by `/usr/bin/gedit --gapplication-service'.
     Program terminated with signal SIGSEGV, Segmentation fault.
     #0  0x00000000007f198f in ?? ()
     [Current thread is 1 (Thread 0x7f7cde497a80 (LWP 15100))]
     (gdb) bt
     #0  0x00000000007f198f in ?? ()
     #1  0x00007f7ce25f7669 in g_main_context_prepare (context=context at entry=0x55ba65041ad0, priority=priority at entry=0x7ffcb3349aa0) at ../../../glib/gmain.c:3492
     #2  0x00007f7ce25f806b in g_main_context_iterate (context=context at entry=0x55ba65041ad0, block=block at entry=1, dispatch=dispatch at entry=1, self=<optimized out>) at ../../../glib/gmain.c:3900
     #3  0x00007f7ce25f825c in g_main_context_iteration (context=context at entry=0x55ba65041ad0, may_block=may_block at entry=1) at ../../../glib/gmain.c:3981
     #4  0x00007f7ce37aea2d in g_application_run (application=0x55ba650231e0, argc=<optimized out>, argv=0x7ffcb3349c88) at ../../../gio/gapplication.c:2470
     #5  0x000055ba63f271fa in main (argc=2, argv=0x7ffcb3349c88) at gedit/gedit.c:146
     (gdb) info local
     No symbol table info available.
     (gdb) up
     #1  0x00007f7ce25f7669 in g_main_context_prepare (context=context at entry=0x55ba65041ad0, priority=priority at entry=0x7ffcb3349aa0) at ../../../glib/gmain.c:3492
     3492              result = (* prepare) (source, &source_timeout);
     (gdb) info local
     result = <optimized out>
     prepare = 0x7f198f
     source_timeout = -1
     i = <optimized out>
     n_ready = 16
     current_priority = 0
     source = 0x55ba658e7d00
     iter = {context = 0x55ba65041ad0, may_modify = 1, current_list = 0x7f7cd00020e0, source = 0x55ba658e7d00}

     https://sources.debian.org/src/glib2.0/2.58.3-2+deb10u2/glib/gmain.c/#L3492

[2]
     https://gitlab.gnome.org/GNOME/gedit/-/issues/51

[3]
     https://wiki.debian.org/HowToGetABacktrace
-------------- next part --------------

# single-use Buster/stable amd64 qemu VM 2021-03-28

echo "set enable-bracketed-paste off" >> /etc/inputrc; bash

apt update

# to speedup testing
mv /etc/manpath.config /etc/manpath.config.renamed
apt install libeatmydata1
export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libeatmydata.so

apt dist-upgrade
apt install systemd-coredump gdb lz4 gedit gnome \
        gedit-dbgsym libglib2.0-0-dbgsym


wget "https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=984975;filename=core.gedit.1000.e6ec596bfdba4283915bcec4a14baf60.15100.1615469040000000.lz4;msg=5" -O core.gedit.1000.e6ec596bfdba4283915bcec4a14baf60.15100.1615469040000000.lz4
unlz4 core.gedit.1000.e6ec596bfdba4283915bcec4a14baf60.15100.1615469040000000.lz4


gdb -q --core core.gedit.1000.e6ec596bfdba4283915bcec4a14baf60.15100.1615469040000000
gdb -q /usr/bin/gedit --core core.gedit.1000.e6ec596bfdba4283915bcec4a14baf60.15100.1615469040000000





benutzer at debian:~$ gdb -q /usr/bin/gedit --core core.gedit.1000.e6ec596bfdba4283915bcec4a14baf60.15100.1615469040000000
Reading symbols from /usr/bin/gedit...(no debugging symbols found)...done.
[New LWP 15100]
[New LWP 15105]
[New LWP 15104]
[New LWP 15103]
[New LWP 15101]
[New LWP 15102]

warning: .dynamic section for "/lib/x86_64-linux-gnu/libpcre.so.3" is not at the expected address (wrong library or version mismatch?)

warning: .dynamic section for "/lib/x86_64-linux-gnu/libenchant.so.1" is not at the expected address (wrong library or version mismatch?)

warning: .dynamic section for "/lib/x86_64-linux-gnu/libzstd.so.1" is not at the expected address (wrong library or version mismatch?)

warning: .dynamic section for "/usr/lib/x86_64-linux-gnu/enchant/libenchant_myspell.so" is not at the expected address (wrong library or version mismatch?)

warning: Could not load shared library symbols for 19 libraries, e.g. /lib/x86_64-linux-gnu/libicui18n.so.65.
Use the "info sharedlibrary" command to see the complete listing.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/bin/gedit --gapplication-service'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00000000007f198f in ?? ()
[Current thread is 1 (Thread 0x7f7cde497a80 (LWP 15100))]
(gdb) bt
#0  0x00000000007f198f in ?? ()
#1  0x00007f7ce25f7669 in g_main_context_prepare () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f7ce25f806b in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f7ce25f825c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f7ce37aea2d in g_application_run () from /lib/x86_64-linux-gnu/libgio-2.0.so.0
#5  0x000055ba63f271fa in main ()



Core was generated by `/usr/bin/gedit --gapplication-service'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00000000007f198f in ?? ()
[Current thread is 1 (Thread 0x7f7cde497a80 (LWP 15100))]
(gdb) bt
#0  0x00000000007f198f in ?? ()
#1  0x00007f7ce25f7669 in g_main_context_prepare (context=context at entry=0x55ba65041ad0, priority=priority at entry=0x7ffcb3349aa0) at ../../../glib/gmain.c:3492
#2  0x00007f7ce25f806b in g_main_context_iterate (context=context at entry=0x55ba65041ad0, block=block at entry=1, dispatch=dispatch at entry=1, self=<optimized out>) at ../../../glib/gmain.c:3900
#3  0x00007f7ce25f825c in g_main_context_iteration (context=context at entry=0x55ba65041ad0, may_block=may_block at entry=1) at ../../../glib/gmain.c:3981
#4  0x00007f7ce37aea2d in g_application_run (application=0x55ba650231e0, argc=<optimized out>, argv=0x7ffcb3349c88) at ../../../gio/gapplication.c:2470
#5  0x000055ba63f271fa in main (argc=2, argv=0x7ffcb3349c88) at gedit/gedit.c:146
(gdb) info local
No symbol table info available.
(gdb) up
#1  0x00007f7ce25f7669 in g_main_context_prepare (context=context at entry=0x55ba65041ad0, priority=priority at entry=0x7ffcb3349aa0) at ../../../glib/gmain.c:3492
3492              result = (* prepare) (source, &source_timeout);

(gdb) info local
result = <optimized out>
prepare = 0x7f198f
source_timeout = -1
i = <optimized out>
n_ready = 16
current_priority = 0
source = 0x55ba658e7d00
iter = {context = 0x55ba65041ad0, may_modify = 1, current_list = 0x7f7cd00020e0, source = 0x55ba658e7d00}

(gdb) print source->source_funcs->prepare
Cannot access memory at address 0x7f7ccc2bb100
(gdb) print source
$1 = (GSource *) 0x55ba658e7d00
(gdb) print *source
$2 = {callback_data = 0x0, callback_funcs = 0x0, source_funcs = 0x7f7ccc2bb100, ref_count = 3, context = 0x55ba65041ad0, priority = 0, flags = 1, source_id = 52, poll_fds = 0x0, prev = 0x7f7cd0018d70, next = 0x55ba658eb0d0, name = 0x0, priv = 0x55ba6540d680}
(gdb) print source->source_funcs
$3 = (const GSourceFuncs *) 0x7f7ccc2bb100
(gdb) print *source->source_funcs
Cannot access memory at address 0x7f7ccc2bb100

(gdb) print source->context 
$4 = (GMainContext *) 0x55ba65041ad0
(gdb) print *source->context 
$5 = {mutex = {p = 0x0, i = {0, 0}}, cond = {p = 0x0, i = {0, 0}}, owner = 0x55ba650168d0, owner_count = 2, waiters = 0x0, ref_count = 68, sources = 0x55ba65043000, pending_dispatches = 0x55ba65015100, timeout = 0, next_id = 59, source_lists = 0x7f7cd00020e0, in_check_or_prepare = 1, poll_records = 0x7f7cd0001d20, n_poll_records = 5, cached_poll_array = 0x55ba653b1170, cached_poll_array_size = 4, wakeup = 0x55ba65036fc0, wake_up_rec = {fd = 5, events = 1, revents = 1}, poll_changed = 0, poll_func = 0x7f7ce26077f0 <g_poll>, time = 18940942572, time_is_fresh = 1}
(gdb) 



https://sources.debian.org/src/glib2.0/2.58.3-2+deb10u2/glib/gmain.c/#L3492

https://gitlab.gnome.org/GNOME/gedit/-/issues/51


More information about the pkg-gnome-maintainers mailing list