All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-core] [BUG] oops on skincall without nucleus being loaded
@ 2006-06-22 10:35 Jan Kiszka
  2006-06-22 10:50 ` Jan Kiszka
  0 siblings, 1 reply; 9+ messages in thread
From: Jan Kiszka @ 2006-06-22 10:35 UTC (permalink / raw)
  To: xenomai-core

[-- Attachment #1: Type: text/plain, Size: 2032 bytes --]

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


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 249 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Xenomai-core] [BUG] oops on skincall without nucleus being loaded
  2006-06-22 10:35 [Xenomai-core] [BUG] oops on skincall without nucleus being loaded Jan Kiszka
@ 2006-06-22 10:50 ` Jan Kiszka
  2006-06-23 13:41   ` Gilles Chanteperdrix
  2006-06-23 14:34   ` Gilles Chanteperdrix
  0 siblings, 2 replies; 9+ messages in thread
From: Jan Kiszka @ 2006-06-22 10:50 UTC (permalink / raw)
  To: xenomai-core

[-- Attachment #1: Type: text/plain, Size: 301 bytes --]

Jan Kiszka wrote:
> 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


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 249 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Xenomai-core] [BUG] oops on skincall without nucleus being loaded
  2006-06-22 10:50 ` Jan Kiszka
@ 2006-06-23 13:41   ` Gilles Chanteperdrix
  2006-06-23 16:26     ` Philippe Gerum
  2006-06-23 14:34   ` Gilles Chanteperdrix
  1 sibling, 1 reply; 9+ messages in thread
From: Gilles Chanteperdrix @ 2006-06-23 13:41 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: xenomai-core

Jan Kiszka wrote:
 > Jan Kiszka wrote:
 > > 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.

-- 


					    Gilles Chanteperdrix.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Xenomai-core] [BUG] oops on skincall without nucleus being loaded
  2006-06-22 10:50 ` Jan Kiszka
  2006-06-23 13:41   ` Gilles Chanteperdrix
@ 2006-06-23 14:34   ` Gilles Chanteperdrix
  1 sibling, 0 replies; 9+ messages in thread
From: Gilles Chanteperdrix @ 2006-06-23 14:34 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: xenomai-core

Jan Kiszka wrote:
 > Jan Kiszka wrote:
 > > 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.

-- 


					    Gilles Chanteperdrix.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Xenomai-core] [BUG] oops on skincall without nucleus being loaded
  2006-06-23 13:41   ` Gilles Chanteperdrix
@ 2006-06-23 16:26     ` Philippe Gerum
  2006-06-23 18:01       ` Gilles Chanteperdrix
  0 siblings, 1 reply; 9+ messages in thread
From: Philippe Gerum @ 2006-06-23 16:26 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: Jan Kiszka, xenomai-core

On Fri, 2006-06-23 at 15:41 +0200, Gilles Chanteperdrix wrote:
> Jan Kiszka wrote:
>  > Jan Kiszka wrote:
>  > > 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.

I don't get it: the muxid should be invalid then(?)

>  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.

-- 
Philippe.




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Xenomai-core] [BUG] oops on skincall without nucleus being loaded
  2006-06-23 16:26     ` Philippe Gerum
@ 2006-06-23 18:01       ` Gilles Chanteperdrix
  2006-06-23 18:22         ` Gilles Chanteperdrix
  0 siblings, 1 reply; 9+ messages in thread
From: Gilles Chanteperdrix @ 2006-06-23 18:01 UTC (permalink / raw)
  To: rpm; +Cc: xenomai

Philippe Gerum wrote:
 > On Fri, 2006-06-23 at 15:41 +0200, Gilles Chanteperdrix wrote:
 > > Jan Kiszka wrote:
 > >  > Jan Kiszka wrote:
 > >  > > 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.
 > 
 > 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.

-- 


					    Gilles Chanteperdrix.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Xenomai-core] [BUG] oops on skincall without nucleus being loaded
  2006-06-23 18:01       ` Gilles Chanteperdrix
@ 2006-06-23 18:22         ` Gilles Chanteperdrix
  2006-06-27  8:06           ` Jan Kiszka
  0 siblings, 1 reply; 9+ messages in thread
From: Gilles Chanteperdrix @ 2006-06-23 18:22 UTC (permalink / raw)
  To: rpm, xenomai

Gilles Chanteperdrix wrote:
 > 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.

This is not even possible, since the invalid syscall go through
do_hisyscall_event first and get handled there.

-- 


					    Gilles Chanteperdrix.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Xenomai-core] [BUG] oops on skincall without nucleus being loaded
  2006-06-23 18:22         ` Gilles Chanteperdrix
@ 2006-06-27  8:06           ` Jan Kiszka
  2006-06-27 11:29             ` Gilles Chanteperdrix
  0 siblings, 1 reply; 9+ messages in thread
From: Jan Kiszka @ 2006-06-27  8:06 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai

[-- Attachment #1: Type: text/plain, Size: 569 bytes --]

Gilles Chanteperdrix wrote:
> Gilles Chanteperdrix wrote:
>  > 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.
> 
> This is not even possible, since the invalid syscall go through
> do_hisyscall_event first 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


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Xenomai-core] [BUG] oops on skincall without nucleus being loaded
  2006-06-27  8:06           ` Jan Kiszka
@ 2006-06-27 11:29             ` Gilles Chanteperdrix
  0 siblings, 0 replies; 9+ messages in thread
From: Gilles Chanteperdrix @ 2006-06-27 11:29 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: xenomai

Jan Kiszka wrote:
 > Gilles Chanteperdrix wrote:
 > > Gilles Chanteperdrix wrote:
 > >  > 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.
 > > 
 > > This is not even possible, since the invalid syscall go through
 > > do_hisyscall_event first 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.

-- 


					    Gilles Chanteperdrix.


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2006-06-27 11:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-22 10:35 [Xenomai-core] [BUG] oops on skincall without nucleus being loaded Jan Kiszka
2006-06-22 10:50 ` Jan Kiszka
2006-06-23 13:41   ` Gilles Chanteperdrix
2006-06-23 16:26     ` Philippe Gerum
2006-06-23 18:01       ` Gilles Chanteperdrix
2006-06-23 18:22         ` Gilles Chanteperdrix
2006-06-27  8:06           ` Jan Kiszka
2006-06-27 11:29             ` Gilles Chanteperdrix
2006-06-23 14:34   ` Gilles Chanteperdrix

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.