Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 198724 - PTRACE_[SG]ET_THREAD_AREA not supported by sys_ptrace32 on kernel.x86_64
PTRACE_[SG]ET_THREAD_AREA not supported by sys_ptrace32 on kernel.x86_64
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Kernel Maintainer List
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2006-07-13 01:19 EDT by Alexandre Oliva
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-11-06 20:15:41 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Alexandre Oliva 2006-07-13 01:19:19 EDT
Description of problem:
The 32-bit libthread_db included in the latest glibc breaks 32-bit gdb running
on a 64-bit kernel.  At first I thought it was something broken in the new gdb,
but then I took gdb- from FC5 and a threaded program built on
FC5 and tried it on rawhide/x86_64, and the symptom is the same as using the
latest gdb.i386 on rawhide/x86_64:

[Thread debugging using libthread_db enabled]
Error while reading shared library symbols:
Cannot find new threads: generic error
Cannot find user-level thread for LWP 19788: generic error

The problem is that td_ta_thr_iter_p() returns 1 instead of 0, for some reason I
haven't tried to figure out yet.

gdb.x86_64 works perfectly well, and the latest gdb.i386 works perfectly on
rawhide/i386, on kernel.i686.

Version-Release number of selected component (if applicable):
kernel-2.6.17-1.2364.fc6, and also whatever kernel runs on the brew i386 build
machines, which is how I know it is not a kernel problem.  I can tell from the
failures that it is an x86_64 kernel.

How reproducible:
Every time

Steps to Reproduce:
1.Install gdb.i386 on x86_64 rawhide
2.Try to debug any 32-bit threaded program, setting a breakpoint in main

Actual results:
See above

Expected results:
It should not fail

Additional info:
Comment 1 Jakub Jelinek 2006-07-13 08:19:48 EDT
32-bit gdb ever worked on 64-bit x86-64 kernel?  That's news for me.
Comment 2 Alexandre Oliva 2006-07-13 14:46:11 EDT
Yes, I have used it in the not-too-distant past, even to debug multi-threaded
programs and to run its testsuite.
Comment 3 Alexandre Oliva 2006-07-13 18:53:48 EDT
And I've just verified that it works on FC5/x86_64 with all updates and testing
updates as of yesterday.
Comment 4 Alexandre Oliva 2006-07-14 01:04:38 EDT
Sorry, false alarm, it's not in glibc, it's in the kernel.  sys_ptrace32
regressed in this regard between the FC5 kernel and the rawhide kernel, in that
the latter no longer handles PTRACE_[SG]ET_THREAD_AREA.  I don't quite see that
the handling in the FC5 kernel is entirely correct, but, oddly enough, it
appears to work.  Anyhow, this makes it a kernel bug, and apparently a
regression while at that.
Comment 5 Chuck Ebbert 2007-11-06 20:15:41 EST
Fixed upstream in Nov 2006.

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