Bug#984975: gedit 3.30.2-2 segmentation fault

2021-04-09 Thread Bernhard Übelacker

Hello Nenad Cvetkovic,



> Hi Bernhard Übelacker,
> I hope I managed to create a proper backtrace, this is my first time.
>
> As for your question about rebuilt packages, I have no idea when this 
happened. I didn't build many things, I remember building ubuntu's Yaru theme.
>



> Thread 1 (Thread 0x7f7711e8ea80 (LWP 18322)):
> #0  0x007f198f in  ()
> #1  0x7f7715fee669 in g_main_context_prepare () at 
/lib/x86_64-linux-gnu/libglib-2.0.so.0
> #2  0x7f7715fef06b in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
> #3  0x7f7715fef25c in g_main_context_iteration () at 
/lib/x86_64-linux-gnu/libglib-2.0.so.0
> #4  0x7f77171a5a2d in g_application_run () at 
/lib/x86_64-linux-gnu/libgio-2.0.so.0
> #5  0x55e52ad2d1fa in main ()



thank you for the backtrace, at least it is equal to
what your core file generated in my test.

I still guess this might be a manifestation of upstream bug [1].
Unfortunately this got closed as it could no longer be reproduced
with at least gedit-3.30.2 and glib-2.60.6.
Unfortunately in Buster/stable is glib-2.58.3 in use.

Kind regards,
Bernhard

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



Bug#984975: Fw: Re: Bug#984975: gedit 3.30.2-2 segmentation fault

2021-03-30 Thread nenadcvetkovic



Sent from ProtonMail, encrypted email based in Switzerland.

‐‐‐ Original Message ‐‐‐
On Monday, March 29, 2021 11:15 PM,  wrote:

> Hi Bernhard Übelacker,
> I hope I managed to create a proper backtrace, this is my first time.
>
> As for your question about rebuilt packages, I have no idea when this 
> happened. I didn't build many things, I remember building ubuntu's Yaru theme.
>
> Sent from ProtonMail, encrypted email based in Switzerland.
>
> ‐‐‐ Original Message ‐‐‐
> On Sunday, March 28, 2021 11:00 AM, Bernhard Übelacker bernha...@mailbox.org 
> wrote:
>
> > 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 
> >
> >  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 0x007f198f in ?? ()
> > [Current thread is 1 (Thread 0x7f7cde497a80 (LWP 15100))]
> > (gdb) bt
> > #0 0x007f198f in ?? ()
> > #1 0x7f7ce25f7669 in g_main_context_prepare 
> > (context=context@entry=0x55ba65041ad0, 
> > priority=priority@entry=0x7ffcb3349aa0) at ../../../glib/gmain.c:3492
> > #2 0x7f7ce25f806b in g_main_context_iterate 
> > (context=context@entry=0x55ba65041ad0, block=block@entry=1, 
> > dispatch=dispatch@entry=1, self=) at 
> > ../../../glib/gmain.c:3900
> >
> >  #3  0x7f7ce25f825c in g_main_context_iteration 
> > (context=context@entry=0x55ba65041ad0, may_block=may_block@entry=1) at 
> > ../../../glib/gmain.c:3981
> >  #4  0x7f7ce37aea2d in g_application_run 
> > (application=0x55ba650231e0, argc=, argv=0x7ffcb3349c88) at 
> > ../../../gio/gapplication.c:2470
> >
> >  #5  0x55ba63f271fa in main (argc=2, argv=0x7ffcb3349c88) at 
> > gedit/gedit.c:146
> >  (gdb) info local
> >  No symbol table info available.
> >  (gdb) up
> >  #1  0x7f7ce25f7669 in g_main_context_prepare 
> > (context=context@entry=0x55ba65041ad0, 
> > priority=priority@entry=0x7ffcb3349aa0) at ../../../glib/gmain.c:3492
> >  3492  result = (* prepare) (source, _timeout);
> >  (gdb) info local
> >  result = 
> >
> >  prepare = 0x7f198f
> >  source_timeout = -1
> >  i = 
> >
> >  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


Thread 6 (Thread 0x7f770bfff700 (LWP 18325)):
#0  0x7f7716fb1819 in __GI___poll (fds=0x55e52c486b40, nfds=1, timeout=-1) 
at ../sysdeps/unix/sysv/linux/poll.c:29
resultvar = 18446744073709551100
sc_cancel_oldtype = 0
#1  0x7f7715fef136 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x7f7715fef25c in g_main_context_iteration () at 
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x7f7710b25ffd in  () at 
/usr/lib/x86_64-linux-gnu/gio/modules/libdconfsettings.so
#4  0x7f7716017415 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x7f7715e46fa3 in start_thread (arg=) at 
pthread_create.c:486
ret = 
pd = 
now = 
unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140149279160064, 
-4816642476741125435, 140734018650862, 140734018650863, 140149279160064, 
94442779747632, 4884662664485771973, 4884702345840794309}, mask_was_saved = 
0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, 
canceltype = 0}}}
not_first_call = 
#6  0x7f7716fbc4cf in clone () at 
../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 5 (Thread 0x7f770ad14700 (LWP 18327)):
#0  0x7f7716fb6f59 in syscall () at 
../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1  0x7f77160390ba in g_cond_wait_until () at 
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x7f7715fc1091 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x7f7716017ef2 in  

Bug#984975: gedit 3.30.2-2 segmentation fault

2021-03-28 Thread Bernhard Übelacker

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 
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  0x007f198f in ?? ()
[Current thread is 1 (Thread 0x7f7cde497a80 (LWP 15100))]
(gdb) bt
#0  0x007f198f in ?? ()
#1  0x7f7ce25f7669 in g_main_context_prepare 
(context=context@entry=0x55ba65041ad0, priority=priority@entry=0x7ffcb3349aa0) 
at ../../../glib/gmain.c:3492
#2  0x7f7ce25f806b in g_main_context_iterate 
(context=context@entry=0x55ba65041ad0, block=block@entry=1, 
dispatch=dispatch@entry=1, self=) at ../../../glib/gmain.c:3900
#3  0x7f7ce25f825c in g_main_context_iteration 
(context=context@entry=0x55ba65041ad0, may_block=may_block@entry=1) at 
../../../glib/gmain.c:3981
#4  0x7f7ce37aea2d in g_application_run (application=0x55ba650231e0, 
argc=, argv=0x7ffcb3349c88) at ../../../gio/gapplication.c:2470
#5  0x55ba63f271fa in main (argc=2, argv=0x7ffcb3349c88) at 
gedit/gedit.c:146
(gdb) info local
No symbol table info available.
(gdb) up
#1  0x7f7ce25f7669 in g_main_context_prepare 
(context=context@entry=0x55ba65041ad0, priority=priority@entry=0x7ffcb3349aa0) 
at ../../../glib/gmain.c:3492
3492  result = (* prepare) (source, _timeout);
(gdb) info local
result = 
prepare = 0x7f198f
source_timeout = -1
i = 
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

# 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.161546904000.lz4;msg=5;
 -O core.gedit.1000.e6ec596bfdba4283915bcec4a14baf60.15100.161546904000.lz4
unlz4 
core.gedit.1000.e6ec596bfdba4283915bcec4a14baf60.15100.161546904000.lz4


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





benutzer@debian:~$ gdb -q /usr/bin/gedit --core 
core.gedit.1000.e6ec596bfdba4283915bcec4a14baf60.15100.161546904000
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