You are not logged in.

#1 2021-11-25 03:29:50

Lehthanis
Member
Registered: 2013-09-26
Posts: 21

gdb suddenly giving SIGTRAP and terminating program.

I've been using gdb to debug plugin I write for X-Plane flight simulator.  Suddenly I'm unable to debug the program (with or without breakpoints set)  I get the following:

Starting program: /home/robbie/X-Plane11/X-Plane-x86_64 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7fffede3a640 (LWP 169759)]
[Thread 0x7fffede3a640 (LWP 169759) exited]
[New Thread 0x7fffede3a640 (LWP 169760)]
[New Thread 0x7fffecbd1640 (LWP 169761)]
MicroProfile: Web server started on 127.0.0.1:1338
MicroProfile: Web server started on 10.10.101.213:1338
[New Thread 0x7fffe7fff640 (LWP 169762)]
[New Thread 0x7fffe729e640 (LWP 169763)]
..... I deleted some
[New Thread 0x7fff9553b640 (LWP 169782)]
[New Thread 0x7fff7ffff640 (LWP 169783)]
[Detaching after vfork from child process 169784]
[Thread 0x7fff7ffff640 (LWP 169783) exited]
[Thread 0x7fff9553b640 (LWP 169782) exited]
..... I deleted some
[Thread 0x7fffe7fff640 (LWP 169762) exited]
[Thread 0x7fffecbd1640 (LWP 169761) exited]
[Thread 0x7fffede3a640 (LWP 169760) exited]

Program terminated with signal SIGTRAP, Trace/breakpoint trap.
The program no longer exists.

This is pretty quick and during initialization before any plugins are evaluated or anything.

I posted this to Reddit and got one response. Figured I'd run it here before submitting a bug.

https://www.reddit.com/r/archlinux/comments/r0lgkc

Seems like it might be a bug in 5.15.4 and downgrading to 5.15.2 fixes it? I haven't downgraded and will wait because I won't be debugging anything for the holiday weekend and next week anyways due to business trip.

Offline

#2 2021-11-25 22:49:42

Oxyd
Member
From: Czech Republic
Registered: 2008-01-17
Posts: 167

Re: gdb suddenly giving SIGTRAP and terminating program.

Can confirm, same issue. Switching to the LTS kernel (5.10.81 currently) fixes the issue for me.

In the program I'm working on, it seems to be triggered by a popen call. If I remove that, the program starts in GDB as it should. So I suspect there's something wrong with one of the lower-level calls used to implement popen, probably vfork or exec.

Offline

#3 2021-11-25 23:25:37

Lehthanis
Member
Registered: 2013-09-26
Posts: 21

Re: gdb suddenly giving SIGTRAP and terminating program.

I've never reported a bug before, should I?

Offline

#4 2021-11-26 00:02:34

loqs
Member
Registered: 2014-03-06
Posts: 14,257

Re: gdb suddenly giving SIGTRAP and terminating program.

https://lore.kernel.org/bpf/CAP045AoMY4 … gmail.com/
Patches were applied to 5.15.5 as 7614e046ed489a70f71b90274a1f59ee863f2821 and 686bf792032a1361b7a0a83688779786f0c86a17 hopefully fixing the issue.

Last edited by loqs (2021-11-26 00:14:49)

Offline

Board footer

Powered by FluxBB