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
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):
Steps to Reproduce:
1.compile the attached file natively: make ptrace_exec64
2.Run : ./ptrace_exec64
3.Get assert failure
Created attachment 197221 [details]
A case compialed natively can reproduce the problem
Created attachment 197281 [details]
the entire test suite to reproduse the problem, including src, binary, script
execute ./ptrace_exec64 and will get a assertion.
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.