Bug 292981 - Debugee send TWO sigtrap to itslf when execute misc/script
Debugee send TWO sigtrap to itslf when execute misc/script
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: ia32el (Show other bugs)
5.0
ia64 Linux
medium Severity high
: ---
: ---
Assigned To: Petr Machata
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-09-17 05:58 EDT by Eric Lin
Modified: 2015-05-04 21:33 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-03-20 11:35:21 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
A case compialed natively can reproduce the problem (4.49 KB, text/plain)
2007-09-17 05:58 EDT, 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 08:06 EDT, Eric Lin
no flags Details

  None (edit)
Description Eric Lin 2007-09-17 05:58:01 EDT
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 05:58:02 EDT
Created attachment 197221 [details]
A case compialed natively can reproduce the problem
Comment 2 Eric Lin 2007-09-17 08:06:19 EDT
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 11:35:21 EDT
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.