# Is this a kernel bug?



## sk8harddiefast (Feb 21, 2014)

Sudenly my computer freezes. Rebooting I saw a page fault and syslog started to create crash files on /var/crach
I want to share the core dump to tell me if is this a bug. My system is fresh clean install on ZFS with encryption.
`My uname -a`

```
FreeBSD Unix 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014     root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
```

My /var/crash/info.0


```
Dump header from device /dev/gpt/swap0
  Architecture: amd64
  Architecture Version: 2
  Dump Length: 2394083328B (2283 MB)
  Blocksize: 512
  Dumptime: Fri Feb 21 02:44:31 2014
  Hostname: Unix
  Magic: FreeBSD Kernel Dump
  Version String: FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014
    root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC
  Panic String: page fault
  Dump Parity: 1550376081
  Bounds: 0
  Dump Status: good
```

My /var/crash/core.txt.0
http://pastebin.com/LTvmnQKH

This is are the files into /var/crash and also a vmcore.0 which is not a text file.
Over there I see:

```
ACPI BIOS Warning (bug): Incorrect checksum in table [OEMB] - 0x8C, should be 0x8B (20130823/tbprint-233)
```
If this is some kind of bug I am going to post it on FreeBSD bugs.


----------



## SirDice (Feb 21, 2014)

Verify if your memory and harddisks are still good before you do. A page fault usually indicates there's something wrong with the memory. It may also be some bug in a driver but lets exclude everything else first.


----------



## sk8harddiefast (Feb 21, 2014)

And how to check them? You mean to run some test right? Because My system has 16GB of memory and still see 16GB.
`dmesg | grep memory`

```
real memory  = 17179869184 (16384 MB)
avail memory = 16575778816 (15807 MB)
```

I thought that maybe could be ZFS. I think is experimental on installation disk but still I choose it.

Ps. I have 16GB (4x4GB) of Corsair Vengeance: http://www.corsair.com/en/memory-by-pro ... 00c10.html
I think that's a little impossible the specific RAM to be damaged, especially after 3 years. If it was problematic I was seen it from the begining.
For HDD I don't know. I have it some years and never had any problem with that too.
But to exclude everything, can you tell me how to check if they are alright? I don't know none memory and hdd diagnostic tool.


----------



## SirDice (Feb 21, 2014)

sk8harddiefast said:
			
		

> I thought that maybe could be ZFS. I think is experimental on installation disk but still I choose it.


The installer is still experimental, ZFS itself isn't.



> But to exclude everything, can you tell me how to check if they are alright? I don't know none memory and hdd diagnostic tool.


Memory tests can be done with sysutils/memtest. For checking the harddrive's status; sysutils/smartmontools.


----------



## sk8harddiefast (Feb 21, 2014)

Ok. I installed smartmontools and `smartctl` return this:


```
ember@Unix /etc $ sudo smartctl -aH /dev/ada0
smartctl 6.2 2013-07-26 r3841 [FreeBSD 10.0-RELEASE amd64] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Western Digital Caviar Blue (SATA)
Device Model:     WDC WD3200AAKS-00SBA0
Serial Number:    WD-WMAPZ0334232
LU WWN Device Id: 5 0014ee 0aabede42
Firmware Version: 12.01B01
User Capacity:    320,072,933,376 bytes [320 GB]
Sector Size:      512 bytes logical/physical
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ATA/ATAPI-7 (minor revision not indicated)
Local Time is:    Fri Feb 21 15:22:09 2014 EET
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:  (0x84)	Offline data collection activity
					was suspended by an interrupting command from host.
					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: 		( 8400) 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: 	 (   2) minutes.
Extended self-test routine
recommended polling time: 	 ( 106) minutes.
Conveyance self-test routine
recommended polling time: 	 (   6) minutes.
SCT capabilities: 	       (0x103f)	SCT Status supported.
					SCT Error Recovery Control supported.
					SCT Feature Control supported.
					SCT Data Table supported.

SMART Attributes Data Structure revision number: 16
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   200   200   051    Pre-fail  Always       -       0
  3 Spin_Up_Time            0x0003   169   024   021    Pre-fail  Always       -       4525
  4 Start_Stop_Count        0x0032   099   099   000    Old_age   Always       -       1274
  5 Reallocated_Sector_Ct   0x0033   200   200   140    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000e   200   200   051    Old_age   Always       -       0
  9 Power_On_Hours          0x0032   057   057   000    Old_age   Always       -       31480
 10 Spin_Retry_Count        0x0012   100   100   051    Old_age   Always       -       0
 11 Calibration_Retry_Count 0x0012   100   100   051    Old_age   Always       -       0
 12 Power_Cycle_Count       0x0032   099   099   000    Old_age   Always       -       1230
192 Power-Off_Retract_Count 0x0032   200   200   000    Old_age   Always       -       365
193 Load_Cycle_Count        0x0032   200   200   000    Old_age   Always       -       1281
194 Temperature_Celsius     0x0022   115   098   000    Old_age   Always       -       32
196 Reallocated_Event_Count 0x0032   200   200   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0012   200   200   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0010   200   200   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x003e   200   200   000    Old_age   Always       -       47
200 Multi_Zone_Error_Rate   0x0008   200   200   051    Old_age   Offline      -       0

SMART Error Log Version: 1
No Errors Logged

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


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.
```


----------



## SirDice (Feb 21, 2014)

Your disk appears to be in order. Keep an eye on values from Reallocated_Sector_Ct and Offline_Uncorrectable. Those could indicate bad sectors.


----------



## sk8harddiefast (Feb 21, 2014)

Ok. Smartmontool is a nice tool 

I also installed memtester but I cannot find how to use it. I read manual but don't understand a lot o things.

How to use it to check all my 16GB? I use 4 slots with 4GB on each slot


----------



## Beastie (Feb 21, 2014)

Is sysutils/memtest reliable? Correct me if I'm wrong, but it's a "user-space utility" so there must be parts of the memory it can't check.

I once used sysutils/memtest86+. That was many years ago, so I don't remember very well, but I believe it runs at boot time (like a kernel). There are also bootable ISO images.

Anyway, checking 16GB is going to take a *very* long time, so keep the tests running for at least an entire day.


----------



## sk8harddiefast (Feb 21, 2014)

I thought memtest+86 but I don't know how to put it on boot.


----------



## Uniballer (Feb 23, 2014)

sk8harddiefast said:
			
		

> I thought memtest+86 but I don't know how to put it on boot.



Install the package, or `# make clean install` the port as usual (note that you still need gcc to build memtest86+ on 10.0, and I think I had to edit the Makefile).  This will put it in /boot/opt/memtest86+.  During boot, escape to the loader prompt and use the following commands:

```
unload
load /boot/opt/memtest86+
boot
```


----------

