kernel icon indicating copy to clipboard operation
kernel copied to clipboard

Enable kernel stack switching with newlib

Open mkroening opened this issue 3 years ago • 0 comments

Error

When accepting a connection with lwIP:

[...]
awaitening connections
[0][ERROR] Page Fault (#PF) Exception: ExceptionStackFrame {
    instruction_pointer: 0x4148e9,
    code_segment: 0x8,
    cpu_flags: 0x10206,
    stack_pointer: 0x11f00,
    stack_segment: 0x10,
}
[0][ERROR] virtual_address = 0x4148E9, page fault error = The fault was caused by a non-present page.
The access causing the fault was a read.
The access causing the fault originated when the processor was executing in supervisor mode.
The fault was not caused by reserved bit violation.
The fault was caused by an instruction fetch.
[0][ERROR] fs = 0x897180, gs = 0x0
[0][PANIC] panicked at 'assertion failed: `(left != right)`
  left: `Idle`,
 right: `Idle`: Trying to terminate the idle task', src/scheduler/mod.rs:146:13
[0][INFO] Shutting down system

Trace

netconn_accept
sys_arch_mbox_fetch
mailbox_ptr_fetch
sys_sem_timedwait
Semaphore::acquire
scheduler

Workaround

Disable kernel_function! for sys_sem_* and sys_spinlock_*

mkroening avatar Jun 22 '22 14:06 mkroening