Hello,
I regularly get an assertion in
rtnet-0.9.9/stack/packet/af_packet.c function rt_packet_recvmsg(),
line 302.
The relevant code is:
> rtskb = rtskb_dequeue_chain(&sock->incoming);
> RTNET_ASSERT(rtskb != NULL, return -EFAULT;);
The assertion is:
> kernel: [ 273.609588] Assertion failed! .../rtnet-0.9.9/stack/packet/
> af_packet.c:rt_packet_recvmsg:302 rtskb != NULL
AFAICS this seems to happen for every nonblocking recv with no data
available. This is not a problem unless you call it frequently and the
error message starts to take up lots of CPU time (and disk space). For
my application, the error message crashed the system.
Workaround (patch attached):
> rtskb = rtskb_dequeue_chain(&sock->incoming);
> if (rtskb == NULL && timeout < 0)
> return -EWOULDBLOCK; /* workaround to avoid assertion for
> nonblocking recv. with no data avail. */
> RTNET_ASSERT(rtskb != NULL, return -EFAULT;);
I do not know if this is a bad workaround or proper solution. It works
for me, though.
SVN has not changed compared to rtnet-0.9.9 at this piece of code.
Bye,
Wolfgang
--- rtnet-0.9.9/stack/packet/af_packet.c 2007-02-09 23:01:05.000000000 +0100
+++ rtnet-fixed/stack/packet/af_packet.c 2007-11-07 20:23:36.000000000 +0100
@@ -299,6 +299,9 @@
}
rtskb = rtskb_dequeue_chain(&sock->incoming);
+ if (rtskb == NULL && timeout < 0)
+ return -EWOULDBLOCK; /* workaround to avoid assertion for
+ nonblocking recv. with no data avail. */
RTNET_ASSERT(rtskb != NULL, return -EFAULT;);
sll = msg->msg_name;
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
RTnet-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rtnet-developers