6.3-Release Kernel Panic on Gigabyte EP35-DS4 motherboard

2018-08-09 Thread neil woods
>Synopsis:  System crashes (totally locks up) after a small amount of time.
>Category:  kernel
>Environment:
System  : OpenBSD 6.3
Details : OpenBSD 6.3 (GENERIC.MP) #107: Sat Mar 24 14:21:59 MDT 
2018
  
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP

Architecture: OpenBSD.amd64
Machine : amd64
>Description:
I recently installed OpenBSD 6.3 Release on a home built desktop 
machine (which had previously run Linux). It had been running for 
a few days in text mode (i.e no X), and seemed to be running smoothly.

To cut a long story short, every so often the machine will crash, and 
with the *same* error message displayed at the top each time:

acpicpu setperf failed to alter frequency

Doing a Google search of this led to a few results. See in particular:

https://marc.info/?l=openbsd-bugs&m=143464570209840&w=2

where a possible fix (though relevant to ProLiant) was suggested. 
I modified a couple of similar (I think?) BIOS settings here, and it 
was OK for a while (overnight), then the problem returned. The last 
time it crashed it had only been running for a few minutes.

I'm unable to do anything at this point, as the keyboard locks up, 
as does any ssh session, and my only option each time is to physically 
switch the machine off. I did take a photo of the screen, which I link 
below.

Any help much appreciated. I would be tempted to think a hardware 
problem 
was to blame, except for the fact that the machine was running Linux 
previously with no problems. Frankly I'm at a loss as to what to do 
next.

The motherboard is a Gigabyte GA-EP35-DS4 with 8 gigs of memory, and 
the 
video card is an nvidia geforce 9800GT, soon to be replaced by a Radeon 
HD5450. There's the dmesg output here:

>Dmesg:

OpenBSD 6.3 (GENERIC.MP) #107: Sat Mar 24 14:21:59 MDT 2018
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 8571977728 (8174MB)
avail mem = 8305119232 (7920MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xf0100 (38 entries)
bios0: vendor Award Software International, Inc. version "F3" date 02/27/2008
bios0: Gigabyte Technology Co., Ltd. EP35-DS4
acpi0 at bios0: rev 0
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP HPET MCFG APIC SSDT SSDT
acpi0: wakeup devices PEX0(S5) PEX1(S5) PEX2(S5) PEX3(S5) PEX4(S5) PEX5(S5) 
HUB0(S5) UAR1(S3) USB0(S3) USB1(S3) USB2(S3) USB3(S3) US31(S3) USB4(S3) 
USB5(S3) USBE(S3) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpimcfg0 at acpi0 addr 0xf000, bus 0-63
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400.32 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,NXE,LONG,LAHF,PERF,SENSOR,MELTDOWN
cpu0: 4MB 64b/line 16-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 266MHz
cpu0: mwait min=64, max=64, C-substates=0.2, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400.00 MHz
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,NXE,LONG,LAHF,PERF,SENSOR,MELTDOWN
cpu1: 4MB 64b/line 16-way L2 cache
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 3 (application processor)
cpu2: Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400.02 MHz
cpu2: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,NXE,LONG,LAHF,PERF,SENSOR,MELTDOWN
cpu2: 4MB 64b/line 16-way L2 cache
cpu2: smt 0, core 3, package 0
cpu3 at mainbus0: apid 2 (application processor)
cpu3: Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400.00 MHz
cpu3: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,NXE,LONG,LAHF,PERF,SENSOR,MELTDOWN
cpu3: 4MB 64b/line 16-way L2 cache
cpu3: smt 0, core 2, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 24 pins
, remapped to apid 2
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 2 (PEX0)
acpiprt2 at acpi0: bus -1 (PEX1)
acpiprt3 at acpi0: bus -1 (PEX2)
acpiprt4 at acpi0: bus -1 (PEX3)
acpiprt5 at acpi0: bus 3 (PEX4)
acpiprt6 at acpi0: bus 4 (PEX5)
acpiprt7 at acpi0: bus 5 (HUB0)
acpicpu0 at acpi0

Re: Kernel Panic 6.3 and HP DL360 Gen9

2018-08-09 Thread Stuart Henderson
On 2018/08/08 10:00, Albert Martinez wrote:
> Hi,
> 
> This must be related to a pf.conf syntax change between 5.8 and 5.9 - 
> 6.3, some old syntax rules are valid for the dry run in 5.9 - 6.3 but no 
> more for PF.. what its also estrange its that the pf.conf its loaded on 
> boot and just after a reload of the ruleset crashes...
> 
> I am going to load parts of the ruleset to try to find the rule that 
> trigger the crash..
> 
> Did you find something? Do you need further info?

Nothing stands out to me from the ddb output. If you're able to
determine which rules trigger it, that would be very useful.

> Lg,
> Albert
> 
> 
> 
> 
> 
> On 31/07/18 15:03, Albert Martinez wrote:
> > Hi,
> >
> > sorry for the delay, we had to move the testings to a another server 
> > and set everything again, this its an HP DL360 G6, but its happening 
> > just the same..
> >
> > Find attached the standard outputs from: 
> > https://www.openbsd.org/ddb.html + the ones that you requested .. this 
> > time was all done in a fresh install from the last 6.3 current.
> >
> > Regards,
> > Albert Martinez
> >
> > On 05/07/18 10:36, Albert Martinez wrote:
> >> Hi,
> >>
> >> Ok, then I will perform this week the upgrade to the last current.
> >>
> >> Regards,
> >> Albert
> >>
> >> The outputs from  "sh malloc" and the  "sh all pools" from the 6.3 
> >> stable:
> >>
> >> panic: malloc: out of space in kmem_map
> >> Stopped at  db_enter+0x5:   popq    %rbp
> >>     TID    PID    UID PRFLAGS PFLAGS  CPU  COMMAND
> >> * 52231  1  0    0x13  0    2K ksh
> >> db_enter() at db_enter+0x5
> >> panic() at panic+0x129
> >> malloc(800020bc1570,800020bc1510,1) at malloc+0x6fa
> >> ufs_readdir(1) at ufs_readdir+0x101
> >> VOP_READDIR(800020a8c018,3b0f315201378d58,800020bc155c,ff087f7ca480
> >>  
> >>
> >> ) at VOP_READDIR+0x45
> >> sys_getdents(630,800020a8c018,0) at sys_getdents+0x125
> >> syscall() at syscall+0x279
> >> --- syscall (number 99) ---
> >> end of kernel
> >> end trace frame: 0x7f7c5090, count: 8
> >> 0x13f92454032a:
> >> https://www.openbsd.org/ddb.html describes the minimum info required 
> >> in bug
> >> reports.  Insufficient info makes it difficult to find and fix bugs.
> >> ddb{2}> sh malloc
> >>    Type InUse  MemUse  HighUse   Limit  Requests Type Lim 
> >> Kern Lim
> >>  devbuf  8699   5339K    5340K  78643K 10670 0 0
> >>     pcb    72 15K  15K  78643K   202 0 0
> >>  rtable  1231 26K  26K  78643K  1783 0 0
> >>  ifaddr   632 96K  96K  78643K   639 0 0
> >>    counters   455    398K 398K  78643K   455 0 0
> >>    ioctlops 1  4K   4K  78643K 92144 0 0
> >>     iov 0  0K   1K  78643K 1 0 0
> >>   mount 4  4K   4K  78643K 4 0 0
> >>  vnodes  1161 73K  73K  78643K  1168 0 0
> >>   UFS quota 1 32K  32K  78643K 1 0 0
> >>   UFS mount    17 56K  56K  78643K    17 0 0
> >>     shm 2  1K   1K  78643K 2 0 0
> >>  VM map 2  0K   0K  78643K 2 0 0
> >>     sem 2  0K   0K  78643K 2 0 0
> >>     dirhash    24  4K   4K  78643K    57 0 0
> >>    ACPI  5017    559K 671K  78643K 17335 0 0
> >>   file desc 1  0K   0K  78643K 1 0 0
> >>    proc    14 13K  13K  78643K    14 0 0
> >>     NFS srvsock 1  0K   0K  78643K 1 0 0
> >>  NFS daemon 1 16K  16K  78643K 1 0 0
> >>     ip_moptions    70  8K   8K  78643K    70 0 0
> >>    in_multi   411 27K  27K  78643K   412 0 0
> >>     ether_multi   414 12K  12K  78643K   415 0 0
> >>     ISOFS mount 1 32K  32K  78643K 1 0 0
> >>   MSDOSFS mount 1 16K  16K  78643K 1 0 0
> >>    ttys   420   1777K    1777K  78643K   420 0 0
> >>    exec 0  0K   1K  78643K  1273 0 0
> >>     pagedep 1  8K   8K  78643K 1 0 0
> >>    inodedep 1 32K  32K  78643K 1 0 0
> >>  newblk 1  0K   0K  78643K 1 0 0
> >>     VM swap 7    722K 722K  78643K 7 0 0
> >>    UVM amap   234  9K  26K  78643K  4750 0 0
> >>    UVM aobj 2  2K   2K  78643K 2 0 0
> >>     USB    99 44K  44K  78643K   121 0 0
> >>  USB device    32  2K   2K  78643K    32 0 0
> >>  USB HC 1  0K   0K  78643K 1 0 0
> >>     memdesc 1  4K   4K  78643K 1 0 0
> >>     crypto data 1  1K   1K  78643K 1 0 0
> >>     NDP   143  4K   5K  78643K   157 0 0
> >>    temp  1025   2620K    2624K  78643K 12704

set wsconsctl display.screen_off crashes the system

2018-08-09 Thread solene
>Synopsis:  wsconsctl crash
>Category:  system
>Environment:
System  : OpenBSD 6.3
Details : OpenBSD 6.3-current (GENERIC) #138: Sat Aug  4 00:02:13 
MDT 2018
 
dera...@macppc.openbsd.org:/usr/src/sys/arch/macppc/compile/GENERIC

Architecture: OpenBSD.macppc
Machine : macppc
>Description:
# wsconsctl display.screen_off 
O
# wsconsctl display.screen_off=200

ddb> show panic
trap type 0 at 64ded4 (cpu_idle_cycle+0x40) lr 32b110
ddb> bt
db_enter() at db_enter+0xc
panic(8bde74) at panic+0xe0
trap(0) at trap+0x158
trapagain(32b0f8,e6227f10,0,0,0,0,c2,73a2dc44) at trapagain+0x4
--- trap (type 0x0) ---
taskq_thread(0) at taskq_thread+0x50
fork_trampoline(180,0,2008,90001,10,40,8000) at fork_trampoline+0x10
end trace frame: 0x0, count: -6
>How-To-Repeat:
doas wsconsctl display.screen_off=200 and the system immediately drops 
to ddb


OpenBSD 6.3-current (GENERIC) #138: Sat Aug  4 00:02:13 MDT 2018
dera...@macppc.openbsd.org:/usr/src/sys/arch/macppc/compile/GENERIC
real mem = 536870912 (512MB)
avail mem = 504791040 (481MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root: model PowerBook6,7
cpu0 at mainbus0: 7447A (Revision 0x105): 1333 MHz: 512KB L2 cache
mem0 at mainbus0
spdmem0 at mem0: no EEPROM found
memc0 at mainbus0: uni-n rev 0xd2
"hw-clock" at memc0 not configured
kiic0 at memc0 offset 0xf8001000
iic0 at kiic0
adt0 at iic0 addr 0x2e: adt7467 rev 0x71
asms0 at iic0 addr 0x58: rev 1.34, version 0.1
mpcpcibr0 at mainbus0 pci: uni-north
pci0 at mpcpcibr0 bus 0
pchb0 at pci0 dev 11 function 0 "Apple UniNorth AGP" rev 0x00
agp at pchb0 not configured
radeondrm0 at pci0 dev 16 function 0 "ATI Radeon Mobility 9550" rev 0x80
drm0 at radeondrm0
radeondrm0: irq 48
mpcpcibr1 at mainbus0 pci: uni-north
pci1 at mpcpcibr1 bus 0
macobio0 at pci1 dev 23 function 0 "Apple Intrepid" rev 0x00
openpic0 at macobio0 offset 0x4: version 0x4614 feature 3f0302 LE
macgpio0 at macobio0 offset 0x50
"modem-reset" at macgpio0 offset 0x1d not configured
"modem-power" at macgpio0 offset 0x1c not configured
"accelerometer-1" at macgpio0 offset 0x13 not configured
"accelerometer-2" at macgpio0 offset 0x14 not configured
"headphone-mute" at macgpio0 offset 0x1f not configured
"amp-mute" at macgpio0 offset 0x20 not configured
"hw-reset" at macgpio0 offset 0x25 not configured
"headphone-detect" at macgpio0 offset 0x17 not configured
macgpio1 at macgpio0 offset 0x9: irq 47
"programmer-switch" at macgpio0 offset 0x11 not configured
dfs0 at macgpio0 offset 0x6b: speeds: 1333, 666 MHz
"gpio4" at macgpio0 offset 0x1e not configured
"escc-legacy" at macobio0 offset 0x12000 not configured
zs0 at macobio0 offset 0x13000: irq 22,23
zstty0 at zs0 channel 0
zstty1 at zs0 channel 1
snapper0 at macobio0 offset 0x0: irq 30,1,2
"timer" at macobio0 offset 0x15000 not configured
adb0 at macobio0 offset 0x16000: irq 25, via-pmu, 2 targets
apm0 at adb0: battery flags 0x5, 65% charged
piic0 at adb0
iic1 at piic0
akbd0 at adb0 addr 2: iBook keyboard with inverted T (ISO layout)
wskbd0 at akbd0: console keyboard
abtn0 at adb0 addr 7: brightness/volume/eject buttons
"battery" at macobio0 offset 0x0 not configured
"backlight" at macobio0 offset 0xf300 not configured
kiic1 at macobio0 offset 0x18000
iic2 at kiic1
wdc0 at macobio0 offset 0x2 irq 24: DMA
atapiscsi0 at wdc0 channel 0 drive 0
scsibus1 at atapiscsi0: 2 targets
cd0 at scsibus1 targ 0 lun 0:  ATAPI 5/cdrom 
removable
cd0(wdc0:0:0): using BIOS timings, DMA mode 2
audio0 at snapper0
bwi0 at pci1 dev 18 function 0 "Broadcom BCM4318" rev 0x02: irq 52, address 
00:14:51:e3:a8:a8
ohci0 at pci1 dev 26 function 0 "Apple Intrepid USB" rev 0x00: irq 29, version 
1.0, legacy support
ohci1 at pci1 dev 27 function 0 "NEC USB" rev 0x43: irq 63, version 1.0
ohci2 at pci1 dev 27 function 1 "NEC USB" rev 0x43: irq 63, version 1.0
ehci0 at pci1 dev 27 function 2 "NEC USB" rev 0x04: irq 63
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 configuration 1 interface 0 "NEC EHCI root hub" rev 2.00/1.00 
addr 1
usb1 at ohci0: USB revision 1.0
uhub1 at usb1 configuration 1 interface 0 "Apple OHCI root hub" rev 1.00/1.00 
addr 1
usb2 at ohci1: USB revision 1.0
uhub2 at usb2 configuration 1 interface 0 "NEC OHCI root hub" rev 1.00/1.00 
addr 1
usb3 at ohci2: USB revision 1.0
uhub3 at usb3 configuration 1 interface 0 "NEC OHCI root hub" rev 1.00/1.00 
addr 1
mpcpcibr2 at mainbus0 pci: uni-north
pci2 at mpcpcibr2 bus 0
kauaiata0 at pci2 dev 13 function 0 "Apple Intrepid ATA" rev 0x00
wdc1 at kauaiata0 irq 39: DMA
wd0 at wdc1 channel 0 drive 0: 
wd0: 16-sector PIO, LBA48, 38154MB, 78140160 sectors
wd0(wdc1:0:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 5
"Apple UniNorth Firewire" rev 0x81 at pci2 dev 14 function 0 not configured
gem0 at pci2 dev 15 function 0 "Apple Uni-N2 GMAC" rev 0x80: irq 41, address 
00:14:51