swanctl crash in libnss_files-2.20.so
I encounter a crash (SEGFAULT) with swanctl when it is built against glibc 2.20:
The Linux distribution I use is Arch Linux. This can be reproduced on three different boxes and happens with every call of swanctl, even calling it without any options!
It only happens when you compile against glibc-2.20. it worked before with earlier versions of the glibc package.
This might be a problem with the way glibc is built on Arch at the moment (PKGVER 6).
I did not test this with older revisions of glibc (PGKVER < 6).
Also, this has not beeen an issue with earlier versions of it, as it worked before.
The reason for me setting it to priority "HIGH" is, that it prevents strongswan-swanctl.service from working at all correctly and also makes swanctl slightly unusable
for sripting at the moment because of the static exit code of 139. Also, this affects all users of Arch Linux and currently upgrading their strongSwan versions or patching them.
└──╼ swanctl -S
uptime: 10 days, since Dec 28 03:02:02 2014
worker threads: 16 total, 11 idle, working: 4/0/1/0
job queues: 0/0/0/0
jobs scheduled: 2
IKE_SAs: 1 total, 0 half-open
mallinfo: sbrk 2711552, mmap 0, used 785424, free 1926128
Speicherzugriffsfehler (Speicherabzug geschrieben)
in the journal:
Jan 07 18:39:11 vms.thermi kernel: swanctl8324: segfault at 7f2ef9e7f3c0 ip 00007f2ef9e7f3c0 sp 00007fffeac26498 error 14 in libnss_files-2.20.so[7f2efcdc5000+b000]
Jan 07 18:39:12 vms.thermi systemd-coredump8329: Process 8324 (swanctl) of user 0 dumped core.
ltrace output is in ltrace.log. strace output is in the attached file "strace.log".
gdb bt full output is in "gdb-bt-full.log".
└──╼ pacman -Qo /usr/lib/libnss_files-2.20.so
/usr/lib/libnss_files-2.20.so ist in glibc 2.20-6 enthalten
Package build stuff for my strongswan version is available at .
The same for glibc is at .
configure: Load SQL backends after crypto plugins
If the MySQL client library is linked against OpenSSL the mysql plugin
will cause a segmentation fault when it is unloaded after the openssl
plugin has already been deinitialized. This is very similar to the issues
with curl (see 44b6a34d438f).
#1 Updated by Tobias Brunner about 7 years ago
- Status changed from New to Feedback
- Assignee set to Tobias Brunner
From the backtrace it looks like a problem with the mysql plugin. Because libmysqlclient is linked against OpenSSL on Arch and the openssl plugin is loaded by swanctl there seems to be a race when deinitializing the plugins and libraries (a similar issue occurs with the curl and openssl plugins when libcurl is linked against OpenSSL).
You might be able to work around this by moving the mysql plugin after the openssl plugin in the load order for swanctl (if that works we can do this by patching
configure.ac, similar to 44b6a34d43).