ethercat driver crashes linux kernel
- esmurf
- Offline
- New Member
-
Less
More
- Posts: 8
- Thank you received: 1
07 Mar 2025 15:37 #323424
by esmurf
ethercat driver crashes linux kernel was created by esmurf
Hi,
this is on Almalinux 9 (RHEL9 clone), kernel 5.14.0-503.23.2.el9_5.x86_64.
Ethercat is from github, release 1.6.3.
Ethercat was built from source, loads correctly and shows something meaningfull with the command "ethercat master". Other than that, nothing was configured yet.
Ethercat master alone is stable, but when two slaves are present on the same network, it crashes after some time.
Crash:
[ 719.621831] BUG: TASK stack guard page was hit at 000000009ee0e10f (stack is 00000000e1d2d8c3..00000000a409be87)
[ 719.621834] stack guard page: 0000 [#1] PREEMPT SMP NOPTI
[ 719.621837] CPU: 1 PID: 722 Comm: EtherCAT-IDLE Kdump: loaded Tainted: G OE
--- 5.14.0-503.23.2.el9_5.x86_64 #1
[ 719.621840] Hardware name: ASUSTeK COMPUTER INC. NUC14MNK-B1/NUC14MNB1, BIOS MNADLCPX.0009.2024.1006.0803 10/06/2024
[ 719.621841] RIP: 0010:ec_master_calc_topology_rec+0x10/0xa0 [ec_master]
[ 719.621885] Code: 66 2e 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 0f 1f 44 00 00 41 55 49 89 fd 41 54 49 89 d4 55 <53> 8b 2a bb 03 00 00 00 48 69 ed 70 03 00 00 48 03 af 90 07 00 00
[ 719.621886] RSP: 0018:ffffc004c0d1c000 EFLAGS: 00010286
[ 719.621887] RAX: ffff997f0ae55b90 RBX: 0000000000000003 RCX: 0000000000000004
[ 719.621888] RDX: ffffc004c0d1fe7c RSI: ffff997f0ae55820 RDI: ffff997e86d6c000
[ 719.621889] RBP: ffff997f0ae55820 R08: 0000000000000000 R09: ffffc004c0d1fd20
[ 719.621889] R10: ffffc004c0d1fd18 R11: ffffffffb9de93e8 R12: ffffc004c0d1fe7c
[ 719.621890] R13: ffff997e86d6c000 R14: ffff997e86d6c6d8 R15: ffff997e86d6c080
[ 719.621891] FS: 0000000000000000(0000) GS:ffff9981ef880000(0000) knlGS:0000000000000000
[ 719.621892] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 719.621892] CR2: ffffc004c0d1bff8 CR3: 00000001019e8000 CR4: 0000000000750ef0
[ 719.621893] PKRU: 55555554
[ 719.621894] Call Trace:
[ 719.621895] <#DF>
[ 719.621896] ? show_trace_log_lvl+0x1c4/0x2df
[ 719.621900] ? show_trace_log_lvl+0x1c4/0x2df
[ 719.621902] ? ec_master_calc_topology_rec+0x6d/0xa0 [ec_master]
[ 719.621927] ? __die_body.cold+0x8/0xd
[ 719.621929] ? die+0x2b/0x50
[ 719.621931] ? handle_stack_overflow+0x49/0x60
[ 719.621933] ? exc_double_fault+0x14b/0x180
[ 719.621935] ? asm_exc_double_fault+0x1f/0x30
[ 719.621938] ? ec_master_calc_topology_rec+0x10/0xa0 [ec_master]
[ 719.621961] </#DF>
[ 719.621961] <TASK>
[ 719.621962] ec_master_calc_topology_rec+0x6d/0xa0 [ec_master]
[ 719.621984] ec_master_calc_topology_rec+0x6d/0xa0 [ec_master]
[ 719.622006] ec_master_calc_topology_rec+0x6d/0xa0 [ec_master]
[ 719.622028] ec_master_calc_topology_rec+0x6d/0xa0 [ec_master]
[ 719.622050] ec_master_calc_topology_rec+0x6d/0xa0 [ec_master]
[ 719.622072] ec_master_calc_topology_rec+0x6d/0xa0 [ec_master]
[ 719.622095] ec_master_calc_topology_rec+0x6d/0xa0 [ec_master]
[ 719.622119] ec_master_calc_topology_rec+0x6d/0xa0 [ec_master]
[ 719.622142] ec_master_calc_topology_rec+0x6d/0xa0 [ec_master]
(many more such lines)
Now i am a newbie to Ethercat and to Linuxcnc, so i may be doing something wrong here.
So i have some basic questions:
- is ethercat master to be used on a separate ethernet port, so do i need two NICs in my linuxcnc computer? Or does it coexist with the rest of Linux/IP ?
- is the "daisy chain" ethernet cabling mandatory for ethercat? During the crash, i had everything connected to a mini-switch.
- how do multiple ethercat slaves get distinguished? Do i have to assign some slave-ID?
this is on Almalinux 9 (RHEL9 clone), kernel 5.14.0-503.23.2.el9_5.x86_64.
Ethercat is from github, release 1.6.3.
Ethercat was built from source, loads correctly and shows something meaningfull with the command "ethercat master". Other than that, nothing was configured yet.
Ethercat master alone is stable, but when two slaves are present on the same network, it crashes after some time.
Crash:
[ 719.621831] BUG: TASK stack guard page was hit at 000000009ee0e10f (stack is 00000000e1d2d8c3..00000000a409be87)
[ 719.621834] stack guard page: 0000 [#1] PREEMPT SMP NOPTI
[ 719.621837] CPU: 1 PID: 722 Comm: EtherCAT-IDLE Kdump: loaded Tainted: G OE
--- 5.14.0-503.23.2.el9_5.x86_64 #1
[ 719.621840] Hardware name: ASUSTeK COMPUTER INC. NUC14MNK-B1/NUC14MNB1, BIOS MNADLCPX.0009.2024.1006.0803 10/06/2024
[ 719.621841] RIP: 0010:ec_master_calc_topology_rec+0x10/0xa0 [ec_master]
[ 719.621885] Code: 66 2e 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 0f 1f 44 00 00 41 55 49 89 fd 41 54 49 89 d4 55 <53> 8b 2a bb 03 00 00 00 48 69 ed 70 03 00 00 48 03 af 90 07 00 00
[ 719.621886] RSP: 0018:ffffc004c0d1c000 EFLAGS: 00010286
[ 719.621887] RAX: ffff997f0ae55b90 RBX: 0000000000000003 RCX: 0000000000000004
[ 719.621888] RDX: ffffc004c0d1fe7c RSI: ffff997f0ae55820 RDI: ffff997e86d6c000
[ 719.621889] RBP: ffff997f0ae55820 R08: 0000000000000000 R09: ffffc004c0d1fd20
[ 719.621889] R10: ffffc004c0d1fd18 R11: ffffffffb9de93e8 R12: ffffc004c0d1fe7c
[ 719.621890] R13: ffff997e86d6c000 R14: ffff997e86d6c6d8 R15: ffff997e86d6c080
[ 719.621891] FS: 0000000000000000(0000) GS:ffff9981ef880000(0000) knlGS:0000000000000000
[ 719.621892] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 719.621892] CR2: ffffc004c0d1bff8 CR3: 00000001019e8000 CR4: 0000000000750ef0
[ 719.621893] PKRU: 55555554
[ 719.621894] Call Trace:
[ 719.621895] <#DF>
[ 719.621896] ? show_trace_log_lvl+0x1c4/0x2df
[ 719.621900] ? show_trace_log_lvl+0x1c4/0x2df
[ 719.621902] ? ec_master_calc_topology_rec+0x6d/0xa0 [ec_master]
[ 719.621927] ? __die_body.cold+0x8/0xd
[ 719.621929] ? die+0x2b/0x50
[ 719.621931] ? handle_stack_overflow+0x49/0x60
[ 719.621933] ? exc_double_fault+0x14b/0x180
[ 719.621935] ? asm_exc_double_fault+0x1f/0x30
[ 719.621938] ? ec_master_calc_topology_rec+0x10/0xa0 [ec_master]
[ 719.621961] </#DF>
[ 719.621961] <TASK>
[ 719.621962] ec_master_calc_topology_rec+0x6d/0xa0 [ec_master]
[ 719.621984] ec_master_calc_topology_rec+0x6d/0xa0 [ec_master]
[ 719.622006] ec_master_calc_topology_rec+0x6d/0xa0 [ec_master]
[ 719.622028] ec_master_calc_topology_rec+0x6d/0xa0 [ec_master]
[ 719.622050] ec_master_calc_topology_rec+0x6d/0xa0 [ec_master]
[ 719.622072] ec_master_calc_topology_rec+0x6d/0xa0 [ec_master]
[ 719.622095] ec_master_calc_topology_rec+0x6d/0xa0 [ec_master]
[ 719.622119] ec_master_calc_topology_rec+0x6d/0xa0 [ec_master]
[ 719.622142] ec_master_calc_topology_rec+0x6d/0xa0 [ec_master]
(many more such lines)
Now i am a newbie to Ethercat and to Linuxcnc, so i may be doing something wrong here.
So i have some basic questions:
- is ethercat master to be used on a separate ethernet port, so do i need two NICs in my linuxcnc computer? Or does it coexist with the rest of Linux/IP ?
- is the "daisy chain" ethernet cabling mandatory for ethercat? During the crash, i had everything connected to a mini-switch.
- how do multiple ethercat slaves get distinguished? Do i have to assign some slave-ID?
Please Log in or Create an account to join the conversation.
- Hakan
- Offline
- Platinum Member
-
Less
More
- Posts: 595
- Thank you received: 188
07 Mar 2025 18:06 #323445
by Hakan
Replied by Hakan on topic ethercat driver crashes linux kernel
Not sure if it is absolutely necessary, but let Ethercat have its own port.
Daisy.chain is mandatory.
First slave in the daisy chain is slave 0, and so on. The network ports are marked In and Out, follow that.
EtherCAT uses a special technique to strip and fill in data in a packet on the fly.
One packet to send data to all clients. The same packet on the way back picks up data from all clients and give that to the EtherCAT master.
Daisy.chain is mandatory.
First slave in the daisy chain is slave 0, and so on. The network ports are marked In and Out, follow that.
EtherCAT uses a special technique to strip and fill in data in a packet on the fly.
One packet to send data to all clients. The same packet on the way back picks up data from all clients and give that to the EtherCAT master.
Please Log in or Create an account to join the conversation.
- esmurf
- Offline
- New Member
-
Less
More
- Posts: 8
- Thank you received: 1
08 Mar 2025 15:23 #323529
by esmurf
Replied by esmurf on topic ethercat driver crashes linux kernel
Thanks.
With the daisy chain cabling i got it to work, to the point where i can spin the servos from within linuxcnc. (Now i need some more hardware before i can continue...)
With the daisy chain cabling i got it to work, to the point where i can spin the servos from within linuxcnc. (Now i need some more hardware before i can continue...)
The following user(s) said Thank You: Hakan
Please Log in or Create an account to join the conversation.
Time to create page: 0.131 seconds