* [Xenomai-core] Fwd: Re: rt_task_delete doesn't work
@ 2011-06-14 11:59 Roberto Bielli
2011-06-14 16:27 ` Cagnulein
2011-06-15 11:25 ` Gilles Chanteperdrix
0 siblings, 2 replies; 4+ messages in thread
From: Roberto Bielli @ 2011-06-14 11:59 UTC (permalink / raw)
To: xenomai
Here is the example and the command.
RT_TASK pippo;
RT_TASK pluto;
void test1()
{
int err;
err = rt_task_delete(&pippo );
if( err != 0 )
printf("error task delete\n");
}
int main (int argc, char *argv[])
{
// Porta di comunicazione
//int s;
mlockall(MCL_CURRENT|MCL_FUTURE);
// gestione signal handler
//struct sigaction sa;
//sa.sa_sigaction = (void *)sigHandler;
//sigemptyset (&sa.sa_mask);
//sa.sa_flags = SA_SIGINFO;
//sigaction(SIGTERM,&sa, NULL);
//sigaction(SIGINT,&sa, NULL);
//sigaction(SIGPIPE,&sa, NULL);
//sigaction(SIGFPE,&sa, NULL);
//sigaction(SIGSEGV,&sa, NULL);
char * namePippo = "pippo";
char * namePluto = "pluto";
int err;
err = rt_task_create(&pippo, namePippo, 0x2000, 20, T_FPU );
if( err != 0 )
printf("error task create %s\n", namePippo );
err = rt_task_create(&pluto, namePluto, 0x2000, 20, T_FPU );
if( err != 0 )
printf("error task create %s\n", namePluto );
err = rt_task_start(&pluto, (void *)test1, NULL );
if( err != 0 )
printf("error task start %s\n", namePluto );
}
--COMMAND--
# gdb --args ./apgs -D
GNU gdb (GDB) 6.8.50.20080821-cvs
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-mv5sft-linux-gnueabi".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
(gdb) r
`/flash/apgs' has disappeared; keeping its symbols.
Starting program: /flash/apgs -D
[Thread debugging using libthread_db enabled]
[New Thread 0x2acf7490 (LWP 537)]
[New Thread 0x2acfc490 (LWP 538)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x2acfc490 (LWP 538)]
0x2aab9d74 in _dl_catch_error () from /lib/ld-linux.so.3
(gdb)
Il 10/06/2011 19:32, Gilles Chanteperdrix ha scritto:
> On 06/10/2011 06:51 PM, Roberto Bielli wrote:
>> The segmentation fault was not on this code line.
>> i upgraded the version to 2.5.6 but the error is the same.
>>
>> The fault is when i try to delete a realtime task from another realtime
>> task.
>>
>> It's possible to do that ?
> Please post a self-contained testcase. A self-contained test case is
> worth a thousand words.
>
-----
Nessun virus nel messaggio.
Controllato da AVG - www.avg.com
Versione: 10.0.1382 / Database dei virus: 1513/3699 - Data di rilascio: 12/06/2011
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Xenomai-core] Fwd: Re: rt_task_delete doesn't work
2011-06-14 11:59 [Xenomai-core] Fwd: Re: rt_task_delete doesn't work Roberto Bielli
@ 2011-06-14 16:27 ` Cagnulein
2011-06-15 10:19 ` Roberto Bielli
2011-06-15 11:25 ` Gilles Chanteperdrix
1 sibling, 1 reply; 4+ messages in thread
From: Cagnulein @ 2011-06-14 16:27 UTC (permalink / raw)
To: Roberto Bielli; +Cc: xenomai
> err = rt_task_create(&pluto, namePluto, 0x2000, 20, T_FPU );
> if( err != 0 )
> printf("error task create %s\n", namePluto );
>
> err = rt_task_start(&pluto, (void *)test1, NULL );
You've created 2 tasks with the same RT_TASK variable. Is it volunteer?
Roberto Viola
>
>
> Here is the example and the command.
>
> RT_TASK pippo;
> RT_TASK pluto;
>
> void test1()
> {
> int err;
>
> err = rt_task_delete(&pippo );
> if( err != 0 )
> printf("error task delete\n");
>
> }
>
> int main (int argc, char *argv[])
> {
> // Porta di comunicazione
> //int s;
>
> mlockall(MCL_CURRENT|MCL_FUTURE);
>
> // gestione signal handler
> //struct sigaction sa;
> //sa.sa_sigaction = (void *)sigHandler;
> //sigemptyset (&sa.sa_mask);
> //sa.sa_flags = SA_SIGINFO;
>
> //sigaction(SIGTERM,&sa, NULL);
> //sigaction(SIGINT,&sa, NULL);
> //sigaction(SIGPIPE,&sa, NULL);
> //sigaction(SIGFPE,&sa, NULL);
> //sigaction(SIGSEGV,&sa, NULL);
>
>
> char * namePippo = "pippo";
> char * namePluto = "pluto";
> int err;
> err = rt_task_create(&pippo, namePippo, 0x2000, 20, T_FPU );
> if( err != 0 )
> printf("error task create %s\n", namePippo );
> err = rt_task_create(&pluto, namePluto, 0x2000, 20, T_FPU );
> if( err != 0 )
> printf("error task create %s\n", namePluto );
>
> err = rt_task_start(&pluto, (void *)test1, NULL );
> if( err != 0 )
> printf("error task start %s\n", namePluto );
>
> }
>
> --COMMAND--
>
> # gdb --args ./apgs -D
> GNU gdb (GDB) 6.8.50.20080821-cvs
> Copyright (C) 2008 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later
> <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law. Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "arm-mv5sft-linux-gnueabi".
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/gdb/bugs/>...
> (gdb) r
> `/flash/apgs' has disappeared; keeping its symbols.
> Starting program: /flash/apgs -D
> [Thread debugging using libthread_db enabled]
> [New Thread 0x2acf7490 (LWP 537)]
> [New Thread 0x2acfc490 (LWP 538)]
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 0x2acfc490 (LWP 538)]
> 0x2aab9d74 in _dl_catch_error () from /lib/ld-linux.so.3
> (gdb)
>
>
> Il 10/06/2011 19:32, Gilles Chanteperdrix ha scritto:
>> On 06/10/2011 06:51 PM, Roberto Bielli wrote:
>>> The segmentation fault was not on this code line.
>>> i upgraded the version to 2.5.6 but the error is the same.
>>>
>>> The fault is when i try to delete a realtime task from another
>>> realtime
>>> task.
>>>
>>> It's possible to do that ?
>> Please post a self-contained testcase. A self-contained test case is
>> worth a thousand words.
>>
>
>
>
> -----
> Nessun virus nel messaggio.
> Controllato da AVG - www.avg.com
> Versione: 10.0.1382 / Database dei virus: 1513/3699 - Data di rilascio:
> 12/06/2011
>
>
> _______________________________________________
> Xenomai-core mailing list
> Xenomai-core@domain.hid
> https://mail.gna.org/listinfo/xenomai-core
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Xenomai-core] Fwd: Re: rt_task_delete doesn't work
2011-06-14 16:27 ` Cagnulein
@ 2011-06-15 10:19 ` Roberto Bielli
0 siblings, 0 replies; 4+ messages in thread
From: Roberto Bielli @ 2011-06-15 10:19 UTC (permalink / raw)
To: cagnulein; +Cc: xenomai
the tasks has not the same rt_task. One it's a create, one is a start.
Il 14/06/2011 18:27, Cagnulein ha scritto:
>> err = rt_task_create(&pluto, namePluto, 0x2000, 20, T_FPU );
>> if( err != 0 )
>> printf("error task create %s\n", namePluto );
>>
>> err = rt_task_start(&pluto, (void *)test1, NULL );
> You've created 2 tasks with the same RT_TASK variable. Is it volunteer?
> Roberto Viola
>
>>
>> Here is the example and the command.
>>
>> RT_TASK pippo;
>> RT_TASK pluto;
>>
>> void test1()
>> {
>> int err;
>>
>> err = rt_task_delete(&pippo );
>> if( err != 0 )
>> printf("error task delete\n");
>>
>> }
>>
>> int main (int argc, char *argv[])
>> {
>> // Porta di comunicazione
>> //int s;
>>
>> mlockall(MCL_CURRENT|MCL_FUTURE);
>>
>> // gestione signal handler
>> //struct sigaction sa;
>> //sa.sa_sigaction = (void *)sigHandler;
>> //sigemptyset (&sa.sa_mask);
>> //sa.sa_flags = SA_SIGINFO;
>>
>> //sigaction(SIGTERM,&sa, NULL);
>> //sigaction(SIGINT,&sa, NULL);
>> //sigaction(SIGPIPE,&sa, NULL);
>> //sigaction(SIGFPE,&sa, NULL);
>> //sigaction(SIGSEGV,&sa, NULL);
>>
>>
>> char * namePippo = "pippo";
>> char * namePluto = "pluto";
>> int err;
>> err = rt_task_create(&pippo, namePippo, 0x2000, 20, T_FPU );
>> if( err != 0 )
>> printf("error task create %s\n", namePippo );
>> err = rt_task_create(&pluto, namePluto, 0x2000, 20, T_FPU );
>> if( err != 0 )
>> printf("error task create %s\n", namePluto );
>>
>> err = rt_task_start(&pluto, (void *)test1, NULL );
>> if( err != 0 )
>> printf("error task start %s\n", namePluto );
>>
>> }
>>
>> --COMMAND--
>>
>> # gdb --args ./apgs -D
>> GNU gdb (GDB) 6.8.50.20080821-cvs
>> Copyright (C) 2008 Free Software Foundation, Inc.
>> License GPLv3+: GNU GPL version 3 or later
>> <http://gnu.org/licenses/gpl.html>
>> This is free software: you are free to change and redistribute it.
>> There is NO WARRANTY, to the extent permitted by law. Type "show copying"
>> and "show warranty" for details.
>> This GDB was configured as "arm-mv5sft-linux-gnueabi".
>> For bug reporting instructions, please see:
>> <http://www.gnu.org/software/gdb/bugs/>...
>> (gdb) r
>> `/flash/apgs' has disappeared; keeping its symbols.
>> Starting program: /flash/apgs -D
>> [Thread debugging using libthread_db enabled]
>> [New Thread 0x2acf7490 (LWP 537)]
>> [New Thread 0x2acfc490 (LWP 538)]
>>
>> Program received signal SIGSEGV, Segmentation fault.
>> [Switching to Thread 0x2acfc490 (LWP 538)]
>> 0x2aab9d74 in _dl_catch_error () from /lib/ld-linux.so.3
>> (gdb)
>>
>>
>> Il 10/06/2011 19:32, Gilles Chanteperdrix ha scritto:
>>> On 06/10/2011 06:51 PM, Roberto Bielli wrote:
>>>> The segmentation fault was not on this code line.
>>>> i upgraded the version to 2.5.6 but the error is the same.
>>>>
>>>> The fault is when i try to delete a realtime task from another
>>>> realtime
>>>> task.
>>>>
>>>> It's possible to do that ?
>>> Please post a self-contained testcase. A self-contained test case is
>>> worth a thousand words.
>>>
>>
>>
>> -----
>> Nessun virus nel messaggio.
>> Controllato da AVG - www.avg.com
>> Versione: 10.0.1382 / Database dei virus: 1513/3699 - Data di rilascio:
>> 12/06/2011
>>
>>
>> _______________________________________________
>> Xenomai-core mailing list
>> Xenomai-core@domain.hid
>> https://mail.gna.org/listinfo/xenomai-core
>>
>
>
> -----
> Nessun virus nel messaggio.
> Controllato da AVG - www.avg.com
> Versione: 10.0.1382 / Database dei virus: 1513/3703 - Data di rilascio: 14/06/2011
--
+------------------------------------------------------------------------------------------------+
Roberto Bielli
Sviluppo Software
Axel S.r.l.
Via Del Cannino, 3
21020 Crosio Della Valle
Varese - Italy
Telefono: +39 0332 949600
Fax: +39 0332 969315
E-mail: roberto.bielli@domain.hid
Web Site: www.axelsw.it
+------------------------------------------------------------------------------------------------+
Si precisa che le informazioni contenute in questo messaggio sono riservate e ad uso esclusivo del destinatario.
Qualora il messaggio in parola Le fosse pervenuto per errore, La preghiamo di eliminarlo senza copiarlo e di non inoltrarlo a terzi,
dandocene gentilmente comunicazione. Grazie.
Informativa sul trattamento dei dati personali (D. Lgs. 196/2003).
I dati utilizzati per la spedizione del presente messaggio sono utilizzati da Axel S.r.l., titolare del trattamento,
per l'invio delle comunicazioni dei diversi settori aziendali, non essendo autorizzata la divulgazione a terzi.
Potrete rivolgere alla seguente mail richieste di verifica, rettifica o cancellazione dei Vostri dati: info@domain.hid
This e-mail and any attachments is confidential and may contain privileged information
intended for the addressee(s) only. Dissemination, copying, printing or use by anybody
else is unauthorised. If you are not the intended recipient,
please delete this message and any attachments and advise the sender
by return e-mail.Thank you.
+------------------------------------------------------------------------------------------------+
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Xenomai-core] Fwd: Re: rt_task_delete doesn't work
2011-06-14 11:59 [Xenomai-core] Fwd: Re: rt_task_delete doesn't work Roberto Bielli
2011-06-14 16:27 ` Cagnulein
@ 2011-06-15 11:25 ` Gilles Chanteperdrix
1 sibling, 0 replies; 4+ messages in thread
From: Gilles Chanteperdrix @ 2011-06-15 11:25 UTC (permalink / raw)
To: Roberto Bielli; +Cc: xenomai
On 06/14/2011 01:59 PM, Roberto Bielli wrote:
>
>
> Here is the example and the command.
>
> RT_TASK pippo;
> RT_TASK pluto;
>
> void test1()
> {
> int err;
>
> err = rt_task_delete(&pippo );
> if( err != 0 )
> printf("error task delete\n");
>
> }
>
> int main (int argc, char *argv[])
> {
> // Porta di comunicazione
> //int s;
>
> mlockall(MCL_CURRENT|MCL_FUTURE);
>
> // gestione signal handler
> //struct sigaction sa;
> //sa.sa_sigaction = (void *)sigHandler;
> //sigemptyset (&sa.sa_mask);
> //sa.sa_flags = SA_SIGINFO;
>
> //sigaction(SIGTERM,&sa, NULL);
> //sigaction(SIGINT,&sa, NULL);
> //sigaction(SIGPIPE,&sa, NULL);
> //sigaction(SIGFPE,&sa, NULL);
> //sigaction(SIGSEGV,&sa, NULL);
>
>
> char * namePippo = "pippo";
> char * namePluto = "pluto";
> int err;
> err = rt_task_create(&pippo, namePippo, 0x2000, 20, T_FPU );
> if( err != 0 )
> printf("error task create %s\n", namePippo );
> err = rt_task_create(&pluto, namePluto, 0x2000, 20, T_FPU );
> if( err != 0 )
> printf("error task create %s\n", namePluto );
>
> err = rt_task_start(&pluto, (void *)test1, NULL );
> if( err != 0 )
> printf("error task start %s\n", namePluto );
>
> }
>
> --COMMAND--
>
> # gdb --args ./apgs -D
> GNU gdb (GDB) 6.8.50.20080821-cvs
> Copyright (C) 2008 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later
> <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law. Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "arm-mv5sft-linux-gnueabi".
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/gdb/bugs/>...
> (gdb) r
> `/flash/apgs' has disappeared; keeping its symbols.
> Starting program: /flash/apgs -D
> [Thread debugging using libthread_db enabled]
> [New Thread 0x2acf7490 (LWP 537)]
> [New Thread 0x2acfc490 (LWP 538)]
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 0x2acfc490 (LWP 538)]
> 0x2aab9d74 in _dl_catch_error () from /lib/ld-linux.so.3
> (gdb)
The segfault is due to a stack overflow. The stack sizes you pass are
too small.
Note that if you are using Xenomai on an ARMv5, if you choose to enable
FCSE (which is really recommended for latencies anyway), the
configuration option CONFIG_ARM_FCSE_MESSAGES will tell you when you
likely had a stack overflow.
Here is the traces I got when running the example you sent:
[00d22f9c] *pgd=23a50031, *pte=23d6e04f, *ppte=23d6e00e
Pid: 908, comm: pluto
CPU: 0 Not tainted (2.6.37.6 #2)
PC is at 0x89d7a4
LR is at 0x8b5000
pc : [<0089d7a4>] lr : [<008b5000>] psr: 60000010
sp : 00d22f90 ip : 00000048 fp : 00d231b4
r10: 00a525ac r9 : 00000000 r8 : 008c8ff8
r7 : 80000001 r6 : 00000048 r5 : 008b5000 r4 : 00000000
r3 : 008a2384 r2 : 00d2318f r1 : 00d23184 r0 : 00d23188
Flags: nZCv IRQs on FIQs on Mode USER_32 ISA ARM Segment user
Control: 0005317f Table: 23a68000 DAC: 00000015
mappings:
0x00008000-0x00009000 r-xp 0x00000000 /usr/bin/test_task_delete
0x00010000-0x00011000 rwxp 0x00000000 /usr/bin/test_task_delete
0x00011000-0x00032000 rwxp 0x00011000 [heap]
0x0081e000-0x0081f000 rwxp 0x0081e000
0x00830000-0x00839000 r-xp 0x00000000 /usr/lib/libnative.so.3.0.0
0x00839000-0x00840000 ---p 0x00009000 /usr/lib/libnative.so.3.0.0
0x00840000-0x00841000 rwxp 0x00008000 /usr/lib/libnative.so.3.0.0
0x0086e000-0x0086f000 rwxp 0x0086e000
0x0088f000-0x008ad000 r-xp 0x00000000 /lib/ld-linux.so.3 <- PC
0x008b4000-0x008b5000 r-xp 0x0001d000 /lib/ld-linux.so.3
0x008b5000-0x008b6000 rwxp 0x0001e000 /lib/ld-linux.so.3
0x008b6000-0x008cb000 r-xp 0x00000000 /lib/libpthread.so.0
0x008cb000-0x008d2000 ---p 0x00015000 /lib/libpthread.so.0
0x008d2000-0x008d3000 r-xp 0x00014000 /lib/libpthread.so.0
0x008d3000-0x008d4000 rwxp 0x00015000 /lib/libpthread.so.0
0x008d4000-0x008d6000 rwxp 0x008d4000
0x008d6000-0x008e1000 r-xp 0x00000000 /lib/libgcc_s.so.1
0x008e1000-0x008e9000 ---p 0x0000b000 /lib/libgcc_s.so.1
0x008e9000-0x008ea000 rwxp 0x0000b000 /lib/libgcc_s.so.1
0x008ea000-0x008eb000 rwxp 0x008ea000
0x0092f000-0x00933000 r-xp 0x00000000 /usr/lib/libxenomai.so.0.0.0
0x00933000-0x0093a000 ---p 0x00004000 /usr/lib/libxenomai.so.0.0.0
0x0093a000-0x0093b000 rwxp 0x00003000 /usr/lib/libxenomai.so.0.0.0
0x0093b000-0x00a79000 r-xp 0x00000000 /lib/libc.so.6
0x00a79000-0x00a80000 ---p 0x0013e000 /lib/libc.so.6
0x00a80000-0x00a82000 r-xp 0x0013d000 /lib/libc.so.6
0x00a82000-0x00a83000 rwxp 0x0013f000 /lib/libc.so.6
0x00a83000-0x00a86000 rwxp 0x00a83000
0x00a86000-0x00a87000 r-xs 0xc480c000 /dev/rtheap
0x00af4000-0x00af5000 r-xs 0xfff7c000 /dev/mem
0x00bc1000-0x00bc4000 rwxs 0x00000000 /dev/rtheap
0x00c6b000-0x00c6e000 rwxs 0x00000000 /dev/rtheap
0x00c7d000-0x00c7e000 ---p 0x00c7d000
0x00c7e000-0x00c82000 rwxp 0x00c7e000
0x00d22000-0x00d23000 ---p 0x00d22000 <- SP, fault
0x00d23000-0x00d27000 rwxp 0x00d23000
0x01d8a000-0x01dac000 rw-p 0x01fde000 [stack]
0xffff0000-0xffff1000 r-xp 0xffff0000 [vectors]
FCSE: process 908(pluto) probably overflowed stack at 0x0089d7a4.
--
Gilles.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-06-15 11:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-14 11:59 [Xenomai-core] Fwd: Re: rt_task_delete doesn't work Roberto Bielli
2011-06-14 16:27 ` Cagnulein
2011-06-15 10:19 ` Roberto Bielli
2011-06-15 11:25 ` 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.