Hi all,

My application hangs when receive the signal SIGINT(CTRL-C) or SIGTERM. I've 
activated the
debug flags related to xenomai plus ipipe, and the console shows the
following:

<3>Xenomai: fatal: inserting element twice, holder=c3ce0a18, qslot=bf002dfc at 
include/xenomai/nucleus/queue.h:321
<4> CPU  PID    PRI      TIMEOUT  STAT      NAME
<4>   0  0       -1      0        00500088  ROOT
<4>   0  0        1      5140450  00000084  rtdm_task
<4>   0  1676     1      95406250 00300186  test_rtdm-1676
<4>>  0  1694     1      0        00300180  test_rtdm-1694
<4>Master time base: clock=428928724
<4>[<c002a828>] (show_stack+0x0/0x48) from [<c00750a0>] 
(xnsynch_sleep_on+0xd7c/0xf1c)
<4>[<c0074324>] (xnsynch_sleep_on+0x0/0xf1c) from [<c00afb14>] 
(rtdm_mutex_timedlock+0x124/0x184)
<4>[<c00af9f0>] (rtdm_mutex_timedlock+0x0/0x184) from [<c00afb90>] 
(rtdm_mutex_lock+0x1c/0x20)
<4>[<c00afb74>] (rtdm_mutex_lock+0x0/0x20) from [<bf0020d0>] 
(rtdm_test_ioctl+0x20/0x164 [rtdm_drv_01])
<4>[<bf0020b0>] (rtdm_test_ioctl+0x0/0x164 [rtdm_drv_01]) from [<c00ae260>] 
(__rt_dev_ioctl+0x60/0x178)
<4> r7:c3ce1010 r6:c3c1e660 r5:fffffff7 r4:00000000
<4>[<c00ae200>] (__rt_dev_ioctl+0x0/0x178) from [<c00b00ec>] 
(sys_rtdm_ioctl+0x2c/0x30)
<4> r3:00000000 r2:0000f301
<4> r8:00000000 r7:c3ce0620 r6:00000003 r5:c3e6ffb0 r4:00000050
<4>[<c00b00c0>] (sys_rtdm_ioctl+0x0/0x30) from [<c007c29c>] 
(hisyscall_event+0x14c/0x278)
<4>[<c007c150>] (hisyscall_event+0x0/0x278) from [<c0066d7c>] 
(__ipipe_dispatch_event+0xd0/0x1c8)
<4>[<c0066cac>] (__ipipe_dispatch_event+0x0/0x1c8) from [<c002b6a0>] 
(__ipipe_syscall_root+0x80/0x100)
<4>[<c002b620>] (__ipipe_syscall_root+0x0/0x100) from [<c0026c68>]
(vector_swi+0x68/0xa8)

Environment:
        AT9260 based board.
        xenomai-2.4.5
        kernel 2.6.25
        User app + rtdm driver.

I've attached an example which reproduces the problem.

To reproduce:
        # insmod rtdm_drv_01.ko
        # ./test_rtdm 10000000 &
        # ./test_rtdm 10000000 &

and now kill one of them. The crash doesn't occurs everytime but is easy
to reproduce it after several tries.

The appliccation just send a lot of dummy ioctl to the rtdm driver. The driver
launchs a periodic real time task which is in charge of wakeup the
process which is waiting on the ioctl. To avoid concurrent access (I'm
simulating the real app) to the ioctl commands there is a mutex which is
locked at the begin of the ioctl function and released at the end of the
ioctl function.

Any hints ?

Regards,
        Juan Antonio

Attachment: test_rtdm.bz2
Description: Binary data

_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Reply via email to