Am 08.08.2014 um 15:16 schrieb Pascal Huerst <
pascal...@gmail.com>:
>>> I pulled, recompiled, and got nicer error messages, but the problem is
>>> still there.
>>>
>>> Any Ideas?
>>
>> did this machine even run machinetalk or linuxcnc before successfully? if not, have a look at, and run this:
>
> No it did not.
>
> But I built and successfully run machinekit (32f48ce46a) on the same
> machine, with the same kernel.
>
> Its a Debian (Sid) Machine, with a custom built Xenomai Kernel, which
> works with machinekit (32f48ce46a)
>
> uname -a:
> Linux lenovo 3.8.13-xenomai-2.6.3+ #3 SMP Fri Jul 11 11:27:37 CEST 2014
> x86_64 GNU/Linux
>
>> ../scripts/check-system-configuration.sh
>
> This call did not output anything (Which I would say is good, from a
> quick look in the script)
yes, that makes all sense
>
>> because the following hints it might be a problem with the shared memory segment size, i.e. limits.conf:
>>
>> Aug 8 12:34:15 thinkpad rtapi:0: rtapi_app:0: ERROR: global segment magic not changing to ready: magic=0xeadbeef
>> Aug 8 12:34:15 thinkpad rtapi:0: rtapi:0: FATAL - failed to attach to global segment
>>
>> (background:
>>
>>
>> then run the following like so:
>>
>> DEBUG=5 realtime start
>
> ~/buildscripts/machinekit$ DEBUG=5 realtime start
> warning: removing unused global shm segment /linuxcnc-0-00154711
> zsys.c:331: zsys_handler_set: Assertion `handler_fn' failed.
> halcmd: cant connect to rtapi_app: -1 (uri=
> uuid=a42c8c6b-4025-4f83-ba28-dad21114744a): rtapi_rpc(): reply timeout
>
> halcmd: the rtapi:0 RT demon is not running - please investigate
> /var/log/linuxcnc.log
> halcmd: the msgd:0 logger demon is not running - please investigate
> /var/log/linuxcnc.log
>
>> this should give a much more detailed log
>
> Unfortunately it does not.
well it does - a bit: zsys.c:331: zsys_handler_set: Assertion `handler_fn' failed.
this hints me at something wrong with the zeromq or czmq library - maybe version, which prevents rtapi_msgd from coming up even so far it can write a log entry
it definitely should write a log entry at startup, for example:
Jun 12 09:54:44 beaglebone msgd:0: startup instance=inst0 pid=5527 flavor=xenomai rtlevel=1 usrlevel=1 halsize=512000 shm=Posix gcc=4.6.3 version=v2.7.0~pre0~machinetalk-preview~608ad28
Jun 12 09:54:44 beaglebone msgd:0: ØMQ=4.0.4 czmq=2.2.0 protobuf=2.4.1
here's the interesting stuff -----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
it's evident that rtapi_msgd (owner of the global shared memory segment) doesnt come up, and everything else is a consequence
so lets do this:
realtime stop, then run rtapi_msgd under gdb like so:
mah@nwheezy:~/machinekit-tutorial/src$ DEBUG=5 gdb ../libexec/rtapi_msgd
GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <
http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
<
http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/mah/machinekit-tutorial/libexec/rtapi_msgd...done.
(gdb) r --foreground --stderr
Starting program: /home/mah/machinekit-tutorial/libexec/rtapi_msgd --foreground --stderr
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/i686/cmov/libthread_db.so.1".
Aug 8 16:21:44 msgd:0: startup instance=inst0 pid=26953 flavor=posix rtlevel=3 usrlevel=3 halsize=262000 shm=Posix gcc=4.7.2 version=v2.7.0~pre0~machinetalk-preview-3~9d073be
Aug 8 16:21:44 msgd:0: ØMQ=4.0.4 czmq=2.2.0 protobuf=2.4.1
------------------------^^^^^^^^^^^^^^ ---- what does this line say? do you get this far at all?
Aug 8 16:21:44 msgd:0: configured: Aug 7 2014 18:49:58 sha=9d073be
Aug 8 16:21:44 msgd:0: built: Aug 8 2014 10:15:00 sha=1b9b0b2
Aug 8 16:21:44 msgd:0: WARNING: git SHA's for configure and build do not match!
[New Thread 0xb7817b70 (LWP 26957)]
[New Thread 0xb7016b70 (LWP 26958)]
Aug 8 16:21:44 msgd:0: publishing ZMQ/protobuf log messages at ipc:///tmp/0.log.a42c8c6b-4025-4f83-ba28-dad21114744a
while msgd runs under gdb like above, do this in another window:
l$ ls -l /run/shm/
total 604
-rw-rw---- 1 mah mah 528416 Aug 8 16:24 linuxcnc-0-00154711 <------- the global shared memory segment, must exist
also, try this - this should give a hint which shared libraries are involved, because I'm pretty sure this is a shared library version snafu:
mah@nwheezy:~/machinekit-tutorial/src$ ldd ../libexec/rtapi_msgd
example output, please paste yours:
linux-gate.so.1 => (0xb7753000)
liblinuxcncshm.so.0 => /home/mah/machinekit-tutorial/lib/liblinuxcncshm.so.0 (0xb774d000)
liblinuxcncini.so.0 => /home/mah/machinekit-tutorial/lib/liblinuxcncini.so.0 (0xb7749000)
libmtalk.so.0 => /home/mah/machinekit-tutorial/lib/libmtalk.so.0 (0xb773b000)
liblinuxcnc-pb2++.so.0 => /home/mah/machinekit-tutorial/lib/liblinuxcnc-pb2++.so.0 (0xb75da000)
libprotobuf.so.7 => /usr/lib/libprotobuf.so.7 (0xb74c7000)
libz.so.1 => /lib/i386-linux-gnu/libz.so.1 (0xb74ae000)
libpthread.so.0 => /lib/i386-linux-gnu/i686/cmov/libpthread.so.0 (0xb7495000)
libczmq.so.1 => /usr/lib/i386-linux-gnu/libczmq.so.1 (0xb7448000)
libzmq.so.3 => /usr/lib/i386-linux-gnu/libzmq.so.3 (0xb739f000)
libavahi-common.so.3 => /usr/lib/i386-linux-gnu/libavahi-common.so.3 (0xb7391000)
libavahi-client.so.3 => /usr/lib/i386-linux-gnu/libavahi-client.so.3 (0xb737f000)
libstdc++.so.6 => /usr/lib/i386-linux-gnu/libstdc++.so.6 (0xb7293000)
libdl.so.2 => /lib/i386-linux-gnu/i686/cmov/libdl.so.2 (0xb728e000)
libuuid.so.1 => /lib/i386-linux-gnu/libuuid.so.1 (0xb7288000)
librt.so.1 => /lib/i386-linux-gnu/i686/cmov/librt.so.1 (0xb727f000)
libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xb7262000)
libc.so.6 => /lib/i386-linux-gnu/i686/cmov/libc.so.6 (0xb70fe000)
libm.so.6 => /lib/i386-linux-gnu/i686/cmov/libm.so.6 (0xb70d7000)
libjansson.so.4 => /usr/lib/i386-linux-gnu/libjansson.so.4 (0xb70ca000)
/lib/ld-linux.so.2 (0xb7754000)
libsodium.so.10 => /usr/lib/libsodium.so.10 (0xb705a000)
libdbus-1.so.3 => /lib/i386-linux-gnu/libdbus-1.so.3 (0xb700f000)
- Michael