Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

my linux (ubuntu 12.04) laptop crashed, and I am trying to figure out why.

# last
sds      pts/4        :0               Tue Sep  4 10:01   still logged in   
sds      pts/3        :0               Tue Sep  4 10:00   still logged in   
reboot   system boot  3.2.0-29-generic Tue Sep  4 09:43 - 11:23  (01:40)    
sds      pts/8        :0               Mon Sep  3 14:23 - crash  (19:19)    

this seems to indicate a crash at 09:42 (= 14:23+19:19). as per another question, I looked at /var/log:

auth.log:

Sep  4 09:17:02 t520sds CRON[32744]: pam_unix(cron:session): session closed for user root
Sep  4 09:43:17 t520sds lightdm: pam_unix(lightdm:session): session opened for user lightdm by (uid=0)

no messages file

syslog:

Sep  4 09:24:19 t520sds kernel: [219104.819975] CPU0: Package power limit normal
Sep  4 09:43:16 t520sds kernel: imklog 5.8.6, log source = /proc/kmsg started.

kern.log:

Sep  4 09:24:19 t520sds kernel: [219104.819969] CPU1: Package power limit normal
Sep  4 09:24:19 t520sds kernel: [219104.819971] CPU2: Package power limit normal
Sep  4 09:24:19 t520sds kernel: [219104.819974] CPU3: Package power limit normal
Sep  4 09:24:19 t520sds kernel: [219104.819975] CPU0: Package power limit normal
Sep  4 09:43:16 t520sds kernel: imklog 5.8.6, log source = /proc/kmsg started.
Sep  4 09:43:16 t520sds kernel: [    0.000000] Initializing cgroup subsys cpuset
Sep  4 09:43:16 t520sds kernel: [    0.000000] Initializing cgroup subsys cpu

I had a computation running until 9:24, but the system crashed 18 minutes later!

kern.log has many pages of these:

Sep  4 09:43:16 t520sds kernel: [    0.000000] total RAM covered: 8086M
Sep  4 09:43:16 t520sds kernel: [    0.000000]  gran_size: 64K  chunk_size: 64K         num_reg: 10     lose cover RAM: 38M
Sep  4 09:43:16 t520sds kernel: [    0.000000]  gran_size: 64K  chunk_size: 128K        num_reg: 10     lose cover RAM: 38M
Sep  4 09:43:16 t520sds kernel: [    0.000000]  gran_size: 64K  chunk_size: 256K        num_reg: 10     lose cover RAM: 38M
Sep  4 09:43:16 t520sds kernel: [    0.000000]  gran_size: 64K  chunk_size: 512K        num_reg: 10     lose cover RAM: 38M
Sep  4 09:43:16 t520sds kernel: [    0.000000]  gran_size: 64K  chunk_size: 1M  num_reg: 10     lose cover RAM: 38M
Sep  4 09:43:16 t520sds kernel: [    0.000000]  gran_size: 64K  chunk_size: 2M  num_reg: 10     lose cover RAM: 38M
Sep  4 09:43:16 t520sds kernel: [    0.000000]  gran_size: 64K  chunk_size: 4M  num_reg: 10     lose cover RAM: 38M
Sep  4 09:43:16 t520sds kernel: [    0.000000]  gran_size: 64K  chunk_size: 8M  num_reg: 10     lose cover RAM: 38M
Sep  4 09:43:16 t520sds kernel: [    0.000000]  gran_size: 64K  chunk_size: 16M         num_reg: 10     lose cover RAM: 38M
Sep  4 09:43:16 t520sds kernel: [    0.000000] *BAD*gran_size: 64K      chunk_size: 32M         num_reg: 10     lose cover RAM: -16M
Sep  4 09:43:16 t520sds kernel: [    0.000000] *BAD*gran_size: 64K      chunk_size: 64M         num_reg: 10     lose cover RAM: -16M
Sep  4 09:43:16 t520sds kernel: [    0.000000]  gran_size: 64K  chunk_size: 128M        num_reg: 10     lose cover RAM: 0G
Sep  4 09:43:16 t520sds kernel: [    0.000000]  gran_size: 64K  chunk_size: 256M        num_reg: 10     lose cover RAM: 0G
Sep  4 09:43:16 t520sds kernel: [    0.000000]  gran_size: 64K  chunk_size: 512M        num_reg: 10     lose cover RAM: 0G
Sep  4 09:43:16 t520sds kernel: [    0.000000]  gran_size: 64K  chunk_size: 1G  num_reg: 10     lose cover RAM: 0G
Sep  4 09:43:16 t520sds kernel: [    0.000000] *BAD*gran_size: 64K      chunk_size: 2G  num_reg: 10     lose cover RAM: -1G

does this mean that my RAM is bad?!

it also says

Sep  4 09:43:16 t520sds kernel: [    2.944123] EXT4-fs (sda1): INFO: recovery required on readonly filesystem
Sep  4 09:43:16 t520sds kernel: [    2.944126] EXT4-fs (sda1): write access will be enabled during recovery
Sep  4 09:43:16 t520sds kernel: [    3.088001] firewire_core: created device fw0: GUID f0def1ff8fbd7dff, S400
Sep  4 09:43:16 t520sds kernel: [    8.929243] EXT4-fs (sda1): orphan cleanup on readonly fs
Sep  4 09:43:16 t520sds kernel: [    8.929249] EXT4-fs (sda1): ext4_orphan_cleanup: deleting unreferenced inode 658984
...
Sep  4 09:43:16 t520sds kernel: [    9.343266] EXT4-fs (sda1): ext4_orphan_cleanup: deleting unreferenced inode 525343
Sep  4 09:43:16 t520sds kernel: [    9.343270] EXT4-fs (sda1): 56 orphan inodes deleted
Sep  4 09:43:16 t520sds kernel: [    9.343271] EXT4-fs (sda1): recovery complete
Sep  4 09:43:16 t520sds kernel: [    9.645799] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)

does this mean my HD is bad?

As per FaultyHardware, I tried smartctl -l selftest, which uncovered no errors:

smartctl 5.41 2011-06-09 r3365 [x86_64-linux-3.2.0-30-generic] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net

=== START OF INFORMATION SECTION ===
Model Family:     Seagate Momentus 7200.4
Device Model:     ST9500420AS
Serial Number:    5VJE81YK
LU WWN Device Id: 5 000c50 0440defe3
Firmware Version: 0003LVM1
User Capacity:    500,107,862,016 bytes [500 GB]
Sector Size:      512 bytes logical/physical
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   8
ATA Standard is:  ATA-8-ACS revision 4
Local Time is:    Mon Sep 10 16:40:04 2012 EDT
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
See vendor-specific Attribute list for marginal Attributes.

General SMART Values:
Offline data collection status:  (0x82) Offline data collection activity
                                        was completed without error.
                                        Auto Offline Data Collection: Enabled.
Self-test execution status:      (   0) The previous self-test routine completed
                                        without error or no self-test has ever 
                                        been run.
Total time to complete Offline 
data collection:                (    0) seconds.
Offline data collection
capabilities:                    (0x7b) SMART execute Offline immediate.
                                        Auto Offline data collection on/off support.
                                        Suspend Offline collection upon new
                                        command.
                                        Offline surface scan supported.
                                        Self-test supported.
                                        Conveyance Self-test supported.
                                        Selective Self-test supported.
SMART capabilities:            (0x0003) Saves SMART data before entering
                                        power-saving mode.
                                        Supports SMART auto save timer.
Error logging capability:        (0x01) Error logging supported.
                                        General Purpose Logging supported.
Short self-test routine 
recommended polling time:        (   1) minutes.
Extended self-test routine
recommended polling time:        ( 109) minutes.
Conveyance self-test routine
recommended polling time:        (   2) minutes.
SCT capabilities:              (0x103b) SCT Status supported.
                                        SCT Error Recovery Control supported.
                                        SCT Feature Control supported.
                                        SCT Data Table supported.

SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x000f   117   099   034    Pre-fail  Always       -       162843537
  3 Spin_Up_Time            0x0003   100   100   000    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0032   100   100   020    Old_age   Always       -       571
  5 Reallocated_Sector_Ct   0x0033   100   100   036    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000f   069   060   030    Pre-fail  Always       -       17210154023
  9 Power_On_Hours          0x0032   095   095   000    Old_age   Always       -       174362787320258
 10 Spin_Retry_Count        0x0013   100   100   097    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   020    Old_age   Always       -       571
184 End-to-End_Error        0x0032   100   100   099    Old_age   Always       -       0
187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always       -       0
188 Command_Timeout         0x0032   100   100   000    Old_age   Always       -       1
189 High_Fly_Writes         0x003a   100   100   000    Old_age   Always       -       0
190 Airflow_Temperature_Cel 0x0022   061   043   045    Old_age   Always   In_the_past 39 (0 11 44 26)
191 G-Sense_Error_Rate      0x0032   100   100   000    Old_age   Always       -       84
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       20
193 Load_Cycle_Count        0x0032   099   099   000    Old_age   Always       -       2434
194 Temperature_Celsius     0x0022   039   057   000    Old_age   Always       -       39 (0 15 0 0)
195 Hardware_ECC_Recovered  0x001a   041   041   000    Old_age   Always       -       162843537
196 Reallocated_Event_Count 0x000f   095   095   030    Pre-fail  Always       -       4540 (61955, 0)
197 Current_Pending_Sector  0x0012   100   100   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0010   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x003e   200   200   000    Old_age   Always       -       0
254 Free_Fall_Sensor        0x0032   100   100   000    Old_age   Always       -       0

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Extended offline    Completed without error       00%      4545         -

SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.

Googling for the messages proved inconclusive, I can't even figure out whether the messages are routine or catastrophic.

So, what do I do now?

share|improve this question

closed as too localized by Jorge Castro, Ringtail, Mik, Takkat, Thomas W. Oct 27 '12 at 22:23

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

3  
+1 this DEFINITELY shows research effort. Wish I had a good answer but all I can do is refer you to the official community docs for faulty hardware. –  Tom Brossman Sep 9 '12 at 20:25
    
^^I second the above. –  NlightNFotis Sep 10 '12 at 20:48

1 Answer 1

I would think that this is either caused by bad RAM, bad filesystem or HDD. I would do the following in order, and see if each one makes a difference before continuing on to the next.

1) As Tom Brossman suggested in his link, I would run a RAM test (Memtest86+). It is available from the GRUB menu of any installation or LiveCD. Do whatever is the most thorough (it should be fairly obvious and this would need to be done overnight).

2) From a LiveCD, run fsck.ext4 (without mounting the drive)

sudo fsck.ext4 -cf /dev/sda1

3) This post suggests that the *BAD*gran_size errors may be caused by not enabling the MTRR sanitizer. Edit /boot/grub/grub.cfg and change this line:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

to this:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash enable_mtrr_cleanup mtrr_spare_reg_nr=1 mtrr_gran_size=32M mtrr_chunk_size=128M"

Save the file. Then run

sudo update-grub

and reboot.

share|improve this answer
    
memtest86 did not uncover any errors –  sds Sep 14 '12 at 11:35
    
mtrr did take care of *BAD*gran_size –  sds Sep 14 '12 at 11:35
    
What about the fsck? Is it still crashing? –  reverendj1 Sep 14 '12 at 14:38
    
fsck run at boot because of /forcefsck and did not find any errors; badblock did not find anything either –  sds Sep 23 '12 at 5:50
    
How often does it crash? It may be overheating. –  reverendj1 Sep 24 '12 at 14:49

Not the answer you're looking for? Browse other questions tagged or ask your own question.