[strongSwan-dev] gdb and IPsec does not seem to work
Sebastian Wurst
wurstsebastian80 at gmail.com
Mon Sep 9 23:07:48 CEST 2013
On 9 September 2013 00:57, Martin Willi <martin at strongswan.org> wrote:
> Hi Sebastian,
>
> > ipsec start --attach-gdb
> >
> > Unfortunately, whenever I press ctrl+c to interrupt charon, things go bad
>
> --attach-gdb is useful to catch startup segfaults and the like, but
> certainly makes interaction more complicated. Usually it might be
> simpler to attach gdb manually once charon is up, for example by calling
> "gdb /path/to/charon `cat /var/run/charon.pid`".
>
Martin, I have tried this approach too, but it did not work for me. What I
am seeing is that once gdb suspends charon It can't resume it anymore (see
gdb output below). My guess is that starter process perhaps restarted it
(concluded based on fact that charon had a new pid)?
Can you let me know, if you can attach? I would like to know which
direction I should look at (i.e. my setup or strongswan).
(gdb) attach 3296
Attaching to process 3296
Reading symbols from /usr/local/libexec/ipsec/charon...done.
Reading symbols from /usr/local/lib/ipsec/libstrongswan.so.0...done.
Loaded symbols for /usr/local/lib/ipsec/libstrongswan.so.0
Reading symbols from /usr/local/lib/ipsec/libhydra.so.0...done.
Loaded symbols for /usr/local/lib/ipsec/libhydra.so.0
Reading symbols from /usr/local/lib/ipsec/libcharon.so.0...done.
Loaded symbols for /usr/local/lib/ipsec/libcharon.so.0
Reading symbols from /lib/x86_64-linux-gnu/libpthread.so.0...(no debugging
symbols found)...done.
[New LWP 3312]
[New LWP 3311]
[New LWP 3310]
[New LWP 3309]
[New LWP 3308]
[New LWP 3307]
[New LWP 3306]
[New LWP 3305]
[New LWP 3304]
[New LWP 3303]
[New LWP 3302]
[New LWP 3301]
[New LWP 3300]
[New LWP 3299]
[New LWP 3298]
[New LWP 3297]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Loaded symbols for /lib/x86_64-linux-gnu/libpthread.so.0
Reading symbols from /lib/x86_64-linux-gnu/libc.so.6...(no debugging
symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libc.so.6
Reading symbols from /lib/x86_64-linux-gnu/libdl.so.2...(no debugging
symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libdl.so.2
Reading symbols from /lib/x86_64-linux-gnu/libm.so.6...(no debugging
symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libm.so.6
Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols
found)...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Reading symbols from
/usr/local/lib/ipsec/plugins/libstrongswan-aes.so...done.
Loaded symbols for /usr/local/lib/ipsec/plugins/libstrongswan-aes.so
Reading symbols from
/usr/local/lib/ipsec/plugins/libstrongswan-des.so...done.
Loaded symbols for /usr/local/lib/ipsec/plugins/libstrongswan-des.so
Reading symbols from
/usr/local/lib/ipsec/plugins/libstrongswan-sha1.so...done.
Loaded symbols for /usr/local/lib/ipsec/plugins/libstrongswan-sha1.so
Reading symbols from
/usr/local/lib/ipsec/plugins/libstrongswan-sha2.so...done.
Loaded symbols for /usr/local/lib/ipsec/plugins/libstrongswan-sha2.so
Reading symbols from
/usr/local/lib/ipsec/plugins/libstrongswan-md5.so...done.
Loaded symbols for /usr/local/lib/ipsec/plugins/libstrongswan-md5.so
Reading symbols from
/usr/local/lib/ipsec/plugins/libstrongswan-random.so...done.
Loaded symbols for /usr/local/lib/ipsec/plugins/libstrongswan-random.so
Reading symbols from
/usr/local/lib/ipsec/plugins/libstrongswan-nonce.so...done.
Loaded symbols for /usr/local/lib/ipsec/plugins/libstrongswan-nonce.so
Reading symbols from
/usr/local/lib/ipsec/plugins/libstrongswan-x509.so...done.
Loaded symbols for /usr/local/lib/ipsec/plugins/libstrongswan-x509.so
Reading symbols from
/usr/local/lib/ipsec/plugins/libstrongswan-revocation.so...done.
Loaded symbols for /usr/local/lib/ipsec/plugins/libstrongswan-revocation.so
Reading symbols from
/usr/local/lib/ipsec/plugins/libstrongswan-constraints.so...done.
Loaded symbols for /usr/local/lib/ipsec/plugins/libstrongswan-constraints.so
Reading symbols from
/usr/local/lib/ipsec/plugins/libstrongswan-pubkey.so...done.
Loaded symbols for /usr/local/lib/ipsec/plugins/libstrongswan-pubkey.so
Reading symbols from
/usr/local/lib/ipsec/plugins/libstrongswan-pkcs1.so...done.
Loaded symbols for /usr/local/lib/ipsec/plugins/libstrongswan-pkcs1.so
Reading symbols from
/usr/local/lib/ipsec/plugins/libstrongswan-pkcs8.so...done.
Loaded symbols for /usr/local/lib/ipsec/plugins/libstrongswan-pkcs8.so
Reading symbols from
/usr/local/lib/ipsec/plugins/libstrongswan-pgp.so...done.
Loaded symbols for /usr/local/lib/ipsec/plugins/libstrongswan-pgp.so
Reading symbols from
/usr/local/lib/ipsec/plugins/libstrongswan-dnskey.so...done.
Loaded symbols for /usr/local/lib/ipsec/plugins/libstrongswan-dnskey.so
Reading symbols from
/usr/local/lib/ipsec/plugins/libstrongswan-pem.so...done.
Loaded symbols for /usr/local/lib/ipsec/plugins/libstrongswan-pem.so
Reading symbols from
/usr/local/lib/ipsec/plugins/libstrongswan-fips-prf.so...done.
Loaded symbols for /usr/local/lib/ipsec/plugins/libstrongswan-fips-prf.so
Reading symbols from
/usr/local/lib/ipsec/plugins/libstrongswan-gmp.so...done.
Loaded symbols for /usr/local/lib/ipsec/plugins/libstrongswan-gmp.so
Reading symbols from /usr/lib/x86_64-linux-gnu/libgmp.so.10...(no debugging
symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libgmp.so.10
Reading symbols from
/usr/local/lib/ipsec/plugins/libstrongswan-xcbc.so...done.
Loaded symbols for /usr/local/lib/ipsec/plugins/libstrongswan-xcbc.so
Reading symbols from
/usr/local/lib/ipsec/plugins/libstrongswan-cmac.so...done.
Loaded symbols for /usr/local/lib/ipsec/plugins/libstrongswan-cmac.so
Reading symbols from
/usr/local/lib/ipsec/plugins/libstrongswan-hmac.so...done.
Loaded symbols for /usr/local/lib/ipsec/plugins/libstrongswan-hmac.so
Reading symbols from
/usr/local/lib/ipsec/plugins/libstrongswan-attr.so...done.
Loaded symbols for /usr/local/lib/ipsec/plugins/libstrongswan-attr.so
Reading symbols from
/usr/local/lib/ipsec/plugins/libstrongswan-kernel-netlink.so...done.
Loaded symbols for
/usr/local/lib/ipsec/plugins/libstrongswan-kernel-netlink.so
Reading symbols from
/usr/local/lib/ipsec/plugins/libstrongswan-resolve.so...done.
Loaded symbols for /usr/local/lib/ipsec/plugins/libstrongswan-resolve.so
Reading symbols from
/usr/local/lib/ipsec/plugins/libstrongswan-socket-default.so...done.
Loaded symbols for
/usr/local/lib/ipsec/plugins/libstrongswan-socket-default.so
Reading symbols from
/usr/local/lib/ipsec/plugins/libstrongswan-stroke.so...done.
Loaded symbols for /usr/local/lib/ipsec/plugins/libstrongswan-stroke.so
Reading symbols from
/usr/local/lib/ipsec/plugins/libstrongswan-updown.so...done.
Loaded symbols for /usr/local/lib/ipsec/plugins/libstrongswan-updown.so
Reading symbols from
/usr/local/lib/ipsec/plugins/libstrongswan-xauth-generic.so...done.
Loaded symbols for
/usr/local/lib/ipsec/plugins/libstrongswan-xauth-generic.so
Reading symbols from /lib/x86_64-linux-gnu/libnss_compat.so.2...(no
debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libnss_compat.so.2
Reading symbols from /lib/x86_64-linux-gnu/libnsl.so.1...(no debugging
symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libnsl.so.1
Reading symbols from /lib/x86_64-linux-gnu/libnss_nis.so.2...(no debugging
symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libnss_nis.so.2
Reading symbols from /lib/x86_64-linux-gnu/libnss_files.so.2...(no
debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libnss_files.so.2
0x00007fbf4f853960 in sigwait () from /lib/x86_64-linux-gnu/libpthread.so.0
(gdb) c
Continuing.
^C[Thread 0x7fbf44417700 (LWP 3310) exited]
[Thread 0x7fbf48c20700 (LWP 3301) exited]
[Thread 0x7fbf49c22700 (LWP 3299) exited]
[Thread 0x7fbf4741d700 (LWP 3304) exited]
[Thread 0x7fbf46c1c700 (LWP 3305) exited]
[Thread 0x7fbf47c1e700 (LWP 3303) exited]
[Thread 0x7fbf4641b700 (LWP 3306) exited]
[Thread 0x7fbf45c1a700 (LWP 3307) exited]
[Thread 0x7fbf45419700 (LWP 3308) exited]
[Thread 0x7fbf4a423700 (LWP 3298) exited]
[Thread 0x7fbf43c16700 (LWP 3311) exited]
[Thread 0x7fbf43415700 (LWP 3312) exited]
[Thread 0x7fbf44c18700 (LWP 3309) exited]
[Thread 0x7fbf49421700 (LWP 3300) exited]
[Thread 0x7fbf4841f700 (LWP 3302) exited]
[Thread 0x7fbf4ac24700 (LWP 3297) exited]
[Inferior 1 (process 3296) exited normally]
(gdb) c
The program is not being run.
(gdb) c
>
> Regards
> Martin
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.strongswan.org/pipermail/dev/attachments/20130909/b22a2803/attachment.html>
More information about the Dev
mailing list