Network problems

  • From time to time, we have the problem , that our PicoMOD6 boards freeze when they are connected to the ethernet.
    The PicoMOD6 is connected via an switch. The last time, this error occured, we captured the network traffic with Wireshark and we see a lost of Spanning-tree-(for-bridges)_01 messages.


    Do you have any idea, what can cause these messages?

  • Some more informations:


    The "spanning-tree" Messages come every 30ms. Here is an example captured by Wireshark:


    Source: Spanning-tree-(for-bridges)_01
    Destination: Spanning-tree-(for-bridges)_01
    Protocol: CTRL
    Info: MAC PAUSE: Quanta 65535

  • A PAUSE frame sent means than someone is sending packets too fast and another device is telling to stop transmission for some time.
    Quanta 65535 means a stop for 65535 bit times which corresponds to 33ms for 1GB Ethernet.
    See http://homepage.cem.itesm.mx/raulm/pub/mimicry/opodis06.pdf for more information.

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Hallo,


    tut mir leid, dass ich diesen Beitrag auf Deutsch verfasse, aber das Thema ist mir zu wichtig, dass ich nicht möchte, dass Missverständnisse durch mein Englisch entstehen.


    Ich habe nun noch einige Tests mit der eingefrorenen PicoMOD6 durchgeführt:
    Zuallererst mal, eingefroren ist eigentlich der falsche Ausdruck. Wenn ich mir die CPU-Auslastung (STA2-Pin) der PicoMOD6 anschaue, dann scheint mir die CPU-Auslastung bei 100%, jedenfalls ist die LED dauerhaft an.


    Nun zu den Tests:

    • Die eingefrorene PicoMOD ist über einen Netgear-Switch an das Netzwerk angeschlossen. Solange die PicoMOD an den Switch angeschlossen ist, habe ich auf allen Ports des Switches Probleme, eine Netzwerkverbindung herzustellen. Sobald ich die PicoMOD vom Switch entferne, läuft die Verbindung wieder ohne Probleme
    • Ich habe die eingefrorene PicoMOD direkt mit einem PC verbunden und wiederum über Wireshark den Netzwerkverkehr aufgezeichnet. Auch hier erkennt man alle 33,5 ms ein „Spanning-tree“-Paket, allerdings ist die Source-Mac-Adresse nun 00:00:00:00:00:00. Es scheint mir also so zu sein, dass die PicoMOD ihre Mac-Adresse „verloren“ hat!!!
    • Ich habe mal versucht, dieses Verhalten zu provozieren, indem ich starken Netzwerkverkehr zwischen einer PicoMOD und einem Laptop aufgebaut habe und in meinem Programm im Thread mit der höchsten Priorität eine Endlosschleife programmiert habe
      Code
      1. while(true);

      .
      Ich konnte aber die PicoMOD nicht dazu bringen, ein „Spanning-tree“ Paket zu senden. Ich denke eher, dass sich irgendein Treiber mit einer höheren Priorität als der Netzwerktreiber „aufhängt“ und somit der Netzwerktreiber nicht mehr dazu kommt, Daten zu empfangen. Mit welcher Priorität läuft den der Ethernet-Treiber und kann man die Priorität ändern?


    Hinweis:
    Ich programmiere mit C# und habe eine TcpClient Kommunikation programmiert. Bei der eingefrorenen PicoMOD war allerdings von unserem Programm keine Kommunikation aktiv.

  • Please send a small sample project so we can reproduce the problem here.

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • I read in this document: http://geekswithblogs.net/Bruc…ng-thread-priorities.aspx


    That drivers in Windows CE always have a higher priority than applications:


    Drivers in the range 97-152
    Applications in the range 248-255


    So I'm asking myself if it is even possible than an application-crash can cause the ethernet driver to not be able to handle ethernet requests.
    Can you confirm this?


    By the way:
    We also use the Can-Driver and we must set the Prioirty of the Can-Driver to 50 because we had many lost Can-Messages.


    Remember that I'm programming with C# and I change the threadPriority with an enum System.Threading.ThreadPriority:

    Code
    1. System.Threading.ThreadPriority
    2. AboveNormal
    3. BelowNormal
    4. Highest
    5. Lowest
    6. Normal
  • Please send the Wireshark dump file with the PAUSE frames and the traffic to/from the PicoMOD.
    Please remove all unnecessary traffic.

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • To which email address should I send the file?


    I have made some more investigations:
    I created a new thread with an endless loop and set the priority of this thread to 115 using invoke call of CeSetThreadPriority(). This will cause the display to freeze and the ethernet driver to send the spanning-tree-Pause messages after some seconds. If I run the same thread on priority 116, the dispaly is frozen, but ethernet communication is still working (the device is still pingable) and no spanning-tree-Pause messages are present.


    I think that's because the ethernet driver has a prioirty of 115 or 116, isn't it?


    FYI:
    We also use I2C which has a thread prority of 103.


    Another question:
    What does the network driver when no network cable is connected?

  • Hello,
    according this i create the atteched program. Please run it and log the serial debug output. In case of error we can identify the priority of the running thread and maybe more. Please send me the log when the error occur.


    Quote

    ... I think that's because the ethernet driver has a prioirty of 115 or 116, isn't it?

    Yes, at least the thread within the driver which sends the "PAUSE". Did your program run in this case?


    Quote

    Again, is it possible, that my application can cause the ethernet driver to send those PAUSE frames?

    Maybe indirect - e.g. if your program is busy in "CAN Read" it can not emtpy the ethernet buffers -> ethernet driver send "PAUSE".
    PS: Sorry, CAN is not possibel. The blocking driver must have priority>115!

    Files

    • OutOfCtl.zip

      (7.46 kB, downloaded 457 times, last: )

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • While we do some tests with Festus in our office we find out that "PAUSE" packets from Ethernet driver are only a result of the blocking from an other thread. So Ethernet driver is not to blame for the error we talk about in theis thread. We decide to wait which result are deliverd by the "outofctl" application.

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.