System panic

BTW, you can use that Ubuntu USB stick you've mentioned earlier and use the HDD diagnostic tool (forgot its name, sorry) they have in every distro. At least you'll see if your disk shows errors...
Ok, smartctl is the name. For HDD's with S.M.A.R.T. present. Not sure if it applies to SSD's in any useful way.
 
Ok, smartctl is the name. For HDD's with S.M.A.R.T. present. Not sure if it applies to SSD's in any useful way.
Ok - since everyone seems to think it's a hard disk issue - I ran smartctl from a ubuntu 16.x stick - so see if ssd is the culprit here .... here are the results :

short test :
ubuntu@ubuntu:~$ sudo smartctl -t short /dev/sda
smartctl 6.5 2016-01-24 r4214 [x86_64-linux-4.10.0-28-generic] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===
Sending command: "Execute SMART Short self-test routine immediately in off-line mode".
Drive command "Execute SMART Short self-test routine immediately in off-line mode" successful.
Testing has begun.
Please wait 2 minutes for test to complete.
Test will complete after Sun Dec 11 16:25:47 2022

Use smartctl -X to abort test.
ubuntu@ubuntu:~$ sudo smartctl -a /dev/sda
smartctl 6.5 2016-01-24 r4214 [x86_64-linux-4.10.0-28-generic] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Device Model: Samsung SSD 860 EVO 500GB
Serial Number: S4FNNJ0N101593D
LU WWN Device Id: 5 002538 e3010d998
Firmware Version: RVT04B6Q
User Capacity: 500,107,862,016 bytes [500 GB]
Sector Size: 512 bytes logical/physical
Rotation Rate: Solid State Device
Form Factor: 2.5 inches
Device is: Not in smartctl database [for details use: -P showall]
ATA Version is: Unknown(0x09fc), ACS-4 T13/BSR INCITS 529 revision 5
SATA Version is: SATA 3.2, 6.0 Gb/s (current: 3.0 Gb/s)
Local Time is: Sun Dec 11 16:35:47 2022 UTC
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.
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: (0x53) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
No Offline surface scan supported.
Self-test supported.
No 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: ( 85) minutes.
SCT capabilities: (0x003d) SCT Status supported.
SCT Error Recovery Control supported.
SCT Feature Control supported.
SCT Data Table supported.

SMART Attributes Data Structure revision number: 1
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
5 Reallocated_Sector_Ct 0x0033 100 100 010 Pre-fail Always - 0
9 Power_On_Hours 0x0032 099 099 000 Old_age Always - 4040
12 Power_Cycle_Count 0x0032 098 098 000 Old_age Always - 1628
177 Wear_Leveling_Count 0x0013 095 095 000 Pre-fail Always - 85
179 Used_Rsvd_Blk_Cnt_Tot 0x0013 100 100 010 Pre-fail Always - 0
181 Program_Fail_Cnt_Total 0x0032 100 100 010 Old_age Always - 0
182 Erase_Fail_Count_Total 0x0032 100 100 010 Old_age Always - 0
183 Runtime_Bad_Block 0x0013 100 100 010 Pre-fail Always - 0
187 Reported_Uncorrect 0x0032 100 100 000 Old_age Always - 0
190 Airflow_Temperature_Cel 0x0032 067 043 000 Old_age Always - 33
195 Hardware_ECC_Recovered 0x001a 200 200 000 Old_age Always - 0
199 UDMA_CRC_Error_Count 0x003e 099 099 000 Old_age Always - 30
235 Unknown_Attribute 0x0012 099 099 000 Old_age Always - 200
241 Total_LBAs_Written 0x0032 099 099 000 Old_age Always - 32988322854

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 Short offline Completed without error 00% 4040 -
# 2 Short offline Completed without error 00% 3451 -
# 3 Short offline Completed without error 00% 1598 -

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
256 0 65535 Read_scanning was never started
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.

Now started the long test on smartctl as well - will update this post with those results after 85 mins that it says it will take :
UPDATE : Here is the result for the long test below
ubuntu@ubuntu:~$ sudo smartctl -t long /dev/sda
smartctl 6.5 2016-01-24 r4214 [x86_64-linux-4.10.0-28-generic] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===
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.
Please wait 85 minutes for test to complete.
Test will complete after Sun Dec 11 18:02:39 2022

Use smartctl -X to abort test.
ubuntu@ubuntu:~$ date
Sun Dec 11 16:45:01 UTC 2022
ubuntu@ubuntu:~$ date
Sun Dec 11 17:15:56 UTC 2022
ubuntu@ubuntu:~$ date
Sun Dec 11 17:27:45 UTC 2022
ubuntu@ubuntu:~$ date
Sun Dec 11 17:33:04 UTC 2022
ubuntu@ubuntu:~$ date
Sun Dec 11 18:26:07 UTC 2022
ubuntu@ubuntu:~$ sudo smartctl -a /dev/sda
smartctl 6.5 2016-01-24 r4214 [x86_64-linux-4.10.0-28-generic] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Device Model: Samsung SSD 860 EVO 500GB
Serial Number: S4FNNJ0N101593D
LU WWN Device Id: 5 002538 e3010d998
Firmware Version: RVT04B6Q
User Capacity: 500,107,862,016 bytes [500 GB]
Sector Size: 512 bytes logical/physical
Rotation Rate: Solid State Device
Form Factor: 2.5 inches
Device is: Not in smartctl database [for details use: -P showall]
ATA Version is: Unknown(0x09fc), ACS-4 T13/BSR INCITS 529 revision 5
SATA Version is: SATA 3.2, 6.0 Gb/s (current: 3.0 Gb/s)
Local Time is: Sun Dec 11 18:26:16 2022 UTC
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.
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: (0x53) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
No Offline surface scan supported.
Self-test supported.
No 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: ( 85) minutes.
SCT capabilities: (0x003d) SCT Status supported.
SCT Error Recovery Control supported.
SCT Feature Control supported.
SCT Data Table supported.

SMART Attributes Data Structure revision number: 1
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
5 Reallocated_Sector_Ct 0x0033 100 100 010 Pre-fail Always - 0
9 Power_On_Hours 0x0032 099 099 000 Old_age Always - 4042
12 Power_Cycle_Count 0x0032 098 098 000 Old_age Always - 1628
177 Wear_Leveling_Count 0x0013 095 095 000 Pre-fail Always - 85
179 Used_Rsvd_Blk_Cnt_Tot 0x0013 100 100 010 Pre-fail Always - 0
181 Program_Fail_Cnt_Total 0x0032 100 100 010 Old_age Always - 0
182 Erase_Fail_Count_Total 0x0032 100 100 010 Old_age Always - 0
183 Runtime_Bad_Block 0x0013 100 100 010 Pre-fail Always - 0
187 Reported_Uncorrect 0x0032 100 100 000 Old_age Always - 0
190 Airflow_Temperature_Cel 0x0032 064 043 000 Old_age Always - 36
195 Hardware_ECC_Recovered 0x001a 200 200 000 Old_age Always - 0
199 UDMA_CRC_Error_Count 0x003e 099 099 000 Old_age Always - 30
235 Unknown_Attribute 0x0012 099 099 000 Old_age Always - 200
241 Total_LBAs_Written 0x0032 099 099 000 Old_age Always - 32988322854

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% 4042 -
# 2 Short offline Completed without error 00% 4040 -
# 3 Short offline Completed without error 00% 3451 -
# 4 Short offline Completed without error 00% 1598 -

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
256 0 65535 Read_scanning was never started
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.

ubuntu@ubuntu:~$
 
Ok, point by point)))

1) Actually Samsung is a good reputation SSD manufacturer. Still, things happen...

2) Yes, the error will be copied over to the new pool, but there it WILL be fixed with scrub, and you also WILL be able to delete the unfortunate files.

3) Actually, if you're "expert" enough, you may boot from a 13.1 installation media, create a zpool on your new HDD, then use zfs send command to send your old pool (snapshot) to the new zpool. That will restore ALL you have in the old pool to the new pool. You will then be able to boot from that stuff same as you booted from the old one. Well, some basic setup for booting will be necessary, of course.

4) That tool checks HDD on the low hardware level. It cares nothing about the stuff that's written to the disk. We're supposedly dealing here with hardware level problems. And ZFS + its encryption is, as you would know, software level ;)
This is very helpful - I'm guessing the smartctl tool above should catch any errors. on the SSD. I still have to buy a new SSD yet.

Opps, my typo. dumpon -l to list the dump device, dumpon /dev/diskNpX to use the swap as swapdevice. AUTO part of the rc.conf should then automatically use that device.
I'm on a ubuntu stick now 16.x .... is there some logs/operations that might help from a ubuntu stick to make things more apparent? This is so much easier than being on my phone and replying. Happy to provide any such info.

cracauer@ vaguely remember reading online that maybe zdb could fix the issue as you suggested me to use that command - I replied here https://forums.FreeBSD.org/threads/system-panic.87387/post-591149 ..... but apparently (from what I read) the behaviour of zdb isn't well documented) ..... did my previous reply show any progress is possible with my situation?
 
You can try this zdb option. Would do it after a backup.

--all-reconstruction

Ok - so that's a last resort. Will keep in mind.

The smartctl tests above - do those look ok? I mean if it was a SSD error as you're suspecting it to be
 
Well Ubuntu 16 is not ZFS aware as far as I know so you can't do much with the FS itself. My advise to you is still the same: make sure you have dumps available so others can have a look as see what's happening and do the backup without doing too many (if any) chance to the current ZFS setup.
 
Well Ubuntu 16 is not ZFS aware as far as I know so you can't do much with the FS itself. My advise to you is still the same: make sure you have dumps available so others can have a look as see what's happening and do the backup without doing too many (if any) chance to the current ZFS setup.
I thought someone above mentioned that hard drive test could be done since zfs+encryption was at software level and the hard drive test was at a hardware level. Is that incorrect?

Regarding dumps - I'm still not sure how I'll be able to share it from my mobile phone. Being on a ubunti stick I can access browser - going back to single user mode makes things difficult to share.
 
The thing is - we are all guessing. We don't know what's happening. Panic/crash has all the information needed. You can't go wrong with HW test, why not. So far from little you shared we don't see any obvious HW issue.
You could use USB stick to copy contents of the /var/crash to it, boot Ubuntu and upload that. Just make sure you're using FS that both FreeBSD and Linux is comfortable with. To not to complicate things fat32 is just fine in your setup.
 
The thing is - we are all guessing. We don't know what's happening. Panic/crash has all the information needed. You can't go wrong with HW test, why not. So far from little you shared we don't see any obvious HW issue.
You could use USB stick to copy contents of the /var/crash to it, boot Ubuntu and upload that. Just make sure you're using FS that both FreeBSD and Linux is comfortable with. To not to complicate things fat32 is just fine in your setup.
Ok - let me try this. Will report back soon. Will probably need to set dump device since auto option was already set.

Update _martin : 'dumpon -l' outputs '/dev/null'

Also, I had earlier tried to check contents of /var/crash.... There seems to only be a single file there with the name "minfree" and a single line containing the number "2048"

Feeling a little lost here how to proceed 🤔
 
So far from little you shared we don't see any obvious HW issue.
Are there some other possible explanations as to why ZFS pool would have permanent errors that don't go away nor can be fixed? Like files reported corrupted that can't be fixed nor deleted? I would like to know because I've encounter the same situation twice. And in both cases replacing the disk solved the problem.
It is understood that ZFS is extremely difficult to kill. So when it does start failing like this, what could it possibly be , other than HW failure?
 
The thing is - we are all guessing. We don't know what's happening. Panic/crash has all the information needed. You can't go wrong with HW test, why not. So far from little you shared we don't see any obvious HW issue.

The smartctl output looked clean to me but I'm no expert, and I only observe with awe the issues people have with ZFS.

You could use USB stick to copy contents of the /var/crash to it, boot Ubuntu and upload that. Just make sure you're using FS that both FreeBSD and Linux is comfortable with. To not to complicate things fat32 is just fine in your setup.

Tracker could maybe use an OTG cable to move files from and to his box from the phone, iff the phone does OTG?

Works for me on my 2017 Samsung J5pro, so should on anything as or more recent ...
 
Feeling a little lost here how to proceed 🤔
Please re-read my posts, I did mention this at least 3 times now how to set that dump device.

Are there some other possible explanations as to why ZFS pool would have permanent errors that don't go away nor can be fixed?
I not familiar with ZFS internals so I don't know. Several people even here on forums reported similar issues over time.

It's up to OP to do what he/she thinks is the best way to proceed, be it focusing on the files that are reported as problematic by ZFS. My 2c to the issue is what I said above: 100% reproducible panic on GENERIC kernel --> collect information and open PR.
 
Please re-read my posts, I did mention this at least 3 times now how to set that dump device
I tried putting into rc.conf :

dumpdir="/var/crash"

But it won't show me anything in/var/crash directory after reboot/panic ☹️

Next I'm trying dumpon to a usb stick partition - would it remember the partition/USB after reboot though?

Update: upon typing:
dumpon /dev/das3

It says: da0s3 isn't suitable for kernel dumps (wrong type?)

This disk partition is fat32 on remaining space of a bootable freebsd 13.1 stick

What do I do now?
It's up to OP to do what he/she thinks is the best way to proceed, be it focusing on the files that are reported as problematic by ZFS. My 2c to the issue is what I said above:
I strongly suspect this is a zfs issue but not sure how to proceed with it.

Will have to look for a zfs send/backup guide as well. Running out of time...
 

Attachments

  • IMG20221212142516.jpg
    IMG20221212142516.jpg
    357.3 KB · Views: 65
it wont dump not because of the partition type but rather because the size of the partition is less than physical memory size
so ignore the error of gpart modify
yes, you need a bigger disk
 
Why da0 ? Isn't that your USB key? Judging from the size of the disk and that ada0 actually has zfs partition ada0 is your system disk. ada0p2 is freebsd-swap which is a proper type. Use that.

You don't need to specify dumpdir in rc.conf. Use this only:
Code:
dumpdev="/dev/ada0p2"
But in order for it to be usable make sure you execute (in your case in single mode): dumpon /dev/ada0p2. Then do a reboot to single mode again and do dumpdev -l. You should see this partition as dump device. Once that's done you're set for the crash.
 
I've updated my post and included again the info I shared above. When system panics you'll see it's saving the crash. When it reboots go to single mode. I'm not 100% sure if savecore is executed in single mode, if not you'll execute it yourself (we'll see). The crash should be in /var/crash.
 
But in order for it to be usable make sure you execute (in your case in single mode): dumpon /dev/ada0p2. Then do a reboot to single mode again and do dumpdev -l. You should see this partition as dump device
Ok I followed these steps. Upon checking however the output shows the same dump destination separated by a comma, ie:
dumpon /dev/ada0p2
Dumpon -l
ada0p2,ada0p2


Does that look correct or I need to fix something? _martin
 
I'm not 100% sure why it's twice there, I'm assuming it was caught once by rc.conf and now as you did that manually. But I think you're ready to boot normally and see if it properly dumps.
 
I'm not 100% sure why it's twice there, I'm assuming it was caught once by rc.conf and now as you did that manually. But I think you're ready to boot normally and see if it properly dumps.
Ok I rebooted. I saw it say "Dumping...10%....90%"

But NOTHING under/var/crash

etc/rc.conf only has dumpdev="/dev/ada0p2" (as was suggested earlier)

What am I missing? Soo close
 
Back
Top