Bug 491542 - Undo Fedora-specific clone() cfi_undefined(pc) removal
Undo Fedora-specific clone() cfi_undefined(pc) removal
Product: Fedora
Classification: Fedora
Component: glibc (Show other bugs)
x86_64 Linux
low Severity low
: ---
: ---
Assigned To: Andreas Schwab
Fedora Extras Quality Assurance
Depends On:
Blocks: 516995
  Show dependency treegraph
Reported: 2009-03-22 16:34 EDT by Jan Kratochvil
Modified: 2009-11-30 10:31 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-11-30 10:31:10 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 Jan Kratochvil 2009-03-22 16:34:13 EDT
Description of problem:
On F11 GDB started to backtrace past clone() thread_start.
This was workarounded in GDB by code matching pattern which changed with gcc44.
The workaround in GDB could be dropped as the upstream DWARF based patch now works in F11 and its Fedora specific removal can be stopped.
Originally it was incompatible with libgcc unwinder (although I did not find the specific patch which did fix it).

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
$ gdb -q ./threadit
(gdb) b start
Breakpoint 1 at 0x400628: file threadit.c, line 31.
(gdb) r
(gdb) bt
Actual results:
#0  start (arg=0x0) at threadit.c:31
#1  0x00000000009a087a in start_thread () from /lib64/libpthread.so.0
#2  0x00007ffff7d5b4cd in clone () from /lib64/libc.so.6
#3  0x0000000000000000 in ?? ()

Expected results:
#0  start (arg=0x0) at threadit.c:31
#1  0x00000000009a087a in start_thread () from /lib64/libpthread.so.0
#2  0x00007ffff7d5b4cd in clone () from /lib64/libc.so.6

Additional info:
The removal is by:
* Thu Dec 14 2006 Jakub Jelinek <jakub@redhat.com> 2.5.90-13
- revert i?86/x86_64 clone CFI temporarily
+++ glibc-20090320T1944-fedora/sysdeps/unix/sysv/linux/i386/clone.S     14 Dec 2006 09:06:34 -0000
+++ glibc-20090320T1944-fedora/sysdeps/unix/sysv/linux/x86_64/clone.S   14 Dec 2006 09:06:34 -0000

It was discussed at:

GDB regression on: gdb.threads/bt-clone-stop.exp

glibc scratch build test:
With no regressions for: grep -i 'make:.*error' *.log

It breaks upstream libunwind for its testcase:
But Fedora libunwind has no (maybe one minor) regressions probably due to its:
libunwind.non-ia64 is currently used only by Frysk now.

Tested that the testcase:
#include <pthread.h>
#include <execinfo.h>
#include <stdio.h>
#include <unistd.h>
void *
tf (void *arg)
  void *buf[512];
  int i = backtrace (buf, 512);
  printf ("%d\n", i);
  backtrace_symbols_fd (buf, i, STDOUT_FILENO);
  return NULL;
main (void)
  pthread_t th;
  pthread_create (&th, NULL, tf, NULL);
  pthread_join (th, NULL);
  return 0;
unwinds fine on x86_64+i686:

and that it really loops with the glibc scratch build o RHEL-5.2:

If the patch removal stays in glibc sure I can update the workaround in GDB.
Comment 1 Jakub Jelinek 2009-03-24 06:44:35 EDT
To my knowledge GCC unwinder still treats DW_CFA_undefined exactly the same
as DW_CFA_same_value, so this really can't be removed, it breaks a lot of stuff.

I guess I should revive the
patch, but I'll need support for that from Roland/you/drow.
Comment 2 Bug Zapper 2009-06-09 08:30:05 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
Comment 3 Ulrich Drepper 2009-11-22 19:42:49 EST
What is the status of this?
Comment 4 Jakub Jelinek 2009-11-23 05:21:31 EST
The GCC change is now in upstream GCC 4.4.0+ (and of course Fedora GCC 4.4-RH too), so in theory this could be reverted even on the glibc side.
Comment 5 Andreas Schwab 2009-11-30 10:31:10 EST
Fixed in rawhide.

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