Bug 474390 - pass 2 aborts on s390x with module.function probe
Summary: pass 2 aborts on s390x with module.function probe
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: systemtap
Version: 5.3
Hardware: s390x
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Frank Ch. Eigler
QA Contact: BaseOS QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-12-03 16:39 UTC by Petr Muller
Modified: 2016-09-20 02:05 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-23 15:10:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
backtrace (3.59 KB, text/plain)
2008-12-03 16:42 UTC, Petr Muller
no flags Details

Description Petr Muller 2008-12-03 16:39:20 UTC
Description of problem: 

Running this script: 
====================================
# cat mod.stp
probe module("ext3").function("*") {
  printf("%s\\n",probefunc())
}
====================================

aborts in pass 2:
# stap -v mod.stp
Pass 1: parsed user script and 44 library script(s) in 410usr/10sys/1174real ms.

terminate called after throwing an instance of 'std::logic_error'
  what():  basic_string::_S_construct NULL not valid
Aborted

Version-Release number of selected component (if applicable):
systemtap-0.7.2-2
kernel-2.6.18-92 (NOT occuring on 2.6.18-124)

How reproducible:
always

Steps to Reproduce:
1. stap -p2 -v mod.stp
  
Actual results:
Pass 1: parsed user script and 44 library script(s) in 410usr/10sys/1174real ms.
terminate called after throwing an instance of 'std::logic_error'
  what():  basic_string::_S_construct NULL not valid
Aborted

Expected results:
compiles & runs flawlessly

Comment 1 Petr Muller 2008-12-03 16:42:10 UTC
Created attachment 325560 [details]
backtrace

backtrace

Comment 2 David Smith 2008-12-03 18:00:23 UTC
From the backtrace, we've determined that the problem is that dwarf_diename() returned NULL, which was then passed to a std::string constructor.  Unfortunately, NULL isn't a valid value to pass to the constructor.

I've audited all uses of dwarf_diename() in systemtap and ensured that a return value of NULL is properly handled.  These changes have been checked into the mainline of systemtap development (git commit id 50e22e6).

With these changes, mainline systemtap works correctly on s390x kernel-2.6.18-92 (and 2.6.18-124).

Comment 3 David Smith 2008-12-08 17:49:55 UTC
The correct git commit id is 0e68eaa.

Comment 4 Frank Ch. Eigler 2009-09-23 15:10:48 UTC
0.9.* releases already in RHEL5.4 include a fix for this problem.


Note You need to log in before you can comment on or make changes to this bug.