Debian 12 RTAI

  • JT
  • JT's Avatar Topic Author
  • Away
  • Administrator
  • Administrator
More
29 Jun 2024 11:50 #304017 by JT
Debian 12 RTAI was created by JT
I installed a generic Debian 12 then installed
www.linuxcnc.org/dists/bookworm/2.9-rt/b...xcnc_2.9.2_amd64.deb
www.linuxcnc.org/dists/bookworm/base/bin...ai-amd64-2_amd64.deb
www.linuxcnc.org/dists/bookworm/base/bin...xcnc-delta_amd64.deb

When I try and run LinuxCNC the config picker just freezes up. Latency is crazy good...

When I try and run the testsuite I get
john@rtai:/usr/realtime-5.4.258-rtai-amd64/testsuite$ pwd
/usr/realtime-5.4.258-rtai-amd64/testsuite
john@rtai:/usr/realtime-5.4.258-rtai-amd64/testsuite$ sudo /usr/realtime-5.4.258-rtai-amd64/testsuite/display
[sudo] password for john:
CANNOT FIND MAILBOX
john@rtai:/usr/realtime-5.4.258-rtai-amd64/testsuite$ sudo /usr/realtime-5.4.258-rtai-amd64/testsuite/latency
CANNOT CREATE MAILBOX
john@rtai:/usr/realtime-5.4.258-rtai-amd64/testsuite$ sudo /usr/realtime-5.4.258-rtai-amd64/testsuite/run
.runinfo is /usr/realtime-5.4.258-rtai-amd64/testsuite/.runinfo
RTAI loaded.
Unloading modules...
Running rmmod on /usr/realtime-5.4.258-rtai-amd64/testsuite/.runinfo...
rmmod: ERROR: Module rtai_msg is not currently loaded
rmmod: ERROR: Module rtai_mbx is not currently loaded
rmmod: ERROR: Module rtai_sched is in use by: rtapi
rmmod: ERROR: Module rtai_hal is in use by: rtapi rtai_sched
All RTAI modules unloaded.
Running insmod on /usr/realtime-5.4.258-rtai-amd64/testsuite/.runinfo...
insmod: ERROR: could not insert module /usr/realtime-5.4.258-rtai-amd64/modules/rtai_hal.ko: File exists
Error inserting rtai_hal.ko
CANNOT CREATE MAILBOX
CANNOT FIND MAILBOX
Cleaning up...
rmmod: ERROR: Module rtai_msg is not currently loaded
Error removing rtai_msg.ko

Anyone have an idea what I missed?

JT
 

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

More
29 Jun 2024 13:50 #304019 by tommylight
Replied by tommylight on topic Debian 12 RTAI
Try
halrun -U
then try to run the included parallel port configuration
mind the upper case U

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

  • JT
  • JT's Avatar Topic Author
  • Away
  • Administrator
  • Administrator
More
29 Jun 2024 14:03 #304020 by JT
Replied by JT on topic Debian 12 RTAI
This is what I get:
john@rtai:/usr/realtime-5.4.258-rtai-amd64/testsuite$ halrun -U
ERROR:  Can't remove RTAI modules, kill the following process(es) first
                     USER        PID ACCESS COMMAND
/dev/rtai_shm:       john       1106 ....m halcmd

JT

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

  • JT
  • JT's Avatar Topic Author
  • Away
  • Administrator
  • Administrator
More
29 Jun 2024 14:09 #304021 by JT
Replied by JT on topic Debian 12 RTAI
Rebooting and just running halrun from a terminal I get an error with motmod:
john@rtai:~$ halrun
halcmd: loadrt trivkins coordinates=XYZ
halcmd: loadrt motmod base_period_nsec=100000 servo_period_nsec=1000000 num_joints=3
insmod: ERROR: could not insert module /usr/realtime-5.4.258-rtai-amd64/modules/linuxcnc/motmod.ko: Unknown symbol in module
<stdin>:2: exit value: 1
<stdin>:2: insmod for motmod failed, returned -1
See the output of 'dmesg' for more information.
halcmd: 

JT

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

  • JT
  • JT's Avatar Topic Author
  • Away
  • Administrator
  • Administrator
More
29 Jun 2024 14:12 #304022 by JT
Replied by JT on topic Debian 12 RTAI
One thing I noticed is Linuxcnc and RTAI versions don't match on the downloads page.
 

Dunno if that is an issue or not.
JT
 
Attachments:

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

More
29 Jun 2024 15:40 #304025 by cornholio
Replied by cornholio on topic Debian 12 RTAI
Ran modinfo and it seems it has dependencies
sudo modinfo /usr/realtime-5.4.258-rtai-amd64/modules/linuxcnc/motmod.ko 
[sudo] password for rmurphy: 
filename:       /usr/realtime-5.4.258-rtai-amd64/modules/linuxcnc/motmod.ko
license:        GPL
description:    Motion Controller for EMC
author:         Matt Shaver/John Kasunich
depends:        homecomp,tpmod,hal_lib,millturn,rtapi,rtai_math
name:           motmod
vermagic:       5.4.258-rtai-amd64 SMP mod_unload 
parm:           key:shared memory key (int)
parm:           base_period_nsec:fastest thread period (nsecs) (long)
parm:           base_thread_fp:floating point in base thread? (int)
parm:           servo_period_nsec:servo thread period (nsecs) (long)
parm:           traj_period_nsec:trajectory planner period (nsecs) (long)
parm:           num_spindles:number of spindles (int)
parm:           num_joints:number of joints used in kinematics (int)
parm:           num_extrajoints:number of extra joints (not used in kinematics) (int)
parm:           num_dio:number of digital inputs/outputs (int)
parm:           names_din:names of digital inputs (array of charp)
parm:           names_dout:names of digital outputs (array of charp)
parm:           num_aio:number of analog inputs/outputs (int)
parm:           names_ain:names of analog inputs (array of charp)
parm:           names_aout:names of analog outputs (array of charp)
parm:           num_misc_error:number of misc error inputs (int)
parm:           names_misc_errors:names of errors (array of charp)
parm:           unlock_joints_mask:mask to select joints for unlock pins (int)

There's a whole lot of modules that need loading before motmod

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

  • JT
  • JT's Avatar Topic Author
  • Away
  • Administrator
  • Administrator
More
29 Jun 2024 15:46 #304026 by JT
Replied by JT on topic Debian 12 RTAI
Hmm, I think the startup scrip does some magic but it freezes on me and does not print anything to the terminal.

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

  • JT
  • JT's Avatar Topic Author
  • Away
  • Administrator
  • Administrator
More
29 Jun 2024 15:51 #304027 by JT
Replied by JT on topic Debian 12 RTAI
Interesting a Stepconf sim started up and ran then Firefox crashed then the sim crashed with this:
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/john/linuxcnc/configs/my-mill'
Machine configuration file is 'my-mill.ini'
INIFILE=/home/john/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
libnml/buffer/shmem.cc 507: SHMEM: Can't take semaphore

**********************************************************
* Current Directory = /home/john/linuxcnc/configs/my-mill
* 
**********************************************************
* BufferName = toolSts
* BufferType = 0
* ProcessName = emc
* Configuration File = /usr/share/linuxcnc/linuxcnc.nml
* CMS Status = -1 (CMS_MISC_ERROR:   A miscellaneous  error occurred.)
* Recent errors repeated:

SHMEM: Can't take semaphore



* BufferLine: B toolSts               SHMEM   localhost       1024    0       0       5       16 1005 TCP=5005 xdr
* ProcessLine: P emc           toolSts         LOCAL   localhost       R       0       1.0     0       0
* error_type = 5 (NML_INTERNAL_CMS_ERROR)
************************************************************

Shutting down and cleaning up LinuxCNC...
task: 4249 cycles, min=0.000005, max=0.077609, avg=0.010031, 0 latency excursions (> 10x expected cycle time of 0.010000s)
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments

Debug file information:
link (updating variable file): No such file or directory
note: MAXV     max: 1.000 units/sec 60.000 units/min
note: LJOG     max: 1.000 units/sec 60.000 units/min
note: LJOG default: 0.100 units/sec 6.000 units/min
note: jog_order='XYZ'
note: jog_invert=set()
/usr/bin/linuxcnc: line 977:  1788 Segmentation fault      $EMCDISPLAY -ini "$INIFILE" $EMCDISPLAYARGS $EXTRA_ARGS
1715
Inconsistency detected by ld.so: rtld.c: 1656: dl_main: Assertion `main_map != NULL' failed!
1784
Stopping realtime threads
Unloading hal components

Kernel message information:
[   88.945183] I-pipe: head domain RTAI registered.
[   88.945184] RTAI[hal]: mounted. ISOL_CPUS_MASK: 0.
[   88.945185] SYSINFO - # CPUs: 4, TIMER NAME: 'lapic-deadline', TIMER IRQ: 4355, TIMER FREQ: 474987506, CLOCK NAME: 'tsc', CLOCK FREQ: 3791999000, CPU FREQ: 3791999000, LINUX TIMER IRQ: 4355.
[   88.949322] RTAI[malloc]: global heap size = 2097152 bytes, <BSD>.
[   88.949347] kstacks pool size = 524288 bytes
[   88.949347] RTAI[sched]: hard timer type/freq = lapic-deadline/474987506(Hz)
[   88.949348] linear timed lists.
[   88.949348] RTAI[sched]: Linux timer freq = 250 (Hz), TimeBase freq = 3791999000 hz.
[   88.949349] RTAI[sched]: timer setup = 82 ns, resched latency = 0 ns.
[   88.950696] USERMODE CHECK: OK.
[   88.950697] USERMODE CHECK PROVIDED (ns): KernelLatency 809, UserLatency 1094.
[   88.950698] FINAL CALIBRATION SUMMARY (ns): KernelLatency 809, UserLatency 1094.
[   88.966552] RTAI[math]: loaded integrated musl libm version 1.2.3.
[   89.079357] traps: hal_manualtoolc[1775] general protection fault ip:51710d sp:7ffc0ba72b10 error:0 in python3.11[41f000+2b3000]
[   98.833243] [pango] FcInit[1819]: segfault at 10 ip 00007f14d476e579 sp 00007f14d188bb90 error 4 in libc.so.6[7f14d46fd000+155000]
[   98.833247] Code: 8b 4e 08 49 39 c8 0f 82 7d 03 00 00 48 83 f9 0f 0f 86 73 03 00 00 4c 8b 06 49 83 e0 f8 49 39 c0 0f 85 db 05 00 00 4c 8b 42 18 <49> 3b 50 10 0f 85 fd 04 00 00 4c 39 7a 10 0f 85 f3 04 00 00 f6 c1
[  131.785856] axis[1788]: segfault at 14 ip 00007f0b06c91a50 sp 00007fffbfc57fe0 error 4 in libtcl8.6.so[7f0b06bd8000+143000]
[  131.785862] Code: 66 2e 0f 1f 84 00 00 00 00 00 4d 85 f6 74 b0 41 c7 06 00 00 00 00 eb a7 66 90 48 85 db 0f 84 38 ff ff ff 0f 1f 80 00 00 00 00 <44> 39 6b 10 75 06 4c 39 7b 20 74 d4 48 8b 1b 48 85 db 75 ec e9 18
[  134.163588] RTAI[math]: unloaded.
[  134.226200] SCHED releases registered named ALIEN PEDV$D
[  134.228332] RTAI[malloc]: unloaded.
[  134.338161] RTAI[sched]: unloaded (forced hard/soft/hard transitions: traps 0, syscalls 0).
[  134.355825] I-pipe: head domain RTAI unregistered.
[  134.355829] RTAI[hal]: unmounted.

JT

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

  • JT
  • JT's Avatar Topic Author
  • Away
  • Administrator
  • Administrator
More
29 Jun 2024 15:53 #304028 by JT
Replied by JT on topic Debian 12 RTAI
If I try and run the sim again I get:
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/john/linuxcnc/configs/my-mill'
Machine configuration file is 'my-mill.ini'
INIFILE=/home/john/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: 34 cycles, min=0.000005, max=0.011682, avg=0.005748, 0 latency excursions (> 10x expected cycle time of 0.010000s)
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments

Debug file information:
/usr/bin/linuxcnc: line 977:  2934 Segmentation fault      $EMCDISPLAY -ini "$INIFILE" $EMCDISPLAYARGS $EXTRA_ARGS
2862
2931
Stopping realtime threads
Unloading hal components

Kernel message information:
[  270.856729] I-pipe: head domain RTAI registered.
[  270.856730] RTAI[hal]: mounted. ISOL_CPUS_MASK: 0.
[  270.856732] SYSINFO - # CPUs: 4, TIMER NAME: 'lapic-deadline', TIMER IRQ: 4355, TIMER FREQ: 474987506, CLOCK NAME: 'tsc', CLOCK FREQ: 3791999000, CPU FREQ: 3791999000, LINUX TIMER IRQ: 4355.
[  270.859936] RTAI[malloc]: global heap size = 2097152 bytes, <BSD>.
[  270.859960] kstacks pool size = 524288 bytes
[  270.859960] RTAI[sched]: hard timer type/freq = lapic-deadline/474987506(Hz)
[  270.859961] linear timed lists.
[  270.859961] RTAI[sched]: Linux timer freq = 250 (Hz), TimeBase freq = 3791999000 hz.
[  270.859962] RTAI[sched]: timer setup = 82 ns, resched latency = 0 ns.
[  270.860778] USERMODE CHECK: OK.
[  270.860778] USERMODE CHECK PROVIDED (ns): KernelLatency 809, UserLatency 1094.
[  270.860779] FINAL CALIBRATION SUMMARY (ns): KernelLatency 809, UserLatency 1094.
[  270.867139] RTAI[math]: loaded integrated musl libm version 1.2.3.
[  271.150629] axis[2934]: segfault at 0 ip 00007fbaa6352083 sp 00007ffdc8eb94c0 error 6 in libtcl8.6.so[7fbaa62ad000+143000]
[  271.150634] Code: 8b 5c 24 20 e9 ae fe ff ff 66 0f 1f 44 00 00 48 8b 45 00 0f b6 4a 01 49 83 c6 08 48 83 c2 02 48 8b 40 70 48 8b 04 c8 49 89 06 <83> 00 01 0f b6 02 e9 2e ff ff ff 66 90 49 8b 8c 24 a8 00 00 00 48
[  273.622344] RTAI[math]: unloaded.
[  273.684923] SCHED releases registered named ALIEN PEDV$D
[  273.697002] RTAI[malloc]: unloaded.
[  273.804895] RTAI[sched]: unloaded (forced hard/soft/hard transitions: traps 0, syscalls 0).
[  273.822479] I-pipe: head domain RTAI unregistered.
[  273.822482] RTAI[hal]: unmounted.

JT

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

More
29 Jun 2024 17:35 #304039 by andypugh
Replied by andypugh on topic Debian 12 RTAI
You should have matching 5.4.258 linux-image, linux-headers and RTAI modules from here:
www.linuxcnc.org/dists/bookworm/base/binary-amd64/
And then the linuxcnc deb from here: www.linuxcnc.org/dists/bookworm/2.9-rt/binary-amd64/

If that works then it looks like the docs need updating. If that doesn't work then it looks like I need to dig deeper.
The following user(s) said Thank You: JT

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

Time to create page: 0.111 seconds
Powered by Kunena Forum