public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug tapsets/4592] New: access to $bio ioblock.request probe in ioblock.stp fails
@ 2007-06-04 19:25 wcohen at redhat dot com
  2007-06-04 19:32 ` [Bug tapsets/4592] " fche at redhat dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: wcohen at redhat dot com @ 2007-06-04 19:25 UTC (permalink / raw)
  To: systemtap

When running the  systemtap.samples/ioblocktest.stp, the test fails when
running. It appears to make in invalid access through a pointer.



stap
/home/wcohen/stap_snap_200706041620/src/testsuite/systemtap.samples/ioblocktest.stp
systemtap starting probe
ERROR: pointer dereference fault near identifier '$bio' at
/home/wcohen/stap_snap_200706041620/install/share/systemtap/tapset/ioblock.stp:115:33
WARNING: Number of errors: 1, skipped probes: 0

Looking through the ioblock.stp the section of code in question is:

probe ioblock.request = kernel.function ("generic_make_request")
{
        devname = __bio_devname($bio) //problem here
        ino = __bio_ino($bio)
...

The __bio_devname function is the following (noticed the line with the "FIXME":

/* returns the block device name */
function __bio_devname:string(bio:long)
%{
    char b[BDEVNAME_SIZE];
    struct bio *bio = (struct bio *)(long)THIS->bio;
    struct block_device *bdev = kread(&(bio->bi_bdev));
	if (bdev == NULL) {
		strlcpy(THIS->__retvalue, "N/A", MAXSTRINGLEN);
	} else {
		const char *name = bdevname(bdev, b); /* FIXME: deref hazard! */
		deref_string(THIS->__retvalue, name, MAXSTRINGLEN);
	}
	CATCH_DEREF_FAULT();
%}

-- 
           Summary: access to $bio ioblock.request probe in ioblock.stp
                    fails
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: tapsets
        AssignedTo: systemtap at sources dot redhat dot com
        ReportedBy: wcohen at redhat dot com
  GCC host triplet: ia64


http://sourceware.org/bugzilla/show_bug.cgi?id=4592

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug tapsets/4592] access to $bio ioblock.request probe in ioblock.stp fails
  2007-06-04 19:25 [Bug tapsets/4592] New: access to $bio ioblock.request probe in ioblock.stp fails wcohen at redhat dot com
@ 2007-06-04 19:32 ` fche at redhat dot com
  2007-06-04 20:53 ` wcohen at redhat dot com
  2009-03-23 21:08 ` wcohen at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: fche at redhat dot com @ 2007-06-04 19:32 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From fche at redhat dot com  2007-06-04 19:32 -------
(In reply to comment #0)
> When running the  systemtap.samples/ioblocktest.stp, the test fails when
> running. It appears to make in invalid access through a pointer.

It would be useful to see the value of the pointer.  You can do this by a
modified test case that arranges to print raw $bio and related values.
It could help figure out whether the pointers are invalid, whether the
debugging information is wrong, or something else is amiss.


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=4592

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug tapsets/4592] access to $bio ioblock.request probe in ioblock.stp fails
  2007-06-04 19:25 [Bug tapsets/4592] New: access to $bio ioblock.request probe in ioblock.stp fails wcohen at redhat dot com
  2007-06-04 19:32 ` [Bug tapsets/4592] " fche at redhat dot com
@ 2007-06-04 20:53 ` wcohen at redhat dot com
  2009-03-23 21:08 ` wcohen at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: wcohen at redhat dot com @ 2007-06-04 20:53 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From wcohen at redhat dot com  2007-06-04 20:52 -------
The following probe show $bio as being zero, need to determine whether this is
due to faulty debuginfo or bad code generated for accessing function arguments.

#! stap
global teststr
probe begin { log("systemtap starting probe") }

probe end { 
   log("systemtap ending probe")
   printf("%s", teststr)
}


probe kernel.function ("generic_make_request")
{
   printf ("bio = %p \n", $bio);
}


$ ../../install/bin/stap -k /tmp/ioblocktest2.stp 
systemtap starting probe
bio = 0x0000000000000000 
bio = 0x0000000000000000 
bio = 0x0000000000000000 
...



-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=4592

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug tapsets/4592] access to $bio ioblock.request probe in ioblock.stp fails
  2007-06-04 19:25 [Bug tapsets/4592] New: access to $bio ioblock.request probe in ioblock.stp fails wcohen at redhat dot com
  2007-06-04 19:32 ` [Bug tapsets/4592] " fche at redhat dot com
  2007-06-04 20:53 ` wcohen at redhat dot com
@ 2009-03-23 21:08 ` wcohen at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: wcohen at redhat dot com @ 2009-03-23 21:08 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From wcohen at redhat dot com  2009-03-23 18:53 -------
Checked to see if this is still a problem on the current RHEL5 ia64 running 
2.6.18-128.1.1.el5 kernel. Not clear whether is is a debuginfo problem with the
older kernel or problem with the systemtap finding where to get the argument.
The test script runs fine with current version of systemtap on this kernel, but
version of systemtap checked out 20081201 and systemtap from rpm
(systemtap-0.7.2-2.el5) also worked. Output of latest systemtap:

WARNING: read-only global variable 'teststr' : identifier 'teststr' at /tmp/iobl
ocktest2.stp:2:8
 source: global teststr
                ^
systemtap starting probe
bio = 0xe00000405544bb00 
bio = 0xe00000405544bb80 
...
bio = 0xe000004055445500 
bio = 0xe000004055445580 
bio = 0xe000004055445900 
bio = 0xe000004055445980 
bio = 0xe000004055445980 
bio = 0xe000004055445900 
systemtap ending probe
Keeping temporary directory "/tmp/stapvH1qVM"


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WORKSFORME


http://sourceware.org/bugzilla/show_bug.cgi?id=4592

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-03-23 18:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-04 19:25 [Bug tapsets/4592] New: access to $bio ioblock.request probe in ioblock.stp fails wcohen at redhat dot com
2007-06-04 19:32 ` [Bug tapsets/4592] " fche at redhat dot com
2007-06-04 20:53 ` wcohen at redhat dot com
2009-03-23 21:08 ` wcohen at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).