System panic

My system was working fine.
All of a sudden Chrome started crashing a couple of days ago.

Now the system won't even boot property and gets stuck here :

. Fatal trap 9 : general protection fault while in kernel mode


What do I do? Feeling lost
 
Can you boot from usb/dvd then mount/chroot into your system ?
Can boot into single user mode on the same machine/hard drive.

Tried to boot into different boot environment using beadm and bectl but multiuser mode keeps crashing.
 
When you can boot into single user mode. It means the kernel can get loaded, and you are able to go to a shell and fix the problems.
Things you can try:
-Mount root filesystem
-Use chroot
-Perform freebsd-upgrade
-Do a pkg update& upgrade.
-Reinstall bootcode with "gpart bootcode"
 
Before doing any complicated things that change the state (and may sweep the problem under the rug), diagnose what the problem is. To begin with: when the system panics, what does the console show? What is the call stack? That tells you what part of the kernel is unhappy, which is already valuable. Perhaps even more important: What process caused the panic? I think the normal panic output on the console shows the current process ID and name.

Next question: What action causes it? If you can boot into single user mode, stay there for a while, and try several things. For example: Is your storage OK? Are there disk errors? What unusual stuff do you see in dmesg or /var/log/messages? Are your file systems in good health? Are all the expected peripherals present?

Think back: What was the most recent configuration change you made before it started crashing?

Having explored single user mode, try bringing the system to multi-user mode but do NOT start X windows or the GUI. Does it still work? Is normal user login possible? You said above that multi-user mode crashes, but I don't know whether you really mean GUI login there.
 
When you can boot into single user mode. It means the kernel can get loaded, and you are able to go to a shell and fix the problems.
Things you can try:
-Mount root filesystem
-Use chroot
-Perform freebsd-upgrade
-Do a pkg update& upgrade.
-Reinstall bootcode with "gpart bootcode"
Thanks. So I was able to mount using
zfs mount -a

Now able to see user home directory. Trying to figure out how to chroot
 
Before doing any complicated things that change the state (and may sweep the problem under the rug), diagnose what the problem is. To begin with: when the system panics, what does the console show? What is the call stack? That tells you what part of the kernel is unhappy, which is already valuable. Perhaps even more important: What process caused the panic? I think the normal panic output on the console shows the current process ID and name.

Next question: What action causes it? If you can boot into single user mode, stay there for a while, and try several things. For example: Is your storage OK? Are there disk errors? What unusual stuff do you see in dmesg or /var/log/messages? Are your file systems in good health? Are all the expected peripherals present?

Think back: What was the most recent configuration change you made before it started crashing?

Having explored single user mode, try bringing the system to multi-user mode but do NOT start X windows or the GUI. Does it still work? Is normal user login possible? You said above that multi-user mode crashes, but I don't know whether you really mean GUI login there.
Thanks. Good suggestions. Couldn't find much under/var/log/messages

And /var/crash shows a file minfree - so still not sure how to check what's causing this.

Dmesg also doesn't show anything - although I haven't chrooted yet, trying to figure that out.
 
Something like,
Code:
chroot / /usr/local/bin/zsh
This worked but somehow when I try setting zfs fa to writeable using this it doesn't work


zfs set read-only=off zroot/ROOT/default


It complains saying " cannot open 'zroot/ROOT/default': dataset does not exist

Update: Got this step to work
 
Are you able to take picture of that fault and share?

Can boot into single user mode on the same machine/hard drive.
Meaning the same system/BE that would normally crash if going into multiuser ? If we see where the GPF is happening we may be able to narrow it down. Any special driver being loaded in loader.conf or by rc.conf (graphics driver) ?

If you had chrome crashing prior to this boot issue it could be a HW problem. Can you do a memtest+ ram test booting usb ?
 
Are you able to take picture of that fault and share?


Meaning the same system/BE that would normally crash if going into multiuser ? If we see where the GPF is happening we may be able to narrow it down. Any special driver being loaded in loader.conf or by rc.conf (graphics driver) ?

If you had chrome crashing prior to this boot issue it could be a HW problem. Can you do a memtest+ ram test booting usb ?
Yes, same system crashing in multiuser. Tried changing BE but multiuser mot working.

Unlikely to be a hardware issue - nothing changed really.

Chrome crash was few days ago, consistently crashing, upon start. And now multiuser won't boot. Strange. Not sure how to diagnose.
 
If you show us the picture of that crash we can see at least what code has been executing when GPF occurred. That's a first step. As you have access to the system in single mode you can still configure crashdumps to save this and possible share either here or open a PR (with latter being the proper way of reporting issues). dumpon -l shows you if you have any dump devices configured. Depending on your disk layout (gpart show) you need to select swap partition with dumpon and add at least dumpdev="AUTO" in rc.conf.

Of course chrome could be crashing due to some SW bug. Without further information your guess is good as mine. But at least for now it does show a pattern.
 
When you can boot into single user mode. It means the kernel can get loaded, and you are able to go to a shell and fix the problems.
Things you can try:
-Mount root filesystem
-Use chroot
-Perform freebsd-upgrade
-Do a pkg update& upgrade.
-Reinstall bootcode with "gpart bootcode"
So I tried mounting zfs latest pool
Did chroot
Did freebsd-update fetch and install
pkg update and install

Just haven't tried the "gpart boot code" command
 
If I can share my 2c, please don't do a kitchen sink approach to this problem and for sure don't start reinstalling stuff. GPF trap in kernel is for sure not due to bad bootcode. You are already in single mode, you're long gone after bootcode.
If you share that picture, we can see what's happening. From there we can navigate and give you better suggestions.
 
If I can share my 2c, please don't do a kitchen sink approach to this problem and for sure don't start reinstalling stuff. GPF trap in kernel is for sure not due to bad bootcode. You are already in single mode, you're long gone after bootcode.
If you share that picture, we can see what's happening. From there we can navigate and give you better suggestions.
My Mobile camera pictures are apparently too large to upload here:/

But the scren it stops on mentions:

Current process: 49022 (rm)
Trap no =9
Panic: general protection fault
......
....
Fatal trap 9: general protection fault while in kernel mode
......
.....
Warning !drm_modeset_is_locked)...

 
Well, not ideal, but you did share already important part: "drm_modeset_is_locked". This is graphics driver related stuff. As I mentioned in my first reply here - locate video-driver specific lines in /boot/loader.conf and /etc/rc.conf , comment them out and try booting again.
Also most likely some part of the system did get updated then.
 
Well, not ideal, but you did share already important part: "drm_modeset_is_locked". This is graphics driver related stuff. As I mentioned in my first reply here - locate video-driver specific lines in /boot/loader.conf and /etc/rc.conf , comment them out and try booting again.
Also most likely some part of the system did get updated then.
So I was able to see dmesg logs. It seems like it's the graphic drivers. Starts with

!drm_modeset_is_locked(.... failed at /wrkdirs/user/ports/graphics/drm-510-kmod/work/drm-kmod-drm_v5.10.113_8/drivers/GPU/drm/drm_atomic_helper.c:669
Kernel trap 12 with interrupts disabled

Fatal trap 12 : page fault while in kernel mode
cpuid=0; apic Id= 00
Fault virtual address= .....


 
What is the graphics card you use and which driver ?
Do you load the driver from loader.conf or rc.conf.
I vaguely remember installing drm-510-kmod from ports back in the day . I tried `make deinstall delete` by going into ports... Seemed to delete it.

Rebooted but issue persists. Maybe I should reinstall it via pkg?

My loader.conf file has these (commented out + uncommented) since pretty long and worked fine (since a couple of years I believe now) :


....
#i915kms_load="YES"

fuse_load="YES"

#kern.vty=vt

.....
[/CMD]
My rc.conf has these ones



.....
kld_list="/boot/modules/i915kms.ko"
#gnome
dbus_enable="YES"
hald_enable="YES"
slim_enable="YES"
.....

 
Back
Top