tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kernel 9.0 crash on amd64



Hello,

On Sun, Apr 19, 2020 at 05:10:37PM +0000, maya%NetBSD.org@localhost wrote:
> On Sun, Apr 19, 2020 at 05:29:40PM +0200, tlaronde%polynum.com@localhost wrote:
> > Hello,
> > 
> > Mainly in order to be able to test wine, I'm compiling a NetBSD kernel
> > from netbsd-9-0-RELEASE sources on an amd64 (Intel bicore).
> > 
> > My config has very minimal changes from NetBSD 8.* config, the only important
> > modification being USER_LDT (and I'm not putting option SVS).
> > 
> > When it crashes, keyboard is unavailable and the information repeated is:
> > 
> > prevented execution of 0x18 (SMEP)
> > fatal page fault in supervisor mode
> > trap type 6 code 0x10 rip 0x18 cs 0x8 rflags 0x10246 cr2 0x18 ilevel 0x8
> > rsp 0xffffcc00ae0cbb40
> > 
> > The last bit registered and shown by dmesg (when rebooting with the 8.0
> > kernel) is about enumerating ahcisata0.
> > 
> > Does this ring some bell to somebody?
> > 
> > TIA,
> 
> SMEP is a hardware method to stop execution user-memory.
> It tried to execute a function pointer that isn't initialized, most
> likely.
> 
> It would be interesting to see what the backtrace is
> sysctl -w ddb.onpanic=2 will print the backtrace and reboot, which
> should make it visible in the back of the dmesg.
> 
> Also, if a kernel core dump is done, it should be in /var/crash, gunzip
> and crash -M netbsd.12 -N netbsd.12.core
> crash> bt
> 
> should print a backtrace.

Since there was no dump in /var/crash and the messages were frozen with
keyboard not responding, I commented out all the pckbd* isa stuff,
keeping only the ws* stuff related to USB keyboard and mouse.

And this time, the kernel boots...

I will have (later this week) to try to re-establish some options to
pin-point what the offending bit is (but the pckbd* is the more likely
culprit; I had also a  COMPAT_BSDPTY left but I doubt it could have
any effect if the related stuff doesn't exist anymore in the 9.x
branch...).

FWIW, here is the diff between my 8.0 config and the 9.0 _booting_
one:

Index: node.mdec
===================================================================
RCS file: /data/cvs/priv/2/4/cauchy/node.mdec,v
retrieving revision 1.11
diff -u -r1.11 node.mdec
--- node.mdec	17 Aug 2019 12:49:01 -0000	1.11
+++ node.mdec	19 Apr 2020 17:47:50 -0000
@@ -55,6 +55,10 @@
 
 options 	INSECURE	# disable kernel security levels - X needs this
 
+##9
+options		AUDIO_BLK_MS=4 # make software with low latency needs performant
+						# no substantial CPU overhead on this platform
+
 options 	RTC_OFFSET=0	# hardware clock is this many mins. west of GMT
 options 	NTP		# NTP phase/frequency locked loop
 
@@ -73,6 +77,11 @@
 #options 	PIPE_SOCKETPAIR	# smaller, but slower pipe(2)
 options 	SYSCTL_INCLUDE_DESCR	# Include sysctl descriptions in kernel
 
+# CPU-related options.
+options 	USER_LDT	# user-settable LDT; used by WINE
+##9
+#no options SVS
+
 # CPU features
 acpicpu*	at cpu?		# ACPI CPU (including frequency scaling)
 coretemp*	at cpu?		# Intel on-die thermal sensor
@@ -94,12 +103,13 @@
 #
 makeoptions	COPTS="-O2 -fno-omit-frame-pointer"
 options 	DDB		# in-kernel debugger
-options 	DIAGNOSTIC	# inexpensive kernel consistency checks
-#options 	DDB_ONPANIC=1	# see also sysctl(8): `ddb.onpanic'
+options 	DDB_COMMANDONENTER="bt"	# execute command when ddb is entered
+#options 	DIAGNOSTIC	# inexpensive kernel consistency checks
+options 	DDB_ONPANIC=0	# see also sysctl(7): `ddb.onpanic'
 options 	DDB_HISTORY_SIZE=512	# enable history editing in DDB
 #options 	KGDB		# remote debugger
 #options 	KGDB_DEVNAME="\"com\"",KGDB_DEVADDR=0x3f8,KGDB_DEVRATE=9600
-#makeoptions	DEBUG="-g"	# compile full symbol table
+makeoptions	DEBUG="-g"	# compile full symbol table
 #options 	SYSCALL_STATS	# per syscall counts
 #options 	SYSCALL_TIMES	# per syscall times
 #options 	SYSCALL_TIMES_HASCOUNTER	# use 'broken' rdtsc (soekris)
@@ -108,6 +118,7 @@
 options 	COMPAT_50	# NetBSD 5.0 compatibility,
 options 	COMPAT_60	# NetBSD 6.0 compatibility.
 options 	COMPAT_70	# NetBSD 7.0 binary compatibility.
+options 	COMPAT_80	# de dicto
 
 options 	COMPAT_OSSAUDIO
 options 	COMPAT_NETBSD32
@@ -115,7 +126,7 @@
 options 	COMPAT_LINUX32	# req. COMPAT_LINUX and COMPAT_NETBSD32
 options 	EXEC_ELF32
 # this one needed by xterm(1) which uses for now BSD ptys.
-options 	COMPAT_BSDPTY	# /dev/[pt]ty?? ptys.
+#options 	COMPAT_BSDPTY	# /dev/[pt]ty?? ptys.
 
 # Wedge support
 options 	DKWEDGE_AUTODISCOVER	# Automatically add dk(4) instances
@@ -252,6 +263,9 @@
 acpiout*	at acpivga?		# ACPI Display Output Device
 acpiwdrt*	at acpi?		# ACPI Watchdog Resource Table
 acpiwmi*	at acpi?		# ACPI WMI Mapper
+##9
+#ipmi_acpi*     at acpi?
+#ipmi0          at ipmi_acpi?
 
 # Mainboard devices
 attimer*	at acpi?		# AT Timer
@@ -261,7 +275,7 @@
 hpet*		at acpihpetbus?		# High Precision Event Timer (table)
 hpet*		at acpinodebus?		# High Precision Event Timer (device)
 lpt*		at acpi?		# Parallel port
-pckbc*		at acpi?		# PC keyboard controller
+#pckbc*		at acpi?		# PC keyboard controller
 pcppi*		at acpi?		# AT-style speaker sound
 
 # Basic Bus Support
@@ -292,16 +306,18 @@
 # Console Devices
 
 # wscons
-pckbc0		at isa?			# pc keyboard controller
-pckbd*		at pckbc?		# PC keyboard
-pms*		at pckbc?		# PS/2 mouse for wsmouse
+#pckbc0		at isa?			# pc keyboard controller
+#pckbd*		at pckbc?		# PC keyboard
+#pms*		at pckbc?		# PS/2 mouse for wsmouse
 vga*		at pci? dev ? function ?
 genfb*		at pci? dev ? function ?
 options 	VCONS_DRAW_INTR
 wsdisplay*	at vga? console ?
 wsdisplay*	at wsemuldisplaydev?
-wskbd*		at pckbd? console ?
-wsmouse*	at pms? mux 0
+#wskbd*		at pckbd? console ?
+#wsmouse*	at pms? mux 0
+##9
+#wsmouse*       at wsmousedev?
 
 attimer0	at isa?
 pcppi0		at isa?
@@ -544,6 +560,11 @@
 pseudo-device	wsmux			# mouse & keyboard multiplexor
 pseudo-device	wsfont
 
+##9
+# Give us a choice of fonts based on monitor size
+options        FONT_BOLD8x16
+options        FONT_BOLD16x32
+
 # pseudo audio device driver
 pseudo-device	pad
 
Best regards,
-- 
        Thierry Laronde <tlaronde +AT+ polynum +dot+ com>
                     http://www.kergis.com/
                       http://www.sbfa.fr/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C


Home | Main Index | Thread Index | Old Index