#linuxcnc-devel Logs

Jun 29 2018

#linuxcnc-devel Calendar

08:44 AM spma: 09,01
11:14 AM -!- #linuxcnc-devel mode set to +v by kornbluth.freenode.net
03:49 PM andypugh: pcw_mesa: What firmware would you suggest for testing the 7i65. I can easily use a 7i43 or 7i80HD. I also have a 5i25 in the machine, and a HDDBADAPT. I could also plug the 7i65 in to the 5i23 in my milling machine or 5i24 in my lathe and operate through ssh, but if the machine needs a hardware reset that quickly gets annoying.
04:00 PM pcw_mesa: probably 7I80HD or 7I43 would be easiest and I think there's firmware for both but would trust the 7I80 to be more up-to-date
04:02 PM pcw_mesa: note that the crash on exit bug does not need the 7I65 present to be checked
04:03 PM pcw_mesa: ( The component/driver doesnt know if the card is there or not )
04:06 PM andypugh: Ah, OK.
04:06 PM andypugh: I think I ned to start the 7i80 off from EPP?
04:07 PM andypugh: Actually, I can just use EPP, can’t I
04:08 PM Tom_L: epp?
04:20 PM andypugh: I can’t read. It’s a 7i90 :-)
04:20 PM andypugh: I do also have a 7i80
04:20 PM Tom_L: :)
04:20 PM Tom_L: just curious
04:20 PM pcw_mesa: 7I90 should be OK also
04:21 PM Tom_L: what bug are you tryin to kill?
04:27 PM andypugh: https://github.com/LinuxCNC/linuxcnc/issues/451
04:27 PM andypugh: pcw_mesa: I have the same problem you had. The test machine is a uspace build, no mesa_7i65 driver..
04:28 PM pcw_mesa: Yeah I had to switch to RTAI to test
04:28 PM andypugh: I guess I need to find an RTAI kernel, reboot and recompile.
04:29 PM pcw_mesa: but I have a wheezy system with both kernel flavors so can switch easily
04:30 PM andypugh: I think I am on Stretch
04:32 PM pcw_mesa: I just reboot and use grub to choose the correct kernel for the LinuxCNC flavor du jour
04:33 PM andypugh: mesa_7i65 _should_ compile… https://github.com/LinuxCNC/linuxcnc/commit/2f18851eaaddb504697a0595d557b930bf4b2241
04:34 PM pcw_mesa: yeah not sure whats up there
04:35 PM pcw_mesa: I would probably be a lot nicer to debug in uspace
04:36 PM pcw_mesa: Yay! my 7C80 RPI daughtercard is alive
04:42 PM andypugh: http://pastebin.ubuntu.com/p/J3DV7rC4zF/
04:43 PM andypugh: I have no idea what is going on thee
04:43 PM andypugh: jepler: Any ideas?
04:45 PM andypugh: Ah, err, I may be being daft.
04:45 PM andypugh: . ./scripts/rio-environment has not happened today….
04:47 PM andypugh: That seems to have been the problem.
04:47 PM andypugh: pcw_mesa: I think I still need a bitfile with a uart for the 7i65?
04:47 PM andypugh: To pass the name to the driver?
04:48 PM pcw_mesa: which FPGA card are you using?
04:49 PM pcw_mesa: ( the 7I65 is SPI not sserial )
05:00 PM pcw_mesa: 7I90 --> 7i90_epp_2x7i65.bit
05:05 PM andypugh: I have it hooked up and have found a bug.
05:05 PM andypugh: Possibly not the same bug.
05:06 PM andypugh: http://pastebin.ubuntu.com/p/ZSJYGPrmDq/
05:06 PM andypugh: Happens 2 times out of 2 when _loading_ the driver.
05:07 PM andypugh: jepler: cradek seb_kuzminsky mozmck rene-dev Any of you adept at reading a backtrace?
05:08 PM cradek: free(): corrupted unsorted chunks
05:08 PM cradek: this makes me think you're overrunning a malloced area
05:09 PM seb_kuzminsky: stackoverflow says: run it under valgrind
05:10 PM cradek: that's a great idea if you can do it. often points right to the overrun.
05:10 PM cradek: decoding the backtrace itself any farther will probably point to the free, not the overrun, so although I think there are instructions on the wiki somewhere I wouldn't bother
05:16 PM andypugh: Hmm. Sounds like a great plan. Has anyone ever run a real-time module unser Valgrind?
05:17 PM seb_kuzminsky: should be fine on uspace
05:18 PM andypugh: OK, I am in uspace
05:24 PM andypugh: valgrind halrun seems to work.
05:24 PM andypugh: But I need to recompile with -g
05:25 PM seb_kuzminsky: i think you want to valgrind the top-level rtapi_app, not halcmd
05:25 PM andypugh: How would I do that?
05:25 PM seb_kuzminsky: the top rtapi-app will dlopen all the rtcomps and run their functions inside itself, and that's where your problem seems to be
05:26 PM andypugh: The valgrind quick start basically says “of you normally run the program with progname param then use valgrind progname param
05:27 PM andypugh: So I only really know how to valgrind halrun or valgrind linuxcnc. (This is also why I have never managed to figure out how to use any debugger with LinuxCNC)
05:31 PM seb_kuzminsky: you could try 'valgrind linuxcnc', or look in scripts/linuxcnc where it starts realtime and insert 'valgrind' strategically there somewhere
05:32 PM seb_kuzminsky: or the 'realtime' script? i'm not sure, off the top of my head
05:33 PM seb_kuzminsky: no, probably not realtime, it's probably in scripts/linuxcnc
05:36 PM seb_kuzminsky: looks like in scripts/linuxcnc it's "section" that loads all the halfiles named in the ini, so that's probably where uspace realtime starts
05:43 PM andypugh: I much prefer to test this sort of thing in a halrun environment
05:43 PM seb_kuzminsky: oh, yeah
05:43 PM seb_kuzminsky: much easier
05:43 PM seb_kuzminsky: 'valgrind halrun' should work i would think
05:43 PM andypugh: So I think that valgrind halrun has to be better than halrun linuxcnc
05:43 PM seb_kuzminsky: i agree, that's a better idea
05:44 PM andypugh: I wasn’t doing a halcmd -kf after-the-fact connection to realtime
05:44 PM andypugh: OK, so now to add that -g
05:44 PM andypugh: (got distracted by a desire to eat)
06:04 PM andypugh: Well, Valgrind didn’t help… http://pastebin.ubuntu.com/p/VjYpVb5Bh4/
06:04 PM andypugh: (Or I need to run it a different way)
06:16 PM andypugh: I suspect that HAL modules are not running under valgrind?
06:17 PM seb_kuzminsky: hal rtcomps should be running in the 'master' rtapi_app, which should be started by halrun
06:20 PM andypugh: I only have one rtapi here
06:20 PM andypugh: Maybe it isn’t a valgrind-class problem?
06:21 PM andypugh: I asked on the valgrind IRC, but they may be asleep
06:26 PM seb_kuzminsky: this is an rt comp, right? not a non-realtime comp, aka "userspace"
06:30 PM pcw_mesa: yes, its RT
06:38 PM seb_kuzminsky: you might try using 'pstree' or 'ps axjf' or something similar to make sure that the master rtapi_app is a decendant of valgrind
06:38 PM seb_kuzminsky: oh, and run valgrind with --trace-children=yes
06:38 PM seb_kuzminsky: bbl
10:21 PM jepler: forum reboot coming
10:22 PM jepler: joomla update to follow
10:23 PM jepler: and we should be done