Crash in RTEMS when doing TCP communication.

Ben Dart Ben.Dart at adept.com
Thu Nov 10 18:17:45 UTC 2016


I have a program for RTEMS 4.9.2. This works for most applications but we are having some issues right now. We are sending TCP packets to the system running RTEMS, if the tcp port is open and receiving and we are replying etc, everything works fine. But if we stop the tcp receiver, eventually we get a crash in RTEMS. We have had the following few stack dumps:

CRASH 1
0x3A010000 : bsp_ram_size
0x0032DED4 : soisconnected
0x0035D0F0 : tcp_input
0x0031914C : ip_input
0x00319C80 : ipintr
0x00323124 : rtems_bsdnet_event_receive
0x00323298 : soconnsleep
0x0036E980 : _Thread_Handler
0x0036E904 : _Objects_API_maximum_class

CRASH 2
0x00334EC8 : _Heap_Block_allocate
0x00335B08 : _Protected_heap_Allocate
0x003115A4 : malloc
0x003233B0 : rtems_bsdnet_malloc
0x0035E6C4 : tcp_newtcpcb
0x003271B8 : rtems_set_tcp_buffer_sizes
0x0032DC38 : sonewconn1
0x0035BD90 : tcp_input
0x0031914C : ip_input
0x00319C80 : ipintr
0x00323124 : rtems_bsdnet_event_receive
0x00323298 : soconnsleep
0x0036E9A4 : _Thread_Handler
0x0036E928 : _Objects_API_maximum_class

CRASH 3
(We got this print out during this crash: Program heap: free of bad pointer 8 -- range 616B80 - 6800000)
0x0035F5A0 : tcp_fasttimo
0x0032870C : domaininit
0x00323198 : rtems_bsdnet_event_receive
0x00323298 : soconnsleep
0x0036EA38 : _Thread_Handler
0x0036E9BC : _Objects_API_maximum_class

As far as I can tell we are not running out of mbuf space or memory or anything. It seems that we always crash when doing the rtems_bsdnet_event_receive or tcp_input calls. Is there a known bug in this section of the code? Are there any work arounds? What other information do we need to solve this?


Ben
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20161110/c002752c/attachment.html>


More information about the users mailing list