Re: Crash when unplugging a UPS USB connection

2021-08-07 Thread Mike
On 8/6/2021 5:46 PM, Anindya Mukherjee wrote:
> I apologise for not following up. I relocated my UPS and a Pi is acting as the
> NUT server now, running several devices. As a result I am unable to easily
> connect my main OpenBSD desktop to test. However I am setting up another 
> machine
> and will have a chance to test the fix soon.
> 
> I am still running upsmon on my desktop which is working fine but this is just
> the net client.
> 
> Thanks to everyone for the rapid fix, and in particular sthen@ for his prompt
> and helpful responses.
> 

I was able to run a test this morning.

The fix works.  dmesg is below.  Note that I plugged in and unplugged
the USB comm cable a couple of times.


To reproduce the initial issue, and to test the fix, I did the following:

1) fresh install of OpenBSD current (no ports need be installed)
2) reboot after the install
3) plug in the USB comm cable
4) unplug the USB comm cable

Thank you to those who worked to fix this.

==


OpenBSD 6.9-current (RAMDISK_CD) #159: Sat Aug  7 05:11:58 MDT 2021
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/RAMDISK_CD
real mem = 4129800192 (3938MB)
avail mem = 4000620544 (3815MB)
random: good seed from bootblocks
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xe0010 (78 entries)
bios0: vendor LENOVO version "6IET75WW (1.35 )" date 02/01/2011
bios0: LENOVO 2522DU5
acpi0 at bios0: ACPI 4.0
acpi0: tables DSDT FACP SSDT ECDT APIC MCFG HPET ASF! SLIC BOOT SSDT
TCPA SSDT SSDT SSDT
acpiec0 at acpi0
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i5 CPU M 560 @ 2.67GHz, 2926.51 MHz, 06-25-05
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,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,POPCNT,AES,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,SENSOR,ARAT,MELTDOWN
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: apic clock running at 132MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.1, IBE
cpu at mainbus0: not configured
cpu at mainbus0: not configured
cpu at mainbus0: not configured
ioapic0 at mainbus0: apid 1 pa 0xfec0, version 20, 24 pins, remapped
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (PEG_)
acpiprt2 at acpi0: bus 2 (EXP1)
acpiprt3 at acpi0: bus 3 (EXP2)
acpiprt4 at acpi0: bus -1 (EXP3)
acpiprt5 at acpi0: bus 5 (EXP4)
acpiprt6 at acpi0: bus 13 (EXP5)
"PNP0C0D" at acpi0 not configured
"PNP0C0E" at acpi0 not configured
acpipci0 at acpi0 UNCR
acpipci1 at acpi0 PCI0: 0x 0x0011 0x0001
acpicmos0 at acpi0
"PNP0C0A" at acpi0 not configured
"ACPI0003" at acpi0 not configured
"IBM0068" at acpi0 not configured
"*pnp0c14" at acpi0 not configured
"PNP0C14" at acpi0 not configured
acpicpu at acpi0 not configured
acpipwrres at acpi0 not configured
acpitz at acpi0 not configured
cpu0: using IvyBridge MDS workaround
pci0 at mainbus0 bus 255
pchb0 at pci0 dev 0 function 0 "Intel QuickPath" rev 0x02
pchb1 at pci0 dev 0 function 1 "Intel QuickPath" rev 0x02
pchb2 at pci0 dev 2 function 0 "Intel QPI Link" rev 0x02
pchb3 at pci0 dev 2 function 1 "Intel QPI Physical" rev 0x02
pchb4 at pci0 dev 2 function 2 "Intel Reserved" rev 0x02
pchb5 at pci0 dev 2 function 3 "Intel Reserved" rev 0x02
pci1 at mainbus0 bus 0
pchb6 at pci1 dev 0 function 0 "Intel Core Host" rev 0x02
ppb0 at pci1 dev 1 function 0 "Intel 3400 PCIE" rev 0x02: msi
pci2 at ppb0 bus 1
vga1 at pci2 dev 0 function 0 vendor "NVIDIA", unknown product 0x0a6c
rev 0xa2
vga1: aperture needed
wsdisplay1 at vga1 mux 1: console (80x25, vt100 emulation)
vendor "NVIDIA", unknown product 0x0be3 (class multimedia subclass
hdaudio, rev 0xa1) at pci2 dev 0 function 1 not configured
"Intel 3400 MEI" rev 0x06 at pci1 dev 22 function 0 not configured
em0 at pci1 dev 25 function 0 "Intel 82577LM" rev 0x06: msi, address
f0:de:f1:50:6e:0a
ehci0 at pci1 dev 26 function 0 "Intel 3400 USB" rev 0x06: apic 1 int 23
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 configuration 1 interface 0 "Intel EHCI root hub" rev
2.00/1.00 addr 1
"Intel 3400 HD Audio" rev 0x06 at pci1 dev 27 function 0 not configured
ppb1 at pci1 dev 28 function 0 "Intel 3400 PCIE" rev 0x06: msi
pci3 at ppb1 bus 2
ppb2 at pci1 dev 28 function 1 "Intel 3400 PCIE" rev 0x06: msi
pci4 at ppb2 bus 3
iwn0 at pci4 dev 0 function 0 "Intel Centrino Advanced-N 6200" rev 0x35:
msi, MIMO 2T2R, MoW, address 18:3d:a2:2d:55:28
ppb3 at pci1 dev 28 function 3 "Intel 3400 PCIE" rev 0x06: msi
pci5 at ppb3 bus 5
ppb4 at pci1 dev 28 function 4 "Intel 3400 PCIE" rev 0x06: msi
pci6 at ppb4 bus 13
sdhc0 at pci6 dev 0 function 0 "Ricoh 5U822 SD/MMC" rev 0x01: apic 1 int 16
sdhc0: SDHC 1.0, 50 MHz base clock
sdmmc0 at sdhc0: 4-bit, sd high-speed, mmc high-speed
"Ricoh 5U230 Memory Stick" rev 0x01 at pci6 dev 0 function 1 not configured
"Ricoh 5U832 Firewire" rev 0x01 at pci6 dev 0 function 3 not configured
ehci1 at pci1 dev 

Re: Crash when unplugging a UPS USB connection

2021-08-06 Thread Anindya Mukherjee
I apologise for not following up. I relocated my UPS and a Pi is acting as the
NUT server now, running several devices. As a result I am unable to easily
connect my main OpenBSD desktop to test. However I am setting up another machine
and will have a chance to test the fix soon.

I am still running upsmon on my desktop which is working fine but this is just
the net client.

Thanks to everyone for the rapid fix, and in particular sthen@ for his prompt
and helpful responses.

Regards,
Anindya



Re: Crash when unplugging a UPS USB connection

2021-08-05 Thread Stuart Henderson
On 2021-08-05, Mike  wrote:
> On 8/5/2021 9:52 AM, Stuart Henderson wrote:
>
>> 
>> By requiring that somebody have an affected UPS to reproduce the
>> bug you seriously reduce the number of people who can help.
>
> OK, sorry for the noise.
>
> I'll move on then.
>
> Thanks for the reply.
>
>
>

Short of having an affected UPS, providing the debug information
that is printed on-screen is the next best thing. Please do
continue to report problems, but please include information and
take into account that people who might be able to help can't
necessarily reproduce it themselves.

Fortunately abieber@ had an affected UPS too and posted on the
bugs@ thread with stack trace etc. (He is a developer but anybody
with the problem and either a camera or paper and pencil could
do that too). Which pointed at a particular set of commits
likely to have caused it. With a bit more testing that was
confirmed, and shortly after mpi@ diagnosed the cause.

Providing that information in an easy to read form really does
help.




Re: Crash when unplugging a UPS USB connection

2021-08-05 Thread Mike
On 8/5/2021 9:52 AM, Stuart Henderson wrote:

> 
> By requiring that somebody have an affected UPS to reproduce the
> bug you seriously reduce the number of people who can help.

OK, sorry for the noise.

I'll move on then.

Thanks for the reply.




Re: Crash when unplugging a UPS USB connection

2021-08-05 Thread Mike
On 8/5/2021 8:18 AM, Stuart Henderson wrote:
> Please report to bugs@ with the following,
> 
> - quick summary of problem
> - dmesg
> - a text version of the panic/crash message
> - at least a text version of the function names from the backtrace
> if not the full thing
> - links to images hosted elsewhere (not attachments) if the text version
> of the above isn't the full thing

Thanks for the reply.

I did that on a week or two ago.  I was not able to get the text version
of the crash message, but the images show it clearly.

https://marc.info/?l=openbsd-bugs=162612361706514=2

To clarify, to reproduce...

- Reboot after the fresh install of OpenBSD current.

- plug in the USB comm cable from the UPS

- the console shows the USB connection details

- unplug the USB comm cable from the UPS

- the console shows the crash









Re: Crash when unplugging a UPS USB connection

2021-08-05 Thread Stuart Henderson
On 2021-08-05, Mike  wrote:
> On 8/5/2021 8:18 AM, Stuart Henderson wrote:
>> Please report to bugs@ with the following,
>> 
>> - quick summary of problem
>> - dmesg
>> - a text version of the panic/crash message
>> - at least a text version of the function names from the backtrace
>> if not the full thing
>> - links to images hosted elsewhere (not attachments) if the text version
>> of the above isn't the full thing
>
> Thanks for the reply.
>
> I did that on a week or two ago.  I was not able to get the text version
> of the crash message, but the images show it clearly.

Just type in the relevant lines from the images.

> https://marc.info/?l=openbsd-bugs=162612361706514=2

For bug reports you really need to get the basic information in front of
developer's eyeballs without any extra work on their part. Plain text in
the email will be right there. Links that need opening in a browser can
be useful for extra information. A zip file that needs downloading,
extracting, files opening - it's quite a barrier when somebody might
just be able to quickly read the panic message and functions in the
backtrace and say "aha I know what that is".

> To clarify, to reproduce...
>
> - Reboot after the fresh install of OpenBSD current.
>
> - plug in the USB comm cable from the UPS

By requiring that somebody have an affected UPS to reproduce the
bug you seriously reduce the number of people who can help.

> - the console shows the USB connection details
>
> - unplug the USB comm cable from the UPS
>
> - the console shows the crash
>
>
>
>
>
>
>
>



Re: Crash when unplugging a UPS USB connection

2021-08-05 Thread Stuart Henderson
Please report to bugs@ with the following,

- quick summary of problem
- dmesg
- a text version of the panic/crash message
- at least a text version of the function names from the backtrace
if not the full thing
- links to images hosted elsewhere (not attachments) if the text version
of the above isn't the full thing


On 2021-08-03, Mike  wrote:
> On 7/12/2021 4:16 PM, Mike wrote:
>> On 7/12/2021 3:12 PM, Mike Larkin wrote:
>>> On Sun, Jul 11, 2021 at 04:11:39PM -0400, Mike wrote:
 I run NUT on OpenBSD to monitor a Cyperpower UPS.  The UPS plugs into
 the OpenBSD box via a USB connection.

 OpenBSD 6.8, I had no problems, everything ran fine.  When the power
 went out, NUT saw that and reacted according to configuration.

 After I upgraded to OpenBSD 6.9 (a fresh install, not an in-place
 upgrade), when the power dropped, I'd be greeted with a blue crash screen.

 It seems that when the power drops, the UPS temporarily drops the USB
 connection, seemingly the equivalent of unplugging the USB connector.

 I am able to reproduce that 100% by booting up OpenBSD 6.9 with the UPS
 communications cable plugged into the USB port.  When I unplugged that
 USB connector, the crash occurs.

 This first occurred on my production box which is a Supermicro
 motherboard.  I can provide that dmesg if needed.


 Both OpenBSD 6.8 and current below are fresh installs on a test Lenovo
 laptop.

 On OpenBSD 6.8, when I plug in the UPS and unplug it, here is what I see
 on the console (dmesg is included):

>>>
>>> This crash happens to me as well when I unplug my upd(4). I'll try to find
>>> what diff caused this.
>>>
>>> -ml
>> 
>> 
>> Many thanks for the confirmation!
>> 
>> Mike.
>> 
>> 
>
> This crash also occurs with the following two UPSs:
>
> Cyberpower EC750G
> Tripp-Lite OmniSmart1500LCDT
>
> As before, to reproduce it
>
> 1) fresh install of OpenBSD current
> 2) do the reboot after the install
> 3) plug in the UPS
> 4) unplug it
>
>
> I can supply images of the crash screens for the two UPSs above if they
> are needed.
>
> Thanks!
>
>
>
>



Re: Crash when unplugging a UPS USB connection

2021-08-03 Thread Mike
On 7/12/2021 4:16 PM, Mike wrote:
> On 7/12/2021 3:12 PM, Mike Larkin wrote:
>> On Sun, Jul 11, 2021 at 04:11:39PM -0400, Mike wrote:
>>> I run NUT on OpenBSD to monitor a Cyperpower UPS.  The UPS plugs into
>>> the OpenBSD box via a USB connection.
>>>
>>> OpenBSD 6.8, I had no problems, everything ran fine.  When the power
>>> went out, NUT saw that and reacted according to configuration.
>>>
>>> After I upgraded to OpenBSD 6.9 (a fresh install, not an in-place
>>> upgrade), when the power dropped, I'd be greeted with a blue crash screen.
>>>
>>> It seems that when the power drops, the UPS temporarily drops the USB
>>> connection, seemingly the equivalent of unplugging the USB connector.
>>>
>>> I am able to reproduce that 100% by booting up OpenBSD 6.9 with the UPS
>>> communications cable plugged into the USB port.  When I unplugged that
>>> USB connector, the crash occurs.
>>>
>>> This first occurred on my production box which is a Supermicro
>>> motherboard.  I can provide that dmesg if needed.
>>>
>>>
>>> Both OpenBSD 6.8 and current below are fresh installs on a test Lenovo
>>> laptop.
>>>
>>> On OpenBSD 6.8, when I plug in the UPS and unplug it, here is what I see
>>> on the console (dmesg is included):
>>>
>>
>> This crash happens to me as well when I unplug my upd(4). I'll try to find
>> what diff caused this.
>>
>> -ml
> 
> 
> Many thanks for the confirmation!
> 
> Mike.
> 
> 

This crash also occurs with the following two UPSs:

Cyberpower EC750G
Tripp-Lite OmniSmart1500LCDT

As before, to reproduce it

1) fresh install of OpenBSD current
2) do the reboot after the install
3) plug in the UPS
4) unplug it


I can supply images of the crash screens for the two UPSs above if they
are needed.

Thanks!





Re: Crash when unplugging a UPS USB connection

2021-07-12 Thread Mike
On 7/12/2021 3:12 PM, Mike Larkin wrote:
> On Sun, Jul 11, 2021 at 04:11:39PM -0400, Mike wrote:
>> I run NUT on OpenBSD to monitor a Cyperpower UPS.  The UPS plugs into
>> the OpenBSD box via a USB connection.
>>
>> OpenBSD 6.8, I had no problems, everything ran fine.  When the power
>> went out, NUT saw that and reacted according to configuration.
>>
>> After I upgraded to OpenBSD 6.9 (a fresh install, not an in-place
>> upgrade), when the power dropped, I'd be greeted with a blue crash screen.
>>
>> It seems that when the power drops, the UPS temporarily drops the USB
>> connection, seemingly the equivalent of unplugging the USB connector.
>>
>> I am able to reproduce that 100% by booting up OpenBSD 6.9 with the UPS
>> communications cable plugged into the USB port.  When I unplugged that
>> USB connector, the crash occurs.
>>
>> This first occurred on my production box which is a Supermicro
>> motherboard.  I can provide that dmesg if needed.
>>
>>
>> Both OpenBSD 6.8 and current below are fresh installs on a test Lenovo
>> laptop.
>>
>> On OpenBSD 6.8, when I plug in the UPS and unplug it, here is what I see
>> on the console (dmesg is included):
>>
> 
> This crash happens to me as well when I unplug my upd(4). I'll try to find
> what diff caused this.
> 
> -ml


Many thanks for the confirmation!

Mike.



Re: Crash when unplugging a UPS USB connection

2021-07-12 Thread Mike Larkin
On Sun, Jul 11, 2021 at 04:11:39PM -0400, Mike wrote:
> I run NUT on OpenBSD to monitor a Cyperpower UPS.  The UPS plugs into
> the OpenBSD box via a USB connection.
>
> OpenBSD 6.8, I had no problems, everything ran fine.  When the power
> went out, NUT saw that and reacted according to configuration.
>
> After I upgraded to OpenBSD 6.9 (a fresh install, not an in-place
> upgrade), when the power dropped, I'd be greeted with a blue crash screen.
>
> It seems that when the power drops, the UPS temporarily drops the USB
> connection, seemingly the equivalent of unplugging the USB connector.
>
> I am able to reproduce that 100% by booting up OpenBSD 6.9 with the UPS
> communications cable plugged into the USB port.  When I unplugged that
> USB connector, the crash occurs.
>
> This first occurred on my production box which is a Supermicro
> motherboard.  I can provide that dmesg if needed.
>
>
> Both OpenBSD 6.8 and current below are fresh installs on a test Lenovo
> laptop.
>
> On OpenBSD 6.8, when I plug in the UPS and unplug it, here is what I see
> on the console (dmesg is included):
>

This crash happens to me as well when I unplug my upd(4). I'll try to find
what diff caused this.

-ml

> vvv= OpenBSD 6.8 ==
>
> OpenBSD 6.8 (GENERIC.MP) #3: Sat Jun  5 10:34:16 MDT 2021
>
> t...@syspatch-68-amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 4129800192 (3938MB)
> avail mem = 3989590016 (3804MB)
> random: good seed from bootblocks
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xe0010 (78 entries)
> bios0: vendor LENOVO version "6IET75WW (1.35 )" date 02/01/2011
> bios0: LENOVO 2522DU5
> acpi0 at bios0: ACPI 4.0
> acpi0: sleep states S0 S3 S4 S5
> acpi0: tables DSDT FACP SSDT ECDT APIC MCFG HPET ASF! SLIC BOOT SSDT
> TCPA SSDT SSDT SSDT
> acpi0: wakeup devices LID_(S3) SLPB(S3) IGBE(S4) EXP1(S4) EXP2(S4)
> EXP3(S4) EXP4(S4) EXP5(S4) EHC1(S3) EHC2(S3) HDEF(S4)
> acpitimer0 at acpi0: 3579545 Hz, 24 bits
> acpiec0 at acpi0
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: Intel(R) Core(TM) i5 CPU M 560 @ 2.67GHz, 2926.44 MHz, 06-25-05
> 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,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,POPCNT,AES,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,MELTDOWN
> cpu0: 256KB 64b/line 8-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 133MHz
> cpu0: mwait min=64, max=64, C-substates=0.2.1.1, IBE
> cpu1 at mainbus0: apid 1 (application processor)
> cpu1: Intel(R) Core(TM) i5 CPU M 560 @ 2.67GHz, 2926.01 MHz, 06-25-05
> 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,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,POPCNT,AES,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,MELTDOWN
> cpu1: 256KB 64b/line 8-way L2 cache
> cpu1: smt 1, core 0, package 0
> cpu2 at mainbus0: apid 4 (application processor)
> cpu2: Intel(R) Core(TM) i5 CPU M 560 @ 2.67GHz, 2926.02 MHz, 06-25-05
> 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,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,POPCNT,AES,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,MELTDOWN
> cpu2: 256KB 64b/line 8-way L2 cache
> cpu2: smt 0, core 2, package 0
> cpu3 at mainbus0: apid 5 (application processor)
> cpu3: Intel(R) Core(TM) i5 CPU M 560 @ 2.67GHz, 2926.01 MHz, 06-25-05
> 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,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,POPCNT,AES,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,MELTDOWN
> cpu3: 256KB 64b/line 8-way L2 cache
> cpu3: smt 1, core 2, package 0
> ioapic0 at mainbus0: apid 1 pa 0xfec0, version 20, 24 pins, remapped
> acpimcfg0 at acpi0
> acpimcfg0: addr 0xe000, bus 0-255
> acpihpet0 at acpi0: 14318179 Hz
> acpiprt0 at acpi0: bus 0 (PCI0)
> acpiprt1 at acpi0: bus 1 (PEG_)
> acpiprt2 at acpi0: bus 2 (EXP1)
> acpiprt3 at acpi0: bus 3 (EXP2)
> acpiprt4 at acpi0: bus -1 (EXP3)
> acpiprt5 at acpi0: bus 5 (EXP4)
> acpiprt6 at acpi0: bus 13 (EXP5)
> acpibtn0 at acpi0: LID_
> acpibtn1 at acpi0: SLPB
> acpipci0 at acpi0 UNCR
> acpipci1 at acpi0 PCI0: 0x 0x0011 0x0001
> acpicmos0 at acpi0
> acpibat0 at acpi0: BAT0 model "42T4911" serial 21260 type LION oem "LGC"
> acpiac0 at acpi0: AC unit online
> acpithinkpad0 at acpi0: version 1.0
> "*pnp0c14" at 

Crash when unplugging a UPS USB connection

2021-07-11 Thread Mike
I run NUT on OpenBSD to monitor a Cyperpower UPS.  The UPS plugs into
the OpenBSD box via a USB connection.

OpenBSD 6.8, I had no problems, everything ran fine.  When the power
went out, NUT saw that and reacted according to configuration.

After I upgraded to OpenBSD 6.9 (a fresh install, not an in-place
upgrade), when the power dropped, I'd be greeted with a blue crash screen.

It seems that when the power drops, the UPS temporarily drops the USB
connection, seemingly the equivalent of unplugging the USB connector.

I am able to reproduce that 100% by booting up OpenBSD 6.9 with the UPS
communications cable plugged into the USB port.  When I unplugged that
USB connector, the crash occurs.

This first occurred on my production box which is a Supermicro
motherboard.  I can provide that dmesg if needed.


Both OpenBSD 6.8 and current below are fresh installs on a test Lenovo
laptop.

On OpenBSD 6.8, when I plug in the UPS and unplug it, here is what I see
on the console (dmesg is included):

vvv= OpenBSD 6.8 ==

OpenBSD 6.8 (GENERIC.MP) #3: Sat Jun  5 10:34:16 MDT 2021

t...@syspatch-68-amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 4129800192 (3938MB)
avail mem = 3989590016 (3804MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xe0010 (78 entries)
bios0: vendor LENOVO version "6IET75WW (1.35 )" date 02/01/2011
bios0: LENOVO 2522DU5
acpi0 at bios0: ACPI 4.0
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SSDT ECDT APIC MCFG HPET ASF! SLIC BOOT SSDT
TCPA SSDT SSDT SSDT
acpi0: wakeup devices LID_(S3) SLPB(S3) IGBE(S4) EXP1(S4) EXP2(S4)
EXP3(S4) EXP4(S4) EXP5(S4) EHC1(S3) EHC2(S3) HDEF(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpiec0 at acpi0
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i5 CPU M 560 @ 2.67GHz, 2926.44 MHz, 06-25-05
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,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,POPCNT,AES,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,MELTDOWN
cpu0: 256KB 64b/line 8-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 133MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.1, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM) i5 CPU M 560 @ 2.67GHz, 2926.01 MHz, 06-25-05
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,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,POPCNT,AES,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,MELTDOWN
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 1, core 0, package 0
cpu2 at mainbus0: apid 4 (application processor)
cpu2: Intel(R) Core(TM) i5 CPU M 560 @ 2.67GHz, 2926.02 MHz, 06-25-05
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,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,POPCNT,AES,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,MELTDOWN
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 2, package 0
cpu3 at mainbus0: apid 5 (application processor)
cpu3: Intel(R) Core(TM) i5 CPU M 560 @ 2.67GHz, 2926.01 MHz, 06-25-05
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,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,POPCNT,AES,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,MELTDOWN
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 1, core 2, package 0
ioapic0 at mainbus0: apid 1 pa 0xfec0, version 20, 24 pins, remapped
acpimcfg0 at acpi0
acpimcfg0: addr 0xe000, bus 0-255
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (PEG_)
acpiprt2 at acpi0: bus 2 (EXP1)
acpiprt3 at acpi0: bus 3 (EXP2)
acpiprt4 at acpi0: bus -1 (EXP3)
acpiprt5 at acpi0: bus 5 (EXP4)
acpiprt6 at acpi0: bus 13 (EXP5)
acpibtn0 at acpi0: LID_
acpibtn1 at acpi0: SLPB
acpipci0 at acpi0 UNCR
acpipci1 at acpi0 PCI0: 0x 0x0011 0x0001
acpicmos0 at acpi0
acpibat0 at acpi0: BAT0 model "42T4911" serial 21260 type LION oem "LGC"
acpiac0 at acpi0: AC unit online
acpithinkpad0 at acpi0: version 1.0
"*pnp0c14" at acpi0 not configured
"PNP0C14" at acpi0 not configured
acpicpu0 at acpi0: C3(350@245 mwait.3@0x20), C2(500@205 mwait.3@0x10),
C1(1000@3 mwait.1), PSS
acpicpu1 at acpi0: C3(350@245 mwait.3@0x20), C2(500@205 mwait.3@0x10),
C1(1000@3 mwait.1), PSS
acpicpu2 at acpi0: C3(350@245 mwait.3@0x20), C2(500@205 mwait.3@0x10),
C1(1000@3 mwait.1), PSS