[ros-users] Ros on Arm Hanging
Daniel Stonier
d.stonier at gmail.com
Fri Jul 9 01:45:45 UTC 2010
On 9 July 2010 00:44, René Wagner <rene.wagner at dfki.de> wrote:
>
> On Thu, 2010-07-08 at 19:43 +0900, Daniel Stonier wrote:
> > Got into it with a debugger, and found it hanging at
> > roslib/include/ros/serialization.h at
> >
> >
> > ROS_CREATE_SIMPLE_SERIALIZER(double);
>
> Depending on how the serializer is used, this may result in an
> unaligned write. You can check whether an alignment error is involved
> as follows:
>
> echo 5 > /proc/cpu/alignment
>
> and re-run the executable that's causing trouble. The program should
> receive a signal (so you can see where exactly things go wrong in gdb)
> and the kernel should report an "Alignment trap: ..." on the console or
> in dmesg/syslog.
>
> Cheers,
>
> Rene
>
> -
Thanks for the pointer Rene. Starting to actually find the right
documents when googling now. Some results:
INITIAL TESTS
- with 'echo 5 > proc/cpu/alignment' (i.e. signal + warning mode)
- *both* my float64 and int32 test programs crash with a bus error
- kernel message in both cases also gives an alignment trap msg :
Alignment trap: float_client (941) PC=0x40238ad4 Instr=0xe5933000
Address=0x00034ce1 FSR 0x011
- with 'echo 2 > proc/cpu/alignment' (i.e. fixup mode), both programs
work successfully
- but this is an expensive workaround (I see google sets it to 4
(signal) on android to encourage people to program better)
- The output of 'cat /proc/cpu/alignment (should it be different to this?)
User: 2
System: 0
Skipped: 0
Half: 0
Word: 0
DWord: 0
Multi: 0
User faults: 5 (signal+warn)
AFTER PATCHING (MEMCPY)
- Patched (using the memcpy's rather than the reinterprets in the
SERIALIZER macro).
- In signal+warn mode (echo 5 > /proc/cpu/alignment)
- (float64&int32) client gives a bus error and kernel outputs an
alignment trap message, but servers are fine
- In default mode (echo 0 > /proc/cpu/alignment)
- (float64&int32) client and server function without hanging like before
So...its working, but is this the right fix?
Cheers,
Daniel.
>
> -
> ------------------------------------------------------------
> Dipl.-Inf. René Wagner Junior Researcher
> DFKI Bremen Enrique-Schmidt-Str. 5
> Safe and Secure Cognitive Systems D-28359 Bremen
>
> Phone: (+49) 421-218-64224 Fax: (+49) 421-218-98-64224
> Web: http://www.informatik.uni-bremen.de/agebv/en/ReneWagner
> --- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> Deutsches Forschungszentrum für Künstliche Intelligenz GmbH
> Firmensitz: Trippstadter Strasse 122, D-67663 Kaiserslautern
>
> Geschäftsführung:
> Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster (Vorsitzender)
> Dr. Walter Olthoff
> Vorsitzender des Aufsichtsrats:
> Prof. Dr. h.c. Hans A. Aukes
> Amtsgericht Kaiserslautern HRB 2313
> ------------------------------------------------------------
>
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
--
Phone : +82-10-5400-3296 (010-5400-3296)
Home: http://snorriheim.dnsdojo.com/
Yujin Robot: http://www.yujinrobot.com/
Embedded Control Libraries: http://snorriheim.dnsdojo.com/redmine/wiki/ecl
More information about the ros-users
mailing list