Bug 12157 - TIMER_ABSTIME still resulting in userland deadlock under GDB
Summary: TIMER_ABSTIME still resulting in userland deadlock under GDB
Status: REJECTED UNREPRODUCIBLE
Alias: None
Product: Timers
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: john stultz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-03 14:38 UTC by Gertjan Hofman
Modified: 2009-01-05 09:48 UTC (History)
1 user (show)

See Also:
Kernel Version: 2.6.24, 2.6.27
Subsystem:
Regression: ---
Bisected commit-id:


Attachments
.config file (78.19 KB, text/plain)
2008-12-03 14:44 UTC, Gertjan Hofman
Details
config used with stock 2.6.27.8 (87.18 KB, text/plain)
2008-12-09 14:37 UTC, Gertjan Hofman
Details

Description Gertjan Hofman 2008-12-03 14:38:21 UTC
Problem Description:

This is an attempt to re-open 

http://bugzilla.kernel.org/show_bug.cgi?id=7967

That bug provided a little piece of test code that failed to return from an TIMER_ABSTIME call  under GDB.

We see the exact same problem using standard Ubuntu 8.04, with that test code (and of course, our own code that had us scratching our heads).

Tried both  kernels 2.6.27-7-generic and  2.6.24-21-generic - realize these arent stock, but probably dont have serious patches related to this.

gcc: gcc (GCC) 4.2.3 (Ubuntu 4.2.3-2ubuntu7)
glibc reports:

root@evolution03:~# /lib/libc.so.6
GNU C Library stable release version 2.7, by Roland McGrath et al.

Problem is easily reproduced by running the test code supplied in http://bugzilla.kernel.org/show_bug.cgi?id=7967 under gdb. The code never returns.

We would like to use absolute timers, but also be able to debug code. Anything else I can provide here ?

Gertjan Hofman





Latest working kernel version:
Earliest failing kernel version:
Distribution: Ubuntu 8.04.1 (and likely 8.10)
Hardware Environment: Dell I386
Software Environment: Ubuntu 8.04.1




Steps to reproduce: see above.
Comment 1 Gertjan Hofman 2008-12-03 14:44:49 UTC
Created attachment 19132 [details]
.config file
Comment 2 Thomas Gleixner 2008-12-08 15:59:33 UTC
> We see the exact same problem using standard Ubuntu 8.04, with that test code
> (and of course, our own code that had us scratching our heads).
> 
> Tried both  kernels 2.6.27-7-generic and  2.6.24-21-generic - realize these
> arent stock, but probably dont have serious patches related to this.

I doubt that any ubuntu kernel is anyway near to mainline. 

> Problem is easily reproduced by running the test code supplied in
> http://bugzilla.kernel.org/show_bug.cgi?id=7967 under gdb. The code never
> returns.

Well, the problem is that I can can not reproduce it at all.
 
> We would like to use absolute timers, but also be able to debug code.
> Anything
> else I can provide here ?

Yes, please compile and run a mainline kernel and check whether the
problem persists.

Thanks,

	tglx
Comment 3 Gertjan Hofman 2008-12-09 14:35:00 UTC
Dear Mr. Gleixner,

Thanks for your quick response. I downloaded 2.6.27.8 from kernel.org and applied the config file attached (which is based on the Ubuntu one). The problem, alas persists.  Unfortunately all my machines are running Linux of the same vintage and so it's harder for me to try older gcc versions. Again, I am happy to try and other test you may suggest. We are puzzled we see few references to this problem.

gertjan
Comment 4 Gertjan Hofman 2008-12-09 14:37:00 UTC
Created attachment 19233 [details]
config used with stock 2.6.27.8
Comment 5 Thomas Gleixner 2008-12-11 15:05:13 UTC
Gertjan,

I just run a ubuntu 8.04.1 live cd on KVM and was able to reproduce
the problem. To dig deeper into this I need to install it for real,
but my suspision is that this is a compiler related problem.

To speed up the process can you please install a debian kernel on your
machine ? It's compiled with a different gcc.

# wget http://ftp.debian.org/pool/main/l/linux-2.6/linux-image-2.6.26-1-686_2.6.26-11_i386.deb
# dpkg -i linux-image-2.6.26-1-686_2.6.26-11_i386.deb

Thanks,

	tglx
Comment 6 Thomas Gleixner 2008-12-11 15:50:05 UTC
> I just run a ubuntu 8.04.1 live cd on KVM and was able to reproduce
> the problem. To dig deeper into this I need to install it for real,
> but my suspision is that this is a compiler related problem.

Ok. I installed it and installed the debian kernel as well. The
problem does not longer reproduce with the debian kernel image.

So, my conclusion is that this is really an ubuntu GCC issue:

ubuntu kernel and mainline both compiled with the ubuntu GCC show the
problem.

debian kernel on the same machine does not and I can't see the problem
on any of my machines (debian and fedora).

You could also try the following:

# apt-get install gcc-3.4 

and compile the mainline kernel with:

# make CC=gcc-3.4 ....

Thanks,

	tglx
Comment 7 Gertjan Hofman 2008-12-15 15:37:59 UTC
Dear Thomas,

You are correct. Stock kernel or Ubuntu kernel compiled with gcc-3.4 is no problem. Sigh. I guess this leaves me with the question of where to take this problem - is it likely to be a gcc issue, a glibc or an ubuntu one ? If you have any thoughts on where I should take this question, let me know.
Thanks for your help

Gertjan
Comment 8 Thomas Gleixner 2008-12-16 01:22:21 UTC
Gertjan,

> You are correct. Stock kernel or Ubuntu kernel compiled with gcc-3.4 is no
> problem. Sigh. I guess this leaves me with the question of where to take this
> problem - is it likely to be a gcc issue, a glibc or an ubuntu one ? If you
> have any thoughts on where I should take this question, let me know.

We checked with other gcc 4.2 incarnations, e.g. debian and the
resulting kernel works just fine. AFAICT it is just this particular
version of 4.2 GCC which is shipped by ubuntu.

Poke the ubuntu gcc package maintainer. He handles the debian gcc
package as well, so it should be easy for him to figure out whats
wrong after we already went down the long road to identify the
culprit.

Thanks,

	tglx
Comment 9 Gertjan Hofman 2009-01-05 09:48:55 UTC
bug closed, trying to harass Ubuntu instead (see https://bugs.launchpad.net/ubuntu/+source/gcc-4.2/+bug/313292)

Note You need to log in before you can comment on or make changes to this bug.