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
Description: OpenPGP digital signature
------------------------------------------------------------------------- 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