Discussion:
[SR-Users] Kamailio for ARM with rtpproxy-ng
Marino Mileti
2014-10-23 09:28:35 UTC
Permalink
Hi guys,

I've cross compiled Kamailio (4.1.6) for ARM (Wandboard-IMX6). Everything
seems works fine, but when I try to enable rtpproxy-ng module and Alignment
trap error occurred just during rtpp_test (exchanging ping-ponge message
betweek rtpproxy and rtpproxy-ng module of Kamailio)

rtpengine[2258]: Got valid command from 127.0.0.1:50470: ping - { "command":
"ping" }
rtpengine[2258]: Returning to SIP proxy: d6:result4:ponge
user.err kernel: [66832.254887] Alignment trap: not handling instruction
edc30b08 at [<40b3a130>]
user.alert kernel: [66832.262030] Unhandled fault: alignment exception
(0x801) at 0x4033a782
local0.err kamailio: ERROR: <core> [daemonize.c:307]: daemonize(): Main
process exited before writing to pipe

In x86 architecture same packages works correctly without any problem.

Does anybody encountered this kind of error?

Marino



-----
Marino Mileti
--
View this message in context: http://sip-router.1086192.n5.nabble.com/Kamailio-for-ARM-with-rtpproxy-ng-tp131801.html
Sent from the Users mailing list archive at Nabble.com.
Richard Fuchs
2014-10-23 14:51:33 UTC
Permalink
Post by Marino Mileti
Hi guys,
I've cross compiled Kamailio (4.1.6) for ARM (Wandboard-IMX6). Everything
seems works fine, but when I try to enable rtpproxy-ng module and Alignment
trap error occurred just during rtpp_test (exchanging ping-ponge message
betweek rtpproxy and rtpproxy-ng module of Kamailio)
"ping" }
rtpengine[2258]: Returning to SIP proxy: d6:result4:ponge
user.err kernel: [66832.254887] Alignment trap: not handling instruction
edc30b08 at [<40b3a130>]
user.alert kernel: [66832.262030] Unhandled fault: alignment exception
(0x801) at 0x4033a782
local0.err kamailio: ERROR: <core> [daemonize.c:307]: daemonize(): Main
process exited before writing to pipe
In x86 architecture same packages works correctly without any problem.
Which version of rtpengine is that? There are some places in the code
where misaligned pointers might be a problem and one such instance was
fixed recently. If this is the most recent version, I can try to fix the
pointer alignment if you can figure out where exactly it happens.

cheers
Marino Mileti
2014-10-23 15:32:57 UTC
Permalink
Version is 3.3.0.0 mr3.5.0.0

I've seen that the problem is during the "ping-pong test" when the value of
bencode_item is assigned

The error is on __bencode_dictionary_init, and the istruction is :
dict->value=0

I've read ARM documentation and it says to add __attribute__((packed)) to
value definition inside bencode_item struct. In my case i've done:

long long int value __attribute__((packed));

I've tried and it works. I don't know if this is the right solution.
What do you think about it?
Post by Richard Fuchs
Which version of rtpengine is that? There are some places in the code
where misaligned pointers might be a problem and one such instance was
fixed recently. If this is the most recent version, I can try to fix the
pointer alignment if you can figure out where exactly it happens.
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-----
Marino Mileti
--
View this message in context: http://sip-router.1086192.n5.nabble.com/Kamailio-for-ARM-with-rtpproxy-ng-tp131801p131817.html
Sent from the Users mailing list archive at Nabble.com.
Richard Fuchs
2014-10-23 15:47:47 UTC
Permalink
Post by Marino Mileti
Version is 3.3.0.0 mr3.5.0.0
I've seen that the problem is during the "ping-pong test" when the value of
bencode_item is assigned
dict->value=0
I've read ARM documentation and it says to add __attribute__((packed)) to
long long int value __attribute__((packed));
I've tried and it works. I don't know if this is the right solution.
What do you think about it?
Interesting. I'm not sure why this is required for this value, but hey,
if it works... Let me know if you run into any more trouble.

cheers

Loading...