<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Joel, this is our config:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">#define CONFIGURE_EXTRA_TASK_STACKS (80 * RTEMS_MINIMUM_STACK_SIZE)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">/* Note: The following configuration is called out as CONFIGURED_STACK_CHECKER_ENABLED in the users manual,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">* but that is a typo. The symbol used in the configuration utility is CONFIGURE_STACK_CHECKER_ENABLED */<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">#define CONFIGURE_STACK_CHECKER_ENABLED<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">#define CONFIGURE_INIT_TASK_STACK_SIZE (64*1024)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">So stack checker is on.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Not aware of any IPV6 unless the switch itself produces. We do not use it.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Joel Sherrill <joel@rtems.org>
<br>
<b>Sent:</b> Thursday, October 8, 2020 12:07 PM<br>
<b>To:</b> Glossop, Richard (US) @ ISR - SSS - SSTC <Richard.Glossop@L3Harris.com>; rtems-devel@rtems.org <devel@rtems.org><br>
<b>Subject:</b> [EXTERNAL] Re: Re: RTEMS Network Stack and Managed Switch<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">You didn't reply to the entire list so I am adding it back.<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">You are using the legacy stack (cpukit/libnetworking) which is 20+ years old and IPV4 only.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">There could be a packet which the older stack doesn't like the format of. Perhaps a number pushes something out of range. <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Any possibility there is IPV6 on the network? I don't know how this stack reacts to that.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Another simple thing to try is increasing the size of the stacks and turning on the stack checker.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">--joel<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Thu, Oct 8, 2020 at 10:39 AM <<a href="mailto:Richard.Glossop@l3harris.com">Richard.Glossop@l3harris.com</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Hi Joel,</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">We are using Gaisler’s rc7 release for RTEMS 5.1. I don’t see libbsd in the map file at all, but not
really sure how to tell.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">We do have an FPU and our tasks are all FP enabled. Not sure on the network stack.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> users <</span><a href="mailto:users-bounces@rtems.org" target="_blank"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">users-bounces@rtems.org</span></a><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">>
<b>On Behalf Of </b>Joel Sherrill<br>
<b>Sent:</b> Thursday, October 8, 2020 11:29 AM<br>
<b>To:</b> Thomas Doerfler <</span><a href="mailto:Thomas.Doerfler@imd-systems.de" target="_blank"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Thomas.Doerfler@imd-systems.de</span></a><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">><br>
<b>Cc:</b> </span><a href="mailto:rtems-users@rtems.org" target="_blank"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">rtems-users@rtems.org</span></a><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> <</span><a href="mailto:users@rtems.org" target="_blank"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">users@rtems.org</span></a><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">><br>
<b>Subject:</b> [EXTERNAL] Re: RTEMS Network Stack and Managed Switch</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">On Thu, Oct 8, 2020 at 10:25 AM Thomas Doerfler <<a href="mailto:Thomas.Doerfler@imd-systems.de" target="_blank">Thomas.Doerfler@imd-systems.de</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Richard,<br>
<br>
what hardware/BSP are you running on?<o:p></o:p></p>
</blockquote>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Thomas beat me on this. :)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Also the RTEMS version and network stack (legacy vs libbsd). <o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><br>
Just a shot in the dark: It seems the system crashes in arplookup -> ...<br>
-> svfprintf. Can it be that some networking routine tries to print a<br>
message with floating point, but the FPU is disabled for the<br>
corresponding task?<o:p></o:p></p>
</blockquote>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Since I recall you are using a LEON, this is indeed a very likely culprit.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">The stack trace is a bit odd since nothing in libc would call _Internal_XXX.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">--joel <o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><br>
wkr,<br>
<br>
Thomas.<br>
<br>
Am 08.10.20 um 17:15 schrieb <a href="mailto:Richard.Glossop@L3Harris.com" target="_blank">
Richard.Glossop@L3Harris.com</a>:<br>
> We have discovered a problem with the RTEMS network stack reaching the<br>
> RTEMS _Terminate function when the interfaces are attached to a managed<br>
> switch (in this case a Cisco 3560).<br>
> <br>
> <br>
> <br>
> This does not occur with direct connections or when attached to a layer<br>
> 2 unmanaged switch (NetGear or SMC). Of course the 3560 puts out a lot<br>
> of traffic that a layer 2 switch does not (spanning tree, CDP etc….)<br>
> <br>
> <br>
> <br>
> So it seems the managed switch is putting out traffic that is bringing<br>
> RTEMS down.<br>
> <br>
> <br>
> <br>
> Has anyone seen this behavior? Have you determined the root cause?<br>
> <br>
> <br>
> <br>
> <br>
> <br>
> I set a break point and caught the following backtrace:<br>
> <br>
> <br>
> <br>
> #0 0x6006ec90 0x60200180 <_Terminate+0x4><br>
> <br>
> #1 0x6006ece0 0x602001e8 <_Internal_error+0x8><br>
> <br>
> #2 0x600da250 0x60200248 <_svfprintf_r+0x14><br>
> <br>
> #3 0x600d5810 0x60200420 <snprintf+0x58><br>
> <br>
> #4 0x60073bac 0x60200508 <inet_ntop4+0x24><br>
> <br>
> #5 0x60073e70 0x60200580 <inet_ntop+0x280><br>
> <br>
> #6 0x60073b78 0x60200630 <inet_ntoa_r+0x1c><br>
> <br>
> #7 0x60076340 0x60200698 <arplookup+0x78><br>
> <br>
> #8 0x60076e34 0x60200710 <arpintr+0x20c><br>
> <br>
> #9 0x6008861c 0x602007c0 <networkDaemon+0xa0><br>
> <br>
> #10 0x60088164 0x60200828 <taskEntry+0x20><br>
> <br>
> #11 0x6006d210 0x60200888 <_Thread_Entry_adaptor_numeric+0x8><br>
> <br>
> #12 0x6006c464 0x602008e8 <_Thread_Handler+0x60><br>
> <br>
> #13 0x6006c404 0x60200948 <_Thread_Handler+0><br>
> <br>
> <br>
> <br>
> <br>
> <br>
> CONFIDENTIALITY NOTICE: This email and any attachments are for the sole<br>
> use of the intended recipient and may contain material that is<br>
> proprietary, confidential, privileged or otherwise legally protected or<br>
> restricted under applicable government laws. Any review, disclosure,<br>
> distributing or other use without expressed permission of the sender is<br>
> strictly prohibited. If you are not the intended recipient, please<br>
> contact the sender and delete all copies without reading, printing, or<br>
> saving.<br>
> <br>
> <br>
> _______________________________________________<br>
> users mailing list<br>
> <a href="mailto:users@rtems.org" target="_blank">users@rtems.org</a><br>
> <a href="http://lists.rtems.org/mailman/listinfo/users" target="_blank">http://lists.rtems.org/mailman/listinfo/users</a><br>
> <br>
<br>
-- <br>
IMD Ingenieurbuero fuer Microcomputertechnik<br>
Thomas Doerfler Herbststrasse 8<br>
D-82178 Puchheim Germany<br>
email: <a href="mailto:Thomas.Doerfler@imd-systems.de" target="_blank">Thomas.Doerfler@imd-systems.de</a><br>
PGP public key available on request<br>
_______________________________________________<br>
users mailing list<br>
<a href="mailto:users@rtems.org" target="_blank">users@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/users" target="_blank">http://lists.rtems.org/mailman/listinfo/users</a><o:p></o:p></p>
</blockquote>
</div>
</div>
</div>
<p class="MsoNormal"><br>
<o:p></o:p></p>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt">CONFIDENTIALITY NOTICE: This email and any attachments are for the sole use of the intended recipient and may contain material that is proprietary, confidential, privileged or otherwise legally protected or
restricted under applicable government laws. Any review, disclosure, distributing or other use without expressed permission of the sender is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies without
reading, printing, or saving.</span> <o:p></o:p></p>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt"><o:p> </o:p></span></p>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</body>
</html>