On Sat, Aug 17, 2024 at 09:44:16PM +0200, Walter Alejandro Iglesias wrote:
> On Sat, Aug 17, 2024 at 06:06:39PM +0200, Matthieu Herrb wrote:
> > On Sat, Aug 17, 2024 at 05:25:31PM +0200, Walter Alejandro Iglesias wrote:
> > > If I run gdb on the Xorg.core I got:
> > > 
> > > $ egdb -ex bt -batch -c Xorg.core 
> > > BFD: warning: /home/morlock/Xorg.core is truncated: expected core
> > > file size >= 22296776, found: 9853128
> > 
> > This seems to indicate that the core doesn't match the current Xorg
> > binary. use "egdb /usr/X11R6/bin/Xorg Xorg.core" to be sure to use the
> > currently installed binary. 
> > 
> > > [New process 528036]
> > > [New process 340460]
> > > [New process 448837]
> > > [New process 289344]
> > > Core was generated by `Xorg'.
> > > Program terminated with signal SIGABRT, Aborted.
> > > #0  0x000007752fbf95ab in ?? ()
> > > [Current thread is 1 (process 528036)]
> > > #0  0x000007752fbf95ab in ?? ()
> > > Backtrace stopped: Cannot access memory at address 0x708b3c3eaf50
> > > 
> > > 
> > 
> > There are severtal threads. You may need to use 'info threads' and
> > 'thread <num>' to visit all of them and get the backtrace for each of
> > them.
> 
> Running this command:
> 
>  $ egdb /usr/X11R6/bin/Xorg Xorg.core
> 
> I still get this warning:
> 
>   BFD: warning: /home/morlock/Xorg.core is truncated: expected core file size 
> >= 22276520, found: 17844648
> 
> "Info threads" shows me four threads.  Except selecting the first one,
> selecting any of the rest and running "bt" I get this:
> 
> 0x0000004f9dace7ea in _twait (p=0x4f888de360, val=0, clockid=0, abs=0x0) at 
> /usr/src/lib/libc/thread/synch.h:51
> #3  _rthread_cond_timedwait (cond=0x4f888de360, mutexp=0x4f888b9a50, abs=0x0) 
> at /usr/src/lib/libc/thread/rthread_cond.c:106


I still don't understand how gdb(1) works.  Today I ran the same command
against the same Xorg.core file but I got different messages.  The whole
egdb output:

$ egdb -q $(which X) Xorg.core
Reading symbols from /usr/X11R6/bin/X...
BFD: warning: /home/morlock/Xorg.core is truncated: expected core file size >= 
22276520, found: 17844648
[New process 187036]
[New process 193285]
[New process 386116]
[New process 368370]

warning: Can't read pathname for load map: (undocumented errno -1).

[...] (same warning 7+ times)

warning: Error reading shared library list entry at 0x5033169000

warning: .dynamic section for "/usr/lib/libc.so.100.3" is not at the expected 
address (wrong library or version mismatch?)
Core was generated by `Xorg'.
Program terminated with signal SIGABRT, Aborted.
#0  0x0000004f9da6d3eb in _libc_SHA256Transform (state=<error reading variable: 
Cannot access memory at address 0x77933eb464b0>,
    data=<optimized out>) at /usr/src/lib/libc/hash/sha2.c:421
421             state[2] += c;
[Current thread is 1 (process 187036)]
(gdb) bt
#0  0x0000004f9da6d3eb in _libc_SHA256Transform (state=<error reading variable: 
Cannot access memory at address 0x77933eb464b0>,
    data=<optimized out>) at /usr/src/lib/libc/hash/sha2.c:421
Backtrace stopped: Cannot access memory at address 0x77933eb46598
(gdb) thread 2
[Switching to thread 2 (process 193285)]
#0  0x0000004f9da3fceb in __vfprintf (fp=0x0, fmt0=0x28f3a01bd301aa53 <error: 
Cannot access memory at address 0x28f3a01bd301aa53>,
    ap=0x78b1a56d6a01c379) at /usr/src/lib/libc/stdio/vfprintf.c:1042
1042                                            PRINTANDPAD(cp, dtoaend, lead, 
zeroes);
(gdb) thread 3
[Switching to thread 3 (process 386116)]
#0  0x0000004f9da3fceb in __vfprintf (fp=0x0, fmt0=0x28f3a01bd301aa53 <error: 
Cannot access memory at address 0x28f3a01bd301aa53>,
    ap=0x78b1a56d6a01c379) at /usr/src/lib/libc/stdio/vfprintf.c:1042
1042                                            PRINTANDPAD(cp, dtoaend, lead, 
zeroes);
(gdb) thread 4
[Switching to thread 4 (process 368370)]
#0  0x0000004f9da3fceb in __vfprintf (fp=0x0, fmt0=0x28f3a01bd301aa53 <error: 
Cannot access memory at address 0x28f3a01bd301aa53>,
    ap=0x78b1a56d6a01c379) at /usr/src/lib/libc/stdio/vfprintf.c:1042
1042                                            PRINTANDPAD(cp, dtoaend, lead, 
zeroes);


> 
> 
> > 
> > -- 
> > Matthieu Herrb
> > 
> 
> -- 
> Walter

-- 
Walter

Reply via email to