Alexander Bergolth | 10 Jun 2003 18:42
Picon

smartd dumps core while parsing config

Hi!

When I'm trying to start smartd with DEVICESCAN and -I 194, it dumps 
core while parsing the following config:

DEVICESCAN -a -I 194 -o on -S on -m leo <at> leo.wu-wien.ac.at

I'm using the smartmontools-5.1-11 rpm, a stack trace is attached below...

Cheers,
--leo

# /usr/sbin/smartd -d
smartd version 5.1-11 Copyright (C) 2002-3 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

Using configuration file /etc/smartd.conf
Scan Directive DEVICESCAN found in /etc/smartd.conf. Will scan for devices.
Segmentation fault (core dumped)

(gdb) bt
#0  0x0804a734 in isattoff ()
#1  0x0804b996 in parsetoken ()
#2  0x0804be74 in parseconfigline ()
#3  0x0804c218 in parseconfigfile ()
#4  0x0804caed in main ()
#5  0x420156a4 in __libc_start_main () from /lib/tls/libc.so.6

--

-- 
-----------------------------------------------------------------------
(Continue reading)

Bruce Allen | 11 Jun 2003 20:59
Picon
Favicon

Re: [patch] 5.1-11: Fix smartd offline test enabling

Maciej,

Apparently email to the smartmontools mailing list was being held for
moderation for two weeks without the list admins (including myself) being
notified.  So I only just received this email.

Your patch is of course completely correct, and I'll apply it immediately.  
Thank you very much for noticing this.

Bruce

On Tue, 27 May 2003, Maciej W. Rozycki wrote:

> Hello,
> 
>  The following fix should count as obvious.  Please apply.
> 
>  BTW, smartd refuses to disable/enable offline testing if the automatic
> timer isn't supported, while smartctl executes the command anyway and at
> least one drive seems to respond to this command regardless:
> 
> [the output is shortened a bit]
> # smartctl -i /dev/hda
> 
> === START OF INFORMATION SECTION ===
> Device Model:     ST320423A
> Firmware Version: 3.02
> Device is:        Not in smartctl database [for details use: -P showall]
> ATA Version is:   5
> ATA Standard is:  Exact ATA specification draft version not indicated
(Continue reading)

Bruce Allen | 11 Jun 2003 21:13
Picon
Favicon

Re: [patch] 5.1-11: Fix smartd offline test enabling

Hi Maciej,

>  The following fix should count as obvious.  Please apply.

Done, it's in CVS.

>  BTW, smartd refuses to disable/enable offline testing if the
> automatic timer isn't supported, while smartctl executes the command
> anyway and at least one drive seems to respond to this command
> regardless:

Unfortunately this command is not part of ANY ATA specification, so it's
hard to program correctly.  It's a legacy of the early undocumented days
of SMART.

Currently smartctl issues a warning if the command appears to be
unsuported, but tries issuing the command anyway.  smartd gives up
immediately if the command appears unsupported.  I'd be happy to recode
smartd (or to accept your recoded version, if you want to do it) so that
smartd behaves the same way as smartctl - namely it just issues a warning
if the command appears unsupported, but tries it anyway.

I think this might be better -- do you agree?

Cheers,
	Bruce

-------------------------------------------------------
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
(Continue reading)

Bruce Allen | 11 Jun 2003 22:20
Picon
Favicon

Re: [patch] 5.1-11: Fix smartd offline test enabling

> > >  BTW, smartd refuses to disable/enable offline testing if the
> > > automatic timer isn't supported, while smartctl executes the command
> > > anyway and at least one drive seems to respond to this command
> > > regardless:
> > 
> > Unfortunately this command is not part of ANY ATA specification, so it's
> > hard to program correctly.  It's a legacy of the early undocumented days
> > of SMART.
> 
>  I have a few old S.M.A.R.T. (and other) documents from mid 90's
> downloaded from the old WDC site (fission.dt.wdc.com).  I think I've
> seen a note on the bits somewhere.  I may make the docs available to
> you if you are interested.

I would like very much to get copies of these documents.  Could you
perhaps send me photocopies?  I'll be in Germany starting in about a week.
You could send them to me there - let me know if you want a snail-mail
address.

> > Currently smartctl issues a warning if the command appears to be
> > unsuported, but tries issuing the command anyway.  smartd gives up
> > immediately if the command appears unsupported.  I'd be happy to recode
> > smartd (or to accept your recoded version, if you want to do it) so that
> > smartd behaves the same way as smartctl - namely it just issues a warning
> > if the command appears unsupported, but tries it anyway.
> > 
> > I think this might be better -- do you agree?
> 
>  Definitely.  I'm not sure if I find time to code the change myself --
> probably not.  I have a lot of stuff to do elsewhere, sorry.
(Continue reading)

Bruce Allen | 11 Jun 2003 23:09
Picon
Favicon

Re: smartd dumps core while parsing config

Hi Alexander,

I apologize -- this is my coding bug.  Thank you especially for the stack
trace - this made it pretty easy to find.

I've just submitted a fix to the smartmontools CVS archive.  Could you
follow the directions on the web page to download the code from CVS and
test it to see if the segv is now fixed?

Cheers,
	Bruce

On Tue, 10 Jun 2003, Alexander Bergolth wrote:

> Hi!
> 
> When I'm trying to start smartd with DEVICESCAN and -I 194, it dumps 
> core while parsing the following config:
> 
> DEVICESCAN -a -I 194 -o on -S on -m leo <at> leo.wu-wien.ac.at
> 
> I'm using the smartmontools-5.1-11 rpm, a stack trace is attached below...
> 
> Cheers,
> --leo
> 
> # /usr/sbin/smartd -d
> smartd version 5.1-11 Copyright (C) 2002-3 Bruce Allen
> Home page is http://smartmontools.sourceforge.net/
> 
(Continue reading)

Bruce Allen | 11 Jun 2003 23:16
Picon
Favicon

Re: device database list

> I have two IBM (now Hitachi) drives, model number IC35L120AVV207-1,
> and they are not recognised by smartmontool...
> 
> I have seen that this database is hardcored (in source), so i just
> send you a little mail to tell that IC35L120AVV207-1 is the 8Mo cache
> version of the IC35L120AVV207-0, wich is in the database...
> 
> So, if you can add it to the source for the next release, it would be
> great...
> 
> Thanks for this great tool!
> 
> PS: i use the src.rpm distribution, i have not checked the cvs version.

Thank you!

I have just added this to the database in the CVS version.  If you are
able to test this by downloading from CVS, I'd appreciate it.  Otherwise
when we make the next release.

Cheers,
	Bruce

-------------------------------------------------------
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
Maciej W. Rozycki | 11 Jun 2003 21:45
Picon
Picon
Picon

Re: [patch] 5.1-11: Fix smartd offline test enabling

Hi Bruce,

> >  BTW, smartd refuses to disable/enable offline testing if the
> > automatic timer isn't supported, while smartctl executes the command
> > anyway and at least one drive seems to respond to this command
> > regardless:
> 
> Unfortunately this command is not part of ANY ATA specification, so it's
> hard to program correctly.  It's a legacy of the early undocumented days
> of SMART.

 I have a few old S.M.A.R.T. (and other) documents from mid 90's
downloaded from the old WDC site (fission.dt.wdc.com).  I think I've seen
a note on the bits somewhere.  I may make the docs available to you if you
are interested. 

> Currently smartctl issues a warning if the command appears to be
> unsuported, but tries issuing the command anyway.  smartd gives up
> immediately if the command appears unsupported.  I'd be happy to recode
> smartd (or to accept your recoded version, if you want to do it) so that
> smartd behaves the same way as smartctl - namely it just issues a warning
> if the command appears unsupported, but tries it anyway.
> 
> I think this might be better -- do you agree?

 Definitely.  I'm not sure if I find time to code the change myself --
probably not.  I have a lot of stuff to do elsewhere, sorry.

  Maciej

(Continue reading)

Bruce Allen | 12 Jun 2003 14:20
Picon
Favicon

Re: [patch] 5.1-11: Fix smartd offline test enabling

> > > Currently smartctl issues a warning if the command appears to be
> > > unsuported, but tries issuing the command anyway.  smartd gives up
> > > immediately if the command appears unsupported.  I'd be happy to recode
> > > smartd (or to accept your recoded version, if you want to do it) so that
> > > smartd behaves the same way as smartctl - namely it just issues a warning
> > > if the command appears unsupported, but tries it anyway.
> > > 
> > > I think this might be better -- do you agree?
> > 
> >  Definitely.  I'm not sure if I find time to code the change myself --
> > probably not.  I have a lot of stuff to do elsewhere, sorry.
> 
> I'll code it -- look for it in the next release.  Perhaps you could just
> test it when that release comes out.

I've just put the code into CVS.  If you would be willing to test this by
downloading and building the latest CVS version, I would appreciate it.

Cheers,
	Bruce

-------------------------------------------------------
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
Bruce Allen | 13 Jun 2003 20:02
Picon
Favicon

Re: [patch] 5.1-11: Fix smartd offline test enabling

> > I've just put the code into CVS.  If you would be willing to test this by
> > downloading and building the latest CVS version, I would appreciate it.
> 
>  It looks right to me:

Thanks for checking!

> except possibly that space before a full stop. ;-)

Thanks for pointing this out.  I just fixed it (in CVS).

Cheers,
	Bruce
> 
> 

-------------------------------------------------------
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
Maciej W. Rozycki | 13 Jun 2003 19:54
Picon
Picon
Picon

Re: [patch] 5.1-11: Fix smartd offline test enabling

On Thu, 12 Jun 2003, Bruce Allen wrote:

> I've just put the code into CVS.  If you would be willing to test this by
> downloading and building the latest CVS version, I would appreciate it.

 It looks right to me:

smartd[1986]: smartd version 5.1-14 Copyright (C) 2002-3 Bruce Allen
smartd[1986]: Home page is http://smartmontools.sourceforge.net/
smartd[1986]: Using configuration file /etc/smartd.conf
smartd[1986]: Device: /dev/hda, opened
smartd[1986]: Device: /dev/hda, not found in smartd database.
smartd[1986]: Device: /dev/hda, enabled SMART Attribute Autosave.
smartd[1986]: Device: /dev/hda, SMART Automatic Offline Testing unsupported...
smartd[1986]: Device: /dev/hda, enabled SMART Automatic Offline Testing .
smartd[1986]: Device: /dev/hda, is SMART capable. Adding to "monitor" list.
smartd[1986]: Started monitoring 1 ATA and 0 SCSI devices
smart: smartd startup succeeded

except possibly that space before a full stop. ;-)

--

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro <at> ds2.pg.gda.pl, PGP key available        +

-------------------------------------------------------
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
(Continue reading)


Gmane