vvaltchev/tilck

kfree panic

vvaltchev opened this issue · 1 comments

Steps to reproduce:

  1. in tasklet_runner_kthread() use kernel_yield() instead of the kcond_wait()
  2. enter quickly many commands. It likely a race condition.

************************ KERNEL PANIC ************************
[kfree] Heap not found for block: 0x00670000

Current process: 91 [USER]
Interrupts: [ 128 ]
eflags: 0x00000002 [ ], IOPL: 0
ss: 0x00000010, cs: 0xc7e50008, ds: 0xc7e50010, esp: 0xc7e58e08
eip: 0xc0105bfd, eax: 0xc0105bfd, ecx: 0x00000000, edx: 0xc7e10a78
ebx: 0x00000000, ebp: 0xc7e58e24, esi: 0x080482ad, edi: 0xbfffff24
Stacktrace (8 frames):
[0xc010143a] dump_stacktrace + 0x30
[0xc0105d13] panic + 0x143
[0xc01081cf] kfree2 + 0x200
[0xc01067d0] dfree_strarray + 0x2f
[0xc010a14b] sys_execve + 0x23e
[0xc010ae77] handle_syscall + 0xdb
[0xc0106db8] generic_interrupt_handler + 0x2ae
[0xc01010ce] asm_int_handler + 0x1b

Fixed with commit 534ee06.