Opened 6 weeks ago

Closed 5 weeks ago

#19169 closed bug (fixed)

KDL early in boot when keyboard plugged in

Reported by: monni Owned by: nobody
Priority: normal Milestone: Unscheduled
Component: System/Boot Loader Version: R1/Development
Keywords: Cc:
Blocked By: #19168 Blocking:
Platform: All

Description (last modified by monni)

ASSERT FAILED (src/system/kernel/vm/vm_page.cpp:1558): (!page->IsMapped()); page: 0xFFFFFFFF83000000

vm_free_unused_boot_loader_range() + 0xd8

hrev58228

Change History (8)

comment:1 by monni, 6 weeks ago

Description: modified (diff)

comment:2 by waddlesplash, 6 weeks ago

Blocked By: 19168 added
Resolution: duplicate
Status: newclosed

comment:3 by monni, 6 weeks ago

Resolution: duplicate
Status: closedreopened

hrev58238 still crashes early in the boot

CPU 0: logical apic id: 0x1
x86_init_fpu: CPU has SSE... enabling FXSR and XMM.
reserve_io_interrupt_vectors: reserved 3 vectors starting from 221
reserve_io_interrupt_vectors: reserved 1 vectors starting from 219
arch_init_timer: using APIC timer.
allocate_commpage_entry(2, 16) -> 0x0000000000000200
scheduler_init: found 3 logical cpus and 3 cache levels
scheduler switches: single core: false, cpu load tracking: false, core load tracking: true
scheduler: switching to low latency mode
msi support enabled
setting up apic for CPU 1: apic id 1, version 327700
setting up apic for CPU 2: apic id 2, version 327700
CPU 1: logical apic id: 0x2
CPU 2: logical apic id: 0x4
x86_init_fpu: CPU has SSE... enabling FXSR and XMM.
x86_init_fpu: CPU has SSE... enabling FXSR and XMM.
slab memory manager: created area 0xffffffff80801000 (146)
allocate_commpage_entry(3, 69) -> 0x0000000000000210
vm_soft_fault: va 0xffffffff81494000 not covered by area in address space
vm_page_fault: vm_soft_fault returned error 'Bad address' on fault at 0xffffffff81494002, ip 0xffffffff8005a848, write 0, user 0, exec 0, thread 0x10
PANIC: vm_page_fault: unhandled page fault in kernel space at 0xffffffff81494002, ip 0xffffffff8005a848

Welcome to Kernel Debugging Land...
Thread 16 "main2" running on CPU 2
stack trace for thread 16 "main2"
    kernel stack: 0xffffffff81a17000 to 0xffffffff81a1c000
frame                       caller             <image>:function + offset
 0 ffffffff81a1b810 (+  32) ffffffff801505a0   <kernel_x86_64> arch_debug_call_with_fault_handler() + 0x1a
 1 ffffffff81a1b860 (+  80) ffffffff800b75b8   <kernel_x86_64> debug_call_with_fault_handler() + 0x78
 2 ffffffff81a1b8c0 (+  96) ffffffff800b8c64   <kernel_x86_64> _ZL20kernel_debugger_loopPKcS0_P13__va_list_tagi() + 0xf4
 3 ffffffff81a1b910 (+  80) ffffffff800b8ffe   <kernel_x86_64> _ZL24kernel_debugger_internalPKcS0_P13__va_list_tagi() + 0x6e
 4 ffffffff81a1ba00 (+ 240) ffffffff800b9397   <kernel_x86_64> panic() + 0xb7
 5 ffffffff81a1baf0 (+ 240) ffffffff80139450   <kernel_x86_64> vm_page_fault() + 0x2e0
 6 ffffffff81a1bb30 (+  64) ffffffff8015cf3e   <kernel_x86_64> x86_page_fault_exception() + 0x15e
 7 ffffffff81a1be88 (+ 856) ffffffff80151e7c   <kernel_x86_64> int_bottom() + 0x80
kernel iframe at 0xffffffff81a1be88 (end = 0xffffffff81a1bf50)
 rax 0x2c                  rbx 0xffffffff81494084    rcx 0xffffffff8020ea20
 rdx 0xffffffff81494000    rsi 0x0                   rdi 0xffffffff8cf1f598
 rbp 0xffffffff81a1bf60     r8 0xffffffff81494000     r9 0xffffffff8cf1f598
 r10 0xffffffff8149d060    r11 0x2c                  r12 0x0
 r13 0xffffffff82007a20    r14 0xffffffff801ba940    r15 0xffffffff822c44c0
 rip 0xffffffff8005a848    rsp 0xffffffff81a1bf50 rflags 0x10202
 vector: 0xe, error code: 0x0
 8 ffffffff81a1bf60 (+ 216) ffffffff8005a848   <kernel_x86_64> boot_splash_set_stage() + 0x148
 9 ffffffff81a1bfb0 (+  80) ffffffff80068d37   <kernel_x86_64> _ZL5main2Pv() + 0x37
10 ffffffff81a1bfd0 (+  32) ffffffff8008f5d7   <kernel_x86_64> _ZL19common_thread_entryPv() + 0x37
11 0000000000000000 (+   0) ffffffff81a1bfe0   145:main2_16_kstack@0xffffffff81a17000 + 0x4fe0

comment:4 by waddlesplash, 5 weeks ago

Summary: KDL early in bootKDL early in boot when keyboard plugged in

Monni reports that the system boots to desktop with an older bootloader and the latest kernel, but also with the latest bootloader as long as there is no keyboard plugged in.

comment:5 by waddlesplash, 5 weeks ago

I am told that the KDL doesn't display on screen, just on the serial line. Furthermore:

<Monni> waddlesplash: Pressing any key on keyboard just reboots...

(And sending input via the serial line doesn't work either.)

comment:6 by waddlesplash, 5 weeks ago

The "getchar" code is pretty simple, I wonder if the triple-fault is related to the KDL not displaying on screen somehow (i.e. it gets a character, but then trying to display it faults.)

comment:7 by monni, 5 weeks ago

Likely culprit is commit 875b13d5824f494e061dd00fcaa654d4faae55c0 (hrev58214)... Reverting it will allow boot menu to show up. Something that it changes results in bootloader to try to allocate over 4 MB more than fits before page tables.

What comes to the KDL later in boot process, it seems it tries to switch to different boot drive unintentionally and that will cause it to find older kernel through packagefs. This might cause other weird issues when booting from any other drive than the first hard disk. But I guess that deserves another ticket.

comment:8 by waddlesplash, 5 weeks ago

Resolution: fixed
Status: reopenedclosed

Fixed in hrev58246.

Note: See TracTickets for help on using tickets.