Bug 292981

Summary: Debugee send TWO sigtrap to itslf when execute misc/script
Product: Red Hat Enterprise Linux 5 Reporter: Eric Lin <eric.lin>
Component: ia32elAssignee: Petr Machata <pmachata>
Status: CLOSED WONTFIX QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 5.0CC: anton.fang, eric.lin, law, luyu, mnewsome, yihua.jin
Target Milestone: ---   
Target Release: ---   
Hardware: ia64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-20 15:35:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
A case compialed natively can reproduce the problem
none
the entire test suite to reproduse the problem, including src, binary, script none

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.