Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#22 closed defect (fixed)

smartctl segfaults on 3ware

Reported by: valharis Owned by: Christian Franke
Priority: major Milestone:
Component: all Version:
Keywords: Cc:


I'm running smartctl from SVN head (revision 2985) on an AMD64 system with Linux kernel 2.6.30-2 (Debian unstable)

smartctl -d 3ware,0 -a /dev/sda
results in a Segmentation fault.

#0 0x000000000042e2de in os_linux::linux_escalade_device::ata_pass_through (this=0x674010, in=..., out=...) at os_linux.cpp:1610
#1 0x000000000040cb99 in smartcommandhandler (device=0x674010, command=IDENTIFY, select=0, data=0x662d40 "\036") at atacmds.cpp:569
#2 0x000000000040e82d in ataReadHDIdentity (device=0x674010, buf=0x662d40) at atacmds.cpp:774
#3 0x0000000000413891 in ataPrintMain (device=0x674010, options=...) at ataprint.cpp:1758
#4 0x000000000040600d in main_worker (argc=5, argv=0x7fffffffe4e8) at smartctl.cpp:949
#5 0x000000000040614c in main (argc=5, argv=0x7fffffffe4e8) at smartctl.cpp:967

Debugging reveals:

passthru is initialized in os_linux.cpp:1471 in the (m_escalade_type==AMCC_3WARE_678K) section.
It is then reset to NULL at os_linux.cpp:1576
The subsequent access at os_linux.cpp:1610 dereferences the NULL-Pointer, which segfaults.

Change History (4)

comment:1 by valharis, 15 years ago

By the way,
smartctl -d 3ware,0 -a /dev/twe0
works fine.

comment:2 by Christian Franke, 15 years ago

Owner: changed from somebody to Christian Franke
Status: newaccepted

comment:3 by Christian Franke, 15 years ago

Component: smartctlall
Resolution: fixed
Status: acceptedclosed

Fixed in r2987 but not tested yet.

comment:4 by valharis, 15 years ago

I now get the following output (I can't judge if this is the expected behavior when calling with /dev/sda instead of /dev/twe0)

smartctl 5.39 2009-11-18 r2987 [x86_64-unknown-linux-gnu] (local build)
Copyright (C) 2002-9 by Bruce Allen,


Device Model: [No Information Found]
Serial Number: [No Information Found]
Firmware Version: [No Information Found]
Device is: Not in smartctl database [for details use: -P showall]
ATA Version is: 1
ATA Standard is: Exact ATA specification draft version not indicated
Local Time is: Wed Nov 18 21:04:52 2009 CET
SMART is only available in ATA Version 3 Revision 3 or greater.
We will try to proceed in spite of this.
SMART support is: Ambiguous - ATA IDENTIFY DEVICE words 82-83 don't show if SMART supported.
A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options.

Note: See TracTickets for help on using tickets.