From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 123995 invoked by alias); 11 May 2016 01:24:12 -0000 Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org Received: (qmail 123722 invoked by uid 48); 11 May 2016 01:23:59 -0000 From: "mysecondaccountabc at gmail dot com" To: systemtap@sourceware.org Subject: [Bug tapsets/20075] New: target_set_pid() returns False when execve() syscall is successful Date: Wed, 11 May 2016 01:24:00 -0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: systemtap X-Bugzilla-Component: tapsets X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mysecondaccountabc at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: systemtap at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2016-q2/txt/msg00094.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=3D20075 Bug ID: 20075 Summary: target_set_pid() returns False when execve() syscall is successful Product: systemtap Version: unspecified Status: NEW Severity: normal Priority: P2 Component: tapsets Assignee: systemtap at sourceware dot org Reporter: mysecondaccountabc at gmail dot com Target Milestone: --- Created attachment 9250 --> https://sourceware.org/bugzilla/attachment.cgi?id=3D9250&action=3Dedit Script to show the issue When execve() is called and it returns without error, for some reason a cal= l to target_set_pid(pid()) in this context returns "False", wrongly indicating t= hat the pid doesn't descend from the target process. It causes that syscall be discarded from the syscall trace. I'm using a slightly modified version of "strace.stp" to show the issue, see the attachment. sudo stap my_strace.stp -w -c "sh -c /bin/ls"=20 =3D=3D=3D=3D ... ||OK_CALL 3||: target_set_pid(12701):1 target:12701 ||OK_RETURN 3||: target_set_pid(12701):1 target:12701 Wed May 11 00:49:14 2016.822339 rt_sigprocmask(SIG_SETMASK, [EMPTY], 0x0, 8= ) =3D 0 ||OK_CALL 3||: target_set_pid(12701):1 target:12701 ||OK_RETURN 3||: target_set_pid(12701):1 target:12701 Wed May 11 00:49:14 2016.822364 execve("/usr/local/sbin/sh", ["sh", "-c", "/bin/ls"], [/* 18 vars */]) =3D -2 (ENOENT) ... ||OK_CALL 3||: target_set_pid(12701):1 target:12701 ||FILTERED_RETURN 2||: target_set_pid(12701):0 >>FILTERED_RETURN<<: sh[12701] execve("/bin/sh", ["sh", "-c", "/bin/ls"], [= /* 18 vars */]) =3D 0 ...=20 =3D=3D=3D=3D As you can see above in the last three lines, when the successful execve is called, the target_set_pid(pid()) call in the nd_syscall.*.return probe ret= urns False "target_set_pid(12701):0", causing the syscall to be dropped. --=20 You are receiving this mail because: You are the assignee for the bug.