Re: Userspace serial console not working since OpenBSD-7.1 release

2022-09-15 Thread James Stark
 int 23
usb2 at ehci1: USB revision 2.0
uhub2 at usb2 configuration 1 interface 0 "Intel EHCI root hub" rev
2.00/1.00 addr 1
ppb4 at pci0 dev 30 function 0 "92
pci5 at ppb4 bus 5
pcib0 at pci0 dev 31 function 0 "Intel 82801IR LPC" rev 0x02
ahci0 at pci0 dev 31 function 2 "Intel 82801I AHCI" rev 0x02: msi, AHCI 1.2
ahci0: port 0: 3.0Gb/s
ahci0: port 1: 3.0Gb/s
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0:  naa.5001b4471a8fc523
sd0: 228936MB,tors, thin
sd1 at scsibus1 targ 1 lun 0:  wrote:
>
> If you have old.boot messages from 7.0 saved somewhere, or can boot a 7.0 
> kernel (e.g. download to /bsd.70 and "boot bsd.70" at the boot prompt) then 
> it would be useful to compare the com* attach lines.
>
> The acpidump output files might be useful too (probably saved in 
> /var/db/acpi).
>
> The specific thing which changed is that OpenBSD started using ACPI.to 
> identify serial ports. "Automatic boot i" is a FIFO-buffer worth of 
> characters; the earlier kernel text is sent via polling but the userland 
> output uses interrupts, so something is wrong with the mapping (could be a 
> bios bug of course) so that the os doesn't notice that it can continue 
> transmitting to the port
>
>
> --
>   Sent from a phone, apologies for poor formatting.
>
>
> On 14 September 2022 01:05:38 James Stark  wrote:
>
>>> Synopsis: Userspace serial console not working since OpenBSD-7.1 release.
>>> Category: system
>>> Environment:
>>
>> System  : OpenBSD 7.2
>> Details : OpenBSD 7.2-beta (GENERIC.MP) #714: Fri Sep  2 15:20:16 MDT 
>> 2022
>> dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
>>
>> Architecture: OpenBSD.amd64
>> Machine : amd64
>>>
>>> Description:
>>
>> Beginning with OpenBSD 7.1-Release, the userspace/getty portion of the
>> the serial console is unresponsive.  With the serial console configured
>> following the instructions in the FAQ (I will attach /etc/boot.conf and
>> /etc/ttys for good measure), OpenBSD-7.0 boots and the serial console
>> works as expected.  Upon upgrading to 7.1 (and later snapshots), with
>> the same hardware and configuration, the serial console failure is
>> observed.
>>
>> During boot, the kernel messages are displayed as expected (and ddb
>> works).  However once the boot transfers to userspace the message:
>> "Automatic boot i" is displayed, then nothing.  Accessing the machine
>> via SSH after sshd has started and running "ps ax" shows that the
>> autoboot process is still running, but no getty's have been started.
>> IIRC, I saw complaints from init at one point about gettys respawning
>> too quickly.
>>
>> Deleting/renaming /etc/boot/conf results in the boot running as
>> expected and all of the getty's being started.  However, attempting to
>> connect to the serial console gets no response.
>>
>> In case it's relevant, the client used to connect to the serial console
>> is cu, running on an OpenBSD Laptop.
>>
>> I would have included more output, but "doas sendbug" caused a kernel
>> panic.  I will include the panic data in a separate bug report.
>>
>>> How-To-Repeat:
>>
>> On OpenBSD 7.1-Release (or later):
>> 1.  Enable serial console
>> 2.  Boot machine
>>>
>>> Fix:
>>
>> None
>>
>> dmesg:
>> OpenBSD 7.2-beta (GENERIC.MP) #714: Fri Sep  2 15:20:16 MDT 2022
>> dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
>> real mem = 4267245568 (4069MB)
>> avail mem = 4120518656 (3929MB)
>> random: good seed from bootblocks
>> mpath0 at root
>> scsibus0 at mpath0: 256 targets
>> mainbus0 at root
>> bios0 at mainbus0: SMBIOS rev. 2.6 @ 0x9f800 (22 entries)
>> bios0: vendor American Megatrends Inc. version "080016" date 03/15/2011
>> acpi0 at bios0: ACPI 4.0
>> acpi0: sleep states S0 S1 S4 S5
>> acpi0: tables DSDT FACP APIC MCFG OEMB HPET GSCI
>> acpi0: wakeup devices P0P1(S4) USB0(S4) USB1(S4) USB2(S4) USB5(S4)
>> EUSB(S4) USB3(S4) USB4(S4) USB6(S4) USBE(S4) P0P4(S4) P0P5(S4)
>> P0P6(S4) P0P7(S4) P0P8(S4) P0P9(S4) [...]
>> acpitimer0 at acpi0: 3579545 Hz, 24 bits
>> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
>> cpu0 at mainbus0: apid 0 (boot processor)
>> cpu0: Intel(R) Atom(TM) CPU D525 @ 1.80GHz, 1800.07 MHz, 06-1c-0a
>> 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,TM2,SS

Userspace serial console not working since OpenBSD-7.1 release

2022-09-13 Thread James Stark
>Synopsis: Userspace serial console not working since OpenBSD-7.1 release.
>Category: system
>Environment:
System  : OpenBSD 7.2
Details : OpenBSD 7.2-beta (GENERIC.MP) #714: Fri Sep  2 15:20:16 MDT 2022
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP

Architecture: OpenBSD.amd64
Machine : amd64
>Description:
Beginning with OpenBSD 7.1-Release, the userspace/getty portion of the
the serial console is unresponsive.  With the serial console configured
following the instructions in the FAQ (I will attach /etc/boot.conf and
/etc/ttys for good measure), OpenBSD-7.0 boots and the serial console
works as expected.  Upon upgrading to 7.1 (and later snapshots), with
the same hardware and configuration, the serial console failure is
observed.

During boot, the kernel messages are displayed as expected (and ddb
works).  However once the boot transfers to userspace the message:
"Automatic boot i" is displayed, then nothing.  Accessing the machine
via SSH after sshd has started and running "ps ax" shows that the
autoboot process is still running, but no getty's have been started.
IIRC, I saw complaints from init at one point about gettys respawning
too quickly.

Deleting/renaming /etc/boot/conf results in the boot running as
expected and all of the getty's being started.  However, attempting to
connect to the serial console gets no response.

In case it's relevant, the client used to connect to the serial console
is cu, running on an OpenBSD Laptop.

I would have included more output, but "doas sendbug" caused a kernel
panic.  I will include the panic data in a separate bug report.

>How-To-Repeat:
On OpenBSD 7.1-Release (or later):
1.  Enable serial console
2.  Boot machine
>Fix:
None

dmesg:
OpenBSD 7.2-beta (GENERIC.MP) #714: Fri Sep  2 15:20:16 MDT 2022
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 4267245568 (4069MB)
avail mem = 4120518656 (3929MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.6 @ 0x9f800 (22 entries)
bios0: vendor American Megatrends Inc. version "080016" date 03/15/2011
acpi0 at bios0: ACPI 4.0
acpi0: sleep states S0 S1 S4 S5
acpi0: tables DSDT FACP APIC MCFG OEMB HPET GSCI
acpi0: wakeup devices P0P1(S4) USB0(S4) USB1(S4) USB2(S4) USB5(S4)
EUSB(S4) USB3(S4) USB4(S4) USB6(S4) USBE(S4) P0P4(S4) P0P5(S4)
P0P6(S4) P0P7(S4) P0P8(S4) P0P9(S4) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Atom(TM) CPU D525 @ 1.80GHz, 1800.07 MHz, 06-1c-0a
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,TM2,SSSE3,CX16,xTPR,PDCM,MOVBE,NXE,LONG,LAHF,PERF,SENSOR,MELTDOWN
cpu0: 24KB 64b/line 6-way D-cache, 32KB 64b/line 8-way I-cache, 512KB
64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 7 var ranges, 88 fixed ranges
cpu0: apic clock running at 199MHz
cpu0: mwait min=64, max=64, C-substates=0.1, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Atom(TM) CPU D525 @ 1.80GHz, 1800.00 MHz, 06-1c-0a
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,TM2,SSSE3,CX16,xTPR,PDCM,MOVBE,NXE,LONG,LAHF,PERF,SENSOR,MELTDOWN
cpu1: 24KB 64b/line 6-way D-cache, 32KB 64b/line 8-way I-cache, 512KB
64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 1 (application processor)
cpu2: Intel(R) Atom(TM) CPU D525 @ 1.80GHz, 1800.00 MHz, 06-1c-0a
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,TM2,SSSE3,CX16,xTPR,PDCM,MOVBE,NXE,LONG,LAHF,PERF,SENSOR,MELTDOWN
cpu2: 24KB 64b/line 6-way D-cache, 32KB 64b/line 8-way I-cache, 512KB
64b/line 8-way L2 cache
cpu2: smt 1, core 0, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: Intel(R) Atom(TM) CPU D525 @ 1.80GHz, 1800.00 MHz, 06-1c-0a
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,TM2,SSSE3,CX16,xTPR,PDCM,MOVBE,NXE,LONG,LAHF,PERF,SENSOR,MELTDOWN
cpu3: 24KB 64b/line 6-way D-cache, 32KB 64b/line 8-way I-cache, 512KB
64b/line 8-way L2 cache
cpu3: smt 1, core 1, package 0
ioapic0 at mainbus0: apid 4 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 5 (P0P1)
acpiprt2 at acpi0: bus 1 (P0P4)
acpiprt3 at acpi0: bus -1 (P0P5)
acpiprt4 at acpi0: bus 2 (P0P6)
acpiprt5 at acpi0: bus 3 (P0P7)
acpiprt6 at acpi0: bus 4 (P0P8)
acpiprt7 at acpi0: bus -1 (P0P9)
acpipci0 at acpi0 PCI0
acpicmos0 at acpi0
com0 at acpi0 UAR1 addr 0x