oops on skincall without nucleus being loaded
Hi,
wondering why suddenly things crash on invoking the latency test, I realised that I turned the nucleus into a module which was not yet loaded. Here is the oops in this case:
[ 54.170151] Unable to handle kernel NULL pointer dereference at virtual address 00000054 [ 54.172015] printing eip: [ 54.172326] c013db2d [ 54.172603] *pde = 00000000 [ 54.173001] Oops: 0000 [#1] [ 54.173722] PREEMPT [ 54.174121] Modules linked in: ne2k_pci 8390 [ 54.174924] CPU: 0 [ 54.175027] EIP: 0060:[<c013db2d>] Not tainted VLI [ 54.175212] EFLAGS: 00000202 (2.6.16.16 #101) [ 54.176141] EIP is at losyscall_event+0xca/0x13c [ 54.176542] eax: 00000000 ebx: 00000001 ecx: fffffffd edx: 00000000 [ 54.177019] esi: c7b27fbc edi: 00000000 ebp: c7b27f80 esp: c7b27f6c [ 54.177571] ds: 007b es: 007b ss: 0068 [ 54.177979] Process latency (pid: 901, threadinfo=c7b26000 task=c11d4580) [ 54.178366] Stack: <0>00000000 00000000 c02a4e00 00000246 c02a4e00 c7b27fa8 c013253a c7b27fbc [ 54.180003] 00000021 c02a4d88 00000001 c02a4e00 5254444d bffc7b8c 5254444d c7b27fb4 [ 54.181557] c010a422 5254444d c7b26000 c0268750 5254444d 00000002 00000001 bffc7b8c [ 54.183017] Call Trace: [ 54.183415] [<c0102f96>] show_stack_log_lvl+0xaf/0xba [ 54.184125] [<c01030dd>] show_registers+0x13c/0x1a8 [ 54.184787] [<c01032be>] die+0x175/0x225 [ 54.190610] [<c010c771>] do_page_fault+0x3e9/0x525 [ 54.191307] [<c010a4e9>] __ipipe_handle_exception+0x61/0x90 [ 54.191996] [<c0102a54>] error_code+0x54/0x70 [ 54.192634] [<c013253a>] __ipipe_dispatch_event+0x5e/0xdc [ 54.193440] [<c010a422>] __ipipe_syscall_root+0x55/0xbb [ 54.194119] [<c0268750>] system_call+0x20/0x41 [ 54.194829] Code: 8b 00 ff 11 89 c1 83 f8 da 75 18 f6 c3 40 74 13 85
ff 74 0a b8 01 00 00 00 e8 e0 fb ff ff 83 f3 43 eb ad 89 4e 18 a1 bc d4 48 c0 <8b> 40 54 f6 80 32 02 00 00 40 74 41 b8 00 e0 ff ff 21 e0 8b 10
Could someone have a look?
Jan
Quoted 5 lines · Jan Kiszka
Hi,
wondering why suddenly things crash on invoking the latency test, I realised that I turned the nucleus into a module which was not yet loaded. Here is the oops in this case:
Correction: the nucleus was still compiled in, the native skin was missing.
Jan
Quoted 8 lines · Jan Kiszka
Quoted 5 lines · Jan Kiszka
Hi,
wondering why suddenly things crash on invoking the latency test, I realised that I turned the nucleus into a module which was not yet loaded. Here is the oops in this case:
Correction: the nucleus was still compiled in, the native skin was missing.
After a few investigation, the problem appears to be that the nucleus assume that user-space skins will issue a bind syscall before using a skin, and that the user-space RTDM library does not exit if binding fails. So, there are two ways we can fix this problem:
- either we make the nucleus paranoid and have it handle gracefully syscalls to non loaded tables;
- or we make the user-space RTDM library behave like other skins and exit if the interface is not bound.
Signature · 1 line
Gilles Chanteperdrix.
Quoted 8 lines · Gilles Chanteperdrix
Quoted 7 lines · Jan Kiszka
Quoted 5 lines · Jan Kiszka
Hi,
wondering why suddenly things crash on invoking the latency test, I realised that I turned the nucleus into a module which was not yet loaded. Here is the oops in this case:
Quoted 6 lines
Quoted 1 line
Correction: the nucleus was still compiled in, the native skin was missing.
After a few investigation, the problem appears to be that the nucleus assume that user-space skins will issue a bind syscall before using a skin, and that the user-space RTDM library does not exit if binding fails.
I don't get it: the muxid should be invalid then(?)
Quoted 5 lines
So, there are two ways we can fix this problem:
- either we make the nucleus paranoid and have it handle gracefully syscalls to non loaded tables;
- or we make the user-space RTDM library behave like other skins and exit if the interface is not bound.
Signature · 1 line
Philippe.
Quoted 9 lines · Philippe Gerum
Quoted 8 lines · Gilles Chanteperdrix
Quoted 7 lines · Jan Kiszka
Quoted 5 lines · Jan Kiszka
Hi,
wondering why suddenly things crash on invoking the latency test, I realised that I turned the nucleus into a module which was not yet loaded. Here is the oops in this case:
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
Correction: the nucleus was still compiled in, the native skin was missing.
After a few investigation, the problem appears to be that the nucleus assume that user-space skins will issue a bind syscall before using a skin, and that the user-space RTDM library does not exit if binding fails.
I don't get it: the muxid should be invalid then(?)
Yes the muxid is -1 and everything works fine, it was just a misinterpretation. When issuing syscalls with a fixed muxid whereas there is no interface corresponding to this muxid, the nucleus crashes, but it is acceptable, user-space interfaces should issue an __xn_sys_bind syscall first.
Signature · 1 line
Gilles Chanteperdrix.
Quoted 4 lines · Gilles Chanteperdrix
misinterpretation. When issuing syscalls with a fixed muxid whereas there is no interface corresponding to this muxid, the nucleus crashes, but it is acceptable, user-space interfaces should issue an
__xn_sys_bindsyscall first.
This is not even possible, since the invalid syscall go through do_hisyscall_event first and get handled there.
Signature · 1 line
Gilles Chanteperdrix.
Quoted 9 lines · Gilles Chanteperdrix
Quoted 4 lines · Gilles Chanteperdrix
misinterpretation. When issuing syscalls with a fixed muxid whereas there is no interface corresponding to this muxid, the nucleus crashes, but it is acceptable, user-space interfaces should issue an
__xn_sys_bindsyscall first.This is not even possible, since the invalid syscall go through
do_hisyscall_eventfirst and get handled there.
Do I get this correctly now: problem fixed by commit #1264? Is there still anything we should do about the RTDM lib?
Jan
Quoted 7 lines · Jan Kiszka
Quoted 6 lines · Gilles Chanteperdrix
Quoted 4 lines · Gilles Chanteperdrix
misinterpretation. When issuing syscalls with a fixed muxid whereas there is no interface corresponding to this muxid, the nucleus crashes, but it is acceptable, user-space interfaces should issue an
__xn_sys_bindsyscall first.
Quoted 6 lines
Quoted 3 lines
This is not even possible, since the invalid syscall go through
do_hisyscall_eventfirst and get handled there.Do I get this correctly now: problem fixed by commit #1264? Is there still anything we should do about the RTDM lib?
Yes, it is fixed. There is nothing more to do about the RTDM lib.
Signature · 1 line
Gilles Chanteperdrix.
Quoted 8 lines · Jan Kiszka
Quoted 5 lines · Jan Kiszka
Hi,
wondering why suddenly things crash on invoking the latency test, I realised that I turned the nucleus into a module which was not yet loaded. Here is the oops in this case:
Correction: the nucleus was still compiled in, the native skin was missing.
After a more thorough inspection, the problem was the xnshadow_p() call at the very end of do_losyscall_event. When no pod is loaded this call oopses.
Signature · 1 line
Gilles Chanteperdrix.