NetBSD Problem Report #53991

From www@NetBSD.org  Mon Feb 18 14:16:58 2019
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id CBABB7A150
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 18 Feb 2019 14:16:58 +0000 (UTC)
Message-Id: <20190218141657.00DFF7A1E1@mollari.NetBSD.org>
Date: Mon, 18 Feb 2019 14:16:56 +0000 (UTC)
From: isaki@pastel-flower.jp
Reply-To: isaki@pastel-flower.jp
To: gnats-bugs@NetBSD.org
Subject: X does not work on amd64/7.2 after pgoyette-compat
X-Send-Pr-Version: www-1.0

>Number:         53991
>Category:       kern
>Synopsis:       X does not work on amd64/7.2 after pgoyette-compat
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pgoyette
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Feb 18 14:20:00 +0000 2019
>Closed-Date:    Wed Feb 20 12:59:48 +0000 2019
>Last-Modified:  Wed Feb 20 13:00:01 +0000 2019
>Originator:     Tetsuya Isaki
>Release:        NetBSD-current+7.2
>Organization:
>Environment:
NetBSD XXXXXXX 7.2 NetBSD 7.2 (GENERIC) #19: Fri Jan 25 17:38:24 JST 2019  isaki@XXXXXXX:XXX/sys/arch/amd64/compile/GENERIC amd64
>Description:
X does not work on my amd64 after merging pgoyette-compat.
I placed current kernel in NetBSD 7.2 userland.
A combination of 7.2 userland + current kernel was working
until pgoyette-compat merged.

% startx
 -> X and window manager starts.
 -> Immediately then X backs to console.  It says... (hand copy)
----------
X.Org X Server 1.10.6
Release Date: 2011-07-08
X Protocol Version 11, Revision 0
build Operating System: NetBSD xxx 8.99.34 NetBSD 8.99.34 (GENERIC) #...
Build Date: 01 August 2011  01:01:00AM
 (snip)
(==) Log file: "/var/log/Xorg.0.log", Time: Sun Feb 17 15:35:55 2019
(==) Using config file: "/etc/X11/xorg.conf"
----------

I cannot enter any key.  ping has no response.
Here is a dmesg (outputted by kernel before pgoyette-compat) and
xorg.conf:

----------
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017,
    2018, 2019 The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 8.99.31 (GENERIC) #7: Sun Feb 17 14:39:08 JST 2019
	isaki@XXX:XXX/sys/arch/amd64/compile/GENERIC
total memory = 4086 MB
avail memory = 3941 MB
timecounter: Timecounters tick every 10.000 msec
Kernelized RAIDframe activated
running cgd selftest aes-xts-256 aes-xts-512 done
timecounter: Timecounter "i8254" frequency 1193182 Hz quality 100
System manufacturer System Product Name (System Version)
mainbus0 (root)
ACPI: RSDP 0x00000000000FB7F0 000014 (v00 ACPIAM)
ACPI: RSDT 0x00000000DF690000 00003C (v01 A_M_I_ OEMRSDT  04001028 MSFT 00000097)
ACPI: FACP 0x00000000DF690200 000084 (v02 A_M_I_ OEMFACP  04001028 MSFT 00000097)
ACPI: DSDT 0x00000000DF6905C0 008A54 (v01 A1350  A1350000 00000000 INTL 20060113)
ACPI: FACS 0x00000000DF69E000 000040
ACPI: APIC 0x00000000DF690390 00006C (v01 A_M_I_ OEMAPIC  04001028 MSFT 00000097)
ACPI: MCFG 0x00000000DF690400 00003C (v01 A_M_I_ OEMMCFG  04001028 MSFT 00000097)
ACPI: OEMB 0x00000000DF69E040 000080 (v01 A_M_I_ AMI_OEM  04001028 MSFT 00000097)
ACPI: HPET 0x00000000DF699020 000038 (v01 A_M_I_ OEMHPET  04001028 MSFT 00000097)
ACPI: GSCI 0x00000000DF69E0C0 002024 (v01 A_M_I_ GMCHSCI  04001028 MSFT 00000097)
ACPI: 1 ACPI AML tables successfully acquired and loaded
ioapic0 at mainbus0 apid 2: pa 0xfec00000, version 0x20, 24 pins
cpu0 at mainbus0 apid 0
cpu0: Pentium(R) Dual-Core  CPU      E6300  @ 2.80GHz, id 0x1067a
cpu0: package 0, core 0, smt 0
cpu1 at mainbus0 apid 1
cpu1: Pentium(R) Dual-Core  CPU      E6300  @ 2.80GHz, id 0x1067a
cpu1: package 0, core 1, smt 0
acpi0 at mainbus0: Intel ACPICA 20181213
acpi0: X/RSDT: OemId <A_M_I_,OEMRSDT ,04001028>, AslId <MSFT,00000097>
acpi0: MCFG: segment 0, bus 0-63, address 0x00000000f0000000
ACPI: Dynamic OEM Table Load:
ACPI: SSDT 0xFFFF874EE387AC90 000214 (v01 AMI    CPU1PM   00000001 INTL 20060113)
ACPI: Dynamic OEM Table Load:
ACPI: SSDT 0xFFFF874EE3887D90 000143 (v01 AMI    CPU2PM   00000001 INTL 20060113)
acpi0: SCI interrupting at int 9
acpi0: fixed power button present
timecounter: Timecounter "ACPI-Fast" frequency 3579545 Hz quality 1000
hpet0 at acpi0: high precision event timer (mem 0xfed00000-0xfed00400)
timecounter: Timecounter "hpet0" frequency 14318180 Hz quality 2000
MCH (PNP0C01) at acpi0 not configured
attimer1 at acpi0 (TMR, PNP0100): io 0x40-0x43 irq 0
pcppi1 at acpi0 (SPKR, PNP0800): io 0x61
spkr0 at pcppi1: PC Speaker
wsbell at spkr0 not configured
midi0 at pcppi1: PC speaker
sysbeep0 at pcppi1
LPTE (PNP0401) at acpi0 not configured
SIOR (PNP0C02) at acpi0 not configured
RMSC (PNP0C02) at acpi0 not configured
aibs0 at acpi0 (ASOC, ATK0110-16843024): ASUSTeK AI Booster
FWH (INT0800) at acpi0 not configured
FWHE (PNP0C02) at acpi0 not configured
OMSC (PNP0C02) at acpi0 not configured
pckbc1 at acpi0 (PS2K, PNP0303) (kbd port): io 0x60,0x64 irq 1
pckbc2 at acpi0 (PS2M, PNP0F03) (aux port): irq 12
UAR1 (PNP0501) at acpi0 not configured
PCIE (PNP0C02) at acpi0 not configured
RMEM (PNP0C01) at acpi0 not configured
acpibut0 at acpi0 (PWRB, PNP0C0C-170): ACPI Power Button
ACPI: Enabled 3 GPEs in block 00 to 1F
attimer1: attached to pcppi1
pckbd0 at pckbc1 (kbd slot)
pckbc1: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard
pms0 at pckbc1 (aux slot)
pckbc1: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
pchb0 at pci0 dev 0 function 0: vendor 8086 product 29c0 (rev. 0x10)
agp0 at pchb0: G33-family chipset
agp0: detected 7164k stolen memory
agp0: aperture at 0xe0000000, size 0x10000000
i915drmkms0 at pci0 dev 2 function 0: vendor 8086 product 29c2 (rev. 0x10)
hdaudio0 at pci0 dev 27 function 0: HD Audio Controller
hdaudio0: interrupting at msi0 vec 0
hdafg0 at hdaudio0: vendor 1106 product 0397
hdafg0: DAC00 2ch: Speaker [Jack], HP Out [Jack]
hdafg0: ADC01 2ch: CD [Built-In], Line In [Jack], Mic In [Jack]
hdafg0: DIG02 2ch: SPDIF Out [Jack]
hdafg0: 2ch/2ch 48000Hz PCM16*
audio0 at hdafg0: full duplex, playback, capture, mmap, independent
hdafg0: Virtual format configured - Format SLINEAR, precision 16, channels 2, frequency 48000
hdafg0: Latency: 128 milliseconds
spkr1 at audio0: PC Speaker (synthesized)
wsbell at spkr1 not configured
ppb0 at pci0 dev 28 function 0: vendor 8086 product 27d0 (rev. 0x01)
ppb0: PCI Express capability version 1 <Root Port of PCI-E Root Complex> x1 @ 2.5GT/s
pci1 at ppb0 bus 2
pci1: i/o space, memory space enabled, rd/line, wr/inv ok
ppb1 at pci0 dev 28 function 1: vendor 8086 product 27d2 (rev. 0x01)
ppb1: PCI Express capability version 1 <Root Port of PCI-E Root Complex> x1 @ 2.5GT/s
pci2 at ppb1 bus 1
pci2: i/o space, memory space enabled, rd/line, wr/inv ok
ale0 at pci2 dev 0 function 0: Attansic/Atheros L1E Ethernet
ale0: AR8121 (L1E), ioapic0 pin 17
ale0: Ethernet address XX:XX:XX:XX:XX:XX
atphy0 at ale0 phy 0: L1 10/100/1000 PHY, rev. 9
atphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, auto
uhci0 at pci0 dev 29 function 0: vendor 8086 product 27c8 (rev. 0x01)
uhci0: interrupting at ioapic0 pin 23
usb0 at uhci0: USB revision 1.0
uhci1 at pci0 dev 29 function 1: vendor 8086 product 27c9 (rev. 0x01)
uhci1: interrupting at ioapic0 pin 19
usb1 at uhci1: USB revision 1.0
uhci2 at pci0 dev 29 function 2: vendor 8086 product 27ca (rev. 0x01)
uhci2: interrupting at ioapic0 pin 18
usb2 at uhci2: USB revision 1.0
uhci3 at pci0 dev 29 function 3: vendor 8086 product 27cb (rev. 0x01)
uhci3: interrupting at ioapic0 pin 16
usb3 at uhci3: USB revision 1.0
ehci0 at pci0 dev 29 function 7: vendor 8086 product 27cc (rev. 0x01)
ehci0: interrupting at ioapic0 pin 23
ehci0: EHCI version 1.0
ehci0: 4 companion controllers, 2 ports each: uhci0 uhci1 uhci2 uhci3
usb4 at ehci0: USB revision 2.0
ppb2 at pci0 dev 30 function 0: vendor 8086 product 244e (rev. 0xe1)
pci3 at ppb2 bus 3
pci3: i/o space, memory space enabled
bktr0 at pci3 dev 1 function 0
bktr0: interrupting at ioapic0 pin 20
bktr0: Warning - card vendor 0x10fc (model 0x4030) unknown.
bktr0: Pinnacle/Miro TV, <no> tuner.
vendor 109e product 0878 (miscellaneous multimedia, revision 0x11) at pci3 dev 1 function 1 not configured
ichlpcib0 at pci0 dev 31 function 0: vendor 8086 product 27b8 (rev. 0x01)
timecounter: Timecounter "ichlpcib0" frequency 3579545 Hz quality 1000
ichlpcib0: 24-bit timer
tco0 at ichlpcib0: TCO (watchdog) timer configured.
tco0: Min/Max interval 1/367 seconds
piixide0 at pci0 dev 31 function 1: Intel 82801GB/GR IDE Controller (ICH7) (rev. 0x01)
piixide0: bus-master DMA support present
piixide0: primary channel configured to compatibility mode
piixide0: primary channel interrupting at ioapic0 pin 14
atabus0 at piixide0 channel 0
piixide0: secondary channel configured to compatibility mode
piixide0: secondary channel interrupting at ioapic0 pin 15
atabus1 at piixide0 channel 1
piixide1 at pci0 dev 31 function 2: Intel 82801GB/GR Serial ATA/Raid Controller (ICH7) (rev. 0x01)
piixide1: bus-master DMA support present
piixide1: primary channel configured to native-PCI mode
piixide1: using ioapic0 pin 23 for native-PCI interrupt
atabus2 at piixide1 channel 0
piixide1: secondary channel configured to native-PCI mode
atabus3 at piixide1 channel 1
ichsmb0 at pci0 dev 31 function 3: vendor 8086 product 27da (rev. 0x01)
ichsmb0: interrupting at ioapic0 pin 23
iic0 at ichsmb0: I2C bus
isa0 at ichlpcib0
lpt0 at isa0 port 0x378-0x37b irq 7
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
acpicpu0 at cpu0: ACPI CPU
acpicpu0: C1: HLT, lat   0 us, pow     0 mW
acpicpu0: P0: FFH, lat  10 us, pow 88000 mW, 2793 MHz
acpicpu0: P1: FFH, lat  10 us, pow 42240 mW, 2128 MHz
acpicpu0: P2: FFH, lat  10 us, pow 34584 mW, 1596 MHz
coretemp0 at cpu0: thermal sensor, 1 C resolution, Tjmax=100
acpicpu1 at cpu1: ACPI CPU
coretemp1 at cpu1: thermal sensor, 1 C resolution, Tjmax=100
timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0
IPsec: Initialized Security Association Processing.
uhub0 at usb0: NetBSD (0000) UHCI root hub (0000), class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhub1 at usb1: NetBSD (0000) UHCI root hub (0000), class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
uhub2 at usb2: NetBSD (0000) UHCI root hub (0000), class 9/0, rev 1.00/1.00, addr 1
uhub2: 2 ports with 2 removable, self powered
uhub3 at usb4: NetBSD (0000) EHCI root hub (0000), class 9/0, rev 2.00/1.00, addr 1
uhub3: 8 ports with 8 removable, self powered
uhub4 at usb3: NetBSD (0000) UHCI root hub (0000), class 9/0, rev 1.00/1.00, addr 1
uhub4: 2 ports with 2 removable, self powered
wd0 at atabus2 drive 0
wd0: <ST3160811AS>
wd0: drive supports 16-sector PIO transfers, LBA48 addressing
wd0: 149 GB, 310101 cyl, 16 head, 63 sec, 512 bytes/sect x 312581808 sectors
wd0: 32-bit data port
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133), NCQ (32 tags)
wd0(piixide1:0:0): using PIO mode 4, Ultra-DMA mode 6 (Ultra/133) (using DMA)
boot device: wd0
root on wd0a dumps on wd0b
root file system type: ffs
kern.module.path=/stand/amd64/8.99.31/modules
kern info: [drm] Memory usable by graphics device = 1024M
kern info: [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
kern info: [drm] Driver supports precise vblank timestamp query.
i915drmkms0: interrupting at ioapic0 pin 16 (i915drmkms0)
kern info: [drm] initialized overlay support
intelfb0 at i915drmkms0
intelfb0: framebuffer at 0xffff8a006a7a4000, size 1920x1080, depth 32, stride 7680
wsdisplay0 at intelfb0 kbdmux 1: console (default, vt100 emulation), using wskbd0
wsmux1: connecting to wsdisplay0
wsdisplay0: screen 1 added (default, vt100 emulation)
wsdisplay0: screen 2 added (default, vt100 emulation)
wsdisplay0: screen 3 added (default, vt100 emulation)
wsdisplay0: screen 4 added (default, vt100 emulation)
----------

/etc/X11/xorg.conf
----------
Section "ServerLayout"
	Identifier     "X.org Configured"
	Screen      0  "Screen0" 0 0
	InputDevice    "Mouse0" "CorePointer"
	InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
	ModulePath   "/usr/X11R7/lib/modules"
	FontPath     "/usr/X11R7/lib/X11/fonts/misc/"
	FontPath     "/usr/X11R7/lib/X11/fonts/TTF/"
	FontPath     "/usr/X11R7/lib/X11/fonts/Type1/"
	FontPath     "/usr/X11R7/lib/X11/fonts/75dpi/"
	FontPath     "/usr/X11R7/lib/X11/fonts/100dpi/"
	FontPath     "/usr/local/lib/X11/fonts/TTF/"
	FontPath     "/usr/local/lib/X11/fonts/local/"
	FontPath     "/usr/pkg/share/fonts/X11/TTF/"
	FontPath     "/usr/pkg/share/fonts/X11/local/"
EndSection

Section "Module"
	Load  "dbe"
	Load  "dri"
	Load  "dri2"
	Load  "extmod"
	Load  "glx"
	Load  "record"
	Load  "shadow"
EndSection

Section "InputDevice"
	Identifier  "Keyboard0"
	Driver      "kbd"
	Option      "XkbModel"   "jp106"
	Option      "XkbLayout"  "jp"
	Option      "XkbOptions" "ctrl:swapcaps"
EndSection

Section "InputDevice"
	Identifier  "Mouse0"
	Driver      "mouse"
	Option	    "Protocol" "wsmouse"
	Option	    "Device" "/dev/wsmouse"
	Option	    "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
	Identifier   "Monitor0"
	VendorName   "Monitor Vendor"
	ModelName    "Monitor Model"
EndSection

Section "Device"
	Identifier  "Card0"
	Driver      "wsfb"
	BusID       "PCI:0:2:0"
EndSection

Section "Screen"
	Identifier "Screen0"
	Device     "Card0"
	Monitor    "Monitor0"
	SubSection "Display"
		Viewport   0 0
		Depth     24
	EndSubSection
EndSection
----------
>How-To-Repeat:
Install 7.2/amd64.
Boot with -current kernel.
Run "startx".
>Fix:
unknown.

>Release-Note:

>Audit-Trail:
From: Paul Goyette <paul@whooppee.com>
To: gnats-bugs@NetBSD.org
Cc: isaki@pastel-flower.jp
Subject: Re: kern/53991: X does not work on amd64/7.2 after pgoyette-compat
Date: Tue, 19 Feb 2019 05:48:34 +0800 (PST)

 > X does not work on my amd64 after merging pgoyette-compat.
 > I placed current kernel in NetBSD 7.2 userland.
 > A combination of 7.2 userland + current kernel was working
 > until pgoyette-compat merged.

 Please use ktruss(1) (or ktrace/kdump) to determine the specific system 
 call that is failing.



 +------------------+--------------------------+----------------------------+
 | Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:          |
 | (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at whooppee dot com   |
 | Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd dot org |
 +------------------+--------------------------+----------------------------+

Responsible-Changed-From-To: kern-bug-people->pgoyette
Responsible-Changed-By: pgoyette@NetBSD.org
Responsible-Changed-When: Tue, 19 Feb 2019 02:11:59 +0000
Responsible-Changed-Why:
Take it - it's likely mine


From: Tetsuya Isaki <isaki@pastel-flower.jp>
To: gnats-bugs@NetBSD.org, Paul Goyette <paul@whooppee.com>
Cc: 
Subject: Re: kern/53991: X does not work on amd64/7.2 after pgoyette-compat
Date: Tue, 19 Feb 2019 21:14:05 +0900

 At Tue, 19 Feb 2019 05:48:34 +0800 (PST),
 Paul Goyette wrote:
 > Please use ktruss(1) (or ktrace/kdump) to determine the specific system 
 > call that is failing.

 Thank you for quick response.
 I found the problem while I try to use ktruss.

 uim-xim (from pkgsrc/inputmethod/uim) cause a panic even without X.
 So I was able to get a backtrace.  Does this help you?
 By the way, my subject was not correct, sorry :(

 % uim-xim
  :
  1539 1 uim-xim open("/usr/pkg/lib/nss_nis.so.0", 0, ...) Err#2 ENOENT
  1539 1 uim-xim open("/usr/lib/nss_nis.so.0", 0, 0x6e) Err#2 ENOENT
  1539 1 uim-xim __sigprocmask14(0x3, 0x7f7fffabb940, 0) = 0
  1539 1 uim-xim __lwp_self() = 1
  1539 1 uim-xim __sigprocmask14(0x1, 0x7f7fffabb900, 0x7f7fffabb940) = 0
  1539 1 uim-xim open("/usr/X11R7/lib/nss_files.so.0", 0, 0x6e) Err#2 ENOENT
  1539 1 uim-xim open("/usr/pkg/lib/nss_files.so.0", 0, 0x70) Err#2 ENOENT
  1539 1 uim-xim open("/usr/lib/nss_files.so.0", 0, 0x6e) Err#2 ENOENT
  1539 1 uim-xim __sigprocmask14(0x3, 0x7f7fffabb940, 0) = 0
  1539 1 uim-xim __lwp_self() = 1
  1539 1 uim-xim __sigprocmask14(0x1, 0x7f7fffabb900, 0x7f7fffabb940) = 0
  1539 1 uim-xim open("/usr/X11R7/lib/nss_dns.so.0", 0, 0x6e) Err#2 ENOENT
 uvm_fault(0xffff803279bfe170, 0x0, 1) -> e
 fatal page fault in supervisor mode
 trap type 6 code 0 rip 0xffffffff80a36ebd cs 0x8 rflags 0x10246 cr2 0x1
 ilevel 0 rsp 0xffff87002e6a3e80
 curlwp 0xffff8032a5ef2200 pid 1539.1 lowest kstack 0xffff87002e6a02c0
 kernel: page fault trap, code=0
 Stopped in pid 1539.1 (uim-xim) at netbsd:uipc_ctloutput+0x6e: cmpb
 $
 0,0(%rax)
 db{0}> bt
 uipc_ctloutput() at netbsd:uipc_ctloutput+0x6e
 sosetopt() at netbsd:sosetopt+0x7d
 sys_setsockopt() at netbsd:sys_setsockopt+0x8e
 syscall() at netbsd:syscall+0x2d8
 --- syscall (number 105) ---
 79da516d1c4a:
 db{0}>

 ---
 Tetsuya Isaki <isaki@pastel-flower.jp / isaki@NetBSD.org>

From: Paul Goyette <paul@whooppee.com>
To: gnats-bugs@NetBSD.org
Cc: isaki@pastel-flower.jp
Subject: Re: kern/53991: X does not work on amd64/7.2 after pgoyette-compat
Date: Tue, 19 Feb 2019 21:05:36 +0800 (PST)

 On Tue, 19 Feb 2019, Tetsuya Isaki wrote:

 > The following reply was made to PR kern/53991; it has been noted by GNATS.
 >
 > From: Tetsuya Isaki <isaki@pastel-flower.jp>
 > To: gnats-bugs@NetBSD.org, Paul Goyette <paul@whooppee.com>
 > Cc:
 > Subject: Re: kern/53991: X does not work on amd64/7.2 after pgoyette-compat
 > Date: Tue, 19 Feb 2019 21:14:05 +0900
 >
 > At Tue, 19 Feb 2019 05:48:34 +0800 (PST),
 > Paul Goyette wrote:
 > > Please use ktruss(1) (or ktrace/kdump) to determine the specific system
 > > call that is failing.
 >
 > Thank you for quick response.
 > I found the problem while I try to use ktruss.
 >
 > uim-xim (from pkgsrc/inputmethod/uim) cause a panic even without X.
 > So I was able to get a backtrace.  Does this help you?
 > By the way, my subject was not correct, sorry :(
 >
 > % uim-xim
 >  :
 >  1539 1 uim-xim open("/usr/pkg/lib/nss_nis.so.0", 0, ...) Err#2 ENOENT
 >  1539 1 uim-xim open("/usr/lib/nss_nis.so.0", 0, 0x6e) Err#2 ENOENT
 >  1539 1 uim-xim __sigprocmask14(0x3, 0x7f7fffabb940, 0) = 0
 >  1539 1 uim-xim __lwp_self() = 1
 >  1539 1 uim-xim __sigprocmask14(0x1, 0x7f7fffabb900, 0x7f7fffabb940) = 0
 >  1539 1 uim-xim open("/usr/X11R7/lib/nss_files.so.0", 0, 0x6e) Err#2 ENOENT
 >  1539 1 uim-xim open("/usr/pkg/lib/nss_files.so.0", 0, 0x70) Err#2 ENOENT
 >  1539 1 uim-xim open("/usr/lib/nss_files.so.0", 0, 0x6e) Err#2 ENOENT
 >  1539 1 uim-xim __sigprocmask14(0x3, 0x7f7fffabb940, 0) = 0
 >  1539 1 uim-xim __lwp_self() = 1
 >  1539 1 uim-xim __sigprocmask14(0x1, 0x7f7fffabb900, 0x7f7fffabb940) = 0
 >  1539 1 uim-xim open("/usr/X11R7/lib/nss_dns.so.0", 0, 0x6e) Err#2 ENOENT
 > uvm_fault(0xffff803279bfe170, 0x0, 1) -> e
 > fatal page fault in supervisor mode
 > trap type 6 code 0 rip 0xffffffff80a36ebd cs 0x8 rflags 0x10246 cr2 0x1
 > ilevel 0 rsp 0xffff87002e6a3e80
 > curlwp 0xffff8032a5ef2200 pid 1539.1 lowest kstack 0xffff87002e6a02c0
 > kernel: page fault trap, code=0
 > Stopped in pid 1539.1 (uim-xim) at netbsd:uipc_ctloutput+0x6e: cmpb $0,0(%rax)
 > db{0}> bt
 > uipc_ctloutput() at netbsd:uipc_ctloutput+0x6e
 > sosetopt() at netbsd:sosetopt+0x7d
 > sys_setsockopt() at netbsd:sys_setsockopt+0x8e
 > syscall() at netbsd:syscall+0x2d8
 > --- syscall (number 105) ---
 > 79da516d1c4a:
 > db{0}>

 It is not entirely clear that this is the same problem, since the
 original ("X won't start") problem did not lead to a panic.

 The panic would seem to be related to some compat70 changes made in
 kern/uipc_usrreq.c  I will have a closer look at it tomorrow morning
 (after I get some sleep).




 +------------------+--------------------------+----------------------------+
 | Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:          |
 | (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at whooppee dot com   |
 | Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd dot org |
 +------------------+--------------------------+----------------------------+

From: Tetsuya Isaki <isaki@pastel-flower.jp>
To: Paul Goyette <paul@whooppee.com>, gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/53991: X does not work on amd64/7.2 after pgoyette-compat
Date: Tue, 19 Feb 2019 22:51:21 +0900

 At Tue, 19 Feb 2019 21:05:36 +0800 (PST),
 Paul Goyette wrote:
 > It is not entirely clear that this is the same problem, since the
 > original ("X won't start") problem did not lead to a panic.

 I did not give enough explanation...

 At first I noticed that X works when I logged in as another user
 (root) today.  So I checked my ~/.xinitrc and other dot files.
 Then I found uim-xim which is only called when I logged in on X.
 ---
 Tetsuya Isaki <isaki@pastel-flower.jp / isaki@NetBSD.org>

State-Changed-From-To: open->feedback
State-Changed-By: pgoyette@NetBSD.org
State-Changed-When: Wed, 20 Feb 2019 01:54:18 +0000
State-Changed-Why:
Possible fix provided, waiting for submitter to test/verify


From: Paul Goyette <paul@whooppee.com>
To: gnats-bugs@NetBSD.org
Cc: isaki@pastel-flower.jp
Subject: Re: kern/53991: X does not work on amd64/7.2 after pgoyette-compat
Date: Wed, 20 Feb 2019 09:53:15 +0800 (PST)

   This message is in MIME format.  The first part should be readable text,
   while the remaining parts are likely unreadable without MIME-aware tools.

 --0-1322193257-1550627595=:9370
 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed

 On Tue, 19 Feb 2019, Tetsuya Isaki wrote:

 > Thank you for quick response.
 > I found the problem while I try to use ktruss.
 > 
 > uim-xim (from pkgsrc/inputmethod/uim) cause a panic even without X.
 > So I was able to get a backtrace.  Does this help you?
 > By the way, my subject was not correct, sorry :(
 > 
 > % uim-xim
 >  :
 >  1539 1 uim-xim open("/usr/pkg/lib/nss_nis.so.0", 0, ...) Err#2 ENOENT
 >  1539 1 uim-xim open("/usr/lib/nss_nis.so.0", 0, 0x6e) Err#2 ENOENT
 >  1539 1 uim-xim __sigprocmask14(0x3, 0x7f7fffabb940, 0) = 0
 >  1539 1 uim-xim __lwp_self() = 1
 >  1539 1 uim-xim __sigprocmask14(0x1, 0x7f7fffabb900, 0x7f7fffabb940) = 0
 >  1539 1 uim-xim open("/usr/X11R7/lib/nss_files.so.0", 0, 0x6e) Err#2 ENOENT
 >  1539 1 uim-xim open("/usr/pkg/lib/nss_files.so.0", 0, 0x70) Err#2 ENOENT
 >  1539 1 uim-xim open("/usr/lib/nss_files.so.0", 0, 0x6e) Err#2 ENOENT
 >  1539 1 uim-xim __sigprocmask14(0x3, 0x7f7fffabb940, 0) = 0
 >  1539 1 uim-xim __lwp_self() = 1
 >  1539 1 uim-xim __sigprocmask14(0x1, 0x7f7fffabb900, 0x7f7fffabb940) = 0
 >  1539 1 uim-xim open("/usr/X11R7/lib/nss_dns.so.0", 0, 0x6e) Err#2 ENOENT
 > uvm_fault(0xffff803279bfe170, 0x0, 1) -> e
 > fatal page fault in supervisor mode
 > trap type 6 code 0 rip 0xffffffff80a36ebd cs 0x8 rflags 0x10246 cr2 0x1
 > ilevel 0 rsp 0xffff87002e6a3e80
 > curlwp 0xffff8032a5ef2200 pid 1539.1 lowest kstack 0xffff87002e6a02c0
 > kernel: page fault trap, code=0
 > Stopped in pid 1539.1 (uim-xim) at netbsd:uipc_ctloutput+0x6e: cmpb $0,0(%rax)
 > db{0}> bt
 > uipc_ctloutput() at netbsd:uipc_ctloutput+0x6e
 > sosetopt() at netbsd:sosetopt+0x7d
 > sys_setsockopt() at netbsd:sys_setsockopt+0x8e
 > syscall() at netbsd:syscall+0x2d8
 > --- syscall (number 105) ---
 > 79da516d1c4a:
 > db{0}>

 To fix the panic, please try the following patch (also provided as an
 attachment, since sometimes my MUA screws up tabs!)  If that works,
 please see if the original problem ("X won't start") is also fixed.

 Thanks!


 Index: uipc_usrreq.c
 ===================================================================
 RCS file: /cvsroot/src/sys/kern/uipc_usrreq.c,v
 retrieving revision 1.190
 diff -u -p -r1.190 uipc_usrreq.c
 --- uipc_usrreq.c	4 Feb 2019 10:11:34 -0000	1.190
 +++ uipc_usrreq.c	19 Feb 2019 21:58:08 -0000
 @@ -126,6 +126,7 @@ __KERNEL_RCSID(0, "$NetBSD: uipc_usrreq.
   #include <sys/compat_stub.h>

   #include <compat/sys/socket.h>
 +#include <compat/net/route_70.h>

   /*
    * Unix communications domain.
 @@ -208,7 +209,7 @@ struct mbuf * stub_compat_70_unp_addsock
   	return control;
   }

 -bool *compat70_ocreds_valid = false;
 +bool compat70_ocreds_valid = false;

   /*
    * Initialize Unix protocols.
 @@ -610,7 +611,7 @@ uipc_ctloutput(int op, struct socket *so
   	case PRCO_SETOPT:
   		switch (sopt->sopt_name) {
   		case LOCAL_OCREDS:
 -			if (!*compat70_ocreds_valid)  {
 +			if (!compat70_ocreds_valid)  {
   				error = ENOPROTOOPT;
   				break;
   			}
 @@ -664,7 +665,7 @@ uipc_ctloutput(int op, struct socket *so
   			error = sockopt_setint(sopt, optval);
   			break;
   		case LOCAL_OCREDS:
 -			if (*compat70_ocreds_valid) {
 +			if (compat70_ocreds_valid) {
   				optval = OPTBIT(UNP_OWANTCRED);
   				error = sockopt_setint(sopt, optval);
   				break;



 +------------------+--------------------------+----------------------------+
 | Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:          |
 | (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at whooppee dot com   |
 | Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd dot org |
 +------------------+--------------------------+----------------------------+
 --0-1322193257-1550627595=:9370
 Content-Type: TEXT/PLAIN; charset=US-ASCII; name=uipc_usrreq.c.diff
 Content-Transfer-Encoding: BASE64
 Content-ID: <Pine.NEB.4.64.1902200953150.9370@speedy.whooppee.com>
 Content-Description: 
 Content-Disposition: attachment; filename=uipc_usrreq.c.diff

 SW5kZXg6IHVpcGNfdXNycmVxLmMNCj09PT09PT09PT09PT09PT09PT09PT09
 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0N
 ClJDUyBmaWxlOiAvY3Zzcm9vdC9zcmMvc3lzL2tlcm4vdWlwY191c3JyZXEu
 Yyx2DQpyZXRyaWV2aW5nIHJldmlzaW9uIDEuMTkwDQpkaWZmIC11IC1wIC1y
 MS4xOTAgdWlwY191c3JyZXEuYw0KLS0tIHVpcGNfdXNycmVxLmMJNCBGZWIg
 MjAxOSAxMDoxMTozNCAtMDAwMAkxLjE5MA0KKysrIHVpcGNfdXNycmVxLmMJ
 MTkgRmViIDIwMTkgMjE6NTg6MDggLTAwMDANCkBAIC0xMjYsNiArMTI2LDcg
 QEAgX19LRVJORUxfUkNTSUQoMCwgIiROZXRCU0Q6IHVpcGNfdXNycmVxLg0K
 ICNpbmNsdWRlIDxzeXMvY29tcGF0X3N0dWIuaD4NCiANCiAjaW5jbHVkZSA8
 Y29tcGF0L3N5cy9zb2NrZXQuaD4NCisjaW5jbHVkZSA8Y29tcGF0L25ldC9y
 b3V0ZV83MC5oPg0KIA0KIC8qDQogICogVW5peCBjb21tdW5pY2F0aW9ucyBk
 b21haW4uDQpAQCAtMjA4LDcgKzIwOSw3IEBAIHN0cnVjdCBtYnVmICogc3R1
 Yl9jb21wYXRfNzBfdW5wX2FkZHNvY2sNCiAJcmV0dXJuIGNvbnRyb2w7DQog
 fQ0KIA0KLWJvb2wgKmNvbXBhdDcwX29jcmVkc192YWxpZCA9IGZhbHNlOw0K
 K2Jvb2wgY29tcGF0NzBfb2NyZWRzX3ZhbGlkID0gZmFsc2U7DQogDQogLyoN
 CiAgKiBJbml0aWFsaXplIFVuaXggcHJvdG9jb2xzLg0KQEAgLTYxMCw3ICs2
 MTEsNyBAQCB1aXBjX2N0bG91dHB1dChpbnQgb3AsIHN0cnVjdCBzb2NrZXQg
 KnNvDQogCWNhc2UgUFJDT19TRVRPUFQ6DQogCQlzd2l0Y2ggKHNvcHQtPnNv
 cHRfbmFtZSkgew0KIAkJY2FzZSBMT0NBTF9PQ1JFRFM6DQotCQkJaWYgKCEq
 Y29tcGF0NzBfb2NyZWRzX3ZhbGlkKSAgew0KKwkJCWlmICghY29tcGF0NzBf
 b2NyZWRzX3ZhbGlkKSAgew0KIAkJCQllcnJvciA9IEVOT1BST1RPT1BUOw0K
 IAkJCQlicmVhazsNCiAJCQl9DQpAQCAtNjY0LDcgKzY2NSw3IEBAIHVpcGNf
 Y3Rsb3V0cHV0KGludCBvcCwgc3RydWN0IHNvY2tldCAqc28NCiAJCQllcnJv
 ciA9IHNvY2tvcHRfc2V0aW50KHNvcHQsIG9wdHZhbCk7DQogCQkJYnJlYWs7
 DQogCQljYXNlIExPQ0FMX09DUkVEUzoNCi0JCQlpZiAoKmNvbXBhdDcwX29j
 cmVkc192YWxpZCkgew0KKwkJCWlmIChjb21wYXQ3MF9vY3JlZHNfdmFsaWQp
 IHsNCiAJCQkJb3B0dmFsID0gT1BUQklUKFVOUF9PV0FOVENSRUQpOw0KIAkJ
 CQllcnJvciA9IHNvY2tvcHRfc2V0aW50KHNvcHQsIG9wdHZhbCk7DQogCQkJ
 CWJyZWFrOw0K

 --0-1322193257-1550627595=:9370--

From: "Paul Goyette" <pgoyette@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/53991 CVS commit: src/sys/kern
Date: Wed, 20 Feb 2019 09:59:39 +0000

 Module Name:	src
 Committed By:	pgoyette
 Date:		Wed Feb 20 09:59:39 UTC 2019

 Modified Files:
 	src/sys/kern: uipc_usrreq.c

 Log Message:
 compat70_ocreds_valid is not a pointer to a boolean, it is the boolean
 itself which controls whether or not we recognize the OCRED options.

 Should fix the panic identified in PR kern/53991 (awaiting confirmation
 from submitter).


 To generate a diff of this commit:
 cvs rdiff -u -r1.190 -r1.191 src/sys/kern/uipc_usrreq.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: Tetsuya Isaki <isaki@pastel-flower.jp>
To: gnats-bugs@NetBSD.org, Paul Goyette <paul@whooppee.com>
Cc: 
Subject: Re: kern/53991: X does not work on amd64/7.2 after pgoyette-compat
Date: Wed, 20 Feb 2019 21:37:42 +0900

 At Wed, 20 Feb 2019 09:53:15 +0800 (PST),
 Paul Goyette wrote:
 > To fix the panic, please try the following patch (also provided as an
 > attachment, since sometimes my MUA screws up tabs!)  If that works,
 > please see if the original problem ("X won't start") is also fixed.

 It worked!  and my X also worked.
 Thank you for quick fix!
 ---
 Tetsuya Isaki <isaki@pastel-flower.jp / isaki@NetBSD.org>

State-Changed-From-To: feedback->closed
State-Changed-By: pgoyette@NetBSD.org
State-Changed-When: Wed, 20 Feb 2019 12:59:48 +0000
State-Changed-Why:
Fix confirmed by originator


From: Paul Goyette <paul@whooppee.com>
To: Tetsuya Isaki <isaki@pastel-flower.jp>
Cc: gnats-bugs@NetBSD.org
Subject: Re: kern/53991: X does not work on amd64/7.2 after pgoyette-compat
Date: Wed, 20 Feb 2019 20:55:03 +0800 (PST)

 On Wed, 20 Feb 2019, Tetsuya Isaki wrote:

 > At Wed, 20 Feb 2019 09:53:15 +0800 (PST),
 > Paul Goyette wrote:
 >> To fix the panic, please try the following patch (also provided as an
 >> attachment, since sometimes my MUA screws up tabs!)  If that works,
 >> please see if the original problem ("X won't start") is also fixed.
 >
 > It worked!  and my X also worked.
 > Thank you for quick fix!

 Wonderful!  I will close the PR.  Thanks for checking.


 +------------------+--------------------------+----------------------------+
 | Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:          |
 | (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at whooppee dot com   |
 | Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd dot org |
 +------------------+--------------------------+----------------------------+

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.