#linuxcnc-devel Logs
Dec 16 2018
#linuxcnc-devel Calendar
02:58 PM crazyben: hello, someone here knows about linuxcnc?
03:01 PM crazyben: .. still having issues to get it running on my debian 9 machine
03:01 PM rmu: is that a question
03:01 PM crazyben: maybe I should add that I am using ethercat? :-D
03:01 PM rmu: no, i remember
03:01 PM crazyben: I tried hard to get it running the last days, but looks like I still far away to understand this issue. At the moment, I can see within the /var/log/messages "[ 1109.884006] kernel tried to execute NX-protected page - exploit attempt? (uid: 0) [ 1109.884009] BUG: unable to handle kernel paging requ"
03:03 PM crazyben: may this be related to change within "/git/linuxcnc-ethercat/src/lcec_main.c"? we added here '#include "rtapi_mutex.h"' below '#include "rtapi_app.h"'
03:03 PM rmu: no
03:04 PM crazyben: .. give me a minute to reboot
03:04 PM andypugh: I am afraid that not many of us know much about EtherCAT
03:05 PM andypugh: crazyben: Have you tried the forum, there is a small pocket of EtherCAT knowledge there
03:05 PM rmu: the things you quoted indicate some kernel problem. could be ethercat if you use any ethercat kernel modules
03:06 PM crazyben: sure, I do use
03:07 PM crazyben: My machine is made out of 2 main - adapters (EK1100). Looks like only the first one got up last time..
03:07 PM crazyben: 0 0:0 OP + EK1100 EtherCAT-Koppler (2A E-Bus) 1 0:1 OP + EL1008 8K. Dig. Eingang 24V, 3ms 2 0:2 OP + EL2008 8K. Dig. Ausgang 24V, 0.5A 3 0:3 INIT + EL7041 1K. Schrittmotor-Endstufe (50V, 5A) 4 0:4 PREOP + EL7041 1K. Schrittmotor-Endstufe (50V, 5A) 5 0:5 OP + EL66
03:07 PM crazyben: first one:
03:07 PM crazyben: 0 0:0 OP + EK1100 EtherCAT-Koppler (2A E-Bus) 1 0:1 OP + EL1008 8K. Dig. Eingang 24V, 3ms 2 0:2 OP + EL2008 8K. Dig. Ausgang 24V, 0.5A 3 0:3 INIT + EL7041 1K. Schrittmotor-Endstufe (50V, 5A) 4 0:4 PREOP + EL7041 1K. Schrittmotor-Endstufe (50V, 5A)
03:08 PM crazyben: second:
03:08 PM crazyben: 5 0:5 OP + EL6614 4 Port Switch (Ethernet, CoE) 6 0:6 PREOP + EK1100 EtherCAT-Koppler (2A E-Bus) 7 0:7 PREOP + EL3202 2K.Ana. Eingang PT100 (RTD) 8 0:8 PREOP + EL7041 1K. Schrittmotor-Endstufe (50V, 5A) 9 0:9 PREOP + EL7041 1K. Schrittmotor-Endstufe (50V, 5A)
03:09 PM rmu: sorry no idea about ethercat. but IIRC your issue two days ago was related to base- and servothread. you didn't disable the base-thread and ran the servothread way too fast.
03:09 PM rmu: ballpark-numbers: servo-thread 1kHz, no base-thread.
03:09 PM rmu: man motmod
03:14 PM crazyben: rmu: I tried it. give me a second, I have to do a reboot now
03:17 PM crazyben: rmu: I am know in front of my machine again
03:19 PM crazyben: rmu: Changed within my INI-File "BASE_PERIOD = 100000" to "BASE_PERIOD = 0" again (yes, I did install the machine again today).
03:20 PM crazyben: also changed some bios entries
03:21 PM crazyben: (back to known values of ubun tu 12.04), hate it to say, but looks like this thing is know up and running :)
03:24 PM crazyben: looks like I frickeld so much around within the old installation, that the system went to no-more functional state.
03:25 PM rmu: easy to loose track of changes when "frickling" around
03:27 PM crazyben: my first idea was to get resources by tuning the bootloader (grub in my case). I am know a bit afraid to do any kind of perfromance optimization know.
03:29 PM crazyben: Ma disabling the "BASE_PERIOD" / base_thread have any negative or side effects?
03:30 PM rmu: no. that thread is used on machines that connect stepper drives on parallel port to generate step/dir pulses
03:31 PM rmu: BASE_PERIOD limits max step rate
03:34 PM crazyben: good point, within my profile/linuxnc/configs/ I have an "stepconf" file. Do I still need this file or is it just a fragment of good old "parallel-port" days?
03:36 PM crazyben: rmu, next question: Looks like linuxcnc does not fully unload when I close the gui. How can I check whats happening / what can't be unloaded?
03:37 PM rmu: hmm. not sure. start it in terminal and look at messages
03:37 PM rmu: you could also try to replicate in halrun
03:38 PM rmu: i.e. copy/paste stuff from your .hal files into interactive halrun session and narrow down which component causes the problem
03:38 PM crazyben: loks like a process "EtherCAT-EoE" is still running. ethercat slaves are also up as well as rtapi_app.
03:39 PM crazyben: I can't even get the realtime session when startung "halrun -U"
03:40 PM rmu: you can only have one hal realtime session at a time
03:40 PM crazyben: dmesg : INFO: task rtapi_app:1605 blocked for more than 120 seconds. 4.9.0-8-rt-amd64 #1 Debian 4.9.130-2 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this messag
03:41 PM rmu: seems hal is waiting for something. sleeping on an uninterruptible syscall.
03:43 PM rmu: you could try strace on the process
03:43 PM rmu: strace -p 1605
03:44 PM crazyben: did "strace -p 1605"
03:44 PM crazyben: .. no output
04:03 PM rmu: if it already hangs it is probably too late for strace