[Swan-dev] Crash with libreswan-git 24/10 (fwd)
Paul Wouters
paul at nohats.ca
Fri Oct 24 07:39:11 EEST 2014
Aha, this points to the liveness probes using something that already got
deleted, triggered by failing dpd probe and dpdaction=restart
Paul
---------- Forwarded message ----------
Date: Fri, 24 Oct 2014 00:18:30
From: Reuben Farrelly <reuben-libreswan at reub.net>
To: Paul Wouters <paul at nohats.ca>
Subject: Re: Crash with libreswan-git 24/10
On 24/10/2014 12:07 PM, Paul Wouters wrote:
> On Fri, 24 Oct 2014, Reuben Farrelly wrote:
>
>> Still seeing this crash I reported to you a couple of weeks ago happen
>> very frequently. Here's the latest coredump which is built against
>> current -git as of now ( v3.11-80-g77c5f76-master ).
>
> I think it will still happen in 3.11 which we released yesterday, but
> could you give it a try anyway. Can you also start pluto with
> --leak-detective ? Depending on your init system, you can probably
> create /etc/sysconfig/pluto and add PLUTO_OPTIONS="--leak-detective" to
> it. That should cause freed memory to point to 0xEFEFEFEFEFEFEF so we
> can more clearly see if there is using of freed memory anyway.
>
> Another thing to try would be to compile with electric fence support,
> by setting EFENCE=-lefence to Makefile.inc. It should cause pluto
> to explode on bad memory writes.
>
> Paul
Here you go...success.
lightning pluto # gdb /usr/libexec/ipsec/pluto core
GNU gdb (Gentoo 7.8 vanilla) 7.8
Copyright (C) 2014 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 "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/libexec/ipsec/pluto...done.
[New LWP 19846]
[New LWP 19851]
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `/usr/libexec/ipsec/pluto --config /etc/ipsec.conf
--leak-detective'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x000000000040f39d in restart_connections_by_peer (c=0xac7a78)
at
/var/tmp/portage/net-misc/libreswan-3.11/work/libreswan-3.11/programs/pluto/initiate.c:327
327 if ((c->dnshostname && d->dnshostname &&
(gdb) bt full
#0 0x000000000040f39d in restart_connections_by_peer (c=0xac7a78)
at
/var/tmp/portage/net-misc/libreswan-3.11/work/libreswan-3.11/programs/pluto/initiate.c:327
d = 0xefefefefefefefef
#1 0x0000000000423436 in liveness_check (st=0xac7f78)
at
/var/tmp/portage/net-misc/libreswan-3.11/work/libreswan-3.11/programs/pluto/timer.c:512
tm = {mono_secs = 498095}
last_liveness = {mono_secs = 498045}
timeout = 45
pst = 0xad0498
c = 0xac7a78
last_msg_age = {delta_secs = 498095}
#2 0x0000000000423870 in handle_next_timer_event ()
at
/var/tmp/portage/net-misc/libreswan-3.11/work/libreswan-3.11/programs/pluto/timer.c:627
ev = 0xad1ef8
type = EVENT_v2_LIVENESS
st = 0xac7f78
#3 0x0000000000423175 in handle_timer_event () at
/var/tmp/portage/net-misc/libreswan-3.11/work/libreswan-3.11/programs/pluto/timer.c:444
No locals.
#4 0x00000000004211aa in call_server () at
/var/tmp/portage/net-misc/libreswan-3.11/work/libreswan-3.11/programs/pluto/server.c:774
readfds = {__osfds_bits = {0 <repeats 128 times>}}
writefds = {__osfds_bits = {0 <repeats 128 times>}}
ndes = 0
ifp = 0x0
#5 0x000000000041d9a3 in main (argc=4, argv=0x7fff8e76e698)
at
/var/tmp/portage/net-misc/libreswan-3.11/work/libreswan-3.11/programs/pluto/plutomain.c:1387
lockfd = 3
log_to_stderr_desired = 0
log_to_file_desired = 0
keep_alive = 0
virtual_private = 0xaa0570
"%v4:10.0.0.0/8,%v4:192.168.0.0/16,%v4:172.16.0.0/12,%v4:25.0.0.0/8,%v4:100.64.0.0/10,%v6:fd00::/8,%v6:fe80::/10"
(gdb)
Reuben
More information about the Swan-dev
mailing list