From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19625 invoked by alias); 16 Sep 2013 21:30:08 -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 19566 invoked by uid 48); 16 Sep 2013 21:30:04 -0000 From: "dsmith at redhat dot com" To: systemtap@sourceware.org Subject: [Bug tapsets/15961] New: nd_syscall.exp failure on i686 Date: Mon, 16 Sep 2013 21:30: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: dsmith at redhat dot com X-Bugzilla-Status: NEW 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 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-q3/txt/msg00316.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=15961 Bug ID: 15961 Summary: nd_syscall.exp failure on i686 Product: systemtap Version: unspecified Status: NEW Severity: normal Priority: P2 Component: tapsets Assignee: systemtap at sourceware dot org Reporter: dsmith at redhat dot com The nd_syscall.exp testcase gets a failure on i686 RHEL6 (2.6.32-358.18.1.el6.i686) in the 'trunc' test: FAIL: 32-bit trunc nd_syscall This failure is because systemtap is getting the wrong value for the 'length' convenience variable from the nd_syscall.truncate probe. Here's the source for nd_syscall.truncate: ==== probe nd_syscall.truncate = kprobe.function("sys_truncate") ?, kprobe.function("sys_truncate64") ? { name = "truncate" // path_uaddr = $path // path = user_string($path) // length = $length // argstr = sprintf("%s, %d", user_string_quoted($path), $length) asmlinkage() path_uaddr = pointer_arg(1) path = user_string_quoted(path_uaddr) if (symname(addr()) == "sys_truncate") length = ulong_arg(2) else length = longlong_arg(2) argstr = sprintf("%s, %d", user_string_quoted(path_uaddr), length) } ==== The problem here was that a probe on "sys_truncate" was installed, but 'symname(addr())' failed, so that the wrong value was grabbed for 'length'. 'symname(addr())' shouldn't have failed, but that's a lot of work to do just to figure out which function is being called. A call to 'ppfunc()' might be better or breaking down the probe a bit more like the following (untested): ==== probe nd_syscall.truncate = __nd_syscall.truncate ?, __nd_syscall.truncate64 ? { name = "truncate" // path_uaddr = $path // path = user_string($path) // length = $length // argstr = sprintf("%s, %d", user_string_quoted($path), $length) asmlinkage() path_uaddr = pointer_arg(1) path = user_string_quoted(path_uaddr) argstr = sprintf("%s, %d", user_string_quoted(path_uaddr), length) } probe __nd_syscall.truncate = kprobe.function("sys_truncate") { asmlinkage() length = ulong_arg(2) } probe __nd_syscall.truncate64 = kprobe.function("sys_truncate64") { asmlinkage() length = longlong_arg(2) } ==== Note that there are 3 other similar uses of 'symname(addr())' in the nd_syscall tapset files. -- You are receiving this mail because: You are the assignee for the bug.