Hi EBo, >> I think that the spare time problem is a common ailment. Whatever >> the case, with more people doing nothing more than watching this >> thread, sooner or later a light bulb will go on and we'll have our >> solution. > > true... Any more ideas?
Yep! I discovered the 'record' feature in gdb. Start up gdb on rtapi_app, then run the following: start load threads name1=fast period1=50000 record c With period1=50k and the program running super-slow in gdb record mode, there'll be lots of output about missed deadlines that'll be tickling the bug in the background. If you're lucky, you'll get the segfault in a chunk of actual readable C code (probably malloc(), so install the debug symbol packages). Then you can muddle around until you find a corrupted location, and set a 'watch -l <expression>'. Then run the program backwards with 'reverse-continue' until you find some other place that's writing to that location, but shouldn't. That's as far as I've gotten, but it seems like a promising technique. However, it may take some iterations. My first results lead me to the 'memset' line in linux_rtapi.c. It appears that malloc(stacksize) is handing out memory already allocated. I assume that means the malloc data structures are already corrupt at this first point, but to back up through the next iteration I still need to muddle through *what* is corrupt, since 'watch' can only examine a single memory location and there can only be four watch points at any time. If anyone needs more details to replicate this, I'm happy to provide. It's quite a learning curve for me. > I've got some of Li's NURBS hardware for testing, and as soon as I am > caught up at work the plan is to set up a Gentoo portage overlay that > loads/partial-preconfig of an appropriate > RT-Preempt/LinuxCNC-EMC2/latency-tools/... Note: I had some old ebuilds > for RT-Linux, RTAI, EMC2, EMC2 in the distant past... Neato! Keep us in the loop. Does anyone still use RT-Linux? I seem to remember it hasn't been updated for recent kernels, but I also know of (non-machine) shops that still run Linux 2.4.x for whatever reason. John ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Emc-developers mailing list Emc-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-developers