Bug 292981 - Debugee send TWO sigtrap to itslf when execute misc/script
Summary: Debugee send TWO sigtrap to itslf when execute misc/script
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: ia32el
Version: 5.0
Hardware: ia64
OS: Linux
medium
high
Target Milestone: ---
: ---
Assignee: Petr Machata
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-09-17 09:58 UTC by Eric Lin
Modified: 2015-05-05 01:33 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-03-20 15:35:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
A case compialed natively can reproduce the problem (4.49 KB, text/plain)
2007-09-17 09:58 UTC, Eric Lin
no flags Details
the entire test suite to reproduse the problem, including src, binary, script (40.00 KB, application/x-tar)
2007-09-17 12:06 UTC, Eric Lin
no flags Details

Description Eric Lin 2007-09-17 09:58:01 UTC
Description of problem:
   In RHEL5, if a debuggee execute a misc/script binary, SIGTRAP will be sent 
twice to itself, so that debugger will receive TWO SIGCHLD. After investigate,
the problem is that the notify procedure (fuction "tracehook_report_exec"  ) 
is put in function "search_binary_hanlder", rather than in "load_elf_binary" 
as in RHEL4.
   SO the logic of execute a misc/script binary will belike this:
   do_execve ( )
       |___ search_binary_handler ( )
           |___load_misc_bianry ( )
           |    |___search_bianry_handler ( )
           |        |___ load_elf_binary ( )
           |        |___  tracehook_report_exec ( )
           |___ tracehook_report_exec( )

obviously, "tracehook_report_exec" will be called twice, which send TWO 
SIGTRAP. 
    ia32el depend on load_misc_bianry to simulate 32-bit binary, so if use 32-
bit gdb to debug 32-bit app on ia32el, gdb will get a extra SIGCHLD.

   
    For simply reporduce the problem, attached is a 64-bit case using ptrace 
to attach a child while execute a script and check the status.Normally, parent 
should receive ONE sigchld when child(debugee) call "execve", but in this 
case, it receive TWICE since child execute a script.

 



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


How reproducible:


Steps to Reproduce:
1.compile the attached file natively: make ptrace_exec64
2.Run : ./ptrace_exec64
3.Get assert failure
  
Actual results:


Expected results:


Additional info:

Comment 1 Eric Lin 2007-09-17 09:58:02 UTC
Created attachment 197221 [details]
A case compialed natively can reproduce the problem

Comment 2 Eric Lin 2007-09-17 12:06:19 UTC
Created attachment 197281 [details]
the entire test suite to reproduse the problem, including src, binary, script

execute ./ptrace_exec64 and will get a assertion.

Comment 3 Jeff Law 2013-03-20 15:35:21 UTC
There are no plans to issue further updates to the ia32el package in Red Hat Enterprise Linux 5.  Therefore, this bug is being closed as WONTFIX.


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