[strongSwan-dev] Starting strongswan with valgrind
Sriram Yagnaraman
sriram.yagnaraman at ericsson.com
Thu Jul 9 10:19:12 CEST 2015
Hi,
I am having troubles in finding some memory issues with my installation of strongswan. Tried to use valgrind to start strongswan, but it fails as you can see below.
--22490-- WARNING: unhandled syscall: 345
--22490-- You may be able to write your own handler.
--22490-- Read the file README_MISSING_SYSCALL_OR_IOCTL.
--22490-- Nevertheless we consider this a bug. Please report
--22490-- it at http://valgrind.org/support/bug_reports.html.
disInstr(arm): unhandled instruction: 0xEC520F0E
cond=14(0xE) 27:20=197(0xC5) 4:4=0 3:0=14(0xE)
==22490== valgrind: Unrecognised instruction at address 0x513bd94.
==22490== at 0x513BD94: ??? (in /usr/lib/liblttng-ust.so.0.0.0)
==22490== Your program just tried to execute an instruction that Valgrind
==22490== did not recognise. There are two possible reasons for this.
==22490== 1. Your program has a bug and erroneously jumped to a non-code
==22490== location. If you are running Memcheck and you just saw a
==22490== warning about a bad jump, it's probably your program's fault.
==22490== 2. The instruction is legitimate but Valgrind doesn't handle it,
==22490== i.e. it's Valgrind's fault. If you think this is the case or
==22490== you are not sure, please let us know and we'll try to fix it.
==22490== Either way, Valgrind will now raise a SIGILL signal which will
==22490== probably kill your program.
==22490==
==22490== Process terminating with default action of signal 4 (SIGILL)
==22490== Illegal opcode at address 0x513BD94
==22490== at 0x513BD94: ??? (in /usr/lib/liblttng-ust.so.0.0.0)
BR,
/Sriram
PS: Complete log below
root at sriram:/root# valgrind --tool=memcheck --leak-check=full --show-leak-kinds=all --track-origins=yes ${CXP_PATH}/libexec/ipsec/charon --conffile ${CXP_PATH}/etc/strongswan.conf
==22490== Memcheck, a memory error detector
==22490== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==22490== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
==22490== Command: /home/sriram/strongswan/libexec/ipsec/charon --conffile /home/sriram/strongswan/etc/strongswan.conf
==22490==
==22490== Invalid read of size 4
==22490== at 0x4853B44: library_init (in /home/sriram/strongswan/lib/ipsec/libstrongswan.so.0.0.0)
==22490== Address 0xbd819700 is on thread 1's stack
==22490== 88 bytes below stack pointer
==22490==
00[DMN] Starting IKE charon daemon (strongSwan 5.3.1, Linux 3.10.55-ltsi-rt55-wrlp600.16_8.8.1.45_3, armv7l)
==22490== Use of uninitialised value of size 4
==22490== at 0x40111AE: strcpy (strcpy.S:123)
==22490== by 0x40076DF: _dl_lookup_symbol_x (dl-lookup.c:781)
==22490== by 0x4A16EB1: do_sym (dl-sym.c:107)
==22490== by 0x4A17129: _dl_sym (dl-sym.c:273)
==22490== by 0x4954BD5: dlsym_doit (dlsym.c:50)
==22490== by 0x400AD95: _dl_catch_error (dl-error.c:177)
==22490== by 0x4954F2B: _dlerror_run (dlerror.c:163)
==22490== by 0x4954C0D: dlsym (dlsym.c:70)
==22490== by 0x4863C85: ??? (in /home/sriram/strongswan/lib/ipsec/libstrongswan.so.0.0.0)
==22490== Uninitialised value was created by a stack allocation
==22490== at 0x4863C46: ??? (in /home/sriram/strongswan/lib/ipsec/libstrongswan.so.0.0.0)
==22490==
==22490== Use of uninitialised value of size 4
==22490== at 0x40111B8: strcpy (strcpy.S:128)
==22490== by 0x40076DF: _dl_lookup_symbol_x (dl-lookup.c:781)
==22490== by 0x4A16EB1: do_sym (dl-sym.c:107)
==22490== by 0x4A17129: _dl_sym (dl-sym.c:273)
==22490== by 0x4954BD5: dlsym_doit (dlsym.c:50)
==22490== by 0x400AD95: _dl_catch_error (dl-error.c:177)
==22490== by 0x4954F2B: _dlerror_run (dlerror.c:163)
==22490== by 0x4954C0D: dlsym (dlsym.c:70)
==22490== by 0x4863C85: ??? (in /home/sriram/strongswan/lib/ipsec/libstrongswan.so.0.0.0)
==22490== Uninitialised value was created by a stack allocation
==22490== at 0x4863C46: ??? (in /home/sriram/strongswan/lib/ipsec/libstrongswan.so.0.0.0)
==22490==
00[KNL] received netlink error: Operation not supported (95)
00[KNL] unable to create IPv4 routing table rule
00[KNL] received netlink error: Operation not supported (95)
00[KNL] unable to create IPv6 routing table rule
00[CFG] loading ca certificates from '/ike/etc/ipsec.d/cacerts'
00[CFG] loading aa certificates from '/ike/etc/ipsec.d/aacerts'
00[CFG] loading ocsp signer certificates from '/ike/etc/ipsec.d/ocspcerts'
00[CFG] loading attribute certificates from '/ike/etc/ipsec.d/acerts'
00[CFG] loading crls from '/ike/etc/ipsec.d/crls'
00[CFG] loading secrets from '/ike/etc/ipsec.secrets'
--22490-- WARNING: unhandled syscall: 345
--22490-- You may be able to write your own handler.
--22490-- Read the file README_MISSING_SYSCALL_OR_IOCTL.
--22490-- Nevertheless we consider this a bug. Please report
--22490-- it at http://valgrind.org/support/bug_reports.html.
disInstr(arm): unhandled instruction: 0xEC520F0E
cond=14(0xE) 27:20=197(0xC5) 4:4=0 3:0=14(0xE)
==22490== valgrind: Unrecognised instruction at address 0x513bd94.
==22490== at 0x513BD94: ??? (in /usr/lib/liblttng-ust.so.0.0.0)
==22490== Your program just tried to execute an instruction that Valgrind
==22490== did not recognise. There are two possible reasons for this.
==22490== 1. Your program has a bug and erroneously jumped to a non-code
==22490== location. If you are running Memcheck and you just saw a
==22490== warning about a bad jump, it's probably your program's fault.
==22490== 2. The instruction is legitimate but Valgrind doesn't handle it,
==22490== i.e. it's Valgrind's fault. If you think this is the case or
==22490== you are not sure, please let us know and we'll try to fix it.
==22490== Either way, Valgrind will now raise a SIGILL signal which will
==22490== probably kill your program.
==22490==
==22490== Process terminating with default action of signal 4 (SIGILL)
==22490== Illegal opcode at address 0x513BD94
==22490== at 0x513BD94: ??? (in /usr/lib/liblttng-ust.so.0.0.0)
==22490==
==22490== HEAP SUMMARY:
==22490== in use at exit: 153,892 bytes in 3,080 blocks
==22490== total heap usage: 4,301 allocs, 1,221 frees, 854,079 bytes allocated
==22490==
==22490== 72 bytes in 2 blocks are possibly lost in loss record 1 of 6
==22490== at 0x482F3F4: memalign (in /opt/rcs_ee/mounts/labfs/usr/lib/valgrind/vgpreload_memcheck-arm-linux.so)
==22490==
==22490== 1,064 bytes in 5 blocks are still reachable in loss record 2 of 6
==22490== at 0x482F110: realloc (in /opt/rcs_ee/mounts/labfs/usr/lib/valgrind/vgpreload_memcheck-arm-linux.so)
==22490==
==22490== 1,100 bytes in 3 blocks are still reachable in loss record 3 of 6
==22490== at 0x482F3F4: memalign (in /opt/rcs_ee/mounts/labfs/usr/lib/valgrind/vgpreload_memcheck-arm-linux.so)
==22490==
==22490== 1,996 bytes in 15 blocks are possibly lost in loss record 4 of 6
==22490== at 0x482EEB8: calloc (in /opt/rcs_ee/mounts/labfs/usr/lib/valgrind/vgpreload_memcheck-arm-linux.so)
==22490==
==22490== 70,281 bytes in 138 blocks are still reachable in loss record 5 of 6
==22490== at 0x482EEB8: calloc (in /opt/rcs_ee/mounts/labfs/usr/lib/valgrind/vgpreload_memcheck-arm-linux.so)
==22490==
==22490== 79,379 bytes in 2,917 blocks are still reachable in loss record 6 of 6
==22490== at 0x482C6B4: malloc (in /opt/rcs_ee/mounts/labfs/usr/lib/valgrind/vgpreload_memcheck-arm-linux.so)
==22490==
==22490== LEAK SUMMARY:
==22490== definitely lost: 0 bytes in 0 blocks
==22490== indirectly lost: 0 bytes in 0 blocks
==22490== possibly lost: 2,068 bytes in 17 blocks
==22490== still reachable: 151,824 bytes in 3,063 blocks
==22490== suppressed: 0 bytes in 0 blocks
==22490==
==22490== For counts of detected and suppressed errors, rerun with: -v
==22490== ERROR SUMMARY: 49 errors from 5 contexts (suppressed: 60 from 7)
Killed
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.strongswan.org/pipermail/dev/attachments/20150709/a4589ba5/attachment.html>
More information about the Dev
mailing list