Netgate SG-1000 microFirewall

Author Topic: [v2.3 & v2.4] Kernel crash with Fatal trap 12: page fault while in kernel mode  (Read 4103 times)

0 Members and 1 Guest are viewing this topic.

Offline CDuv

  • Jr. Member
  • **
  • Posts: 89
  • Karma: +1/-0
    • View Profile
Other crash:

Quote
Fatal trap 12: page fault while in kernel mode
cpuid = 5; apic id = 0a
fault virtual address   = 0x78
fault code              = supervisor read data, page not present
instruction pointer     = 0x20:0xffffffff80d6632c
stack pointer           = 0x28:0xfffffe01ec7d9930
frame pointer           = 0x28:0xfffffe01ec7d9990
code segment            = base 0x0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags        = interrupt enabled, resume, IOPL = 0
current process         = 12 (irq289: igb4:que 5)
trap number             = 12
panic: page fault
cpuid = 5
Uptime: 1h33m1s
Dumping 568 out of 8135 MB:..3%..12%..23%..31%..43%..51%..62%..71%..82%..91%
Dump complete
                                                                             99
TAB Key on Remote Keyboard To Entry Setup Menu
MB-7551 Ver.AE0 03/28/2014
Version 2.16.1242. Copyright (C) 2013 American Megatrends, Inc.
Press <DEL> or <ESC> to enter setup.


(.. many empty lines ..)


|oading /boot/defaults/loader.conf serial port                                 
/IOS drive C: is disk0                                                          BIOS 619kB/2081240kB available memory

FreeBSD/x86 bootstrap loader, Revision 1.1
(root@buildbot2.netgate.com, Wed Aug  3 08:04:25 CDT 2016)
\


(.. many empty lines ..)


syms=[0x8+0x17b620+0x8+0x17b93e]a0 data=0xaad7b8+0x4c60e8 \
/boot/entropy size=0x1000 __  ___  ___     
Booting...|_\___ \ / _ \ '_ \/ __|/ _ \   
Copyright (c) 1992-2016 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
  |_|   The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.               
FreeBSD 11.0-RELEASE-p3 #180 8fb831d(RELENG_2_4): Sun Nov 13 23:31:20 CST 2016
    root@buildbot2.netgate.com:/builder/ce/tmp/obj/builder/ce/tmp/FreeBSD-src/sys/pfSense amd64

I will now try v2.3.1 (I think I recall that it was not crashing that much at that time).

2.4.0-BETA crashed few seconds after I changed Virtual IP settings (to disable box running v2.4.0-BETA and switch production to the box running v2.3.1).

Offline w0w

  • Sr. Member
  • ****
  • Posts: 581
  • Karma: +35/-8
  • kernel panic attack
    • View Profile
I can be wrong but it mostly looks like ECC memory failure. Please replace your memory and test again.

Offline CDuv

  • Jr. Member
  • **
  • Posts: 89
  • Karma: +1/-0
    • View Profile
It occurs on 2 identical brand-new box so I doubt faulty hardware is the cause (it is still possible indeed but lowly possible).
« Last Edit: November 15, 2016, 08:08:31 pm by CDuv »

Offline w0w

  • Sr. Member
  • ****
  • Posts: 581
  • Karma: +35/-8
  • kernel panic attack
    • View Profile
Two boxes? Does it mean you don't use same pieces of hardware when testing on both machines? For example harddrive/CF or USB stick?

Offline CDuv

  • Jr. Member
  • **
  • Posts: 89
  • Karma: +1/-0
    • View Profile
It means I have 2 identical servers with exact same model of component (1X SSD, 1x RAM memory stick) in each one.

v2.3.2 was tested on both servers.
v2.40-BETA (which performs a bit better : only 2-3 crashes per day) was only tested on box 2.
v2.3.1 was only tested on box 1.

I never swapped any piece (would it be RAM or SSD)
Used a couple of USB memory stick for the installations : it is actually the only piece of hardware that was shared between servers.

Offline CDuv

  • Jr. Member
  • **
  • Posts: 89
  • Karma: +1/-0
    • View Profile
Funny fact, when unplugging network cables (when I want to swap production from one server to another: for the tests): the server crashes...

Offline w0w

  • Sr. Member
  • ****
  • Posts: 581
  • Karma: +35/-8
  • kernel panic attack
    • View Profile
Are there some BIOS/UEFI options regarding OS installation compatibility?
Did you try to install 2.4 on ZFS with GPT-UEFI (it should work on latest builds)? I am not sure may be its related to some power savings or anything else you can find in BIOS or UEFI settings related to power savings.
It would be good to disable all CPU power saving modes except common C1 mode for testing purposes.

Offline W4RH34D

  • Full Member
  • ***
  • Posts: 264
  • Karma: +29/-5
  • Did you check your cables?
    • View Profile
    • kelcocomputers
bad cable?  faulty plug on the other end with out of spec voltages?
Did you really check your cables?

Offline CDuv

  • Jr. Member
  • **
  • Posts: 89
  • Karma: +1/-0
    • View Profile
Are there some BIOS/UEFI options regarding OS installation compatibility?
Did you try to install 2.4 on ZFS with GPT-UEFI (it should work on latest builds)? I am not sure may be its related to some power savings or anything else you can find in BIOS or UEFI settings related to power savings.
It would be good to disable all CPU power saving modes except common C1 mode for testing purposes.
pfSense 2.4 was installed on MBR: I'll try GPT...

I have no access to BIOS on this appliance which is pre-prepared for pfSense (bought to a local appliance reseller): serial console does not allow me to enter BIOS (I see the "Press <Del> to enter..." but pressing the [Del] key does nothing).: Got it working.
The BIOS says the following about CPU:
* EIST (GV3) : Disable
* P-stat Coordination : Package (cannot be modified)
* TM1 : Enable
* TM2 Mode : Adaptative Throttling (cannot be modified)
* CPU C State : Disable
* Enhanced Halt State : Disable (cannot be modified)
* ACP C2 : Diable (cannot be modified)
* Monitor/Mwait : Enable (cannot be modified)
* L1 Prefetcher : Enable
* L2 Prefetcher : Enable
* Max CPUID Value Limit : Disable
* Execute Disable Bit : Enable
* AES-NI : Enable
* Turbo : Enable (cannot be modified)
* Active Processor Core : All

But, on the pfSense config, PowerD is disabled and AC Power, Battery Power and Unknown Power settings are all set to "Hiadaptive" (did not touched theses after 2.4.0-BETA installation).

It is advised to disable power saving modes in the BIOS/UEFI?
« Last Edit: November 17, 2016, 11:31:06 am by CDuv »

Offline beppo

  • Newbie
  • *
  • Posts: 24
  • Karma: +0/-0
    • View Profile
Code: [Select]
Fatal trap 12: page fault while in kernel mode
cpuid = 3; apic id = 06
fault virtual address = 0x5e00000000
fault code = supervisor read data, page not present
instruction pointer = 0x20:0xffffffff80d80b00
stack pointer         = 0x28:0xfffffe00a1644b60
frame pointer         = 0x28:0xfffffe00a1644b80
code segment = base 0x0, limit 0xfffff, type 0x1b
= DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags = interrupt enabled, resume, IOPL = 0
current process = 75463 (pfctl)

Got the same error once a day with the same motherboard in 2.3.x. Bios settings weren't changed since the first install of 2.x. I don't think it is a hardware issue but I also have no clue how to solve the issue but installing 2.2 again.

Offline CDuv

  • Jr. Member
  • **
  • Posts: 89
  • Karma: +1/-0
    • View Profile
Yeah! I am not alone!

Is your network architecture partially similar to mine? Do you have a lot of users?

If your workaround is to downgrade to 2.2 it is a lead for some debugging and a possible fix...

I see bug #4689 (Panic/Crash "sbflush_internal: cc 4294967166 || mb 0 || mbcnt 0") is similar but is marked as resolved for 2.3...
Original bug report on FreeBSD bug tracker is still open and someone reported it ran into the issue it a month ago.
« Last Edit: November 17, 2016, 06:07:52 pm by CDuv »

Offline w0w

  • Sr. Member
  • ****
  • Posts: 581
  • Karma: +35/-8
  • kernel panic attack
    • View Profile
I don't see any options you must change in BIOS. All your posted options are OK. Just for testing purpose, enable PowerD and set it to maximum perfomance. Make sure you do not have polling enabled and enable all setting below (see picture).
If it does not help then install 2.2.x version.
« Last Edit: November 17, 2016, 10:22:10 pm by w0w »

Offline CDuv

  • Jr. Member
  • **
  • Posts: 89
  • Karma: +1/-0
    • View Profile
I had "Hardware Checksum Offloading" unchecked and both "Hardware TCP Segmentation Offloading" & "Hardware Large Receive Offloading" checked.

I'll check "Hardware Checksum Offloading" and set PowerD to maximum...

Offline CDuv

  • Jr. Member
  • **
  • Posts: 89
  • Karma: +1/-0
    • View Profile
Update:
I tested OPNsense (v16.7.8 ) under the same load and configuration and it works (3 days now)...
In the same time, the other server (on pfSense 2.4.0) which is up but not used (no traffic towards him) did not crashed either: indicates crashes are load/traffic related.

Hope this helps to pinpoint the exact cause of the issue.
« Last Edit: November 21, 2016, 08:35:13 am by CDuv »

Offline w0w

  • Sr. Member
  • ****
  • Posts: 581
  • Karma: +35/-8
  • kernel panic attack
    • View Profile
I think you must create bug report on redmine. The crashes I have had on different hardware also happened under heavy traffic. It could be driver related or NIC hardware revision/firmware.