Bug 638979 - `set follow-fork-mode child' fails on sshd (PIE?)
Summary: `set follow-fork-mode child' fails on sshd (PIE?)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: gdb
Version: rawhide
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Jan Kratochvil
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-09-30 14:31 UTC by Jan Kratochvil
Modified: 2010-10-28 06:07 UTC (History)
3 users (show)

Fixed In Version: gdb-7.2-23.fc14
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-10-28 06:07:32 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
screenshot (7.49 KB, text/plain)
2010-09-30 14:38 UTC, Jan Kratochvil
no flags Details

Description Jan Kratochvil 2010-09-30 14:31:02 UTC
Description of problem:


Version-Release number of selected component (if applicable):
gdb-7.2-6.fc14.x86_64
openssh-server-5.6p1-9.fc15.x86_64

How reproducible:
Always.

Steps to Reproduce:
1. gdb /usr/sbin/sshd `pgrep sshd`
2. set follow-fork-mode child
3. c
4. ssh localhost
5. http://fpaste.org/Bzex/raw/
6. sshd[4441]: segfault at  ...

Actual results:
(gdb) set follow-fork-mode child
(gdb) c
Continuing.
[New process 2094]
[Thread debugging using libthread_db enabled]
process 2094 is executing new program: /usr/sbin/sshd
[Thread debugging using libthread_db enabled]
[New process 2095]
[Thread debugging using libthread_db enabled]

Program exited normally.
(gdb) q

Expected results:
debugged child

Additional info:
There may be some PIE problem, sshd is ET_DYN and:
(gdb) c
Continuing.
process 2443 is executing new program: /usr/sbin/sshd
Error in re-setting breakpoint 1: Cannot access memory at address 0xc2d0
Error in re-setting breakpoint 2: Cannot access memory at address 0xd5c0
Error in re-setting breakpoint 1: Cannot access memory at address 0xc2d0
Error in re-setting breakpoint 2: Cannot access memory at address 0xd5c0

Comment 1 Jan Kratochvil 2010-09-30 14:38:56 UTC
Created attachment 450773 [details]
screenshot

Comment 2 Jan Kratochvil 2010-09-30 18:54:22 UTC
post:
[patch] Fix inferior execl of new PIE x86_64
http://sourceware.org/ml/gdb-patches/2010-09/msg00519.html

You need to use set follow-fork-mode child first and then parent on the second fork, otherwise the control also gets lost, though.

Comment 3 Fedora Update System 2010-10-13 02:55:31 UTC
gdb-7.2-22.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/gdb-7.2-22.fc14

Comment 4 Fedora Update System 2010-10-13 06:10:39 UTC
gdb-7.2-22.fc14 has been pushed to the Fedora 14 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update gdb'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/gdb-7.2-22.fc14

Comment 5 Fedora Update System 2010-10-14 15:42:53 UTC
gdb-7.2-23.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/gdb-7.2-23.fc14

Comment 6 Fedora Update System 2010-10-28 06:07:10 UTC
gdb-7.2-23.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.


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