linuxcnc does not open after switching from rt kernel to rtai

More
23 Mar 2024 21:12 - 23 Mar 2024 21:16 #296594 by Thayloreing
Whenever I try to open my configuration after installing the Rtai kernel it gives me a debug. can you help me? 

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/realtime-5.4.258-rtai-amd64/modules/linuxcnc
LINUXCNC_CONFIG_DIR=
LINUXCNC_LANG_DIR=/usr/lib/tcltk/linuxcnc/msgs
INIVAR=inivar
HALCMD=halcmd
LINUXCNC_EMCSH=/usr/bin/wish8.6
LINUXCNC - 2.9.2
Machine configuration directory is '/home/trhs/linuxcnc/configs/my-mill'
Machine configuration file is 'my-mill.ini'
INIFILE=/home/trhs/linuxcnc/configs/my-mill/my-mill.ini
VERSION=1.1
PARAMETER_FILE=linuxcnc.var
TPMOD=
HOMEMOD=
TASK=milltask
HALUI=
DISPLAY=axis
COORDINATES=X Y Z
KINEMATICS=trivkins coordinates=XYZ
Starting LinuxCNC...
Starting LinuxCNC server program: linuxcncsvr
Loading Real Time OS, RTAPI, and HAL_LIB modules
Starting LinuxCNC IO program: io
linuxcnc TPMOD=tpmod HOMEMOD=homemod EMCMOT=motmod
Found file(REL): ./my-mill.hal
Found file(REL): ./custom.hal
Starting TASK program: milltask
Starting DISPLAY program: axis
Shutting down and cleaning up LinuxCNC...
Could not find pid(s) for task milltask
task: 12 cycles, min=0.000012, max=0.010556, avg=0.007499, 0 latency excursions (> 10x expected cycle time of 0.010000s)
USRMOT: ERROR: command timeout
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments

Debug file information:
.
link (updating variable file): Arquivo ou diretório inexistente
/usr/bin/linuxcnc, linha 977:  1576 Falha de segmentação  $EMCDISPLAY -ini "$INIFILE" $EMCDISPLAYARGS $EXTRA_ARGS
Traceback (most recent call last):
  File "/usr/bin/axis-remote", line 26, in <module>
    import sys, getopt, os
  File "/usr/lib/python3.11/getopt.py", line 38, in <module>
    from gettext import gettext as _
  File "/usr/lib/python3.11/gettext.py", line 72, in <module>
    _token_pattern = re.compile(r"""
                     ^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/re/__init__.py", line 227, in compile
    return _compile(pattern, flags)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/re/__init__.py", line 294, in _compile
    p = _compiler.compile(pattern, flags)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/re/_compiler.py", line 743, in compile
    p = _parser.parse(p, flags)
        ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/re/_parser.py", line 980, in parse
    p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/re/_parser.py", line 455, in _parse_sub
    itemsappend(_parse(source, state, verbose, nested + 1,
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/re/_parser.py", line 720, in _parse
    name = source.getuntil(">", "group name")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SystemError: ../Objects/dictobject.c:1778: bad argument to internal function
1507
Sinal 11 (SEGV) capturado por ps (4.0.2).
/usr/bin/ps:src/ps/display.c:71: por favor, relate esse erro
1571
free(): corrupted unsorted chunks
Stopping realtime threads
Unloading hal components

Kernel message information:
[   61.891243] I-pipe: head domain RTAI registered.
[   61.891245] RTAI[hal]: mounted. ISOL_CPUS_MASK: 0.
[   61.891248] SYSINFO - # CPUs: 2, TIMER NAME: 'lapic', TIMER IRQ: 4355, TIMER FREQ: 20779499, CLOCK NAME: 'tsc', CLOCK FREQ: 2992481000, CPU FREQ: 2992481000, LINUX TIMER IRQ: 4355.
[   61.904460] RTAI[malloc]: global heap size = 2097152 bytes, <BSD>.
[   61.904476] kstacks pool size = 524288 bytes
[   61.904477] RTAI[sched]: hard timer type/freq = lapic/20779499(Hz)
[   61.904478] linear timed lists.
[   61.904479] RTAI[sched]: Linux timer freq = 250 (Hz), TimeBase freq = 2992481000 hz.
[   61.904480] RTAI[sched]: timer setup = 48 ns, resched latency = 0 ns.
[   61.909225] USERMODE CHECK: OK.
[   61.909226] USERMODE CHECK PROVIDED (ns): KernelLatency 864, UserLatency 1172.
[   61.909227] FINAL CALIBRATION SUMMARY (ns): KernelLatency 864, UserLatency 1172.
[   61.912297] RTAI[math]: loaded integrated musl libm version 1.2.3.
[   62.061417] config string '0x378 out'
[   62.292343] axis[1576]: segfault at 0 ip 000000000052d600 sp 00007ffecd8500b0 error 6 in python3.11[41f000+2b5000]
[   62.292350] Code: f8 4c 89 7b 38 4d 8d 57 02 48 81 7f 08 e0 a7 95 00 0f 85 4e ec ff ff 48 83 7f 10 02 0f 85 43 ec ff ff 48 8b 47 20 4d 8d 75 08 <48> 83 00 01 49 89 45 f8 48 8b 47 18 48 83 00 01 49 89 45 00 48 83
[   64.654710] RTAI[math]: unloaded.
[   64.708746] SCHED releases registered named ALIEN PEDV$D
[   64.718730] RTAI[malloc]: unloaded.
[   64.824730] RTAI[sched]: unloaded (forced hard/soft/hard transitions: traps 0, syscalls 0).
[   64.843156] I-pipe: head domain RTAI unregistered.
[   64.843160] RTAI[hal]: unmounted.



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

                Date: sáb 23 mar 2024 17:55:44 -03
            UTC Date: sáb 23 mar 2024 20:55:44 UTC
        this program: /usr/bin/linuxcnc_info
              uptime: 17:55:44 up 1 min, 1 user, load average: 0,50, 0,30, 0,11
     lsb_release -sa: Debian Debian GNU/Linux 12 (bookworm) 12 bookworm
            linuxcnc: /usr/bin/linuxcnc
                 pwd: /home/trhs/linuxcnc/configs/my-mill
                USER: trhs
             LOGNAME: trhs
                HOME: /home/trhs
              EDITOR:
              VISUAL:
            LANGUAGE: pt_BR:pt:en
                TERM: dumb
           COLORTERM:
             DISPLAY: :0.0
             DESKTOP: lightdm-xsession
        display size: 1024x768 pixels (270x203 millimeters)
                PATH: /usr/bin:/home/trhs/linuxcnc/configs/my-mill/bin:/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games

uname items:
         nodename -n: trhs
      kernel-name -s: Linux
      kernel-vers -v: #2 SMP Thu Oct 19 11:54:56 BST 2023
          machine -m: x86_64
        processor -p: unknown
         platform -i: unknown
      oper system -o: GNU/Linux

/proc items:
             cmdline: BOOT_IMAGE=/boot/vmlinuz-5.4.258-rtai-amd64 root=UUID=4d531092-e935-4884-be17-98b95f745ab2 ro initrd=/install/gtk/initrd.gz quiet
          model name: Intel(R) Core(TM)2 Duo CPU E8400 @ 3.00GHz
               cores: 2
             cpu MHz: 2834.936
             parport: 0000-0000 : parport0 0000-0000 : parport0 0000-0000 : parport1
              serial: 0000-0000 : serial 0000-0000 : serial 0000-0000 : serial 0000-0000 : serial

Versions:
                 gcc: gcc (Debian 12.2.0-14) 12.2.0
              python: Python 3.11.2
                 git: not_in_PATH
          git commit: NA
                 tcl: 8.6
                  tk: 8.6
               glade: not_in_PATH

linuxcnc_var all:

     LINUXCNCVERSION: 2.9.2
LINUXCNC_AUX_GLADEVCP: /usr/share/linuxcnc/aux_gladevcp
LINUXCNC_AUX_EXAMPLES: /usr/share/linuxcnc/aux_examples
            REALTIME: /usr/lib/linuxcnc/realtime
                 RTS: /usr/realtime-5.4.258-rtai-amd64/bin/rtai-config
          HALLIB_DIR: /usr/share/linuxcnc/hallib
              PYTHON: /usr/bin/python3.11

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)
||/ Nome            Versão       Arquitectura Descrição
+++-===============-============-============-=============================================
ii  linuxcnc        1:2.9.2      amd64        motion controller for CNC machines and robots
un  linuxcnc-doc    <nenhuma>    <nenhuma>    (nenhuma descrição disponível)
un  linuxcnc-doc-en <nenhuma>    <nenhuma>    (nenhuma descrição disponível)
un  linuxcnc-doc-es <nenhuma>    <nenhuma>    (nenhuma descrição disponível)
un  linuxcnc-doc-fr <nenhuma>    <nenhuma>    (nenhuma descrição disponível)
un  linuxcnc-sim    <nenhuma>    <nenhuma>    (nenhuma descrição disponível)
rc  linuxcnc-uspace 1:2.9.2      amd64        motion controller for CNC machines and robots


 
Last edit: 23 Mar 2024 21:16 by Thayloreing.

Please Log in or Create an account to join the conversation.

More
23 Mar 2024 21:31 #296595 by PCW
You need to use a RTAI version of LinuxCNC with the RTAI kernel

Please Log in or Create an account to join the conversation.

More
23 Mar 2024 23:21 #296600 by tommylight
sudo apt purge linuxcnc-uspace linuxcnc-uspace-dev
sudo apt install linuxcnc
First line removes the existing version, the second line installs the correct version for RTAI.
This only works with the official ISO

Please Log in or Create an account to join the conversation.

More
24 Mar 2024 11:00 #296616 by Thayloreing
I did what you mentioned, but now I have another problem.


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/realtime-5.4.258-rtai-amd64/modules/linuxcnc
LINUXCNC_CONFIG_DIR=
LINUXCNC_LANG_DIR=/usr/lib/tcltk/linuxcnc/msgs
INIVAR=inivar
HALCMD=halcmd
LINUXCNC_EMCSH=/usr/bin/wish8.6
LINUXCNC - 2.9.2
Machine configuration directory is '/home/trhs/linuxcnc/configs/my-mill'
Machine configuration file is 'my-mill.ini'
INIFILE=/home/trhs/linuxcnc/configs/my-mill/my-mill.ini
VERSION=1.1
PARAMETER_FILE=linuxcnc.var
TPMOD=
HOMEMOD=
TASK=milltask
HALUI=
DISPLAY=axis
COORDINATES=X Y Z
KINEMATICS=trivkins coordinates=XYZ
Starting LinuxCNC...
Starting LinuxCNC server program: linuxcncsvr
Loading Real Time OS, RTAPI, and HAL_LIB modules
Starting LinuxCNC IO program: io
linuxcnc TPMOD=tpmod HOMEMOD=homemod EMCMOT=motmod
Found file(REL): ./my-mill.hal
Found file(REL): ./custom.hal
Starting TASK program: milltask
Starting DISPLAY program: axis
Shutting down and cleaning up LinuxCNC...
task: 1 cycles, min=179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000, max=0.000000, avg=0.000000, 0 latency excursions (> 10x expecRemoving HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments

Debug file information:
.
/usr/bin/linuxcnc, linha 977: 1838 Falha de segmentação $EMCDISPLAY -ini "$INIFILE" $EMCDISPLAYARGS $EXTRA_ARGS
/usr/bin/linuxcnc, linha 660: 1848 Falha de segmentação axis-remote --ping
1769
1834
Sinal 11 (SEGV) capturado por ps (4.0.2).
/usr/bin/ps:src/ps/display.c:71: por favor, relate esse erro
Stopping realtime threads
Unloading hal components

Kernel message information:
[ 326.170553] I-pipe: head domain RTAI registered.
[ 326.170555] RTAI[hal]: mounted. ISOL_CPUS_MASK: 0.
[ 326.170557] SYSINFO - # CPUs: 2, TIMER NAME: 'lapic', TIMER IRQ: 4355, TIMER FREQ: 20780999, CLOCK NAME: 'tsc', CLOCK FREQ: 2992481000, CPU FREQ: 2992481000, LINUX TIMER IRQ: 4355.
[ 326.177664] RTAI[malloc]: global heap size = 2097152 bytes, <BSD>.
[ 326.177680] kstacks pool size = 524288 bytes
[ 326.177681] RTAI[sched]: hard timer type/freq = lapic/20780999(Hz)
[ 326.177682] linear timed lists.
[ 326.177683] RTAI[sched]: Linux timer freq = 250 (Hz), TimeBase freq = 2992481000 hz.
[ 326.177684] RTAI[sched]: timer setup = 48 ns, resched latency = 0 ns.
[ 326.181197] USERMODE CHECK: OK.
[ 326.181198] USERMODE CHECK PROVIDED (ns): KernelLatency 864, UserLatency 1172.
[ 326.181199] FINAL CALIBRATION SUMMARY (ns): KernelLatency 864, UserLatency 1172.
[ 326.187593] RTAI[math]: loaded integrated musl libm version 1.2.3.
[ 326.333741] config string '0x378 out'
[ 326.428483] axis[1838]: segfault at 0 ip 00000000004fb9fe sp 00007ffc8a21df30 error 6 in python3.11[41f000+2b5000]
[ 326.428490] Code: 20 00 00 00 00 48 8b 05 80 1f 56 00 48 8b 40 10 48 8b 90 e8 02 00 00 48 8b 43 f8 48 8b 72 08 83 e0 03 66 48 0f 6e c2 48 09 f0 <48> 89 0e 66 48 0f 6e c8 66 0f 6c c1 0f 11 43 f0 48 89 4a 08 48 83
[ 326.542866] axis-remote[1848]: segfault at 78 ip 00000000005181a4 sp 00007ffcb04bb640 error 4 in python3.11[41f000+2b5000]
[ 326.542873] Code: 48 83 ec 18 4c 8b 6f 10 4d 85 ed 0f 8e 45 05 00 00 48 bb c5 67 56 16 2f eb d4 27 49 89 ff 45 31 e4 4b 8b 6c e7 18 4c 8b 75 08 <49> 8b 46 78 48 85 c0 0f 84 8d 2e f1 ff 48 3d 70 eb 4f 00 0f 85 a3
[ 328.830597] RTAI[math]: unloaded.
[ 328.892602] SCHED releases registered named ALIEN PEDV$D
[ 328.898307] RTAI[malloc]: unloaded.
[ 329.008589] RTAI[sched]: unloaded (forced hard/soft/hard transitions: traps 0, syscalls 0).
[ 329.031128] I-pipe: head domain RTAI unregistered.
[ 329.031132] RTAI[hal]: unmounted.



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

Date: dom 24 mar 2024 07:54:48 -03
UTC Date: dom 24 mar 2024 10:54:48 UTC
this program: /usr/bin/linuxcnc_info
uptime: 07:54:48 up 5 min, 1 user, load average: 0,20, 0,23, 0,11
lsb_release -sa: Debian Debian GNU/Linux 12 (bookworm) 12 bookworm
linuxcnc: /usr/bin/linuxcnc
pwd: /home/trhs/linuxcnc/configs/my-mill
USER: trhs
LOGNAME: trhs
HOME: /home/trhs
EDITOR:
VISUAL:
LANGUAGE: pt_BR:pt:en
TERM: dumb
COLORTERM:
DISPLAY: :0.0
DESKTOP: lightdm-xsession
display size: 1024x768 pixels (270x203 millimeters)
PATH: /usr/bin:/home/trhs/linuxcnc/configs/my-mill/bin:/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games

uname items:
nodename -n: trhs
kernel-name -s: Linux
kernel-vers -v: #2 SMP Thu Oct 19 11:54:56 BST 2023
machine -m: x86_64
processor -p: unknown
platform -i: unknown
oper system -o: GNU/Linux

/proc items:
cmdline: BOOT_IMAGE=/boot/vmlinuz-5.4.258-rtai-amd64 root=UUID=4d531092-e935-4884-be17-98b95f745ab2 ro initrd=/install/gtk/initrd.gz quiet
model name: Intel(R) Core(TM)2 Duo CPU E8400 @ 3.00GHz
cores: 2
cpu MHz: 2879.539
parport: 0000-0000 : parport0 0000-0000 : parport0 0000-0000 : parport1
serial: 0000-0000 : serial 0000-0000 : serial 0000-0000 : serial 0000-0000 : serial

Versions:
gcc: gcc (Debian 12.2.0-14) 12.2.0
python: Python 3.11.2
git: not_in_PATH
git commit: NA
tcl: 8.6
tk: 8.6
glade: not_in_PATH

linuxcnc_var all:

LINUXCNCVERSION: 2.9.2
LINUXCNC_AUX_GLADEVCP: /usr/share/linuxcnc/aux_gladevcp
LINUXCNC_AUX_EXAMPLES: /usr/share/linuxcnc/aux_examples
REALTIME: /usr/lib/linuxcnc/realtime
RTS: /usr/realtime-5.4.258-rtai-amd64/bin/rtai-config
HALLIB_DIR: /usr/share/linuxcnc/hallib
PYTHON: /usr/bin/python3.11

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)
||/ Nome Versão Arquitectura Descrição
+++-===============-============-============-=============================================
ii linuxcnc 1:2.9.2 amd64 motion controller for CNC machines and robots
un linuxcnc-doc <nenhuma> <nenhuma> (nenhuma descrição disponível)
un linuxcnc-doc-en <nenhuma> <nenhuma> (nenhuma descrição disponível)
un linuxcnc-sim <nenhuma> <nenhuma> (nenhuma descrição disponível)
un linuxcnc-uspace <nenhuma> <nenhuma> (nenhuma descrição disponível)

Please Log in or Create an account to join the conversation.

More
24 Mar 2024 17:50 #296631 by Thayloreing
It's giving me a segment error now, how can I get around this?

Please Log in or Create an account to join the conversation.

More
25 Mar 2024 01:23 #296667 by tommylight
That is graphic issue, happens sometimes with RTAI kernels, so
-do you get the correct resolution on screen or is screen stretched (check display settings)
-what graphic card is in use?

Please Log in or Create an account to join the conversation.

More
25 Mar 2024 09:47 - 25 Mar 2024 09:57 #296705 by Thayloreing
I don't have a graphics card, just the core 2 duo e8400 processor with integrated video, the screen is at normal resolution and working, only when I try to open Linuxcnc, sometimes the screen goes black and I have to restart the computer, is there anything I can do? do to get around it?
Last edit: 25 Mar 2024 09:57 by Thayloreing.

Please Log in or Create an account to join the conversation.

More
25 Mar 2024 11:11 #296712 by tommylight
Well that should work normally, so can you try to run LinuxCNC from a terminal and post the results ?
Open a terminal and type linuxcnc, it should bring up the config picker, choose your config and press enter.

Please Log in or Create an account to join the conversation.

More
25 Mar 2024 15:13 - 25 Mar 2024 15:15 #296727 by Thayloreing
I did what you asked me to do, then it opened, but what I did using stepconfig doesn't open and gives me a segment error
 
Last edit: 25 Mar 2024 15:15 by Thayloreing.

Please Log in or Create an account to join the conversation.

More
25 Mar 2024 17:40 #296749 by tommylight
Make a new configuration with same settings, choose AXIS GUI, not any other, save, start that config, see if it fails.

Please Log in or Create an account to join the conversation.

Time to create page: 0.186 seconds
Powered by Kunena Forum