#linuxcnc-devel Logs

Oct 01 2023

#linuxcnc-devel Calendar

05:13 AM rigid: can anyone imagine why there's NULL passed to strtok() here? https://github.com/LinuxCNC/linuxcnc/blob/master/src/emc/usr_intf/emcrsh.cc#L1629
05:22 AM rigid: I get a segfault with "get spindle": https://pastebin.com/ZESL7DF6
05:23 AM andypugh: I suspect it was something that I expected to get back to later.
05:24 AM andypugh: Can you raise an issue at https://github.com/LinuxCNC/linuxcnc/issues including a simple test case? (I haven’t really used linuxcncrsh)
05:25 AM rigid: sure, but maybe I can fix it
05:25 AM rigid: seems that char *s + parameter handling is needed
05:25 AM rigid: i.e. parse spindle id if there is one
05:26 AM andypugh: Yes, that would have been my first thing to try, print out s to see what’s in it.
05:26 AM andypugh: Maybe the upstream function needs to be taught how to put a spindle in there.
05:27 AM andypugh: setBrake has the same issue
05:29 AM rigid: yeah, looking over the whole code reveals a few strtok(NULL, ...)
05:29 AM andypugh: If you look at the diffs, there were some already there that I replaced, too.
05:29 AM andypugh: https://github.com/LinuxCNC/linuxcnc/commit/e3caa92e168e06e203664d855e13c1771dcc9f85#diff-83c2639e00116e1ab205e5436e239b5061abf398e2d700ce5433f64707b5f79b
05:30 AM andypugh: Line 1333 for example, used to have strtok(NULL..)
05:31 AM rigid: i start to think that passing NULL is actually valid
05:31 AM rigid: but the man page only speaks of strtok_r to use NULL as a parameter
05:32 AM rigid: ahhh
05:33 AM rigid: it's right there at the start and I missed it: "On the first call to strtok(), the string to be parsed should be specified in str. In each subsequent call that should parse the same string, str must be NULL."
05:33 AM rigid: then just a check is needed
05:34 AM rigid: andypugh: should a missing spindle parameter use 1 as default? or output an error
05:34 AM andypugh: It should use 0 as default.
05:34 AM rigid: of course. ok
05:34 AM andypugh: (ie the same behaviour as before multispindle)
05:38 AM andypugh: Actually, -1 might be better, I think that is used to mean “all spindles” but it’s 5 years since I looked at this.
05:43 AM rigid: i guess I don't need to stick to that ancient "NULL == s" style?
05:44 AM rigid: and is it ok if I remove trailing spaces in my PR? "git diff -w" should take care of that
05:49 AM andypugh: It’s probably better not to make whitespace changes, as we can’t guarantee that all users and tools use -w
05:50 AM rigid: ok
05:50 AM andypugh: But I am not going to be dogmatic about that.
05:50 AM rigid: tho i'd love to make style changes here... e.g. "pch" is such a horrible varname
05:50 AM andypugh: Yes, I was wondeing what it means myself.
05:50 AM rigid: nah you're right. better do cleanups in a seperate commit and for all files
05:51 AM rigid: probably "parameter char"
05:51 AM rigid: with char being redundant. at least that what came to my mind first.
05:51 AM andypugh: Which version of LinuxCNC are you working on?
05:52 AM rigid: master
05:52 AM andypugh: If you are going to make a pull rquest, could you base it on 2.9? (or maybe even 2.8).
05:52 AM andypugh: It’s a bug-fix and so belongs in 2.8 really.
05:52 AM rigid: ok
05:53 AM andypugh: (I will propogate it forward)
05:53 AM andypugh: Back in a bit, need to pop out to buy break…..err..lunch
06:18 AM rigid: hm, adding the first parameter to the signature of set*() and get*() functions and use strtok() inside the function for following parameters seems weird
06:18 AM rigid: better just pass context and always call all strtok()'s inside the functions
06:24 AM linuxcnc-build2: Build [#1550](http://buildbot2.highlab.com/buildbot/#builders/11/builds/1550) of `10-rip.debian-12-bookworm-rtpreempt-amd64` 4failed.
06:55 AM linuxcnc-build2: Build [#1624](http://buildbot2.highlab.com/buildbot/#builders/13/builds/1624) of `00-checkin` 4failed.
07:26 AM rigid: andypugh: i think i'll make spindle the last parameter so it's easy to have it optional
07:27 AM andypugh: In what context?
07:29 AM rigid: in all contexts. e.g. currently it's "set spindle_override spindle percent" or "set brake <spindle> <on|off>"
07:29 AM rigid: in spindle_override it's taken care off that spindle is optional. in brake it's not
07:32 AM andypugh: But won’t that break things for anyone eho has existing scripts that use the interface?
07:32 AM rigid: i doubt anyone has since it would have probably revealed those bug class earlier
07:33 AM andypugh: There is that.
07:33 AM rigid: for people with just one spindle omitting the spindle number, nothing should break
07:33 AM andypugh: Is it documented?
07:33 AM rigid: (emphasis on should) :-P
07:33 AM rigid: i added spindle number parameter to the man page
07:33 AM rigid: not finished, yet tho
08:18 AM andypugh: rigid: No rush, but I am hoping to release 2.9 in the next couple of days. It would be good to have that in there.
08:32 AM rigid: hm, what could be the reason "emcStatus->motion.traj.spindles == 0"?
08:46 AM rigid: argh, something seems odd... "set estop off" gives me ACK but consecutive "get estop" will yield ESTOP ON all the time :-(
09:39 AM rigid: hm, is there a reason for sudo use although installing to a writable path? https://github.com/LinuxCNC/linuxcnc/blob/master/tests/halcompile/personalities_mod/test.sh#L4
09:42 AM rigid: oh, RTLIB_DIR is not overridden i see
10:09 AM linuxcnc-build2: Build [#1546](http://buildbot2.highlab.com/buildbot/#builders/14/builds/1546) of `10-rip.debian-10-buster-rtpreempt-amd64` 4failed.
10:18 AM linuxcnc-build: build #3461 of 1660.rip-buster-python3 is complete: Failure [4failed compile runtests] Build details are at http://buildbot.linuxcnc.org/buildbot/builders/1660.rip-buster-python3/builds/3461 blamelist: Rene Hopf <renehopf@mac.com>
10:20 AM linuxcnc-build2: Build [#1546](http://buildbot2.highlab.com/buildbot/#builders/7/builds/1546) of `10-rip.debian-11-bullseye-rtpreempt-amd64` 4failed.
10:22 AM rigid: hm, for some reason linuxcncrsh only detects a spindle when ran locally. remotely it doesn't
10:23 AM rigid: ...but no error or debug output hinting at the problem
10:28 AM linuxcnc-build: build #3863 of 1640.rip-buster-rtpreempt-amd64 is complete: Failure [4failed compile runtests] Build details are at http://buildbot.linuxcnc.org/buildbot/builders/1640.rip-buster-rtpreempt-amd64/builds/3863 blamelist: Rene Hopf <renehopf@mac.com>
10:39 AM linuxcnc-build: build #3623 of 1650.rip-buster-rtpreempt-rpi4 is complete: Failure [4failed compile runtests] Build details are at http://buildbot.linuxcnc.org/buildbot/builders/1650.rip-buster-rtpreempt-rpi4/builds/3623 blamelist: Rene Hopf <renehopf@mac.com>
10:39 AM linuxcnc-build: build #10281 of 0000.checkin is complete: Failure [4failed] Build details are at http://buildbot.linuxcnc.org/buildbot/builders/0000.checkin/builds/10281 blamelist: Rene Hopf <renehopf@mac.com>
12:15 PM linuxcnc-build: build #3864 of 1640.rip-buster-rtpreempt-amd64 is complete: Failure [4failed compile] Build details are at http://buildbot.linuxcnc.org/buildbot/builders/1640.rip-buster-rtpreempt-amd64/builds/3864 blamelist: andypugh <andy@bodgesoc.org>
12:16 PM linuxcnc-build: build #3624 of 1650.rip-buster-rtpreempt-rpi4 is complete: Failure [4failed compile] Build details are at http://buildbot.linuxcnc.org/buildbot/builders/1650.rip-buster-rtpreempt-rpi4/builds/3624 blamelist: andypugh <andy@bodgesoc.org>
12:16 PM linuxcnc-build: build #3462 of 1660.rip-buster-python3 is complete: Failure [4failed compile] Build details are at http://buildbot.linuxcnc.org/buildbot/builders/1660.rip-buster-python3/builds/3462 blamelist: andypugh <andy@bodgesoc.org>
12:16 PM linuxcnc-build: build #10282 of 0000.checkin is complete: Failure [4failed] Build details are at http://buildbot.linuxcnc.org/buildbot/builders/0000.checkin/builds/10282 blamelist: andypugh <andy@bodgesoc.org>
12:17 PM andypugh: Well, bother!
12:25 PM rigid: I'm digging into all this libnml code but can't find a reason. There is a remote connection to my linuxcnc server (i get lots of TCPSVR request received: fd = 5, serial_number=2, request_type=1, buffer_number=2) there
12:26 PM rigid: but emcStatus on the client never seems to reflect it
12:28 PM rigid: i'll need to get some sim-hardware running to test my linuxcncrsh patch
01:38 PM linuxcnc-build: build #3464 of 1660.rip-buster-python3 is complete: Failure [4failed compile] Build details are at http://buildbot.linuxcnc.org/buildbot/builders/1660.rip-buster-python3/builds/3464 blamelist: andypugh <andy@bodgesoc.org>
01:39 PM linuxcnc-build: build #3866 of 1640.rip-buster-rtpreempt-amd64 is complete: Failure [4failed compile] Build details are at http://buildbot.linuxcnc.org/buildbot/builders/1640.rip-buster-rtpreempt-amd64/builds/3866 blamelist: andypugh <andy@bodgesoc.org>
01:39 PM linuxcnc-build: build #3626 of 1650.rip-buster-rtpreempt-rpi4 is complete: Failure [4failed compile] Build details are at http://buildbot.linuxcnc.org/buildbot/builders/1650.rip-buster-rtpreempt-rpi4/builds/3626 blamelist: andypugh <andy@bodgesoc.org>
01:39 PM linuxcnc-build: build #10284 of 0000.checkin is complete: Failure [4failed] Build details are at http://buildbot.linuxcnc.org/buildbot/builders/0000.checkin/builds/10284 blamelist: andypugh <andy@bodgesoc.org>
01:39 PM andypugh: OK, so I am not going to get away without rebooting into a uspace setup
03:32 PM linuxcnc-build: build #3465 of 1660.rip-buster-python3 is complete: Failure [4failed compile runtests] Build details are at http://buildbot.linuxcnc.org/buildbot/builders/1660.rip-buster-python3/builds/3465 blamelist: andypugh <andypugh@Boookworm.bodgesoc>
03:36 PM linuxcnc-build: build #3867 of 1640.rip-buster-rtpreempt-amd64 is complete: Failure [4failed compile runtests] Build details are at http://buildbot.linuxcnc.org/buildbot/builders/1640.rip-buster-rtpreempt-amd64/builds/3867 blamelist: andypugh <andypugh@Boookworm.bodgesoc>
03:38 PM andypugh: I don’t actually think it is my fault any more
03:58 PM linuxcnc-build: build #3627 of 1650.rip-buster-rtpreempt-rpi4 is complete: Failure [4failed compile runtests] Build details are at http://buildbot.linuxcnc.org/buildbot/builders/1650.rip-buster-rtpreempt-rpi4/builds/3627 blamelist: andypugh <andypugh@Boookworm.bodgesoc>
03:58 PM linuxcnc-build: build #10285 of 0000.checkin is complete: Failure [4failed] Build details are at http://buildbot.linuxcnc.org/buildbot/builders/0000.checkin/builds/10285 blamelist: andypugh <andypugh@Boookworm.bodgesoc>
04:00 PM andypugh: Hi pere I guess we need 2.9 to actually build before we can update the image on Debian?
04:02 PM pere: andypugh: I assume it will have to build independent of any plans to update a image?
04:02 PM pere: andypugh: not quite sure I understand the question.
04:03 PM andypugh: It’s a reflection of the day I have been having...
04:04 PM pere: bad day?
04:04 PM andypugh: I can’t get any version of LinuxCNC to build for me on RTAI.
04:05 PM andypugh: And spent a lot of the day trying to get a fix that helped RTAI to not break preempt-rt
04:06 PM andypugh: Which I think that I have done, but the packages are still not building
04:06 PM andypugh: (on the buildbot)
04:07 PM pere: how come the two approaches became incompatible?
04:08 PM andypugh: Jepler decided that there were no RTAI kernal images and cleared a lot of stuff out. (He was wrong).
04:09 PM andypugh: But, mainly, most of the developers have not been using it and so haven’t been testing the compatibility of their work with RTAI.
04:09 PM pere: Any hope to get RTAI patches mainlined into the kernel or provided as debian packages?
04:10 PM andypugh: The only RTAI buildbots is running Debian Wheezy or Ubuntu Precise, and those can’t build 2.9 or master, so no testing there either.
04:11 PM andypugh: I don’t know about official debian packages, but we can serve them from the LinuxCNC repo
04:16 PM pere: will it work with Debian bookworm?
04:19 PM andypugh: Yes, and no.
04:20 PM andypugh: Yes, I am currently running rwo machines on Bookworm with the RTAI kernel
04:20 PM andypugh: But I can’t compile LinuxCNC on them. 2.8 and earlier do not compile on Bookworm at all, and 2.9 and master do not compile on RTAI.
04:54 PM Tom_L: andypugh, what rtai kernel?
04:54 PM Tom_L: 4.19?
04:54 PM Tom_L: memleak is working on a 5.4 version
04:54 PM andypugh: 5.4.256-rtai-amd64
04:54 PM Tom_L: from his site?
04:55 PM andypugh: Yes,
04:55 PM Tom_L: i may give that a go here soon
04:55 PM Tom_L: what's latency look like on 5.4?
04:56 PM Tom_L: i think he's working on a deb for it
05:03 PM andypugh: I am not yet able to run the latency test, it won’t compile
05:04 PM andypugh: Tom_L: I am uploading the deb packeges to www.linuxcnc/dists
05:17 PM Tom_L: ok
05:34 PM andypugh: https://www.linuxcnc.org/dists/bookworm/base/binary-amd64/
05:35 PM andypugh: (Also in Bullseye)
05:49 PM linuxcnc-build2: Build [#1558](http://buildbot2.highlab.com/buildbot/#builders/14/builds/1558) of `10-rip.debian-10-buster-rtpreempt-amd64` 8completed with warnings.
05:51 PM linuxcnc-build2: Build [#1558](http://buildbot2.highlab.com/buildbot/#builders/7/builds/1558) of `10-rip.debian-11-bullseye-rtpreempt-amd64` 8completed with warnings.
05:55 PM linuxcnc-build2: Build [#1563](http://buildbot2.highlab.com/buildbot/#builders/11/builds/1563) of `10-rip.debian-12-bookworm-rtpreempt-amd64` 8completed with warnings.
06:12 PM linuxcnc-build2: Build [#1637](http://buildbot2.highlab.com/buildbot/#builders/13/builds/1637) of `00-checkin` 3completed successfully.
07:13 PM linuxcnc-build: build #3467 of 1660.rip-buster-python3 is complete: Failure [4failed compile runtests] Build details are at http://buildbot.linuxcnc.org/buildbot/builders/1660.rip-buster-python3/builds/3467 blamelist: Rene Hopf <renehopf@mac.com>
07:15 PM Unterhaus_ is now known as Unterhausen
07:35 PM linuxcnc-build2: Build [#1559](http://buildbot2.highlab.com/buildbot/#builders/7/builds/1559) of `10-rip.debian-11-bullseye-rtpreempt-amd64` 4failed.
07:39 PM linuxcnc-build2: Build [#1564](http://buildbot2.highlab.com/buildbot/#builders/11/builds/1564) of `10-rip.debian-12-bookworm-rtpreempt-amd64` 4failed.
07:41 PM linuxcnc-build2: Build [#1559](http://buildbot2.highlab.com/buildbot/#builders/14/builds/1559) of `10-rip.debian-10-buster-rtpreempt-amd64` 4failed.
07:41 PM linuxcnc-build2: Build [#1638](http://buildbot2.highlab.com/buildbot/#builders/13/builds/1638) of `00-checkin` 4failed.
07:42 PM linuxcnc-build: build #3869 of 1640.rip-buster-rtpreempt-amd64 is complete: Failure [4failed compile runtests] Build details are at http://buildbot.linuxcnc.org/buildbot/builders/1640.rip-buster-rtpreempt-amd64/builds/3869 blamelist: Rene Hopf <renehopf@mac.com>
07:56 PM Tom_L: thanks andypugh
08:02 PM Tom_L: andypugh, mesaflash is up to 3.4.8 now though
08:02 PM Tom_L: build from source
08:09 PM Tom_L: newer board support
08:34 PM linuxcnc-build: build #3629 of 1650.rip-buster-rtpreempt-rpi4 is complete: Failure [4failed compile runtests] Build details are at http://buildbot.linuxcnc.org/buildbot/builders/1650.rip-buster-rtpreempt-rpi4/builds/3629 blamelist: Rene Hopf <renehopf@mac.com>
08:34 PM linuxcnc-build: build #10287 of 0000.checkin is complete: Failure [4failed] Build details are at http://buildbot.linuxcnc.org/buildbot/builders/0000.checkin/builds/10287 blamelist: Rene Hopf <renehopf@mac.com>
09:24 PM linuxcnc-build2: Build [#1562](http://buildbot2.highlab.com/buildbot/#builders/14/builds/1562) of `10-rip.debian-10-buster-rtpreempt-amd64` 8completed with warnings.
09:25 PM linuxcnc-build2: Build [#1562](http://buildbot2.highlab.com/buildbot/#builders/7/builds/1562) of `10-rip.debian-11-bullseye-rtpreempt-amd64` 8completed with warnings.
09:52 PM linuxcnc-build2: Build [#1567](http://buildbot2.highlab.com/buildbot/#builders/11/builds/1567) of `10-rip.debian-12-bookworm-rtpreempt-amd64` 8completed with warnings.
10:15 PM linuxcnc-build2: Build [#1641](http://buildbot2.highlab.com/buildbot/#builders/13/builds/1641) of `00-checkin` 3completed successfully.
11:34 PM linuxcnc-build2: Build [#1563](http://buildbot2.highlab.com/buildbot/#builders/14/builds/1563) of `10-rip.debian-10-buster-rtpreempt-amd64` 4failed.
11:54 PM linuxcnc-build2: Build [#1563](http://buildbot2.highlab.com/buildbot/#builders/7/builds/1563) of `10-rip.debian-11-bullseye-rtpreempt-amd64` 4failed.
11:58 PM linuxcnc-build2: Build [#1568](http://buildbot2.highlab.com/buildbot/#builders/11/builds/1568) of `10-rip.debian-12-bookworm-rtpreempt-amd64` 4failed.
11:59 PM linuxcnc-build2: Build [#1642](http://buildbot2.highlab.com/buildbot/#builders/13/builds/1642) of `00-checkin` 4failed.