grotius-cnc / linux_rtos

Debian 10 - 4.19.0-11-rt-amd64 - Ethercat - Linuxcnc
21 stars 6 forks source link

LinuxCNC crashes on first run #1

Closed janbbeck closed 3 years ago

janbbeck commented 3 years ago

I just installed from the ISO, and then executed the Ethercat_installer.

Then, when running LinuxCNC, I get a crash report:

Error report created by /usr/lib/tcltk/linuxcnc/show_errors.tcl:

Print file information:
RUN_IN_PLACE=no
LINUXCNC_DIR=
LINUXCNC_BIN_DIR=/usr/bin
LINUXCNC_TCL_DIR=/usr/lib/tcltk/linuxcnc
LINUXCNC_SCRIPT_DIR=
LINUXCNC_RTLIB_DIR=/usr/lib/linuxcnc/modules
LINUXCNC_CONFIG_DIR=
LINUXCNC_LANG_DIR=/usr/lib/tcltk/linuxcnc/msgs
INIVAR=inivar
HALCMD=halcmd
LINUXCNC_EMCSH=/usr/bin/wish8.6
LINUXCNC - 2.8.0-77-ge6cfcfa39
Machine configuration directory is '/home/jan/Desktop/linuxcnc_axis/configs/sim.qtvcp_screens'
Machine configuration file is 'qtaxis.ini'
INIFILE=/home/jan/Desktop/linuxcnc_axis/configs/sim.qtvcp_screens/qtaxis.ini
VERSION=1.1
PARAMETER_FILE=sim.var
TASK=milltask
HALUI=halui
DISPLAY=qtvcp -d qtaxis
COORDINATES=X Y Z
KINEMATICS=trivkins
Starting LinuxCNC...
Starting LinuxCNC server program: linuxcncsvr
Loading Real Time OS, RTAPI, and HAL_LIB modules
Starting LinuxCNC IO program: io
emc/iotask/ioControl.cc 702: can't load tool table.
Starting HAL User Interface program: halui
Found file(lib): /usr/share/linuxcnc/hallib/core_sim.hal
Found file(lib): /usr/share/linuxcnc/hallib/sim_spindle_encoder.hal
Found file(lib): /usr/share/linuxcnc/hallib/simulated_home.hal
Found file(REL): ./check_constraints.hal
Starting TASK program: milltask
Starting DISPLAY program: qtvcp
LCEC: requesting master 0 (index 0) failed

lcec: rtapi_app_main: Invalid argument (-22)

['0', '.5 in', '1 in', '6 in', '1 mm', '10 mm', '50 mm']
Shutting down and cleaning up LinuxCNC...
task: 2809 cycles, min=0.000057, max=0.002762, avg=0.001058, 0 latency excursions (> 10x expected cycle time of 0.001000s)
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments

Debug file information:
Note: Using POSIX realtime
[QtDesigner][INFO]  Logging to "/home/jan/qtdesigner.log" (logger.py:88)
[QtDesigner.QTVCP.QT_ISTAT][WARNING]  INI Parsing Error, No MIN_LINEAR_VELOCITY Entry in DISPLAY, Using: 1 (qt_istat.py:335)
[QtDesigner.QTVCP.QT_ISTAT][WARNING]  INI Parsing Error, No DEFAULT_ANGULAR_VELOCITY Entry in DISPLAY, Using: 6 (qt_istat.py:335)
[QtDesigner.QTVCP.QT_ISTAT][WARNING]  INI Parsing Error, No MIN_ANGULAR_VELOCITY Entry in DISPLAY, Using: 1 (qt_istat.py:335)
[QtDesigner.QTVCP.QT_ISTAT][WARNING]  INI Parsing Error, No MAX_ANGULAR_VELOCITY Entry in DISPLAY, Using: 60 (qt_istat.py:335)
[QTvcp][INFO]  Logging to "/home/jan/qtvcp.log" (logger.py:88)
[QtDesigner.QTVCP.QT_PSTAT][DEBUG]  BASENAME qtaxis (qt_pstat.py:58)
[QtDesigner.QTVCP.QT_PSTAT][DEBUG]  Checking for handler file in: None Found (qt_pstat.py:78)
[QtDesigner.QTVCP.QT_PSTAT][DEBUG]  Checking for default handler file in: /usr/share/qtvcp/screens/qtaxis/qtaxis_handler.py (qt_pstat.py:84)
[QtDesigner.QTVCP.QT_PSTAT][INFO]  Using DEFAULT handler file path: /usr/share/qtvcp/screens/qtaxis/qtaxis_handler.py (qt_pstat.py:87)
[QtDesigner.QTVCP.QT_PSTAT][DEBUG]  Checking for .ui in: None Found (qt_pstat.py:104)
[QtDesigner.QTVCP.QT_PSTAT][DEBUG]  Checking for .ui in: /usr/share/qtvcp/screens/qtaxis/qtaxis.ui (qt_pstat.py:109)
[QtDesigner.QTVCP.QT_PSTAT][INFO]  Using DEFAULT ui file from /usr/share/qtvcp/screens/qtaxis/qtaxis.ui (qt_pstat.py:111)
[QtDesigner.QTVCP.QT_PSTAT][DEBUG]  Checking for .qss in: None Found (qt_pstat.py:144)
[QtDesigner.QTVCP.QT_PSTAT][DEBUG]  Checking for .qss in: /usr/share/qtvcp/screens/qtaxis/qtaxis.qss (qt_pstat.py:149)
[QtDesigner.QTVCP.QT_PSTAT][INFO]  Using DEFAULT qss file from /usr/share/qtvcp/screens/qtaxis/qtaxis.qss (qt_pstat.py:151)
[QtDesigner.QTVCP.QT_PSTAT][DEBUG]  Checking for .qrc in: None Found (qt_pstat.py:170)
[QtDesigner.QTVCP.QT_PSTAT][DEBUG]  Checking for .qrc in: /usr/share/qtvcp/screens/qtaxis/qtaxis.qrc (qt_pstat.py:176)
[QtDesigner.QTVCP.QT_PSTAT][INFO]  No qrc file found (qt_pstat.py:183)
[QtDesigner.QTVCP.QT_PSTAT][DEBUG]  Checking for resources.py in: /home/jan/Desktop/linuxcnc_axis/configs/sim.qtvcp_screens/resources.py (qt_pstat.py:199)
[QtDesigner.QTVCP.QT_PSTAT][DEBUG]  Checking for resources.py in: /usr/share/qtvcp/screens/qtaxis/resources.py (qt_pstat.py:210)
[QtDesigner.QTVCP.QT_PSTAT][INFO]  No resources.py file found, No QRC file to compile one from. (qt_pstat.py:222)
[QTvcp][INFO]  Building A Linuxcnc Main Screen (qtvcp:105)
[QTvcp][INFO]  No handler file specified on command line (qtvcp:123)
[QTvcp][INFO]  No HAL component base name specified on command line using: qtaxis (qtvcp:154)
[QTvcp][DEBUG]  Loading the handler file (qtvcp:193)
[QTvcp][DEBUG]  Adding the key events filter (qtvcp:199)
[QTvcp.QTVCP.QT_MAKEGUI][INFO]  No resource file to load: None (qt_makegui.py:173)
[QTvcp.QTVCP.WIDGETS.MDI_HISTORY][DEBUG]  MDI History file created: /home/jan/.axis_mdi_history (mdi_history.py:72)
[QTvcp.QTVCP.WIDGETS.SCREEN_OPTIONS][DEBUG]  Switching to Preference File Path from INI: WORKINGFOLDER/qtaxis.pref (screen_options.py:276)
[QTvcp.QTVCP.WIDGETS.OVERLAY_WIDGET][DEBUG]  last removed: <qtvcp.qt_makegui.VCPWindow object at 0x7f40bf9ade90> (overlay_widget.py:65)
[QTvcp.QTVCP.WIDGETS.JOG_INCREMENTS][DEBUG]  Linear Current index: 0 Increment: 0 , selection changed Continuous (jog_increments.py:101)
[QTvcp][DEBUG]  Calling the handler file's initialized__ function (qtvcp:212)
[QTvcp.QTVCP.LIB.TOOLBAR_ACTIONS][DEBUG]  parceed: text: .5 in Increment: 0.5 scaled: 0.5 (toolbar_actions.py:609)
[QTvcp.QTVCP.LIB.TOOLBAR_ACTIONS][DEBUG]  parceed: text: 1 in Increment: 1.0 scaled: 1.0 (toolbar_actions.py:609)
[QTvcp.QTVCP.LIB.TOOLBAR_ACTIONS][DEBUG]  parceed: text: 6 in Increment: 6.0 scaled: 6.0 (toolbar_actions.py:609)
[QTvcp.QTVCP.LIB.TOOLBAR_ACTIONS][DEBUG]  parceed: text: 1 mm Increment: 1.0 scaled: 0.0393700787402 (toolbar_actions.py:609)
[QTvcp.QTVCP.LIB.TOOLBAR_ACTIONS][DEBUG]  parceed: text: 10 mm Increment: 10.0 scaled: 0.393700787402 (toolbar_actions.py:609)
[QTvcp.QTVCP.LIB.TOOLBAR_ACTIONS][DEBUG]  parceed: text: 50 mm Increment: 50.0 scaled: 1.96850393701 (toolbar_actions.py:609)
[QTvcp.QTVCP.WIDGETS.WIDGET_BASECLASS][WARNING]  Nno objectName for HAL pin: <qtvcp.widgets.status_label.StatusLabel object at 0x7f40b451a180> (widget_baseclass.py:54)
[QTvcp.QTVCP.WIDGETS.JOG_INCREMENTS][DEBUG]  Linear Current index: -1 Increment: 0 , selection changed Continuous (jog_increments.py:101)
[QtDesigner.QTVCP.QT_TSTAT][DEBUG]  Toolfile does not exist' ../sim.tbl (qt_tstat.py:113)
[QtDesigner.QTVCP.QT_TSTAT][DEBUG]  Toolfile does not exist' ../sim.tbl (qt_tstat.py:113)
[QTvcp][DEBUG]  Set HAL ready (qtvcp:218)
[QTvcp][DEBUG]  Show window (qtvcp:278)
[QTvcp][INFO]  postgui filename: qtvcp_postgui.hal (qtvcp:309)
Failed to open /dev/EtherCAT0: No such file or directory
LCEC: requesting master 0 (index 0) failed
lcec: rtapi_app_main: Invalid argument (-22)
qtvcp_postgui.hal:14: waitpid failed /usr/bin/rtapi_app lcec
qtvcp_postgui.hal:14: /usr/bin/rtapi_app exited without becoming ready
qtvcp_postgui.hal:14: insmod for lcec failed, returned -1
16071
16112
Stopping realtime threads
Unloading hal components
Note: Using POSIX realtime

-----------------------------------------------------------------------
Info report created by linuxcnc_info:
The file:    /tmp/linuxcnc_info.txt
can be posted to a forum or a web site like:
     http://pastebin.com
in order to provide information about the linuxcnc
system and configuration.

                Date: Mon 15 Feb 2021 05:46:22 PM EST
            UTC Date: Mon 15 Feb 2021 10:46:22 PM UTC
        this program: /usr/bin/linuxcnc_info
              uptime: 17:46:22 up 2 min, 1 user, load average: 2.75, 1.85, 0.78
     lsb_release -sa: Debian Debian GNU/Linux 10 (buster) 10 buster
      which linuxcnc: /usr/bin/linuxcnc
                 pwd: /home/jan/Desktop/linuxcnc_axis/configs/sim.qtvcp_screens
                USER: jan
             LOGNAME: jan
                HOME: /home/jan
              EDITOR: 
              VISUAL: 
            LANGUAGE: 
                TERM: dumb
           COLORTERM: 
             DISPLAY: :0.0
             DESKTOP: lightdm-xsession
        display size: 1600x900 pixels (423x238 millimeters)
                PATH: /usr/bin:/home/jan/Desktop/linuxcnc_axis/configs/sim.qtvcp_screens/bin:/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games

uname items:
         nodename -n: debian
      kernel-name -s: Linux
      kernel-vers -v: #1 SMP PREEMPT RT Debian 4.19.146-1 (2020-09-17)
          machine -m: x86_64
        processor -p: unknown
         platform -i: unknown
      oper system -o: GNU/Linux

/proc items:
             cmdline: BOOT_IMAGE=/boot/vmlinuz-4.19.0-11-rt-amd64 root=UUID=ddfc188c-4600-47df-9a67-2eb1a0ec264b ro quiet
          model name: Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz
               cores: 2
             cpu MHz: 2993.238
             parport: 
              serial: 

Versions:
                 gcc: gcc (Debian 8.3.0-6) 8.3.0
              python: Python 2.7.16
                 git: git version 2.20.1
          git commit: NA
                 tcl: 8.6
                  tk: 8.6
               glade: glade 3.22.1
          glade-gtk2: glade3 3.8.0

linuxcnc_var all:

     LINUXCNCVERSION: 2.8.0-77-ge6cfcfa39
LINUXCNC_AUX_GLADEVCP: /usr/share/linuxcnc/aux_gladevcp
LINUXCNC_AUX_EXAMPLES: /usr/share/linuxcnc/aux_examples
            REALTIME: /etc/init.d/realtime
                 RTS: uspace
          HALLIB_DIR: /usr/share/linuxcnc/hallib

dpkg -l '*linuxcnc*':
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                Version               Architecture Description
+++-===================-=====================-============-=====================================================================
un  linuxcnc            <none>                <none>       (no description available)
un  linuxcnc-dev        <none>                <none>       (no description available)
un  linuxcnc-doc        <none>                <none>       (no description available)
ii  linuxcnc-doc-en     1:2.8.0.77.ge6cfcfa39 all          motion controller for CNC machines and robots (English documentation)
ii  linuxcnc-doc-es     1:2.8.0.77.ge6cfcfa39 all          controlador de movimiento para máquinas CNC y robots (Español).
ii  linuxcnc-doc-fr     1:2.8.0.77.ge6cfcfa39 all          motion controller for CNC machines and robots (French documentation)
un  linuxcnc-sim        <none>                <none>       (no description available)
un  linuxcnc-sim-dev    <none>                <none>       (no description available)
ii  linuxcnc-uspace     1:2.8.0.77.ge6cfcfa39 amd64        motion controller for CNC machines and robots
ii  linuxcnc-uspace-dev 1:2.8.0.77.ge6cfcfa39 amd64        PC based motion controller for real-time Linux

not sure where to go from here. The EK1100 Network lights did blink a bit while running the Ethercat_installer, FWIW

janbbeck commented 3 years ago

When running the ethercat install script in a terminal, it persisted long enough to grab some information. This may be relevant:

Job for systemd-modules-load.service failed because the control process exited with error code.
See "systemctl status systemd-modules-load.service" and "journalctl -xe" for details.

where "systemctl status systemd-modules-load.service" yields

● systemd-modules-load.service - Load Kernel Modules
   Loaded: loaded (/lib/systemd/system/systemd-modules-load.service; static; vendor preset: enabled)
   Active: failed (Result: exit-code) since Mon 2021-02-15 20:13:50 EST; 1min 47s ago
     Docs: man:systemd-modules-load.service(8)
           man:modules-load.d(5)
  Process: 32678 ExecStart=/lib/systemd/systemd-modules-load (code=exited, status=1/FAILURE)
 Main PID: 32678 (code=exited, status=1/FAILURE)

and journalctl -xe yields

-- 
-- The job identifier is 1810.
Feb 15 20:13:50 debian kernel: EtherCAT: Master driver 1.5.2 unknown
Feb 15 20:13:50 debian kernel: EtherCAT ERROR: MAC address may not be empty.
Feb 15 20:13:50 debian systemd-modules-load[32678]: Failed to insert module 'ec_master': Invalid argument
Feb 15 20:13:50 debian kernel: EtherCAT: Master driver 1.5.2 unknown
Feb 15 20:13:50 debian kernel: EtherCAT ERROR: MAC address may not be empty.
Feb 15 20:13:50 debian systemd-modules-load[32678]: Failed to insert module 'ec_generic': Invalid argument
Feb 15 20:13:50 debian systemd[1]: systemd-modules-load.service: Main process exited, code=exited, status=1/FA
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- An ExecStart= process belonging to unit systemd-modules-load.service has exited.
-- 
-- The process' exit code is 'exited' and its exit status is 1.
Feb 15 20:13:50 debian systemd[1]: systemd-modules-load.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- The unit systemd-modules-load.service has entered the 'failed' state with result 'exit-code'.
Feb 15 20:13:50 debian systemd[1]: Failed to start Load Kernel Modules.
-- Subject: A start job for unit systemd-modules-load.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- A start job for unit systemd-modules-load.service has finished with a failure.
-- 
-- The job identifier is 1810 and the job result is failed.
Feb 15 20:13:50 debian sudo[16920]: pam_unix(sudo:session): session closed for user root
Feb 15 20:15:15 debian kernel: perf: interrupt took too long (3925 > 3923), lowering kernel.perf_event_max_sam
Feb 15 20:15:48 debian rtkit-daemon[879]: Supervising 4 threads of 2 processes of 1 users.
Feb 15 20:15:48 debian rtkit-daemon[879]: Supervising 4 threads of 2 processes of 1 users.
Feb 15 20:16:16 debian sudo[32729]:      jan : TTY=pts/0 ; PWD=/usr/share/ethercat/install_script ; USER=root 
Feb 15 20:16:16 debian sudo[32729]: pam_unix(sudo:session): session opened for user root by (uid=0)
lines 3148-3183/3183 (END)
janbbeck commented 3 years ago

I managed to solve this error by: sudo nano /etc/default/ethercat and manually enter the MAC address of the ethernet card of the computer at the very end of the file. For some reason this was apparently not detected. Then rerun the configuration by sudo update-ethernet-config After a reboot, linuxCNC starts.

Hope this helps someone.