All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-core] Kernel panic on rmmod xeno_vxworks
@ 2006-05-10 20:27 Niklaus Giger
  2006-05-10 21:24 ` Gilles Chanteperdrix
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Niklaus Giger @ 2006-05-10 20:27 UTC (permalink / raw)
  To: xenomai-core

Hi

I compiled and started my test with a recent xenomai/trunk (revision 1068).
I booted into single user mode, did a "modprobe xeno_vxworks" (no problem) and 
then a "rmmod xeno_vxworks" and got as response on my PowerBook only
"Kernel panic: -not syncing: Aiee, killing interrupt handler".


Also when I try to run ksrc/skins/vxworks/demos/satch (after a make std)
I get the following info (using gdb):
(gdb) run
Starting 
program: /mnt/data.ng/hcu/kernel/xenomai-head/ksrc/skins/vxworks/demos/satch
[Thread debugging using libthread_db enabled]
[New Thread 805415264 (LWP 4168)]
[New Thread 805434592 (LWP 4171)]
[New Thread 805450976 (LWP 4172)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 805434592 (LWP 4171)]
0x0fe76094 in vfprintf () from /lib/tls/libc.so.6
(gdb) info stack
#0  0x0fe76094 in vfprintf () from /lib/tls/libc.so.6
#1  0x0fe7e760 in printf () from /lib/tls/libc.so.6
#2  0x10001a6c in consumer_task (a0=269287424, a1=268894208, a2=269477288, 
a3=0, a4=0, a5=0, a6=269482760, a7=805474048,
    a8=2144297840, a9=268064096) at satch.c:99
#3  0x0ffa7714 in wind_task_trampoline (cookie=0x7fcf632c) 
at /mnt/data.ng/hcu/kernel/xenomai-head/src/skins/vxworks/taskLib.c:99
#4  0x0ffd08e8 in start_thread () from /lib/tls/libpthread.so.0
#5  0x0ffd08e8 in start_thread () from /lib/tls/libpthread.so.0
Previous frame inner to this frame (corrupt stack?)

The XENOMAI-parts of my config are:
grep XENO /boot/config-2.6.14
CONFIG_XENOMAI=y
CONFIG_XENO_OPT_NUCLEUS=y
CONFIG_XENO_OPT_PERVASIVE=y
CONFIG_XENO_OPT_SECURITY_ACCESS=y
CONFIG_XENO_OPT_PIPE=y
CONFIG_XENO_OPT_PIPE_NRDEV=32
CONFIG_XENO_OPT_REGISTRY=y
CONFIG_XENO_OPT_REGISTRY_NRSLOTS=512
CONFIG_XENO_OPT_SYS_HEAPSZ=128
# CONFIG_XENO_OPT_ISHIELD is not set
CONFIG_XENO_OPT_PIPELINE_HEAD=y
CONFIG_XENO_OPT_STATS=y
# CONFIG_XENO_OPT_DEBUG is not set
CONFIG_XENO_OPT_WATCHDOG=y
CONFIG_XENO_OPT_TIMING_PERIODIC=y
CONFIG_XENO_OPT_TIMING_PERIOD=1000000
CONFIG_XENO_OPT_TIMING_TIMERLAT=0
CONFIG_XENO_OPT_TIMING_SCHEDLAT=0
# CONFIG_XENO_OPT_SCALABLE_SCHED is not set
CONFIG_XENO_OPT_TIMER_LIST=y
# CONFIG_XENO_OPT_TIMER_HEAP is not set
# CONFIG_XENO_OPT_SHIRQ_LEVEL is not set
# CONFIG_XENO_OPT_SHIRQ_EDGE is not set
CONFIG_XENO_HW_FPU=y
CONFIG_XENO_SKIN_NATIVE=y
CONFIG_XENO_OPT_NATIVE_PIPE=y
CONFIG_XENO_OPT_NATIVE_PIPE_BUFSZ=4096
CONFIG_XENO_OPT_NATIVE_REGISTRY=y
CONFIG_XENO_OPT_NATIVE_SEM=y
CONFIG_XENO_OPT_NATIVE_EVENT=y
CONFIG_XENO_OPT_NATIVE_MUTEX=y
CONFIG_XENO_OPT_NATIVE_COND=y
CONFIG_XENO_OPT_NATIVE_QUEUE=y
CONFIG_XENO_OPT_NATIVE_HEAP=y
CONFIG_XENO_OPT_NATIVE_ALARM=y
CONFIG_XENO_OPT_NATIVE_MPS=y
# CONFIG_XENO_OPT_NATIVE_INTR is not set
# CONFIG_XENO_SKIN_POSIX is not set
# CONFIG_XENO_SKIN_PSOS is not set
# CONFIG_XENO_SKIN_UITRON is not set
# CONFIG_XENO_SKIN_VRTX is not set
CONFIG_XENO_SKIN_VXWORKS=m
CONFIG_XENO_SKIN_RTDM=y
CONFIG_XENO_OPT_RTDM_FILDES=128
CONFIG_XENO_SKIN_UVM=m
# CONFIG_XENO_DRIVERS_16550A is not set
CONFIG_XENO_DRIVERS_TIMERBENCH=m

Any help would be appreciated.

Best regards

-- 
Niklaus Giger


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

* Re: [Xenomai-core] Kernel panic on rmmod xeno_vxworks
  2006-05-10 20:27 [Xenomai-core] Kernel panic on rmmod xeno_vxworks Niklaus Giger
@ 2006-05-10 21:24 ` Gilles Chanteperdrix
  2006-05-11 11:15   ` Niklaus Giger
  2006-05-11  9:28 ` Philippe Gerum
  2006-05-11 10:03 ` Philippe Gerum
  2 siblings, 1 reply; 7+ messages in thread
From: Gilles Chanteperdrix @ 2006-05-10 21:24 UTC (permalink / raw)
  To: niklaus.giger; +Cc: xenomai-core

Niklaus Giger wrote:
 > Hi
 > 
 > I compiled and started my test with a recent xenomai/trunk (revision 1068).
 > I booted into single user mode, did a "modprobe xeno_vxworks" (no problem) and 
 > then a "rmmod xeno_vxworks" and got as response on my PowerBook only
 > "Kernel panic: -not syncing: Aiee, killing interrupt handler".
 > 
 > 
 > Also when I try to run ksrc/skins/vxworks/demos/satch (after a make std)
 > I get the following info (using gdb):
 > (gdb) run
 > Starting 
 > program: /mnt/data.ng/hcu/kernel/xenomai-head/ksrc/skins/vxworks/demos/satch
 > [Thread debugging using libthread_db enabled]
 > [New Thread 805415264 (LWP 4168)]
 > [New Thread 805434592 (LWP 4171)]
 > [New Thread 805450976 (LWP 4172)]
 > 
 > Program received signal SIGSEGV, Segmentation fault.
 > [Switching to Thread 805434592 (LWP 4171)]
 > 0x0fe76094 in vfprintf () from /lib/tls/libc.so.6
 > (gdb) info stack
 > #0  0x0fe76094 in vfprintf () from /lib/tls/libc.so.6
 > #1  0x0fe7e760 in printf () from /lib/tls/libc.so.6
 > #2  0x10001a6c in consumer_task (a0=269287424, a1=268894208, a2=269477288, 
 > a3=0, a4=0, a5=0, a6=269482760, a7=805474048,
 >     a8=2144297840, a9=268064096) at satch.c:99
 > #3  0x0ffa7714 in wind_task_trampoline (cookie=0x7fcf632c) 
 > at /mnt/data.ng/hcu/kernel/xenomai-head/src/skins/vxworks/taskLib.c:99
 > #4  0x0ffd08e8 in start_thread () from /lib/tls/libpthread.so.0
 > #5  0x0ffd08e8 in start_thread () from /lib/tls/libpthread.so.0
 > Previous frame inner to this frame (corrupt stack?)

I observed such an error when the stack size is to small, I guess
vfprintf uses alloca.

-- 


					    Gilles Chanteperdrix.


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

* Re: [Xenomai-core] Kernel panic on rmmod xeno_vxworks
  2006-05-10 20:27 [Xenomai-core] Kernel panic on rmmod xeno_vxworks Niklaus Giger
  2006-05-10 21:24 ` Gilles Chanteperdrix
@ 2006-05-11  9:28 ` Philippe Gerum
  2006-05-11 10:03 ` Philippe Gerum
  2 siblings, 0 replies; 7+ messages in thread
From: Philippe Gerum @ 2006-05-11  9:28 UTC (permalink / raw)
  To: niklaus.giger; +Cc: xenomai-core

Niklaus Giger wrote:
> Hi
> 
> I compiled and started my test with a recent xenomai/trunk (revision 1068).
> I booted into single user mode, did a "modprobe xeno_vxworks" (no problem) and 
> then a "rmmod xeno_vxworks" and got as response on my PowerBook only
> "Kernel panic: -not syncing: Aiee, killing interrupt handler".
> 

Confirmed, and it seems configuration-dependent, but not arch-dependent. 
I'm on it, more later.

-- 

Philippe.


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

* Re: [Xenomai-core] Kernel panic on rmmod xeno_vxworks
  2006-05-10 20:27 [Xenomai-core] Kernel panic on rmmod xeno_vxworks Niklaus Giger
  2006-05-10 21:24 ` Gilles Chanteperdrix
  2006-05-11  9:28 ` Philippe Gerum
@ 2006-05-11 10:03 ` Philippe Gerum
  2006-05-11 11:37   ` Philippe Gerum
  2 siblings, 1 reply; 7+ messages in thread
From: Philippe Gerum @ 2006-05-11 10:03 UTC (permalink / raw)
  To: niklaus.giger; +Cc: xenomai-core

Niklaus Giger wrote:
> Hi
> 
> I compiled and started my test with a recent xenomai/trunk (revision 1068).
> I booted into single user mode, did a "modprobe xeno_vxworks" (no problem) and 
> then a "rmmod xeno_vxworks" and got as response on my PowerBook only
> "Kernel panic: -not syncing: Aiee, killing interrupt handler".
> 

It's the VxWorks tick handler that's still called after the module is 
unloaded. Oops, rainy day indeed. I will send a fix for that. Thanks.

-- 

Philippe.


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

* Re: [Xenomai-core] Kernel panic on rmmod xeno_vxworks
  2006-05-10 21:24 ` Gilles Chanteperdrix
@ 2006-05-11 11:15   ` Niklaus Giger
  2006-05-11 11:30     ` Philippe Gerum
  0 siblings, 1 reply; 7+ messages in thread
From: Niklaus Giger @ 2006-05-11 11:15 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai-core

Am Mittwoch, 10. Mai 2006 23:24 schrieb Gilles Chanteperdrix:
> Niklaus Giger wrote:
>  > Hi
>  >
>  > I compiled and started my test with a recent xenomai/trunk (revision
>  > 1068). I booted into single user mode, did a "modprobe xeno_vxworks" (no
>  > problem) and then a "rmmod xeno_vxworks" and got as response on my
>  > PowerBook only "Kernel panic: -not syncing: Aiee, killing interrupt
>  > handler".
>  >
>  >
>  > Also when I try to run ksrc/skins/vxworks/demos/satch (after a make std)
>  > I get the following info (using gdb):
>  > (gdb) run
>  > Starting
>  > program:
>  > /mnt/data.ng/hcu/kernel/xenomai-head/ksrc/skins/vxworks/demos/satch
>  > [Thread debugging using libthread_db enabled]
>  > [New Thread 805415264 (LWP 4168)]
>  > [New Thread 805434592 (LWP 4171)]
>  > [New Thread 805450976 (LWP 4172)]
>  >
>  > Program received signal SIGSEGV, Segmentation fault.
>  > [Switching to Thread 805434592 (LWP 4171)]
>  > 0x0fe76094 in vfprintf () from /lib/tls/libc.so.6
>  > (gdb) info stack
>  > #0  0x0fe76094 in vfprintf () from /lib/tls/libc.so.6
>  > #1  0x0fe7e760 in printf () from /lib/tls/libc.so.6
>  > #2  0x10001a6c in consumer_task (a0=269287424, a1=268894208,
>  > a2=269477288, a3=0, a4=0, a5=0, a6=269482760, a7=805474048,
>  >     a8=2144297840, a9=268064096) at satch.c:99
>  > #3  0x0ffa7714 in wind_task_trampoline (cookie=0x7fcf632c)
>  > at /mnt/data.ng/hcu/kernel/xenomai-head/src/skins/vxworks/taskLib.c:99
>  > #4  0x0ffd08e8 in start_thread () from /lib/tls/libpthread.so.0
>  > #5  0x0ffd08e8 in start_thread () from /lib/tls/libpthread.so.0
>  > Previous frame inner to this frame (corrupt stack?)
>
> I observed such an error when the stack size is to small, I guess
> vfprintf uses alloca.
This fixed my problem. Task crashes with 18 kB stack, but not with
20 kB. Therefore I propose 24 kB to have some margine for the future.

Please apply the following patch:
Index: ksrc/skins/vxworks/demos/satch.c
===================================================================
--- ksrc/skins/vxworks/demos/satch.c    (Revision 1068)
+++ ksrc/skins/vxworks/demos/satch.c    (Arbeitskopie)
@@ -21,10 +21,10 @@
 #include <vxworks/vxworks.h>

 #define CONSUMER_TASK_PRI    115
-#define CONSUMER_STACK_SIZE  8192
+#define CONSUMER_STACK_SIZE  24*1024

 #define PRODUCER_TASK_PRI    110
-#define PRODUCER_STACK_SIZE  8192
+#define PRODUCER_STACK_SIZE  24*1024

 #define CONSUMER_WAIT 150
 #define PRODUCER_TRIG 40

Thanks in advance.

Best regards

-- 
Niklaus Giger


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

* Re: [Xenomai-core] Kernel panic on rmmod xeno_vxworks
  2006-05-11 11:15   ` Niklaus Giger
@ 2006-05-11 11:30     ` Philippe Gerum
  0 siblings, 0 replies; 7+ messages in thread
From: Philippe Gerum @ 2006-05-11 11:30 UTC (permalink / raw)
  To: niklaus.giger; +Cc: xenomai-core

Niklaus Giger wrote:

> Please apply the following patch:
> Index: ksrc/skins/vxworks/demos/satch.c
> ===================================================================
> --- ksrc/skins/vxworks/demos/satch.c    (Revision 1068)
> +++ ksrc/skins/vxworks/demos/satch.c    (Arbeitskopie)
> @@ -21,10 +21,10 @@
>  #include <vxworks/vxworks.h>
> 
>  #define CONSUMER_TASK_PRI    115
> -#define CONSUMER_STACK_SIZE  8192
> +#define CONSUMER_STACK_SIZE  24*1024
> 
>  #define PRODUCER_TASK_PRI    110
> -#define PRODUCER_STACK_SIZE  8192
> +#define PRODUCER_STACK_SIZE  24*1024
> 
>  #define CONSUMER_WAIT 150
>  #define PRODUCER_TRIG 40
> 

Applied, thanks.

-- 

Philippe.


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

* Re: [Xenomai-core] Kernel panic on rmmod xeno_vxworks
  2006-05-11 10:03 ` Philippe Gerum
@ 2006-05-11 11:37   ` Philippe Gerum
  0 siblings, 0 replies; 7+ messages in thread
From: Philippe Gerum @ 2006-05-11 11:37 UTC (permalink / raw)
  To: Philippe Gerum; +Cc: xenomai-core

Philippe Gerum wrote:
> Niklaus Giger wrote:
> 
>> Hi
>>
>> I compiled and started my test with a recent xenomai/trunk (revision 
>> 1068).
>> I booted into single user mode, did a "modprobe xeno_vxworks" (no 
>> problem) and then a "rmmod xeno_vxworks" and got as response on my 
>> PowerBook only
>> "Kernel panic: -not syncing: Aiee, killing interrupt handler".
>>
> 
> It's the VxWorks tick handler that's still called after the module is 
> unloaded. Oops, rainy day indeed. I will send a fix for that. Thanks.

Commit #1077 fixes that. Thanks for the report.

-- 

Philippe.


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

end of thread, other threads:[~2006-05-11 11:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-10 20:27 [Xenomai-core] Kernel panic on rmmod xeno_vxworks Niklaus Giger
2006-05-10 21:24 ` Gilles Chanteperdrix
2006-05-11 11:15   ` Niklaus Giger
2006-05-11 11:30     ` Philippe Gerum
2006-05-11  9:28 ` Philippe Gerum
2006-05-11 10:03 ` Philippe Gerum
2006-05-11 11:37   ` Philippe Gerum

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.