OPNsense Forum

Archive => 22.7 Legacy Series => Topic started by: chenganir on August 13, 2022, 03:15:36 AM

Title: kernel trap 12 with interrupts disabled
Post by: chenganir on August 13, 2022, 03:15:36 AM
Hello all !

I recently migrated from a dedicated machine (Protectli) to running OPNSense inside a VM (ProxMox) on a pentium N6005. I followed all the available guides, but for some reason my machine keeps panicking with the kernel trap 12. I looked around but all I could find were old versions of OPNSense pointing to resolved bugs. However, I'm using OPNsense 22.7.1 4b384de5c.

I keep hitting this repeatedly multiple times a day, the system will reboot and come back and ask me to submit a report, and then after some time will crash again.


WARNING: attempt to domain_add(netgraph) after domainfinalize()
ovpnc1: link state changed to UP
igc0: link state changed to UP
igc0_vlan50: link state changed to UP
igc0_vlan100: link state changed to UP
igc0_vlan20: link state changed to UP
igc0_vlan30: link state changed to UP
kernel trap 12 with interrupts disabled


I attached the full output I get when I sign into OPNSense after the crash happens (dmesg.boot).

I'm running the same config I used to run on the bare metal device, with the nic names adapted to the VM.

Any starting point and troubleshooting guides would be greatly appreciated !

Thanks.
Title: Re: kernel trap 12 with interrupts disabled
Post by: RAL9005 on October 28, 2022, 12:22:25 AM
Hi chenganir,

did you find a solution in the meantime? I migrated from to a similar setup, I have OPNsense 22.7 installed in a Proxmox QEMU VM, also running on a Pentium N6005 in a Topton Mini PC) and have the same issues you described.
I copied the OPNsese VM from my old Proxmox box (Qotom with a Celeron CPU), the config itself was not changed, so I'm pretty sure this is not be a configuration issue in OPNsense.
I also have some LXC running in Proxmox they are not affected.
Title: Re: kernel trap 12 with interrupts disabled
Post by: chenganir on October 28, 2022, 02:35:45 AM
Hey !

Unfortunately, no, I abandoned this idea. The Topton unit is now sitting unused on a distant shelf. I also tried to replace the thermal paste as as I've seen in some of the different posts on the internet, but nothing helped. I used some test VM's to simulate iperf3 traffic through the firewall and it kept panicking after a few minutes.
Title: Re: kernel trap 12 with interrupts disabled
Post by: RAL9005 on November 03, 2022, 11:17:33 PM
Thanks for the answer, I was afraid you'd reply that :-\

I also replaced the thermal grease of the Topton-Box with a good quality thermal pad to bridge the gap, but that of course did not solve the error.
I ordered the Topton box on aliexpress, I was rated quite well there. Did you by chance test OPNsese on the bare metal?
Title: Re: kernel trap 12 with interrupts disabled
Post by: chenganir on November 03, 2022, 11:31:08 PM
Hey.

No, I did not. I already have a protectli box for bare metal functionality, this unit was meant to test proxmox hypervisor functionality.
Title: Re: kernel trap 12 with interrupts disabled
Post by: RAL9005 on November 06, 2022, 03:12:50 AM
Hi chengair,

I checked the BIOS settings on my box and realized that in CPU options the Power Limit 2 was set to 27W by default, which is way too high. I manually limited the PL2 at 12,5W (should be the maximum for the N6005) and also disabled the Turbo Boost (don't know the exact setting anymore, but you can select 3 options and I chose the "middle" one).
The OPNsense VM is so far running stable, uptime is over 2 days now - which is a record for my Topton box.
I hope that the problem is solved now. I'll update in a few days.
Maybe that also helps you.
Title: Re: kernel trap 12 with interrupts disabled
Post by: chenganir on January 05, 2023, 08:23:36 PM
Thanks!

Can you share some details where you were able to manually limit the PL2 to 12.5W and where you changed the turbo boost settings in the bios? I was trying to find it unsuccessfully. How's your Topton box performance and stability so far ?

Thanks.
Title: Re: kernel trap 12 with interrupts disabled
Post by: RAL9005 on January 08, 2023, 05:25:22 AM
My box is headless, so I cannot check right away. I will search for a monitor and try to find the resp. options in the next days.

Stability is overall fine for me. I had one or two crashes of the OPNsense VM after that but since i upgraded RAM and assigned more memory to the OPNsense VM it really runs smooth.
Did not benchmark, but the performance is great.
Title: Re: kernel trap 12 with interrupts disabled
Post by: LiFE1688 on January 09, 2023, 06:47:29 AM
@RAL9005
Is it the one where you have to set to 12500 to get 12.5W for PL2 - Turbo Performance?
25W for PL2 is pretty much correct for Intel N6005, to boost to 3.3GHz.
You will see the same setting on Intel NUC 11 Essential Kit NUC11ATKPE, except the NUC has a more aggressive setting of 15W at PL1 - Sustained State and 25W at PL2 - Burst State. (See attachment)

What probably "helped" your issues was disabling Turbo Boost mode, where the CPU is limited to 2GHz and unable to boost to 3.3GHz

Just wondering, on your N6005 Topton box, did you put a fan over the case or are you using it without any active cooling.

@chenganir
You can find the settings:
Advanced -> Power & Performance -> CPU - Power Management Control -> View/Configure Turbo Options -> Power Limit 2 Override

I placed a 140mm USB FAN over the unit and that solved the overheating stability issues. There are some raised concerns of overheating on the Chinese forums about these Changwang (CWWK) boxes that uses N5105 and N6005, and most recommend only using the units with a active cooler (USB / 12V FAN) over the unit. The last known unit that doesn't require active cooling are the J4125 units, IMO.

It however does not solve the issues of OPNsense  22.7.10_2, I recommend using 22.7.8, the last known "more stable" version, again IMO.