I have applied your patch and I have received the following results:
The loop was executed for 13 times. The rt_dev_recv(....) has returned 
-14... The application on the other end was not running...
>[1] -14
>[2] -14
>[3] -14
>[4] -14
>[5] -14
>[6] -14
>[7] -14
>[8] -14
>[9] -14
>[10] -14
>[11] -14
>[12] -14
>[13] -14

This are the kernel log....

rt_socket_init: pending_sem.count = 0
rt_udp_recvmsg: pending_sem.count = 0
Assertion failed! /usr/src/rtnet/stack/ipv4/udp.c:rt_udp_recvmsg:399 skb != 
NULL
rt_udp_recvmsg: pending_sem.count = 0
Assertion failed! /usr/src/rtnet/stack/ipv4/udp.c:rt_udp_recvmsg:399 skb != 
NULL
rt_udp_recvmsg: pending_sem.count = 0
Assertion failed! /usr/src/rtnet/stack/ipv4/udp.c:rt_udp_recvmsg:399 skb != 
NULL
rt_udp_recvmsg: pending_sem.count = 0
Assertion failed! /usr/src/rtnet/stack/ipv4/udp.c:rt_udp_recvmsg:399 skb != 
NULL
rt_udp_recvmsg: pending_sem.count = 0
Assertion failed! /usr/src/rtnet/stack/ipv4/udp.c:rt_udp_recvmsg:399 skb != 
NULL
rt_udp_recvmsg: pending_sem.count = 0
Assertion failed! /usr/src/rtnet/stack/ipv4/udp.c:rt_udp_recvmsg:399 skb != 
NULL
rt_udp_recvmsg: pending_sem.count = 0
Assertion failed! /usr/src/rtnet/stack/ipv4/udp.c:rt_udp_recvmsg:399 skb != 
NULL
rt_udp_recvmsg: pending_sem.count = 0
Assertion failed! /usr/src/rtnet/stack/ipv4/udp.c:rt_udp_recvmsg:399 skb != 
NULL
rt_udp_recvmsg: pending_sem.count = 0
Assertion failed! /usr/src/rtnet/stack/ipv4/udp.c:rt_udp_recvmsg:399 skb != 
NULL

Now what do you suggest?

Monotosh Das





>From: Jan Kiszka <[EMAIL PROTECTED]>
>To: Monotosh Das <[EMAIL PROTECTED]>
>CC: rtnet-users@lists.sourceforge.net
>Subject: Re: [RTnet-users] Revceiving UDP/IP data in user space using RTAI 
>LXRT
>Date: Fri, 19 Jan 2007 22:04:42 +0100
>
>Monotosh Das wrote:
> >
> >> From: Jan Kiszka <[EMAIL PROTECTED]>
> >> To: Monotosh Das <[EMAIL PROTECTED]>
> >> CC: rtnet-users@lists.sourceforge.net
> >> Subject: Re: [RTnet-users] Revceiving UDP/IP data in user space using
> >> RTAI LXRT
> >> Date: Fri, 19 Jan 2007 21:24:57 +0100
> >>
> >> Monotosh Das wrote:
> >> > Hello jan,
> >> > Thank you for your prompt reply.
> >> >
> >> > As mentioned by you I have turned on the Internal Debug flag in the
> >> > configuration and rebuild it.... and the application started working
> >> > (atleast started sending and receiving data with the Winsock program
> >> > with running on a windows PC).
> >> > Following message was printed in the kernel log...
> >> > "Assertion failed!
> >> > /usr/src/rtnet-0.9.8/stack/ipv4/udp.c:rt_udp_recvmsg:398 skb != 
>NULL".
> >>
> >> Uhh, that's not nice. It means that the socket got the clear signal 
>that
> >> there should be some data in its queue, but it isn't. Either we are
> >> loosing data in the socket queue, or the underlying rtdm_sem is somehow
> >> broken.
> >
> > So what do you suggest? should I try any older version of RTnet?
>
>Running away is generally not preferred. I would really like to
>understand the bug to assess who might be affected and what needs to be
>done to fix it.
>
> >
> >>
> >> Do you already get this for the very first run (or with pulled cable)
> >> when there can't be any packet in the queue?
> >
> > It was mainly noticed when there was no data atall. That is windows
> > brother is not running...
>
>OK, that widely rules out queue corruption and leaves us with the
>rtdm_sem (or the underlying RTAI implementation).
>
>
>I attached an instrumentation patch to check for the internal semaphore
>state after init and before trying to receive data. If that is fine
>(always 0), we are leaving the RTnet domain (which is not unlikely given
>the fact that your rt_dev_recv(MSG_DONTWAIT) scenario works fine with
>Xenomai here). RTAI people will likely ask you to try latest CVS
>(vulcano), which I would suggest as well then.
>
>Jan


>Index: rtnet/stack/ipv4/udp.c
>===================================================================
>--- rtnet.orig/stack/ipv4/udp.c
>+++ rtnet/stack/ipv4/udp.c
>@@ -382,6 +382,7 @@ ssize_t rt_udp_recvmsg(struct rtdm_dev_c
>      if (testbits(msg_flags, MSG_DONTWAIT))
>          timeout = -1;
>
>+    printk("%s: pending_sem.count = %d\n", __FUNCTION__, 
>sock->pending_sem.count);
>      ret = rtdm_sem_timeddown(&sock->pending_sem, timeout, NULL);
>      if (unlikely(ret < 0))
>          switch (ret) {
>Index: rtnet/stack/socket.c
>===================================================================
>--- rtnet.orig/stack/socket.c
>+++ rtnet/stack/socket.c
>@@ -68,6 +68,7 @@ int rt_socket_init(struct rtdm_dev_conte
>
>      rtdm_lock_init(&sock->param_lock);
>      rtdm_sem_init(&sock->pending_sem, 0);
>+    printk("%s: pending_sem.count = %d\n", __FUNCTION__, 
>sock->pending_sem.count);
>
>      if (test_bit(RTDM_CREATED_IN_NRT, &sockctx->context_flags))
>          pool_size = rtskb_pool_init(&sock->skb_pool, socket_rtskbs);




><< signature.asc >>

_________________________________________________________________
Do women make better employees? Join the debate 
http://msnspecials.in/debate/topicdetails.aspx?TID=64


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
RTnet-users mailing list
RTnet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rtnet-users

Reply via email to