#linuxcnc-devel Logs
Sep 24 2018
#linuxcnc-devel Calendar
08:35 AM jepler: kunena forum update coming up..
08:45 AM jepler: .. afk again, everything looks OK after the mandatory "edit a php file to restore the nav bar on mobile" since that file gets overwritten on every update argh
01:07 PM CaptHindsight: memleak> Somewhere between LinuxCNC 2.6.13 and 2.7.14, rtai_shm was removed from the tree entirely.
01:07 PM CaptHindsight: <memleak> Ah: 291d2594ca2dce17bdce70df6c787ffd7a8cc3dc
01:09 PM CaptHindsight: regardless of what rtai_sched does, rt_shm_free and rt_shm_alloc are only provided by rtai_shm.
01:09 PM CaptHindsight: <memleak> https://github.com/NTULINUX/RTAI/blob/master/base/ipc/shm/shm.c
01:10 PM CaptHindsight: what to do with this?
01:10 PM seb_kuzminsky: i don't understand what you're asking. is there a problem that needs addressing?
01:11 PM CaptHindsight: rtai_shm is required
01:12 PM CaptHindsight: I'm just cutting and pasting what he posted late Friday
01:13 PM CaptHindsight: it's required and it's missing
01:13 PM seb_kuzminsky: i didn't understand it then either :-)
01:13 PM seb_kuzminsky: i think it's required and it's not missing
01:13 PM CaptHindsight: is it somewhere else?
01:14 PM CaptHindsight: I'll ask him later
01:16 PM memfrob: Hello! So what's going on?
01:16 PM CaptHindsight: is something missing from the LCNC tree for RTAI?
01:17 PM CaptHindsight: " Somewhere between LinuxCNC 2.6.13 and 2.7.14, rtai_shm was removed from the tree entirely."
01:17 PM seb_kuzminsky: rt_shm_alloc and rt_shm_free are both in rtai_sched.ko, in the rtai we currently ship (based on rtai 3.9)
01:17 PM memfrob: Yes, LinuxCNC doesn't include rtai_shm.ko -- rtapi: Unknown symbol rt_shm_free (err 0) [ 3902.786530] rtapi: Unknown symbol rt_shm_alloc (err 0)
01:18 PM memfrob: I don't think that's right but I can check the RTAI source..
01:18 PM seb_kuzminsky: for clarity, linuxcnc itself doesn't include any rtai modules, we ship a separate package containing the rtai modules
01:19 PM memfrob: What I mean by include, is include the modules in it's scripts
01:19 PM memfrob: module-helper doesn't include rtai_shm in it's list, nor scripts/rtapi.conf
01:19 PM seb_kuzminsky: the "current" (ie, least old) version of that package is 3.9.265.gd99c55e, built from the shabby/memfrob github way back when
01:19 PM seb_kuzminsky: right, there's no rtai_shm module in rtai 3.9 or 5.0, afaik
01:20 PM seb_kuzminsky: the shm functions are included in rtai_sched.ki
01:20 PM seb_kuzminsky: *ko
01:20 PM memfrob: That doesn't make any sense to me but I'll check the code.
01:21 PM memfrob: RTAI 3.9 upstream has no shm symbols in sched -- checking shabby tree
01:24 PM memfrob: Nothing..
01:25 PM seb_kuzminsky: 'objdump -t rtai_sched.ko | grep rt_shm' shows the function in the module on my machine
01:26 PM seb_kuzminsky: on both wheezy (rtai 3.9+shabby) and lucid (rtai 3.8.1)
01:26 PM seb_kuzminsky: neither of those machines has rtai_shm.ko
01:27 PM memfrob: Alright so there's something magic about that 5 year old code.
01:27 PM seb_kuzminsky: well i don't know anything about that
01:28 PM seb_kuzminsky: linuxcnc is just a consumer of rtai, you're by far the deepest into that code base of anyone in know, so i defer to you on this topic
01:29 PM memfrob: seb_kuzminsky, if you're not convinced: cd RTAI-source && grep "rt_shm" base/sched/*/*
01:29 PM seb_kuzminsky: i belive you that there's no rt_shm* functions in that directory
01:30 PM seb_kuzminsky: could it be the rt_shm stuff lives elsewhere and gets smushed into sched at link time?
01:30 PM memfrob: That's the only possible way for those functions to show up there, and RTAI previously did a horrible job linking everything together.
01:30 PM seb_kuzminsky: looks like it lives in base/ipc
01:32 PM memfrob: everything "just worked" -- still to this day there's a minor bug in the linking of rtai_hal because if you move the hal code into the sched code, you get two undefined symbols out of the 500.
01:33 PM memfrob: https://github.com/NTULINUX/RTAI/blob/master/base/sched/GNUmakefile.am -- lines 18 to 23
01:34 PM memfrob: There's no logical reason I can see to have to cd into a different directory to build rtai_sched but that's how it is.
01:36 PM memfrob: Do you have an RTAI 5 package installed? I'm interested to see if rt_shm* is included in rtai_sched on your end with RTAI 5.
01:37 PM seb_kuzminsky: umm, somewhere, hold on
01:38 PM seb_kuzminsky: yeah, rtai 5 on linux 4.4, no rtai_shm.ko
01:38 PM memfrob: can you check objdump ?
01:39 PM seb_kuzminsky: the same set of rt_shm_* functions are in rtai_sched.ko
01:39 PM memfrob: wth..
01:40 PM seb_kuzminsky: this was built from an rtai 5.0 prerelease fetched from cvs on 2017.05.19, plus some fairly inconsequential local changes
01:40 PM seb_kuzminsky: i think upstream (rtai.org) has been doing it this way since at least 2010
01:41 PM seb_kuzminsky: i suppose it's something particular about how we're building rtai
01:41 PM seb_kuzminsky: *it's possible it's something particular
01:42 PM seb_kuzminsky: we run rtai's configure with --enable-shm
01:42 PM seb_kuzminsky: --enable-malloc
01:42 PM memfrob: oh that might do it.
01:42 PM seb_kuzminsky: https://github.com/SebKuzminsky/rtai/blob/vulcano-debs-2017-05-19/debian/rules.in
01:42 PM memfrob: you're enabling shm instead of compiling it as a module
01:44 PM seb_kuzminsky: that's how we've always done it, as far back as i can see
01:45 PM memfrob: I'm going to build-in shm and see if objdump comes up with anything.
01:45 PM seb_kuzminsky: ok :-)
01:45 PM seb_kuzminsky: i'm stepping away for a bit
01:45 PM memfrob: alright!
01:45 PM seb_kuzminsky: good luck!
01:46 PM memfrob: thanks for helping me out!
02:05 PM memfrob: brb
02:41 PM CaptHindsight: http://wiki.linuxcnc.org/cgi-bin/wiki.pl?WCH all of these I originally purchased back in ~2014 did not have the PCI_ID issue
02:41 PM CaptHindsight: all 3 of the latest ones have the issue. I'll try the pin strap fix to change PCI-ID's
02:42 PM CaptHindsight: how much work can I expect if I make a kernel modification for Debian?
02:54 PM CaptHindsight: looks like one line in /drivers/parport/parport_serial.c
02:56 PM memfrob: objdump -t modules/rtai_sched.ko | grep "rt_shm" shows stuff now. :)
03:05 PM memfrob: How to remove a PR?
03:06 PM memfrob: I can git reset --hard HEAD~ && git push -f but I don't know if this will work.
03:20 PM seb_kuzminsky: andypugh already merged it
03:22 PM memfrob: That's bad. RTAI 4 is now the only one that supports the shm module. Either support it in RTAI 3 through 5 or require it to be built-in.
03:23 PM seb_kuzminsky: looks to me like we should just revert the configure.ac and module_helper.c patches, but do you still want that RTAI==4 block in rtapi.conf.in? without the rtai_shm part?
03:23 PM memfrob: Yes, that'd be wonderful.
03:23 PM seb_kuzminsky: we've never shipped linuxcnc on rtai4, and as far as i know no one has ever built it
03:24 PM seb_kuzminsky: can you prepare a PR with those changes?
03:24 PM memfrob: Yes. Give me a minute.
03:24 PM memfrob: About RTAI 5, is anyone having issues with it?
03:25 PM memfrob: The reason I kept RTAI 4 alive was because RTAI 5 was a trainwreck.
03:25 PM Solarion is now known as Guest18588
03:25 PM seb_kuzminsky: i played with rtai 5 for months last year, it seemed great except it would sometimes hang on unload and paolo and i were never able to fix it
03:25 PM seb_kuzminsky: running the linuxcnc test suite in a loop would trigger the problem reliably within minutes
03:26 PM memfrob: Doesn't sound like it seemed great lol.
03:37 PM memfrob: So for this PR, modify on top of what I already have or fix the commit itself?
03:39 PM memfrob: All I'd have to do is git commit --amend and then there won't be two different commits in the tree.
03:40 PM memfrob: Also it looks like you guys aren't using fifos with RTAI 5, is this correct?
03:43 PM memfrob: I have the commit ready -- you're going to need to use push -f
03:43 PM memfrob: Up to you.
03:53 PM memfrob: Who's up for re-writing history? :)
03:57 PM seb_kuzminsky: no re-writing history, make your commit on top of the current master
03:59 PM memfrob: alright. oh, adeos isn't an RTAI module btw, if it was, it was 1990.
04:09 PM seb_kuzminsky: that looks good
04:10 PM memfrob: Why thank you :)
04:13 PM andypugh: So, I was precipitous in merging that?
04:15 PM memfrob: It was my fault, I wrongly assumed LinuxCNC's assumption of RTAI's configuration, if that makes any sense.
04:16 PM memfrob: The commit you merged of mine was half right at least. :)
04:17 PM andypugh: And I just made the discovery that tklinuxcnc needs absolutely no changes to work with multispindle.
04:18 PM andypugh: Which is a nice surprise
04:23 PM memfrob: Why does LinuxCNC need tk-img btw? It's not even in some distros which makes building linuxcnc quite tricky sometimes.
04:23 PM memfrob: I had to wget from the fedora 18 repos from scientific linux
04:24 PM andypugh: I wonder if it actually does?
04:27 PM rene_dev_: andypugh Im looking at g71 again... whats the status of that?
04:27 PM seb_kuzminsky: hal-histogram, latency-histogram, and ngcgui all ask for it (tk-img
04:28 PM rene_dev_: for some reason Im keen on fixing lathe related issues at the moment :)
04:28 PM seb_kuzminsky: oh, and the Axis ui
04:29 PM andypugh: rene_dev_: There is a version without pockets written in C and working in the Ben Potter branch. Then there is a version in Python to test an pocket algorithm that (ideally) needs to be turned in to C so that it has access to the tool radius comp routines.
04:29 PM rene_dev_: ah, ok
04:31 PM rene_dev_: so the c version works, but needs some fixes from the python code?
04:31 PM rene_dev_: what are pockets, on a lathe? undercuts?
04:38 PM andypugh: See the G71 doxs here: https://github.com/LinuxCNC/linuxcnc/blob/andypugh/g71type2remap/docs/src/gcode/g-code.txt
04:40 PM andypugh: Probably the best-documented non-existent feauture in LinuxCNC :-)
04:43 PM rene_dev_: I need to try that.
04:43 PM rene_dev_: but first finish the tap and drilling in nativecam
04:44 PM andypugh: You can run the Python with a remap pretty easily, sample configs exist in andypugh/G71type2remap
04:44 PM rene_dev_: do you use that regulary on your machine? how well tested is it?
04:47 PM memfrob: brb
04:48 PM andypugh: I have only tried it once on an actual machine. I tend to make rectilinear parts.
04:48 PM andypugh: It is installed, but not well excercised.
04:50 PM rene_dev_: did you ever try nativecam? its surprisingly good at stuff
04:51 PM rene_dev_: first time I really used it 2 days ago
04:51 PM andypugh: I keep meaining to, but my macros are now very familiar an I only make one-offs mainly
04:52 PM rene_dev_: yes, usually the same for me
04:53 PM rene_dev_: but I was making 10 of those steering bits
04:53 PM rene_dev_: took me probably longer to program it than to make them maually :D
05:05 PM andypugh: 5 bobby cars?
07:04 PM andypugh: Do all runtests pass with current master?
07:44 PM jepler: andypugh: buildbot website would know, front page links to a developer page where build results are available.
07:44 PM andypugh: I just checked out master, and the answer might be “no”
07:44 PM jepler: I'm on metered internet at the moment so I'll let you check
07:45 PM jepler: the rtai stuff discussed earlier might be related
07:45 PM jepler: I see you were in on that discussion
07:52 PM andypugh: A lot of runtests fail because the update_ini script can’t find [EMC]VERSION in the little INI files
07:52 PM andypugh: Which I guess is up to me to fix
08:06 PM andypugh: Hmm, it looks like a change I made to the linuxcnc script is “sticking”
08:08 PM andypugh: Which part of the build process converts linuxcnc.in to linuxcnc?
09:59 PM CaptHindsight: https://arduino-shop.cz/photos/produkty_gal/f/2/2581.jpg first I've heard of SCRAM used for E-stop
10:00 PM CaptHindsight: Run Away!
10:14 PM jepler: andypugh: running ./configure in src/ does that, but so does running 'make' if the .in changes, if all is working right anyway
10:15 PM memfrob: A bit OT: Does anyone know what CONFIG_AUDITSYSCALL actually does and does anyone use it?
10:16 PM jepler: freenode has added server-side spam filtering. If I weren't on the road, I'd suggest to try removing the unregistered user ban...
10:16 PM jepler: but I may not be around to put it back if the result is unsatisfactory
10:16 PM memfrob: I just got auditing working with RTAI (it's been broken for years) but getting AUDITSYSCALL working with it is borderline impossible now.
10:16 PM jepler: https://freenode.net/news/spamfilter
10:39 PM jepler: on CONFIG_AUDITSYSCALL: https://lwn.net/Articles/600568/ (nasty bugs in 2014)
10:40 PM jepler: I doubt there's much overlap between intentional users of CONFIG_AUDITSYSCALL and intentional users of LinuxCNC
10:41 PM jepler: but then in the comments: > Systemd requires it too (or at least gentoo's systemd ebuild checks for it and warns if the thing isn't enabled), probably for exactly the same thing consolekit uses it for, if not more.
10:59 PM memfrob: jepler, CONFIG_AUDIT though is widely used, agreed? I just don't know how much hand-in-hand AUDITSYSCALL goes with AUDIT. Do most people who use auditd use AUDITSYSCALL?
11:00 PM memfrob: Gentoo's kernel config checking is overly sensitive, for consolekit the ebuild checks for CONFIG_FHANDLE but consolekit still works just fine.