oops on ARM1176 SoC
Finally got hold of an RS232 interface for my ARM1176 board and have been trying to capture a fatal kernel crash log. Have compiled various kernels and pared the config down to a bare minimum - The trace for the latest crash is attached. This happens when unloading xeno-nucleus, kinda at a loss as to where to go from here, so any pointers would be much appreciated.
Regards, Paul.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bcm2835-crash.log
Type: text/x-log
Size: 7076 bytes
Desc: not available
URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20120826/4f9795c9/attachment.bin>
Quoted 7 lines · Paul
Finally got hold of an RS232 interface for my ARM1176 board and have been trying to capture a fatal kernel crash log. Have compiled various kernels and pared the config down to a bare minimum - The trace for the latest crash is attached. This happens when unloading xeno-nucleus, kinda at a loss as to where to go from here, so any pointers would be much appreciated.
It seems nobody tried xenomai compiling as a module with the "hostrt" feature, a call to rthal_catch_hostrt(NULL) is missing in __xeno_sys_exit.
Signature · 1 line
Gilles.
Quoted 7 lines · Paul
Finally got hold of an RS232 interface for my ARM1176 board and have been trying to capture a fatal kernel crash log. Have compiled various kernels and pared the config down to a bare minimum - The trace for the latest crash is attached. This happens when unloading xeno-nucleus, kinda at a loss as to where to go from here, so any pointers would be much appreciated.
Please try the following patch:
ksrc/nucleus/module.c +15 -3
@@ -92,8 +92,19 @@ static inline void init_hostrt(void) nkvdso->hostrt_data.live =0 ; rthal_catch_hostrt(&hostrt_event); } + +static inline void cleanup_hostrt (void ) +{ +rthal_catch_hostrt (NULL ); +}#else -static inline void init_hostrt (void ) { } +static inline void init_hostrt (void ) +{ +} + +static inline void cleanup_hostrt (void ) +{ +}#endif /* CONFIG_XENO_OPT_HOSTRT */ MODULE_DESCRIPTION ("Xenomai nucleus" );
@@ -235,8 +246,9 @@ int __init __xeno_sys_init(void)xnpod_umount (); - cleanup_arch: +cleanup_hostrt (); + cleanup_arch:xnarch_exit ();#endif /* __KERNEL__ */
@@ -261,7 +273,7 @@ void __exit __xeno_sys_exit(void)xntbase_umount ();xnpod_umount (); - +cleanup_hostrt ();xnarch_exit ();#ifdef __KERNEL__
Signature · 1 line
Gilles.
Quoted 38 lines · Gilles Chanteperdrix
Please try the following patch:
ksrc/nucleus/module.c +14
-2@@ -92,8 +92,19 @@ static inline void init_hostrt(void) nkvdso->hostrt_data.live = 0; rthal_catch_hostrt(&hostrt_event); } + +static inline void cleanup_hostrt (void ) +{ + rthal_catch_hostrt(NULL); +} #else -static inline void init_hostrt (void ) { } +static inline void init_hostrt (void ) +{ +} + +static inline void cleanup_hostrt (void ) +{ +} #endif /* CONFIG_XENO_OPT_HOSTRT */ MODULE_DESCRIPTION("Xenomai nucleus");@@ -235,8 +246,9 @@ int __init __xeno_sys_init(void) xnpod_umount(); - cleanup_arch: + cleanup_hostrt(); + cleanup_arch: xnarch_exit(); #endif /* __KERNEL__ */
ksrc/nucleus/module.c void __exit __xeno_sys_exit(void) · line 276
Quoted 5 lines
ksrc/nucleus/module.c +1
-1@@ -261,7 +273,7 @@ void __exit __xeno_sys_exit(void) xntbase_umount(); xnpod_umount(); - + cleanup_hostrt();
Did a quick and dirty hack just after you posted your original response, and this one function cured the bug.
ksrc/nucleus/module.c void __exit __xeno_sys_exit(void) · line 279
Quoted 3 lines
ksrc/nucleus/module.c +0
-0xnarch_exit(); #ifdef __KERNEL__
Reverted my hack and applied your patch, and xeno-nucleus has been running fine all day - The skins on the other hand haven't... Unloading any of the skins result in the kernel halting. It appears as if it is a deadlock, but I suspect it is timer related - A subject for another thread perhaps.
Regards, Paul.
Quoted 50 lines · Paul
Quoted 38 lines · Gilles Chanteperdrix
Please try the following patch:
ksrc/nucleus/module.c +14
-2@@ -92,8 +92,19 @@ static inline void init_hostrt(void) nkvdso->hostrt_data.live =0 ; rthal_catch_hostrt(&hostrt_event); } + +static inline void cleanup_hostrt (void ) +{ +rthal_catch_hostrt (NULL ); +}#else -static inline void init_hostrt (void ) { } +static inline void init_hostrt (void ) +{ +} + +static inline void cleanup_hostrt (void ) +{ +}#endif /* CONFIG_XENO_OPT_HOSTRT */ MODULE_DESCRIPTION ("Xenomai nucleus" );@@ -235,8 +246,9 @@ int __init __xeno_sys_init(void)xnpod_umount (); - cleanup_arch: +cleanup_hostrt (); + cleanup_arch:xnarch_exit ();#endif /* __KERNEL__ */ ksrc/nucleus/module.c void __exit __xeno_sys_exit(void) · line 276
Quoted 5 lines
ksrc/nucleus/module.c +1
-1@@ -261,7 +273,7 @@ void __exit __xeno_sys_exit(void)xntbase_umount ();xnpod_umount (); - +cleanup_hostrt ();Did a quick and dirty hack just after you posted your original response, and this one function cured the bug.
Quoted 2 lines
ksrc/nucleus/module.c +0
-0xnarch_exit ();
Quoted 7 lines
ksrc/nucleus/module.c void __exit __xeno_sys_exit(void) · line 279
Quoted 1 line
ksrc/nucleus/module.c +0
-0#ifdef __KERNEL__Reverted my hack and applied your patch, and xeno-nucleus has been running fine all day - The skins on the other hand haven't... Unloading any of the skins result in the kernel halting. It appears as if it is a deadlock, but I suspect it is timer related - A subject for another thread perhaps.
Mmmm... does not look too tested either. Try the following patch:
kernel/ipipe/timer.c +1 -0
@@ -317,6 +317,7 @@ void ipipe_timer_stop(unsigned cpu) evtdev->mult = timer->real_mult; evtdev->shift = timer->real_shift; evtdev->set_mode = timer->real_set_mode; + evtdev->set_next_event = timer->real_set_next_event; timer->real_mult = timer->real_shift =0 ; timer->real_set_mode =NULL ; timer->real_set_next_event =NULL ;
Signature · 1 line
Gilles.
Thanks Gilles
Quoted 10 lines · Gilles Chanteperdrix
Quoted 3 lines
Unloading any of the skins result in the kernel halting. It appears as if it is a deadlock, but I suspect it is timer related - A subject for another thread perhaps.
Mmmm... does not look too tested either. Try the following patch:
kernel/ipipe/timer.c +0
-0
kernel/ipipe/timer.c void ipipe_timer_stop(unsigned cpu) · line 323
Quoted 7 lines
kernel/ipipe/timer.c +1
-0@@ -317,6 +317,7 @@ void ipipe_timer_stop(unsigned cpu) evtdev->mult = timer->real_mult; evtdev->shift = timer->real_shift; evtdev->set_mode = timer->real_set_mode; + evtdev->set_next_event = timer->real_set_next_event; timer->real_mult = timer->real_shift = 0; timer->real_set_mode = NULL; timer->real_set_next_event = NULL;
Another bug fixed \o/
Regards, Paul.
Quoted 1 line · Paul
Name: bcm2835-crash.log
It is a raspberry pi, right? Any chance for a submission for an integration into the I-pipe patch?
Signature · 1 line
Gilles.