Hi maxv@n.o, "intrctl affinity" in NetBSD-current causes panic. Here is the backtrace ==================== panic: kernel diagnostic assertion "mutex_owned(&cpu_lock) || !mp_online" failed: file "/disk4/home/k-nakahara/repos/netbsd-src/sys/arch/x86/x86/idt.c", line 122 fatal breakpoint trap in supervisor mode trap type 1 code 0 rip 0xffffffff802249e5 cs 0x8 rflags 0x246 cr2 0x72ca08412d98 ilevel 0 rsp 0xffffe4010e898dc0 curlwp 0xffffe4010e88a0c0 pid 0.22 lowest kstack 0xffffe4010e8952c0 Stopped in pid 0.22 (system) at netbsd:breakpoint+0x5: leave db{1}> bt breakpoint() at netbsd:breakpoint+0x5 vpanic() at netbsd:vpanic+0x140 ch_voltag_convert_in() at netbsd:ch_voltag_convert_in idt_vec_set() at netbsd:idt_vec_set+0x82 intr_activate_xcall() at netbsd:intr_activate_xcall+0x8a xc_thread() at netbsd:xc_thread+0xd4 ====================
ozaki-r@n.o bisects and finds the following commit causes this panic. On 2017/08/01 3:54, Maxime Villard wrote: > Module Name: src > Committed By: maxv > Date: Mon Jul 31 18:54:40 UTC 2017 > > Modified Files: > src/sys/arch/x86/x86: intr.c > > Log Message: > Use idt_vec_set instead. > > > To generate a diff of this commit: > cvs rdiff -u -r1.101 -r1.102 src/sys/arch/x86/x86/intr.c > > Please note that diffs are not public domain; they are subject to the > copyright notices on the relevant files. I think setgate() must be called with kpreempt_disable() and x86_disable_intr(). However, I don't know why setgate() must be called with mutex_onwed(&cpu_lock). Could you tell me why mutex_onwed(&cpu_lock) is required? BTW, do you have any idea to fix this panic? Thanks, -- ////////////////////////////////////////////////////////////////////// Internet Initiative Japan Inc. Device Engineering Section, IoT Platform Development Department, Network Division, Technology Unit Kengo NAKAHARA <k-nakah...@iij.ad.jp>