* [Xenomai-help] 2.5.3++ on Blackfin: Irritating warning
@ 2010-12-21 9:03 Kolja Waschk
2010-12-21 9:24 ` Philippe Gerum
0 siblings, 1 reply; 2+ messages in thread
From: Kolja Waschk @ 2010-12-21 9:03 UTC (permalink / raw)
To: Xenomai GNA
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1445 bytes --]
Hi,
I'm in the process of upgrading my Blackfin uclinux dist base from 2009R1.1 to 2010R1. This also includes a kernel and Xenomai upgrade.
The kernel is now 2.6.34 with I-pipe 1.14.02. With Xenomai 2.5.3, my application told me "Xenomai: User-space support anterior to 2.5.2 detected" on startup. I looked into newer Xenomai and found that there might have been related code changes, so I tried 2.5.5.2 (and also upgraded to I-pipe 1.15-01, but that doesn't seem to make a difference).
Now with 2.5.5.2, the warning when starting the application is gone, but I still get one when killing the application using SIGINT for the first time. The attached small example allows me to reliably reproduce the problem (please inform me if attachment didn't get through, it's only 30 lines).
When starting it after system reboot and then killing it with Ctrl-C after a few seconds, the warning is printed:
/ # /tmp/try
press ctrl-c to stop
press ctrl-c to stop
press ctrl-c to stop
^CXenomai: User-space support anterior to 2.5.2 detected, may corrupt memory upon
thread termination. Upgrade is recommended
/ #
The warning doesn't appear when starting and killing "try" a the second time.
I also experience some other problems with debugging, console output duplication and (probably) memory fragmentation, maybe they're related but I have not been able to reproduce them with a small example yet.
Thanks in advance for any hints in advance!
Kolja
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: TEXT/x-csrc; name=try.c, Size: 814 bytes --]
/* Compile with gcc-4.3.5 (Blackfin toolchain 2010R1-RC4)
bfin-linux-uclibc-gcc \
-I/opt/uClinux/blackfin-linux-dist/staging/usr/include \
-g -D_GNU_SOURCE -D_REENTRANT -D__XENO__ -o try.gdb try.c \
-L/opt/uClinux/blackfin-linux-dist/staging/usr/lib -lxenomai -lnative -lpthread -lrt
*/
#include <stdio.h>
#include <unistd.h>
#include <signal.h>
#include <sys/mman.h>
#include <native/task.h>
static int quit;
void sighandler(int sig)
{
quit++;
}
int main ()
{
quit = 0;
signal(SIGINT, sighandler);
int r;
RT_TASK maintask;
mlockall(MCL_CURRENT|MCL_FUTURE);
r = rt_task_shadow(&maintask, "maintask", 3, 0);
while (quit==0)
{
printf("press ctrl-c to stop\n");
sleep(1);
}
return r;
}
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [Xenomai-help] 2.5.3++ on Blackfin: Irritating warning
2010-12-21 9:03 [Xenomai-help] 2.5.3++ on Blackfin: Irritating warning Kolja Waschk
@ 2010-12-21 9:24 ` Philippe Gerum
0 siblings, 0 replies; 2+ messages in thread
From: Philippe Gerum @ 2010-12-21 9:24 UTC (permalink / raw)
To: xenoka09; +Cc: Xenomai GNA
On Tue, 2010-12-21 at 10:03 +0100, Kolja Waschk wrote:
> Hi,
>
> I'm in the process of upgrading my Blackfin uclinux dist base from 2009R1.1 to 2010R1. This also includes a kernel and Xenomai upgrade.
>
> The kernel is now 2.6.34 with I-pipe 1.14.02. With Xenomai 2.5.3, my application told me "Xenomai: User-space support anterior to 2.5.2 detected" on startup. I looked into newer Xenomai and found that there might have been related code changes, so I tried 2.5.5.2 (and also upgraded to I-pipe 1.15-01, but that doesn't seem to make a difference).
>
> Now with 2.5.5.2, the warning when starting the application is gone, but I still get one when killing the application using SIGINT for the first time. The attached small example allows me to reliably reproduce the problem (please inform me if attachment didn't get through, it's only 30 lines).
>
> When starting it after system reboot and then killing it with Ctrl-C after a few seconds, the warning is printed:
>
> / # /tmp/try
> press ctrl-c to stop
> press ctrl-c to stop
> press ctrl-c to stop
> ^CXenomai: User-space support anterior to 2.5.2 detected, may corrupt memory upon
> thread termination. Upgrade is recommended
> / #
>
> The warning doesn't appear when starting and killing "try" a the second time.
Mmf, commit 90b3e7cf6 does not do what it says it does. It should read:
diff --git a/ksrc/nucleus/shadow.c b/ksrc/nucleus/shadow.c
index 5ac182b..449a9a4 100644
--- a/ksrc/nucleus/shadow.c
+++ b/ksrc/nucleus/shadow.c
@@ -2214,7 +2214,7 @@ static void handle_shadow_exit(void)
*/
if (thread->u_mode && !warned) {
warned = 1;
-#ifndef CONFIG_MMU
+#ifdef CONFIG_MMU
printk(KERN_WARNING
"Xenomai: User-space support anterior to 2.5.2"
" detected, may corrupt memory upon\n"
>
> I also experience some other problems with debugging, console output duplication and (probably) memory fragmentation, maybe they're related but I have not been able to reproduce them with a small example yet.
>
> Thanks in advance for any hints in advance!
> Kolja
> _______________________________________________ Xenomai-help mailing list Xenomai-help@domain.hid https://mail.gna.org/listinfo/xenomai-help
--
Philippe.
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-12-21 9:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-21 9:03 [Xenomai-help] 2.5.3++ on Blackfin: Irritating warning Kolja Waschk
2010-12-21 9:24 ` 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.