- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I get a misaliged memory trap in the network stack and am posting here to see if anyone has seen a similar problem.
I have a complex MicroC/OS-II multi-task application that uses multicast messages occasionally to report status. The application responds to a finger message with a multicast response. The application is up for hours and processes hundreds if not thousands of these messages. Then with no correlation to other network activity I can discern I get a multicast message that gets a misaligned memory failure deep in the network stack. The call trace at the memory trap is below. Send_Mcast is my routine responding to the finger. The rest of the routines are from the iniche libraries. Send_Mcast calls send which via a macro becomes t_sendto. Many layers down I get a NIOS2_READ_EXCEPTION with cause 6 which is NIOS2_EXCEPTION_MISALIGNED_DATA_ADDR. ROUTINE::::::::::: CODE in ROUTINE Send_Mcast::::::: if (sendto(sock, (void *)pB, size, 0, (struct sockaddr *)&destAddr, sizeof(destAddr)) < 0) { t_sendto::::::::::: err = sosend(so, name, buf, &sendlen, flags); sosend::::::::::::: error = (*so->so_proto->pr_usrreq)(so, head, nam); udp_usrreq::::::::: return udp4_socksend(so, m, nam ); udp4_socksend:::: e = udp_send(fport, udpconn->u_lport, pkt); udp_send::::::::::: e = ip_write(UDP_PROT, p); ip_write::::::::::::: return (ip_write_internal(p)); ip_write_internal::: inm = lookup_mcast(p->fhost, p->net); lookup_mcast::::::: if(imp->inm_addr == addr) { /// this traps.Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Further investigation shows that sending multicast messages in the face of network traffic gets a failure. I created code that sends a multicast message once a second. This code gets the illegal memory trap described here after 10 to 20 attempts.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page