DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 19th September 2012
daemonfowl daemonfowl is offline
bsdstudent
 
Join Date: Jan 2012
Location: DaemonLand
Posts: 834
Default segmentation fault

I'm not sure if it's correct to revive the thread just because it's the one same issue .. I've replaced 20g old drive with an 80g ..

dmesg
Code:
[ using 497024 bytes of bsd ELF symbol table ]
console out [ATY,RagePro_C]console in [keyboard] USB and ADB found, using ADB
: memaddr 81000000 size 1000000, : consaddr 81000000, : ioaddr 80881000, size 1000: memtag 9000, iotag 9000: width 1024 linebytes 1024 height 768 depth 8
Copyright (c) 1982, 1986, 1989, 1991, 1993
	The Regents of the University of California.  All rights reserved.
Copyright (c) 1995-2012 OpenBSD. All rights reserved.  http://www.OpenBSD.org

OpenBSD 5.2 (GENERIC) #237: Tue Jul 24 09:46:09 MDT 2012
    deraadt@macppc.openbsd.org:/usr/src/sys/arch/macppc/compile/GENERIC
real mem = 402653184 (384MB)
avail mem = 378941440 (361MB)
mainbus0 at root: model iMac,1
cpu0 at mainbus0: 750 (Revision 0x8202): 333 MHz: 512KB backside cache
mem0 at mainbus0
mpcpcibr0 at mainbus0 pci: grackle, Revision 0x40
pci0 at mpcpcibr0 bus 0
pchb0 at pci0 dev 0 function 0 "Motorola MPC106 PCI" rev 0x40
macobio0 at pci0 dev 16 function 0 "Apple Paddington" rev 0x00
macintr0 at macobio0 offset 0x10
mesh0 at macobio0 offset 0x10000 irq 12: 50MHz
scsibus0 at mesh0: 8 targets, initiator 7
"escc-legacy" at macobio0 offset 0x12000 not configured
zsc0 at macobio0 offset 0x13000: irq 15,16
zstty0 at zsc0 channel 0
zstty1 at zsc0 channel 1
awacs0 at macobio0 offset 0x14000: irq 17,8,9 headphones
audio0 at awacs0
"fdc" at macobio0 offset 0x15000 not configured
adb0 at macobio0 offset 0x16000 irq 18: via-cuda, 0 targets
wdc0 at macobio0 offset 0x20000 irq 13: DMA
wd0 at wdc0 channel 0 drive 0: <WDC WD800BB-55JKA0>
wd0: 16-sector PIO, LBA, 76319MB, 156301488 sectors
wd0(wdc0:0:0): using BIOS timings, DMA mode 2
wdc1 at macobio0 offset 0x21000 irq 14: DMA
atapiscsi0 at wdc1 channel 0 drive 0
scsibus1 at atapiscsi0: 2 targets
cd0 at scsibus1 targ 0 lun 0: <LG, CD-ROM CRN-8241B, LAD4> ATAPI 5/cdrom removable
cd0(wdc1:0:0): using BIOS timings, DMA mode 2
bm0 at macobio0 offset 0x11000 irq 42,33: address 00:50:e4:99:89:75
lxtphy0 at bm0 phy 0: LXT970 10/100 PHY, rev. 3
"nvram" at macobio0 offset 0x60000 not configured
vgafb0 at pci0 dev 18 function 0 "ATI Mach64" rev 0x5c, mmio
wsdisplay0 at vgafb0 mux 1: console (std, vt100 emulation)
ohci0 at pci0 dev 20 function 0 "AT&T/Lucent USB" rev 0x12: irq 28, version 1.0
usb0 at ohci0: USB revision 1.0
uhub0 at usb0 "AT&T/Lucent OHCI root hub" rev 1.00/1.00 addr 1
uhidev0 at uhub0 port 1 configuration 1 interface 0 "USB USB Keykoard" rev 1.10/1.10 addr 2
uhidev0: iclass 3/1
ukbd0 at uhidev0: 8 variable keys, 6 key codes
wskbd0 at ukbd0 mux 1
wskbd0: connecting to wsdisplay0
uhidev1 at uhub0 port 1 configuration 1 interface 1 "USB USB Keykoard" rev 1.10/1.10 addr 2
uhidev1: iclass 3/0, 2 report ids
uhid0 at uhidev1 reportid 1: input=2, output=0, feature=0
uhid1 at uhidev1 reportid 2: input=1, output=0, feature=0
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
bootpath: /pci/mac-io/ide@20000/disk@0:/bsd
root on wd0a (8f0eef42b0eafdc5.a) swap on wd0b dump on wd0b
WARNING: clock lost 20475 days, using FS time -- CHECK AND RESET THE DATE!
wskbd0: disconnecting from wsdisplay0
wskbd0 detached
ukbd0 detached
uhidev0 detached
uhid0 detached
uhid1 detached
uhidev1 detached
uhidev0 at uhub0 port 1 configuration 1 interface 0 "USB USB Keykoard" rev 1.10/1.10 addr 2
uhidev0: iclass 3/1
ukbd0 at uhidev0: 8 variable keys, 6 key codes
wskbd0 at ukbd0 mux 1
wskbd0: connecting to wsdisplay0
uhidev1 at uhub0 port 1 configuration 1 interface 1 "USB USB Keykoard" rev 1.10/1.10 addr 2
uhidev1: iclass 3/0, 2 report ids
uhid0 at uhidev1 reportid 1: input=2, output=0, feature=0
uhid1 at uhidev1 reportid 2: input=1, output=0, feature=0
uhub0: illegal enable change, port 1
wdc0:0:0: intr with DRQ (st=0x58<DRDY,DSC,DRQ>)
wd0g: device timeout writing fsbn 4858176 of 4858176-4858207 (wd0 bn 61486592; cn 60998 tn 9 sn 41), retrying
wd0: soft error (corrected)
wdc0:0:0: intr with DRQ (st=0x58<DRDY,DSC,DRQ>)
wd0g: device timeout writing fsbn 7077996 of 7077996-7078003 (wd0 bn 63706412; cn 63200 tn 12 sn 56), retrying
wd0: soft error (corrected)
wdc0:0:0: intr with DRQ (st=0x58<DRDY,DSC,DRQ>)
wd0g: device timeout writing fsbn 4876096 of 4876096-4876127 (wd0 bn 61504512; cn 61016 tn 6 sn 6), retrying
wd0: soft error (corrected)
wdc0:0:0: intr with DRQ (st=0x58<DRDY,DSC,DRQ>)
wd0g: device timeout writing fsbn 4878528 of 4878528-4878559 (wd0 bn 61506944; cn 61018 tn 12 sn 44), retrying
wd0: soft error (corrected)
wdc0:0:0: intr with DRQ (st=0x58<DRDY,DSC,DRQ>)
wd0g: device timeout writing fsbn 4883104 of 4883104-4883135 (wd0 bn 61511520; cn 61023 tn 5 sn 21), retrying
wd0: soft error (corrected)
wd0(wdc0:0:0): timeout
	type: ata
	c_bcount: 2048
	c_skip: 0
wd0g: device timeout writing fsbn 4870908 of 4870908-4870911 (wd0 bn 61499324; cn 61011 tn 3 sn 47), retrying
wd0: soft error (corrected)
wdc0:0:0: intr with DRQ (st=0x58<DRDY,DSC,DRQ>)
wd0g: device timeout writing fsbn 4891168 of 4891168-4891199 (wd0 bn 61519584; cn 61031 tn 5 sn 21), retrying
wd0: soft error (corrected)
wd0(wdc0:0:0): timeout
	type: ata
	c_bcount: 16384
	c_skip: 0
wd0g: device timeout writing fsbn 4891232 of 4891232-4891263 (wd0 bn 61519648; cn 61031 tn 6 sn 22), retrying
wd0: soft error (corrected)
wdc0:0:0: intr with DRQ (st=0x58<DRDY,DSC,DRQ>)
wd0g: device timeout writing fsbn 4893696 of 4893696-4893727 (wd0 bn 61522112; cn 61033 tn 13 sn 29), retrying
wd0: soft error (corrected)
wdc0:0:0: intr with DRQ (st=0x58<DRDY,DSC,DRQ>)
wd0g: device timeout writing fsbn 4894080 of 4894080-4894111 (wd0 bn 61522496; cn 61034 tn 3 sn 35), retrying
wd0: soft error (corrected)
wd0(wdc0:0:0): timeout
	type: ata
	c_bcount: 16384
	c_skip: 0
wd0g: device timeout writing fsbn 4894144 of 4894144-4894175 (wd0 bn 61522560; cn 61034 tn 4 sn 36), retrying
wd0: soft error (corrected)
wdc0:0:0: intr with DRQ (st=0x58<DRDY,DSC,DRQ>)
wd0g: device timeout writing fsbn 4900832 of 4900832-4900863 (wd0 bn 61529248; cn 61040 tn 14 sn 46), retrying
wd0: soft error (corrected)
wd0(wdc0:0:0): timeout
	type: ata
	c_bcount: 16384
	c_skip: 0
wd0g: device timeout writing fsbn 4902912 of 4902912-4902943 (wd0 bn 61531328; cn 61042 tn 15 sn 47), retrying
wd0: soft error (corrected)
wdc0:0:0: intr with DRQ (st=0x58<DRDY,DSC,DRQ>)
wd0g: device timeout writing fsbn 4915712 of 4915712-4915743 (wd0 bn 61544128; cn 61055 tn 10 sn 58), retrying
wd0: soft error (corrected)
wd0(wdc0:0:0): timeout
	type: ata
	c_bcount: 16384
	c_skip: 0
wd0g: device timeout writing fsbn 7085984 of 7085984-7086015 (wd0 bn 63714400; cn 63208 tn 11 sn 43), retrying
wd0: soft error (corrected)
wd0(wdc0:0:0): timeout
	type: ata
	c_bcount: 16384
	c_skip: 0
wd0g: device timeout writing fsbn 4924352 of 4924352-4924383 (wd0 bn 61552768; cn 61064 tn 4 sn 4), retrying
wd0: soft error (corrected)
wdc0:0:0: intr with DRQ (st=0x58<DRDY,DSC,DRQ>)
wd0g: device timeout writing fsbn 4925312 of 4925312-4925343 (wd0 bn 61553728; cn 61065 tn 3 sn 19), retrying
wd0: soft error (corrected)
wdc0:0:0: intr with DRQ (st=0x58<DRDY,DSC,DRQ>)
wd0g: device timeout writing fsbn 4929504 of 4929504-4929535 (wd0 bn 61557920; cn 61069 tn 5 sn 53), retrying
wd0: soft error (corrected)
wd0(wdc0:0:0): timeout
	type: ata
	c_bcount: 16384
	c_skip: 0
wd0g: device timeout writing fsbn 4932800 of 4932800-4932831 (wd0 bn 61561216; cn 61072 tn 10 sn 10), retrying
wd0: soft error (corrected)
wdc0:0:0: intr with DRQ (st=0x58<DRDY,DSC,DRQ>)
wd0g: device timeout writing fsbn 4940928 of 4940928-4940959 (wd0 bn 61569344; cn 61080 tn 11 sn 11), retrying
wd0: soft error (corrected)
wdc0:0:0: intr with DRQ (st=0x58<DRDY,DSC,DRQ>)
wd0g: device timeout writing fsbn 7087584 of 7087584-7087615 (wd0 bn 63716000; cn 63210 tn 5 sn 5), retrying
wd0: soft error (corrected)
I still get errors like :
Code:
***********************************|100%Segmentation fault
system(/bin/sh, -c, /usr/local/bin/update-desktop-database) failed:  exit(139)
.......
Segmentation fault
system(/bin/sh, -c, /usr/local/bin/gtk-update-icon-cache -q -t /usr/local/share/
icons/hicolor) failed:  exit(139)
...
Here is the output of smartctl -a /dev/wd0c :
Code:
smartctl 5.43 2012-06-30 r3573 [powerpc-unknown-openbsd5.2] (local build)
Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net

=== START OF INFORMATION SECTION ===
Model Family:     Western Digital Caviar
Device Model:     WDC WD800BB-55JKA0
Serial Number:    WD-WCAMD2292502
Firmware Version: 05.01C05
User Capacity:    80,026,361,856 bytes [80.0 GB]
Sector Size:      512 bytes logical/physical
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   6
ATA Standard is:  Exact ATA specification draft version not indicated
Local Time is:    Tue Sep 18 07:44:54 2012 JST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x00)	Offline data collection activity
					was never started.
					Auto Offline Data Collection: Disabled.
Total time to complete Offline 
data collection: 		(    0) seconds.
Offline data collection
capabilities: 			 (0x00) 	Offline data collection not supported.
SMART capabilities:            (0x0000)	Automatic saving of SMART data					is not implemented.
Error logging capability:        (0x00)	Error logging supported.
					No General Purpose Logging support.
SCT capabilities: 	       (0x003f)	SCT Status supported.
					SCT Error Recovery Control supported.
					SCT Feature Control supported.
					SCT Data Table supported.

SMART Error Log Version: 0
No Errors Logged

SMART Self-test log structure revision number 0
Warning: ATA Specification requires self-test log structure revision number = 1
No self-tests have been logged.  [To run self-tests, use: smartctl -t]


Device does not support Selective Self Tests/Logging
(Now the real annoyance is not those blue-lined errors while installing packages .. but the segmentation fault(s) I get each time I launch an application .. it even shows at login .. :-) .. I can use the OS though .. the replacement drive is clean and I had used it as a usb-based OBSD Box before installation on iMac)
Reply With Quote
  #2   (View Single Post)  
Old 19th September 2012
daemonfowl daemonfowl is offline
bsdstudent
 
Join Date: Jan 2012
Location: DaemonLand
Posts: 834
Default

I'm sorry .. the last post appertains to OpenBSD General rather than initial thread issue (upgrading) .. the issue encompass both.
Reply With Quote
  #3   (View Single Post)  
Old 19th September 2012
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

No, actually, it doesn't. Your new problem is a Segmentation Fault, and is unrelated to previous I/O issues.

Please read this link:

http://en.wikipedia.org/wiki/Segmentation_fault
Reply With Quote
  #4   (View Single Post)  
Old 19th September 2012
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,319
Default

This thread has been split from its parent thread since new information describes a different problem.

Last edited by ocicat; 20th September 2012 at 11:12 AM. Reason: URL corrected; noticed by daemonfowl
Reply With Quote
  #5   (View Single Post)  
Old 19th September 2012
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

daemonfowl, your problem is apparently occuring in components of gtk+2. As you've had a consistent problem over this year managing -current and your ports/packages; I suspect you have a "FAQ 15.4.1" problem.

Compare the date of your -current kernel build, 24 July 2012, with the creation dates of the gtk+2 programs that are failing. Are they more than a few days apart? Which is older, the kernel or these programs?

You should know what to do, if gtk+2 programs are significantly newer than the kernel.

Last edited by jggimi; 19th September 2012 at 05:43 PM. Reason: clarity
Reply With Quote
  #6   (View Single Post)  
Old 20th September 2012
daemonfowl daemonfowl is offline
bsdstudent
 
Join Date: Jan 2012
Location: DaemonLand
Posts: 834
Default

Thanks @jggimi ! but it seems to be some other cause .. I got the segfault message after a first login right after a *fresh install* (a bit older macppc -current cd) .. now after an upgrade :
sysctl kern.version
Code:
kern.version=OpenBSD 5.2-current (GENERIC) #12: Tue Sep 11 14:32:34 MDT 2012
    deraadt@macppc.openbsd.org:/usr/src/sys/arch/macppc/compile/GENERIC
and yet segfault still occurs when I login as when I launch a few applications ..
I've been using packages only .. could it be this old cpu failing to deal with packages compiled on new macppc hardware ?
Reply With Quote
  #7   (View Single Post)  
Old 20th September 2012
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

Excuse me, but do you mean to say you see segfaults with NO PACKAGES installed at all?
Reply With Quote
  #8   (View Single Post)  
Old 20th September 2012
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

While waiting for your answer, daemonfowl, a tiny little bit of searching found that in July, a problem was reported to bugs@ regarding segmentation faults with threaded applications in -current, on G3 processors. I don't know what your processor is, but there are 333Mhz G3s.

A search of the commits made in recent months did not highlight any recent G3 specific fixes for this.

----

If the problems are occurring without any packages installed, then the problem is not FAQ 15.4.1 related and is something else ... perhaps you too have this problem that was reported in July, or perhaps you have a hardware problem. You can test this by installing 5.1-release. If you still have segfaults while on -release, then I would consider a hardware problem a possibility. If 5.1-release runs just fine, then you can rule out hardware as a root cause.

Last edited by jggimi; 20th September 2012 at 11:41 AM. Reason: typo, clarity
Reply With Quote
  #9   (View Single Post)  
Old 20th September 2012
daemonfowl daemonfowl is offline
bsdstudent
 
Join Date: Jan 2012
Location: DaemonLand
Posts: 834
Default

Thank you so much, jggimi !
sudo sysctl -a | grep cpu
Code:
kern.ccpu=1948
hw.ncpu=1
hw.cpuspeed=333
hw.ncpufound=1
After reading your question:
Quote:
do you mean to say you see segfaults with NO PACKAGES installed at all?
I got suspicious about whether I actually first saw the segfault before installing packages or afterwards .. what I've done is : backup & fresh install , same OpenBSD current version cd , same disk ..
sysctl kern.version :
Code:
kern.version=OpenBSD 5.2 (GENERIC) #237: Tue Jul 24 09:46:09 MDT 2012
    deraadt@macppc.openbsd.org:/usr/src/sys/arch/macppc/compile/GENERIC
This time , No segfault ..
( but I still receive those 'wd0: soft error (corrected) ... device timeout writing fsbn ***** of ******* , retrying ..... )
Something funny to happen again : I downloaded the macppc sets and put them in/ for a disk-based upgrade as I don't trust ftp upgrade on this old iMac .. put bsd.rd in / and rebooted ..
I've reset boot-device to hd:,ofwboot /bsd .. I chose bsd.rd and got this error :
Code:
booting /pci/mac-io/ide@20000/disk@0:bsd.rd:  read header failed (0) . will try /bsd
and got stuck there .. does it mean iMac's Christmas festivities are over :-) ?
"Legacy hardware have their issue" once said ocicat .. ya true .. but what's to be done ? iMac's infatuation with Puffy :-)
(Note: those errors don't occur on ibook g3 running the latest snaphots.)

A question off-topic :
When upgrading , do I have to use a respective new bsd.rd to boot from ? or does an old bsd.rd existing in / do the job ?
Reply With Quote
Old 20th September 2012
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

Quote:
Originally Posted by daemonfowl View Post
( but I still receive those 'wd0: soft error (corrected)
As mentioned in the original thread, that is an I/O error that is (eventually) recoverable. Its cause is unrelated to the segfaults described here. Possible causes were described to you in the original thread.
Quote:
..I chose bsd.rd and got this error..
The bootloader was unable to read the file from the drive. The bootloader is likely using BIOS I/O services to read the kernel from the drive; those routines may not provide recovery from soft (recoverable) I/O errors. This is conjecture, as I know nothing about PPC BIOS services on Macs or any other PPC based computer.
Quote:
does it mean iMac's Christmas festivities are over :-) ?
I don't consider an 'iMac' a single component. Surely there are parts that, if failing, could be replaced? It is possible the I/O problem is related to the drive or its on board electronics, or to the cable connecting the drive to the controller, or to the drive controller on the motherboard. As SMART did not log any cable communication problems, the I/O errors are more likely to be due to another component.

If this were my system, I would install 5.1-release to see if the segfault issue goes away. I would also (re)install sysutils/smartmontools and run both a short test of the electronics and a long test of the media in the hopes that the I/O errors can be identified and, if media, perhaps even eliminated through sector reassignment. For forcing sector reassignment (after proof of a media issue) I use the "badblocks" program included in sysutils/e2fsprogs.
Quote:
(Note: those errors don't occur on ibook g3 running the latest snaphots.)
I cannot tell you (yet) why you are seeing the segfaults -- these are usually software and I have not (yet) seen any information to indicate otherwise. Your I/O errors are due to a hardware problem in electronics or cable or media, and short and long tests can prove or rule out two of them.
Quote:
A question off-topic :
When upgrading , do I have to use a respective new bsd.rd to boot from ? or does an old bsd.rd existing in / do the job ?
Take this question to another thread, please. But I would ask you to boot a ramdisk kernel for yourself and review the upgrade script and try to determine what it tests for and what it does. See if you can figure out how it knows it is looking for *52.tgz filesets and what will have to happen when -current shifts to *53.tgz filesets.

Last edited by jggimi; 20th September 2012 at 03:58 PM. Reason: mention of badblocks utility
Reply With Quote
Old 21st September 2012
daemonfowl daemonfowl is offline
bsdstudent
 
Join Date: Jan 2012
Location: DaemonLand
Posts: 834
Default

Thanks for your help and suggestions !
Quote:
... install 5.1-release to see if the segfault issue goes away ...
As reading bsd.rd failed -yet another more openfirmware eccentricity .. it often works on iBook- I downloaded the latest snapshot (sept 20) install CD , burnt it and installed it. sysctl kern.version
Code:
kern.version=OpenBSD 5.2-current (GENERIC) #12: Tue Sep 11 14:32:34 MDT 2012
    deraadt@macppc.openbsd.org:/usr/src/sys/arch/macppc/compile/GENERIC
No segfault :-) .. I can launch all installed apps .. but again those blue lines still embellish my screen .. :-)
eg.
Code:
d0 (wdc0:0:0 ) : timeout 
              type: ata
              c_bcount: 16384
              c_skip: 0 
wd0g: device timeout writing fsbn ****** of ********-******** (wd0 bn ********; cn****** tn 13 sn 13), retrying
wd0: soft error (corrected)
More likey : "I/O errors are due to a hardware problem in electronics or cable or media" , as you said .
I've installed both smartmontools and e2fsprogs.
smartctl -t long -l selftest /dev/wd0c output :
Code:
smartctl 5.43 2012-06-30 r3573 [powerpc-unknown-openbsd5.2] (local build)
Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net

=== START OF READ SMART DATA SECTION ===
SMART Self-test log structure revision number 0
Warning: ATA Specification requires self-test log structure revision number = 1
No self-tests have been logged.  [To run self-tests, use: smartctl -t]


=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===
Warning: device does not support Self-Test functions.

Sending command: "Execute SMART Extended self-test routine immediately in off-line mode".
Drive command "Execute SMART Extended self-test routine immediately in off-line mode" successful.
Testing has begun. smartctl -a /dev/wd0c
smartctl 5.43 2012-06-30 r3573 [powerpc-unknown-openbsd5.2] (local build)
Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net

=== START OF INFORMATION SECTION ===
Model Family:     Western Digital Caviar
Device Model:     WDC WD800BB-55JKA0
Serial Number:    WD-WCAMD2292502
Firmware Version: 05.01C05
User Capacity:    80,026,361,856 bytes [80.0 GB]
Sector Size:      512 bytes logical/physical
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   6
ATA Standard is:  Exact ATA specification draft version not indicated
Local Time is:    Wed Jul 25 10:16:11 2012 JST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x00) Offline data collection activity
                                        was never started.
                                        Auto Offline Data Collection: Disabled.
Total time to complete Offline 
data collection:                (    0) seconds.
Offline data collection
capabilities:                    (0x00)         Offline data collection not supported.
SMART capabilities:            (0x0000) Automatic saving of SMART data                                  is not implemented.
Error logging capability:        (0x00) Error logging supported.
                                        No General Purpose Logging support.
SCT capabilities:              (0x003f) SCT Status supported.
                                        SCT Error Recovery Control supported.
                                        SCT Feature Control supported.
                                        SCT Data Table supported.

SMART Error Log Version: 0
No Errors Logged

SMART Self-test log structure revision number 0
Warning: ATA Specification requires self-test log structure revision number = 1
No self-tests have been logged.  [To run self-tests, use: smartctl -t]


Device does not support Selective Self Tests/Logging
Sorry I'm new to the tool , maybe should I do something else here.

----- ------ ------
1 more question please :
Why wouldn't iMac screen output print over ssh ? I mean errors go on there on iMac and ssh client screen remains clean.don't they sync ?
Reply With Quote
Old 21st September 2012
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

Just use

# smartctl -t short /dev/wd0c

It will run what is called an "offline" test -- the electronics on the drive will conduct a self test. It is "offline" because normal operations may continue (though they may extend the time of the test). The output from smartctl will tell you how much time it will take if the drive doesn't get any I/O requests. Short tests of the electronics should just be 1-3 minutes or so.

After this test completes, the output from smartctl -a will show you whether it was successful or not.

Then, a media test is the long "offline" test. Your OS can continue to run. The drive electronics will read every sector of the drive for you.

# smartctl -t long /dev/wd0c

When this completes, another -a can be run. You'll know, at this point, whether the drive electronics or the media is the problem. If there were no errors, the problem is either the cable or the controller on the motherboard.

If there were media errors, the badblocks program can be used to force the drive electronics to replace bad sectors with spare sectors. It writes patterns to all (or a range of) sectors, reads them back, and writes a different pattern, repeating the cycle, in an attempt to force both errors to occur and sector replacement to occur.
Reply With Quote
Old 21st September 2012
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

daemonfowl, just so you know:

sysutils/smartmontools includes a daemon, smartd, which can be configured to report drive errors or sensor results (such as temperature problems), and can also be used to run these "offline" self tests to a schedule you set. I run media (long) tests once per week on all drives, and daily electronics (short) tests.
Code:
SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short offline       Completed without error       00%     51480         -
# 2  Short offline       Completed without error       00%     51456         -
# 3  Short offline       Completed without error       00%     51433         -
# 4  Short offline       Completed without error       00%     51409         -
# 5  Short offline       Completed without error       00%     51386         -
# 6  Extended offline    Completed without error       00%     51364         -
# 7  Short offline       Completed without error       00%     51362         -
# 8  Short offline       Completed without error       00%     51338         -
# 9  Short offline       Completed without error       00%     51315         -
#10  Short offline       Completed without error       00%     51291         -
#11  Short offline       Completed without error       00%     51267         -
#12  Short offline       Completed without error       00%     51244         -
#13  Short offline       Completed without error       00%     51220         -
#14  Extended offline    Completed without error       00%     51199         -
#15  Short offline       Completed without error       00%     51197         -
#16  Short offline       Completed without error       00%     51173         -
#17  Short offline       Completed without error       00%     51150         -
#18  Short offline       Completed without error       00%     51126         -
#19  Short offline       Completed without error       00%     51102         -
#20  Short offline       Completed without error       00%     51079         -
#21  Short offline       Completed without error       00%     51055         -
Reply With Quote
Old 21st September 2012
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

Quote:
1 more question please :
Why wouldn't iMac screen output print over ssh ? I mean errors go on there on iMac and ssh client screen remains clean.don't they sync ?
If you are referring to the blue/white kernel messages, they are posted to the physical console device configured by the bootloader at boot time, to /var/run/dmesg.boot by rc(8) during multi-user boot, to syslogd(8) on a system running in multi-user mode, and buffered in memory for use by dmesg(8).

Your ssh(1) client communicates with an sshd(8) server, not syslogd(8) or these other message vehicles.

Last edited by jggimi; 21st September 2012 at 12:23 PM.
Reply With Quote
Old 21st September 2012
daemonfowl daemonfowl is offline
bsdstudent
 
Join Date: Jan 2012
Location: DaemonLand
Posts: 834
Default

Very useful tool ..
Sir jggimi , thank you so much for the great help !
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
a segmentation fault line daemonfowl OpenBSD General 3 16th June 2012 08:13 PM
Segmentation fault error139 delboy FreeBSD Ports and Packages 8 9th July 2009 06:32 PM
Segmentation fault (11) - Apache ijk FreeBSD Ports and Packages 16 15th July 2008 11:04 AM
Segmentation fault ccc FreeBSD General 8 28th June 2008 02:15 PM
MySQL C library - segmentation fault on mysql_select_db() when using CC optimisation gor OpenBSD Packages and Ports 7 10th June 2008 11:42 PM


All times are GMT. The time now is 07:50 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick