From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29407 invoked by alias); 5 Aug 2014 22:06:28 -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 29382 invoked by uid 48); 5 Aug 2014 22:06:23 -0000 From: "jistone at redhat dot com" To: systemtap@sourceware.org Subject: [Bug translator/17231] New: sysroot is too often prepended Date: Tue, 05 Aug 2014 22:06:00 -0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: systemtap X-Bugzilla-Component: translator X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jistone 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: 2014-q3/txt/msg00126.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=17231 Bug ID: 17231 Summary: sysroot is too often prepended Product: systemtap Version: unspecified Status: NEW Severity: normal Priority: P2 Component: translator Assignee: systemtap at sourceware dot org Reporter: jistone at redhat dot com # normal: $ stap -l 'process("/bin/ls").function("main")' process("/usr/bin/ls").function("main") # symroot identity: $ ./stap -l 'process("/bin/ls").function("main")' --sysroot / process("/usr/bin/ls").function("main") # add a trivial real symroot $ sudo mount --bind / /mnt $ ls -l /mnt/bin/ls -rwxr-xr-x. 1 root root 121K Mar 5 05:09 /mnt/bin/ls $ stap -l 'process("/bin/ls").function("main")' --sysroot /mnt --vp 02 semantic error: while resolving probe point: identifier 'process' at :1:7 thrown from: ../elaborate.cxx:1061 source: probe process("/bin/ls").function("main") {} ^ semantic error: cannot find executable '/mnt//mnt//bin/ls' thrown from: ../tapsets.cxx:672 The sysroot is first prepended in dwarf_builder::build(), then again when base_query::base_query() calls find_executable(), and then it fails when is_fully_resolved() compares the path to yet another find_executable(). By that time we have twice-prepended compared to thrice, which of course is not equal. It also fails when the filename has no path to start with, which ought to search $PATH in the sysroot: $ stap -l 'process("ls").function("main")' process("/usr/bin/ls").function("main") $ stap -l 'process("ls").function("main")' --sysroot /mnt --vp 02 semantic error: while resolving probe point: identifier 'process' at :1:7 thrown from: ../elaborate.cxx:1061 source: probe process("ls").function("main") {} ^ semantic error: cannot find executable '/mnt//mnt/ls' thrown from: ../tapsets.cxx:672 or even: $ stap -l 'process("ls").function("main")' --sysroot / --vp 02 semantic error: while resolving probe point: identifier 'process' at :1:7 thrown from: ../elaborate.cxx:1061 source: probe process("ls").function("main") {} ^ semantic error: cannot find executable '//ls' thrown from: ../tapsets.cxx:672 -- You are receiving this mail because: You are the assignee for the bug.