Date: Mon, 13 Apr 2009 10:41:30 GMT From: Mateusz Guzik <mjguzik@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: bin/133700: [truss] If traced process is killed by signal, truss enters infinite loop Message-ID: <200904131041.n3DAfUWp090937@www.freebsd.org> Resent-Message-ID: <200904131050.n3DAo1C0058072@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 133700 >Category: bin >Synopsis: [truss] If traced process is killed by signal, truss enters infinite loop >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Apr 13 10:50:00 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Mateusz Guzik >Release: 8.0-CURRENT >Organization: >Environment: FreeBSD eternal 8.0-CURRENT FreeBSD 8.0-CURRENT #2: Sat Mar 28 00:24:50 CET 2009 f@eternal:/usr/obj/usr/src/sys/ETERNAL i386 >Description: If traced process is killed by signal, truss enters infinite loop. >How-To-Repeat: Run the following program under truss: int main() {raise(11);} >Fix: The problem lies in setup.c:waitevent(): if (WIFSIGNALED(waitval)) { info->pr_why = S_EXIT; info->pr_why = 0; return; } pr_why is zeroed just after its set to S_EXIT. Patch attached with submission follows: --- usr.bin/truss/setup.c.orig 2007-06-27 00:42:37.000000000 +0200 +++ usr.bin/truss/setup.c 2009-04-13 00:06:45.000000000 +0200 @@ -215,7 +215,7 @@ } if (WIFSIGNALED(waitval)) { info->pr_why = S_EXIT; - info->pr_why = 0; + info->pr_data = 0; return; } } >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200904131041.n3DAfUWp090937>