Hello,

we did a lot of testing (different kernel+rtai combinations, 32/64 bit systems, rtai-watchdog, memtest, enabled different debugging options in the linux kernel), but no success. René told me that the problems occured while using the e1000e drivers from the patch-set. Due to the fact that I created a e1000e driver a few years ago, which worked fine for many year, we started to look at this point. René replaced the e1000e driver from the patch-set with my version. The result is that the systems runs for one day without any problems, normaly the system freezes after minutes or a few hours. The main differences are a few lines regarding e1000e_watchdog. I added these lines to the etherlab-patch-set for kernel 4.9. We tested this also, now for a few hours succesfully.

Here is the diff:
------------------------------------------------------------------
--- netdev-4.9-ethercat.c_orig  2018-09-26 20:34:17.916678969 +0200
+++ netdev-4.9-ethercat.c       2018-09-26 20:48:33.056631668 +0200
@@ -1046,6 +1046,7 @@

                if (adapter->ecdev) {
                        ecdev_receive(adapter->ecdev, skb->data, length);
+                       adapter->ec_watchdog_jiffies = jiffies;      // ADDED
                } else {
                    e1000_receive_skb(adapter, netdev, skb, staterr,
                                      rx_desc->wb.upper.vlan);
@@ -1488,6 +1489,7 @@

                if (adapter->ecdev) {
                        ecdev_receive(adapter->ecdev, skb->data, length);
+                       adapter->ec_watchdog_jiffies = jiffies;      // ADDED
                } else {
                        e1000_receive_skb(adapter, netdev, skb, staterr,
                                        rx_desc->wb.middle.vlan);
@@ -1678,6 +1680,7 @@

                if (adapter->ecdev) {
                        ecdev_receive(adapter->ecdev, skb->data, length);
+                       adapter->ec_watchdog_jiffies = jiffies;      // ADDED
                } else {
                        e1000_receive_skb(adapter, netdev, skb, staterr,
                                          rx_desc->wb.upper.vlan);
@@ -7141,7 +7144,8 @@
        if (jiffies - adapter->ec_watchdog_jiffies >= 2 * HZ) {
                struct e1000_hw *hw = &adapter->hw;
                hw->mac.get_link_status = true;
-               e1000_watchdog((unsigned long) adapter);
+//             e1000_watchdog((unsigned long) adapter);
+               e1000_watchdog_task(&adapter->watchdog_task); // REPLACED
                adapter->ec_watchdog_jiffies = jiffies;
        }

------------------------------------------------------------------

Please let us know if this fixes the problem on your system also.

regards

  W. Holzke


Am 27.09.2018 um 09:02 schrieb René Reimann:
Hello,

we found out that the problem was in the e1000e driver, which caused the System to freeze under RTAI.
My colleague will later provide the code that solved the problem.

Best Regards
René Reimann


On 26.09.2018 09:55, René Reimann wrote:
We tried to use only the e1000e driver for kernel 4.9.80 and no other patches. Additionaly we tried the e1000e driver for kernel 3.18.22 with rtai 5.0. The problem remains the same in both cases.

There is no output to the syslog when the system freezes.

On 26.09.2018 02:46, Gavin Lambert wrote:
Email Signature

One of the first things you should try is to triage the patches by rolling them back and then adding them one at a time and testing until you find which patch appears to introduce the problem (or whether it exists in the baseline without any patches).  In most cases you can then try skipping that patch and applying subsequent ones until you find more problematic patches or you successfully apply the remainder.

Please share your findings so that we know where to look for the culprit.

(Also, if it manages to write some information to the syslog before freezing then that could be helpful.)

FWIW, I’ve been using PREEMPT_RT kernel 4.9.51 with e1000e for a long while without issues.

*From:*René Reimann
*Sent:* Tuesday, 25 September 2018 19:28
*To:* Gianluca Medini <gianluca.med...@gmail.com>; etherlab-users@etherlab.org *Subject:* Re: [etherlab-users] e1000e driver freeze on kernel 4.9.80 rtai 5.1

Hello,

we are experiencing the same problem with rtai 5.1 kernel 4.9.80 and rtai 5.0 kernel. The system freezes randomly after several minutes with the e1000e and the unofficial patches.
Does somebody have an idea how to fix this?

Best Regards
René Reimann

On 23.09.2018 22:29, Gianluca Medini wrote:

    Hi all, I've tested the driver e1000e on rtai 5.1 kernel 4.9.80.

    I'm using Gavin Lambert unofficial patches set that includes
    patched drivers for 4.9.80.

    The system  freezes randomly after some  minutes.

    The Igb driver on same configuration works perfectly.

    Someone have experienced the same issue?

    GM




    _______________________________________________

    etherlab-users mailing list

    etherlab-users@etherlab.org <mailto:etherlab-users@etherlab.org>

    http://lists.etherlab.org/mailman/listinfo/etherlab-users
    
<https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.etherlab.org%2Fmailman%2Flistinfo%2Fetherlab-users&data=02%7C01%7Cgavin.lambert%40tomra.com%7C4e061ec02fe04622d16708d622b86ca7%7C4308d118edd143008a37cfeba8ad5898%7C0%7C0%7C636734572828494098&sdata=qwxQi92RlqOAUXDeP8LWBp7c%2FASFzSt2gRtyX9Zkleo%3D&reserved=0>

Logo <https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.ialb.uni-bremen.de&data=02%7C01%7Cgavin.lambert%40tomra.com%7C4e061ec02fe04622d16708d622b86ca7%7C4308d118edd143008a37cfeba8ad5898%7C0%7C0%7C636734572828494098&sdata=s9xz8CutmxeWMNAcG0Oyxj9OJtb%2FFkou1q6Im8h51dc%3D&reserved=0>

René Reimann
Research Assistent

IALB - Institut for electrical drives, power electronics and devices
Otto-Hahn-Allee 1
28359 Bremen
Raum: S1390
Tel.: +49 421 218 62699
Fax: +49 421 218 98 62699
E-Mail: rreim...@ialb.uni-bremen.de <mailto:rreim...@ialb.uni-bremen.de>

www.ialb.uni-bremen.de <https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.ialb.uni-bremen.de&data=02%7C01%7Cgavin.lambert%40tomra.com%7C4e061ec02fe04622d16708d622b86ca7%7C4308d118edd143008a37cfeba8ad5898%7C0%7C0%7C636734572828494098&sdata=s9xz8CutmxeWMNAcG0Oyxj9OJtb%2FFkou1q6Im8h51dc%3D&reserved=0>

<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.avast.com%2Fsig-email%3Futm_medium%3Demail%26utm_source%3Dlink%26utm_campaign%3Dsig-email%26utm_content%3Demailclient&data=02%7C01%7Cgavin.lambert%40tomra.com%7C4e061ec02fe04622d16708d622b86ca7%7C4308d118edd143008a37cfeba8ad5898%7C0%7C0%7C636734572828494098&sdata=pxczI6vpHQb9qT7nuL5OXDCxkTqM4Y5CJ3xrXKNCiu4%3D&reserved=0>

        

Virenfrei. www.avast.com <https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.avast.com%2Fsig-email%3Futm_medium%3Demail%26utm_source%3Dlink%26utm_campaign%3Dsig-email%26utm_content%3Demailclient&data=02%7C01%7Cgavin.lambert%40tomra.com%7C4e061ec02fe04622d16708d622b86ca7%7C4308d118edd143008a37cfeba8ad5898%7C0%7C0%7C636734572828494098&sdata=pxczI6vpHQb9qT7nuL5OXDCxkTqM4Y5CJ3xrXKNCiu4%3D&reserved=0>



--
Email Signature
Logo <http://www.ialb.uni-bremen.de>
René Reimann
Wissenschaftlicher Mitarbeiter
IALB - Institut für elektrische Antriebe, Leistungselektronik und Bauelemente
Otto-Hahn-Allee 1
28359 Bremen
Raum: S1390
Tel.: +49 421 218 62699
Fax: +49 421 218 98 62699
E-Mail: rreim...@ialb.uni-bremen.de <mailto:rreim...@ialb.uni-bremen.de>

www.ialb.uni-bremen.de <http://www.ialb.uni-bremen.de>



_______________________________________________
etherlab-users mailing list
etherlab-users@etherlab.org
http://lists.etherlab.org/mailman/listinfo/etherlab-users
Email Signature
Logo <http://www.ialb.uni-bremen.de>
René Reimann
Research Assistent
IALB - Institut for electrical drives, power electronics and devices
Otto-Hahn-Allee 1
28359 Bremen
Raum: S1390
Tel.: +49 421 218 62699
Fax: +49 421 218 98 62699
E-Mail: rreim...@ialb.uni-bremen.de <mailto:rreim...@ialb.uni-bremen.de>

www.ialb.uni-bremen.de <http://www.ialb.uni-bremen.de>



_______________________________________________
etherlab-users mailing list
etherlab-users@etherlab.org
http://lists.etherlab.org/mailman/listinfo/etherlab-users


_______________________________________________
etherlab-users mailing list
etherlab-users@etherlab.org
http://lists.etherlab.org/mailman/listinfo/etherlab-users

Reply via email to