This is the mail archive of the mailing list for the systemtap project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tapsets/2934] New: ioblocktest.exp panic

While running the tests in testsuite/tests, I was seeing problems with
ioblocktest.stp locking up the machine if I had the cdrom drive mounted.

To verify, the following test script prints a backtrace if it sees a null value
for bio->bi_bdev, followed by the backtrace I get on the machine.

probe ioblock.end
	if (!$bio->bi_bdev) {
		printf("bio->bi_bdev: %p\n", $bio->bi_bdev)


bio->bi_bdev: 0x0000000
trace for 0 (swapper)
 0xc0168472 : bio_endio+0x2/0x55 []
 0xc01d0477 : __end_that_request_first+0x18a/0x481 []
 0xe003c492 : ata_input_data+0x5e/0x64 [ide_core]
 0xe003c515 : atapi_input_bytes+0x19/0x3f [ide_core]
 0xe04d7fd0 : cdrom_newpc_intr+0x1cf/0x2de [ide_cd]
 0xc02b21b8 : _spin_lock_irqsave+0x9/0xd []
 0xe003c4fc : atapi_input_bytes+0x0/0x3f [ide_core]
 0xe04d7e01 : cdrom_newpc_intr+0x0/0x2de [ide_cd]
 0xe003bef3 : ide_intr+0x12e/0x189 [ide_core]
 0xc014652f : handle_IRQ_event+0x23/0x4c []
 0xc01465e1 : __do_IRQ+0x89/0xda []
 0xc0106561 : do_IRQ+0x43/0x52 []
 0xc0104d5a : common_interrupt+0x1a/0x20 []
 0xc0102377 : poll_idle+0x0/0x14 []
 0xc0102388 : poll_idle+0x11/0x14 []
 0xc0102f06 : cpu_idle+0x9e/0xb8 []
 0xc03a069a : start_kernel+0x316/0x31d []

So bio_devname() in tapset/ioblock.stp should check for null before it calls
bdevname().  The following patch fixes the problem for me:

Index: tapset/ioblock.stp
RCS file: /cvs/systemtap/src/tapset/ioblock.stp,v
retrieving revision 1.1
diff -u -p -r1.1 ioblock.stp
--- tapset/ioblock.stp	8 Jun 2006 23:12:28 -0000	1.1
+++ tapset/ioblock.stp	17 Jul 2006 16:15:32 -0000
@@ -62,11 +62,12 @@ probe ioblock.end
 /* Return the block device name */
 function bio_devname:string(bio:long)
-  char b[BDEVNAME_SIZE];
+  char b[BDEVNAME_SIZE] = "";
   struct bio *bp;
   bp = (struct bio *) ((unsigned long) THIS->bio);
-  bdevname(bp->bi_bdev,b);
+  if (bp->bi_bdev)
+    bdevname(bp->bi_bdev,b);

           Summary: ioblocktest.exp panic
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: tapsets
        AssignedTo: systemtap at sources dot redhat dot com
        ReportedBy: zanussi at us dot ibm dot com

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]