gdb gets SIGTRAP on every instruction after function call

Bug #230315 reported by Dalle
14
Affects Status Importance Assigned to Milestone
Mandriva
Fix Released
High
gdb (Debian)
Fix Released
Unknown
gdb (Ubuntu)
Invalid
Undecided
Unassigned
Hardy
Invalid
Undecided
Unassigned
linux (Ubuntu)
Invalid
Undecided
Unassigned
Hardy
Fix Released
High
Tim Gardner

Bug Description

The 8.04 kernel apparently has a bug that doesn't turn of the SIGTRAP after it has been handled. I had to downgrade to GG since this bug makes gdb unusable for those of us who uses function calls when we debug our programs.

Google found these two references to the problem:

http://groups.google.com/group/linux.debian.bugs.dist/browse_thread/thread/0ebb76bca292d660

http://lkml.org/lkml/2008/3/17/205

Revision history for this message
Eric ALBER (alberthier-deactivatedaccount) wrote :

This problem appears too when debugging a program with kdevelop:
A message box "Program received signal SIGTRAP (Trace/breakpoint trap)" often pops up when debugging.
This bug makes 8.04 unusable as a C/C++ development environment

Revision history for this message
kaizen_all (josep-perarnau) wrote :

I've the same problem and it gets really impossible to work/debug. Please fix it as soon as possible. I don't really understand why the status is still undecided.

Revision history for this message
Matthias Klose (doko) wrote :

according to the bug history this looks like a kernel bug.

Changed in gdb:
status: Unknown → New
Revision history for this message
Matthias Klose (doko) wrote :

setting milestone for the linux task; according to the debian log this is fixed in 2.6.26

Changed in linux:
milestone: none → ubuntu-8.04.1
Revision history for this message
DEXTER (mydexterid) wrote :

Same problem here.

Now that it has been found out that this is fixed in 2.6.26, will this be included in an update _soon_?
Or will there be other solution for this _shortly_?

Imho this should have been fixed already, as others said: "This bug makes 8.04 completly unusable as a C/C++ development environment".

Steve Langasek (vorlon)
Changed in linux:
milestone: ubuntu-8.04.1 → ubuntu-8.04.2
Revision history for this message
DEXTER (mydexterid) wrote :

Target 8.04.2 -> 2009.01.01? Is this serious?

Revision history for this message
Dalle (jan-erik-dahlin) wrote : Re: [Bug 230315] Re: gdb gets SIGTRAP on every instruction after function call

DEXTER wrote:
> Target 8.04.2 -> 2009.01.01? Is this serious?
>
Well, you weren't thinking they were going to change kernel version for
8.04, did you?
Guess we'll have to wait for 8.10...

Revision history for this message
kaizen_all (josep-perarnau) wrote :

"This bug makes 8.04 completly unusable as a C/C++ development environment" --> True
and we have to wait more than 7 months!!!!

Revision history for this message
Luiz Capitulino (lcapitulino) wrote :

We have fixed this bug in Mandriva, patch is here:

http://lkml.org/lkml/2008/7/14/317

Revision history for this message
DEXTER (mydexterid) wrote :

Now that's good to hear. Now we have to wait 'till the ubuntu maintainers will release an update. IF they will at all.. :\

Revision history for this message
Matthias Klose (doko) wrote :

closing the gdb tasks and the intrepid kernel task

Changed in gdb:
status: New → Invalid
status: New → Invalid
Changed in linux:
status: New → Invalid
importance: Undecided → High
status: New → Confirmed
Revision history for this message
DEXTER (mydexterid) wrote :

I cannot believe that to change 2 lines of code in the kernel takes half a year for Ubuntu!

Why are you so neglectful?

Tim Gardner (timg-tpi)
Changed in linux:
assignee: nobody → timg-tpi
status: Confirmed → In Progress
Revision history for this message
Tim Gardner (timg-tpi) wrote :
Changed in linux:
status: In Progress → Fix Committed
Revision history for this message
Tim Gardner (timg-tpi) wrote :

SRU Justification

Impact: gdb is not useable

Patch Description: Fix type in kernel macro

Patch: http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-hardy.git;a=commit;h=2ce4b2c2c29f32060580bf37654269a0c15e7845

Test Case: See bug description

Revision history for this message
DEXTER (mydexterid) wrote :

Thanks for fixing it.

Now.. would it be possible to inlcude this in hardy-updates soon (not in a half-year's time)?

Revision history for this message
Matthias Klose (doko) wrote :

DEXTER schrieb:
> Thanks for fixing it.
>
> Now.. would it be possible to inlcude this in hardy-updates soon (not in
> a half-year's time)?

setting the milestone doesn't imply a date for the fix, especially that this is
fixed earlier.

as a side note, please consider how people may react to your comments. the way
you raise your voice may not be seen as appropriate by all people.

Revision history for this message
Robert O'Brien (robertobrien) wrote :

Thanks for integrating the fix to this bug.
If it would be useful, we can run our test case
against a new patched kernel.

Revision history for this message
DEXTER (mydexterid) wrote :

Matthias Klose wrote:
> as a side note, please consider how people may react to your comments. the way
> you raise your voice may not be seen as appropriate by all people.

I considered that thx. I'm just trying to speed up things a bit, because AFAICS everything is sooooo slow
around bug fixing. As I'm using Hardy to develop programs, I know how much time it takes to fix 2 lines of code.
(should not take more than 5 mins) Especially this is a very annoying bug making really hard to debug on Hardy.
Although I could download the latest kernel source and compile it on my own, but I would really like to see this
in my favorite distro, not to mention that other people would like to use it for developing, debugging, and the easiest
way to do that would be apt-get upgrade.

Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 230315] Re: gdb gets SIGTRAP on every instruction after function call

DEXTER [2008-08-02 8:34 -0000]:
> around bug fixing. As I'm using Hardy to develop programs, I know
> how much time it takes to fix 2 lines of code. (should not take
> more than 5 mins)

It might take just 5 minutes to change 2 lines of code, but it takes
hours of testing the result, testing for regressions, doing QA, and
processing the update.

Revision history for this message
DEXTER (mydexterid) wrote :

Martin Pitt wrote:
> It might take just 5 minutes to change 2 lines of code, but it takes
> hours of testing the result, testing for regressions, doing QA, and
> processing the update.

I know that. That's why I wrote "soon" instead of "immediately" :)

Revision history for this message
Martin Pitt (pitti) wrote :

Accepted into -proposed, please test and give feedback here. Please see https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Revision history for this message
DEXTER (mydexterid) wrote :

I tried the proposed kernel image, but I still get the SIGTRAP.

uname -a
Linux lab 2.6.24-20-generic #1 SMP Mon Jul 28 13:49:52 UTC 2008 i686 GNU/Linux

I tried the simple testcase mentioned in comment #9. Is it enough to apt-get install linux-image-2.6.24-20-generic? (by the way I could not install my Nvidia driver with this kernel, but it could be something on my side.)

Revision history for this message
Martin Pitt (pitti) wrote :

Hi,

DEXTER [2008-08-11 15:29 -0000]:
> I tried the proposed kernel image, but I still get the SIGTRAP.

The new version (-20.39) is still building, so you are still using the
old version. Can you please update again in a few hours?

Sorry for the confusion. There is always a few hours of lag between
accepting an upload, and having it built and published to
archive.ubuntu.com.

Revision history for this message
Cesare Tirabassi (norsetto) wrote :

For the record, this only affects i386 arches, so, don't bother to test it if you are on an amd64 arch.

Revision history for this message
DEXTER (mydexterid) wrote :

Hi,

I just did an apt-get update, but I still get the 20.38 version:

apt-cache policy linux-image-2.6.24-20-generic
linux-image-2.6.24-20-generic:
  Installed: 2.6.24-20.38
  Candidate: 2.6.24-20.38
  Version table:
 *** 2.6.24-20.38 0
        400 http://archive.ubuntu.com hardy-proposed/main Packages
        100 /var/lib/dpkg/status

Revision history for this message
Cesare Tirabassi (norsetto) wrote :

linux-image-2.6.24-20-generic in hardy proposed is superseeded by linux-image-2.6.24-21-generic

Revision history for this message
DEXTER (mydexterid) wrote :

What do you mean by superseeded?

apt-cache search cannot find anything greater than -20.
[11:18][xxx@lab:~]$ apt-cache search 2.6.24-21
[11:18][xxx@lab:~]$

Revision history for this message
DEXTER (mydexterid) wrote :

Hi,

I've just installed:

 linux-image-2.6.24-21-generic:
  Installed: 2.6.24-21.40

uname -a
Linux lab 2.6.24-21-generic #1 SMP Tue Aug 12 13:37:22 UTC 2008 i686 GNU/Linux

and it works like a charm :)
so.. thank you for applying the patch, and building the new kernel. Now I can use my machine for debugging :)
Thank you.

Revision history for this message
Martin Pitt (pitti) wrote :

linux 2.6.24-21 copied to hardy-updates.

Changed in linux:
status: Fix Committed → Fix Released
Changed in mandriva:
importance: Unknown → High
Changed in gdb (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.