Wolfgang Köbler wrote:
> 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.

Users reported this issue already a few times. Once it was a RTAI bug
(3.3-days or so). Last time the reason remained unclear, see
http://thread.gmane.org/gmane.linux.real-time.rtnet.user/2243/focus=2252

What is your setup? Maybe you can go the debug path sketched in the
thread above (applies both to RTAI and Xenomai).

Jan

-- 
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux

-------------------------------------------------------------------------
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

Reply via email to