Re: panic: kernel diagnostic assertion "uvm_page_owner_locked_p(pg)" failed: file "/usr/src/sys/uvm/uvm_page.c", line 1064

2022-01-18 Thread Ralf Horstmann
* Martin Pieuchot  [2022-01-19 03:12]:
> 
> On 18/01/22(Tue) 22:46, Ralf Horstmann wrote:
...
> > db_enter () at db_enter+0x10
> > panic(81e5053e) at panic+0xbf
> > __assert(81ebcdc6,81e23741,428,81e718b1) at 
> > __assert+0x25
> > uvm_page_unbusy(800022738d90,10) at uvm_page_unbusy+0x20e
> > uvm_aio_aiodone(fd81cd592360) at uvm_aio_aiodone+0x252
> > uvm_aiodone_daemon(8000fffefa40) at uvm_aiodone_daemon+0x124
> > end trace frame: 0x0, count: 9
> 
> This is caused by an incorrect lock assertion.  I just committed a fix.
> 
> The problem can be triggered when swapping anon.  It should be fixed in
> the next snapshot.

Thanks for the quick fix!

I am testing with a local kernel for now. I need a couple of days of stability
before I can jump onto the snapshots again :-)

Regards
Ralf



Re: panic: kernel diagnostic assertion "uvm_page_owner_locked_p(pg)" failed: file "/usr/src/sys/uvm/uvm_page.c", line 1064

2022-01-18 Thread Martin Pieuchot
Thanks for the report.

On 18/01/22(Tue) 22:46, Ralf Horstmann wrote:
> >Synopsis:    panic: kernel diagnostic assertion 
> >"uvm_page_owner_locked_p(pg)" failed: file "/usr/src/sys/uvm/uvm_page.c", 
> >line 1064
> >Category:kernel
> >Environment:
>   System  : OpenBSD 7.0
>   Details : OpenBSD 7.0-current (GENERIC.MP) #248: Tue Jan 11 
> 10:12:07 MST 2022
>
> dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> 
>   Architecture: OpenBSD.amd64
>   Machine : amd64
> >Description:
>   The panic typically happens while using some X programs, in
>   most cases chromium. It can take days of uptime and occasional
>   system usage for the problem to show, sometimes but not always
>   with suspend and resume between boot and panic.
> 
>   I have seen the same diagnostics assertion with snapshots from
>   2021-31-12, 2022-01-05 and now 2022-01-11.
> 
>   Even though I do have ddb enabled by default, the system does
>   not always enter ddb and print a backtrace. But for the most
>   recent case I have the following details and a backtrace
>   (typed from screen):
> 
>   Stopped at db_enter+0x10: popq %rbp
>   TIDPID  UIDPRFLAGSPFLAGS CPUCOMMAND
>   *310366  5500400x14000 0x200   0K   aiodoned
>508990  6254100x14000 0x200   2srdis
>   db_enter () at db_enter+0x10
>   panic(81e5053e) at panic+0xbf
>   __assert(81ebcdc6,81e23741,428,81e718b1) at 
> __assert+0x25
>   uvm_page_unbusy(800022738d90,10) at uvm_page_unbusy+0x20e
>   uvm_aio_aiodone(fd81cd592360) at uvm_aio_aiodone+0x252
>   uvm_aiodone_daemon(8000fffefa40) at uvm_aiodone_daemon+0x124
>   end trace frame: 0x0, count: 9

This is caused by an incorrect lock assertion.  I just committed a fix.

The problem can be triggered when swapping anon.  It should be fixed in
the next snapshot.

Thanks again,
Martin



panic: kernel diagnostic assertion "uvm_page_owner_locked_p(pg)" failed: file "/usr/src/sys/uvm/uvm_page.c", line 1064

2022-01-18 Thread Ralf Horstmann
>Synopsis:      panic: kernel diagnostic assertion 
>"uvm_page_owner_locked_p(pg)" failed: file "/usr/src/sys/uvm/uvm_page.c", line 
>1064
>Category:  kernel
>Environment:
System  : OpenBSD 7.0
Details : OpenBSD 7.0-current (GENERIC.MP) #248: Tue Jan 11 
10:12:07 MST 2022
 
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP

Architecture: OpenBSD.amd64
Machine : amd64
>Description:
The panic typically happens while using some X programs, in
most cases chromium. It can take days of uptime and occasional
system usage for the problem to show, sometimes but not always
with suspend and resume between boot and panic.

I have seen the same diagnostics assertion with snapshots from
2021-31-12, 2022-01-05 and now 2022-01-11.

Even though I do have ddb enabled by default, the system does
not always enter ddb and print a backtrace. But for the most
recent case I have the following details and a backtrace
(typed from screen):

Stopped at db_enter+0x10: popq %rbp
TIDPID  UIDPRFLAGSPFLAGS CPUCOMMAND
*310366  5500400x14000 0x200   0K   aiodoned
 508990  6254100x14000 0x200   2srdis
db_enter () at db_enter+0x10
panic(81e5053e) at panic+0xbf
__assert(81ebcdc6,81e23741,428,81e718b1) at 
__assert+0x25
uvm_page_unbusy(800022738d90,10) at uvm_page_unbusy+0x20e
uvm_aio_aiodone(fd81cd592360) at uvm_aio_aiodone+0x252
uvm_aiodone_daemon(8000fffefa40) at uvm_aiodone_daemon+0x124
end trace frame: 0x0, count: 9

>How-To-Repeat:
No reliable reproducer identified yet, other than using
chromium with many tabs for a couple of days.

>Fix:

dmesg:
OpenBSD 7.0-current (GENERIC.MP) #248: Tue Jan 11 10:12:07 MST 2022
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 8250834944 (7868MB)
avail mem = 7984787456 (7614MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xcc7fd000 (65 entries)
bios0: vendor LENOVO version "JBET73WW (1.37 )" date 08/14/2019
bios0: LENOVO 20BWS3WY01
acpi0 at bios0: ACPI 5.0
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SLIC ASF! HPET ECDT APIC MCFG SSDT SSDT SSDT SSDT SSDT 
SSDT SSDT SSDT SSDT PCCT SSDT TCPA SSDT UEFI MSDM BATB FPDT UEFI DMAR
acpi0: wakeup devices LID_(S4) SLPB(S3) IGBE(S4) EXP2(S4) XHCI(S3) EHC1(S3)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpiec0 at acpi0
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i5-5300U CPU @ 2.30GHz, 2195.20 MHz, 06-3d-04
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,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,RDSEED,ADX,SMAP,PT,SRBDS_CTRL,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1.1.1, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM) i5-5300U CPU @ 2.30GHz, 2194.92 MHz, 06-3d-04
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,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,RDSEED,ADX,SMAP,PT,SRBDS_CTRL,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 1, core 0, package 0
cpu2 at mainbus0: apid 2 (application processor)
cpu2: Intel(R) Core(TM) i5-5300U CPU @ 2.30GHz, 2194.93 MHz, 06-3d-04
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,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,RDSEED,ADX,SMAP,PT,SRBDS_CTRL,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 1, package 0