LemonOSProject/LemonOS

Rapid mouse movement during boot causes page fault

larrabyte opened this issue · 1 comments

When booting Lemon on QEMU, making rapid mouse movements while the background is loading will cause the kernel to panic. My guess is something to do with writing outside of video memory, but who knows ¯\_(ツ)_/¯ The bug only seems to occur while the background is loading. Once the background loads, I can't reproduce the bug.

Steps to Reproduce

  • Set your mouse to an extremely high DPI (something like 16,000 should do).
  • Start QEMU using the arguments below and pick Lemon OS (1280x720).
  • Move the mouse around rapidly until the kernel panics.

QEMU Arguments

qemu-system-x86_64 lemon.img -no-reboot -no-shutdown -m 1024M -device qemu-xhci -M q35,accel=whpx -smp 2 -serial stdio -netdev user,id=net0 -device e1000,netdev=net0,mac=DE:AD:69:BE:EF:42

Screenshot

Kernel panic screenshot.

Serial Output

Windows Hypervisor Platform accelerator is operational

[INFO]    Initializing Lemon...

[INFO]    Initializing System Timer...OK
[INFO]    Initializing ACPI...OK
[INFO]    Initializing PCI...OK
[INFO]    Initializing Local and I/O APIC...OK
[INFO]    Initializing SMP...
[INFO]    [SMP] 2 processors initialized!OK
[INFO]    Used RAM: 1 MB
[INFO]    Initializing Ramdisk...OK
[INFO]    Initializing HID...
[INFO]    OK
[INFO]    Initializing Task Scheduler...
[ERROR]   [PCIDevice] AllocateVector: Device not MSI capable!
[INFO]    [XHCI] Interface version: 0x0, Page size: 1, Operational registers offset: 0x40, Runtime registers offset: 0x1
000, Doorbell registers offset: 0x2000
[WARN]    [ATA] No IDE controller found!
[INFO]    Initializing AHCI Controller...
[WARN]    [SATA] Port Hung
[INFO]    [AHCI] Found 3 partitions!
[INFO]    [Ext2] Initializing Volume    Revision: 1, Block Size: 4096, 791108 KB/914432 KB used, Last mounted on: /mnt/L
emon
[INFO]    [FAT32] Initializing Volume   Signature: 41, OEM ID: mkfs.fat, Size: 128 MB
[INFO]    [i8254x]    Base Address: 0xfebc0000, Base Address (virtual): 0xffffffff7ebc0000, IO Base: 0xc000, EEPROM Pres
ent: true, Base Address 1: 0xc000, Base Address 2: 0x0
[ERROR]   [PCIDevice] AllocateVector: Device not MSI capable!,IRQ: 0x2b
[INFO]    [i8254x] MAC Address: 0xde:0xad:0x69:0xbe:0xef:0x42
[INFO]    [i8254x] Link Up, Speed: 1000
[INFO]    [Network] Initializing network interface layer...
[INFO]    Loading Init Process...OK
[INFO]    (Init): rtdl: DT_FLAGS_1(8) is not implemented correctly!, 4527880
[INFO]    (Init): rtdl: DT_FLAGS_1(8) is not implemented correctly!, 4526904
[INFO]    (Init): rtdl: DT_FLAGS_1(8) is not implemented correctly!, 4525928
[INFO]    (Init): mlibc: Broken mbtowc() called, 4528320
[INFO]    Loading: /system/lemon/lemonwm.lef
[INFO]    Done (took 385000 us)
[INFO]    Loading: /system/bin/shell.lef
[INFO]    (lemonwm.lef): rtdl: DT_FLAGS_1(8) is not implemented correctly!, 4662904
[INFO]    (lemonwm.lef): rtdl: DT_FLAGS_1(8) is not implemented correctly!, 4661928
[INFO]    (lemonwm.lef): rtdl: DT_FLAGS_1(8) is not implemented correctly!, 4660952
[INFO]    (lemonwm.lef): mlibc: Broken mbtowc() called, 4663344
[INFO]    Done (took 1052000 us)
[INFO]    Loading: /system/lemon/netgov.lef
[INFO]    Done (took 0 us)
[WARN]    Invalid ELF Header: 0x3f, 0x0, 0xfffffffd (?²)Page Fault

[INFO]    Page not present
[INFO]    Read Only
[INFO]    RIP:
[INFO]    0xffffffff80110267
[INFO]    Process: Init (5)
[INFO]
Fault address:
[INFO]    0x10c0
0INFO]    Register Dump: a: 0x10c0, b:0x83ff40, c:0x
,[I NdFO:0] x 6e ,  (Ssh:el0l.xle6fe):, [3:1m0rxtd1l0: cD0T,_F sLApGS:_01(xfff8ff) fisff cno2tc iam8plcem7e8nt,ed  bcopr
:re0ctxlfyf!f[3f9fm,f f4c90204c7a28ca0
[INFO]    0xffffffff80148132
[INFO]    0xffffffff80151dc6
[INFO]    0xffffffff80106b0aPage Fault

[INFO]    Page not present
[INFO]    RIP:
[INFO]    0xffffffff801102ac
[INFO]    Process: Init (5)
[INFO]
Fault address:
[INFO]    0xffffff0030633031
[INFO]    Register Dump: a: 0xffffff0030633031, b:0x83ff40, c:0x0, d:0x280, S:0xffffffff80110290, D:0xffffff0030633031,
sp:0xffffffffc2ca8840, bp:0xffffffffc2ca8850
[INFO]    0xffffffff8010e96b
[INFO]    0xffffffff8013f7cc
[INFO]    0xffffffff8013da79
[INFO]    0xffffffff801065d4
[ERROR]   Fatal Kernel Exception:
[INFO]    0xd
[INFO]    RIP:
[INFO]    0xffffffff801102ac
[INFO]    Error Code:
[INFO]    0x0
[INFO]    Register Dump: a: 0x3030666666666666, b:0x83ff40, c:0x0, d:0x280, S:0xffffffff80110290, D:0x3030666666666666,
sp:0xffffffffc2ca8410, bp:0xffffffffc2ca8420
[INFO]    Stack Trace:
[INFO]    0xffffffff8010e96b
[INFO]    0xffffffff8013f7cc
[INFO]    0xffffffff8013da79
[INFO]    0xffffffff801065d4

Caused by a similar problem to #12