IRC channel logs

2022-10-12.log

back to list of logs

<damo22>interesting, -smp 1 has same thread_select page fault
<damo22>maybe i changed something that should not have been changed
<damo22>youpi: start acpi: acpi Kernel Debug trap trap, eip 0xc10565b9
<damo22>Stopped at db_load_context+0x49: movl %edi,%dr0
<damo22>db_load_context(f484b000,f484b0bc,10,c1008d68,c11d8e44)+0x49
<damo22>switch_ktss(f484b000,2000,f4843e80,c1008f75,0)+0x82
<damo22>stack_handoff(f484c000,f482fa88,0,c10318e8,f4843ec8)+0x159
<damo22>..
<damo22>is the debugger itself getting in the waY?
<damo22>im getting a deadlock near start of rumpdisk process but cpus are all idle and no interrupts are happening
<damo22>maybe CPU_NUMBER turned off interrupts and nothing enabled them
<damo22>youpi: how do i protect CPU_NUMBER from being interrupted?
<youpi>damo22: cli
<youpi>but that should already be the case, normally
<youpi>as in context switching code etc. most probably already run at high spl
<youpi>perhaps add in CPU_NUMBER some code that checks the interrupt flag in eflags, and ud2 if it's wrong, so you can catch what codepath wouldn't already have interrupts disabled
<youpi>that being said, why would interrupts be a problem?
<damo22>when i add "cli" at the start of CPU_NUMBER, the machine almost boots but gets stuck waiting for an interrupt
<damo22>all cpus are idle sitting there doing nothing
<damo22>and timer interrupts are not happening
<youpi>did you add sti?
<damo22>no
<youpi>actually better: save eflags values, and restore it
<youpi>then don't be surprised that interrupts are disabled :)
<youpi>if you disable them with cli but don't enable them back with sti
<damo22>ok
<youpi>but you need to support nesting
<youpi>thus save flags and restore them
<youpi>it'd be really useful that you read about operating systems details
<damo22>ok
<youpi>such as "The Linux kernel"
<youpi>(bovet & cesati)
<youpi>such kind of tricks are well explained there
<damo22>i understand but dont know how to do it in asm
<damo22>i will grep for it
<youpi>grep for pushf
<damo22>pushfl ; cli; DO STUFF; popfl ?
<youpi>that's the idea yes
<damo22>its crashing at db_load_context
<damo22>in switch_ktss
<damo22>trap trap
<damo22>it booted but slowly to root shell
<civodul>howdy!
<civodul>does "watch/T" work as expected in kdb?
<civodul>i'm wondering if it's really watching
<Pellescours>almost boot with rump (without-linux-group) but trap just after boot process finished (around DHCP step)
<Pellescours>but with smp but 1 cpu, no trap, I will investigate
<Pellescours>ah it just trapped but after (at the time to getting me login console)