Tiny Core Extensions > TCE Q&A Forum
Get a Segmentation fault trying to start StrongSwan on TCL-15.0 x86 (32-bit)
rhermsen:
Thanks for the additional clarification.
Tried to remove all default config files, but the segfaults are still present:
--- Code: ---# sh -x ipsec start
sh: can't open 'ipsec': No such file or directory
root@testapps:/usr/local/etc/strongswan# which ipsec
/usr/local/sbin/ipsec
root@testapps:/usr/local/etc/strongswan# sh -x /usr/local/sbin/ipsec start
+ PATH=/home/tc/.local/bin:/usr/local/sbin:/usr/local/bin:/apps/bin:/usr/sbin:/usr/bin:/sbin:/bin:/etc/sysconfig/tcedir/ondemand
+ export PATH
+ '[' -z ]
+ DAEMON_NAME=charon
+ uname -s
+ OS_NAME=Linux
+ IPSEC_NAME=strongSwan
+ uname -r
+ IPSEC_VERSION=U5.9.14/K6.6.8-tinycore
+ IPSEC_DIR=/usr/local/libexec/ipsec
+ IPSEC_BINDIR=/usr/local/bin
+ IPSEC_SBINDIR=/usr/local/sbin
+ IPSEC_CONFDIR=/usr/local/etc/strongswan
+ IPSEC_PIDDIR=/var/run
+ IPSEC_SCRIPT=ipsec
+ IPSEC_STARTER_PID=/var/run/starter.charon.pid
+ IPSEC_CHARON_PID=/var/run/charon.pid
+ IPSEC_STROKE=/usr/local/libexec/ipsec/stroke
+ IPSEC_STARTER=/usr/local/libexec/ipsec/starter
+ export IPSEC_DIR IPSEC_BINDIR IPSEC_SBINDIR IPSEC_CONFDIR IPSEC_PIDDIR IPSEC_SCRIPT IPSEC_VERSION IPSEC_NAME IPSEC_STARTER_PID IPSEC_CHARON_PID
+ IPSEC_DISTRO='University of Applied Sciences Rapperswil, Switzerland'
+ command_dir=/usr/local/libexec/ipsec
+ shift
+ '[' -d /var/lock/subsys ]
+ exec /usr/local/libexec/ipsec/starter --daemon charon
no files found matching '/usr/local/etc/strongswan/strongswan.conf'
abort initialization due to invalid configuration
Segmentation fault
--- End code ---
Rich:
Hi rhermsen
--- Quote from: rhermsen on August 24, 2024, 06:56:28 PM ---Thanks for the additional clarification.
Tried to remove all default config files, but the segfaults are still present:
--- Code: --- ----- Snip -----
no files found matching '/usr/local/etc/strongswan/strongswan.conf'
abort initialization due to invalid configuration
Segmentation fault
--- End code ---
--- End quote ---
It looks like it's choking because it can't find /usr/local/etc/strongswan/strongswan.conf
In TC13, strongswan.tcz contains a /usr/local/etc/strongswan/strongswan.conf.sample
Maybe you need to rename it without .sample at the end.
rhermsen:
Hi Rich,
Because you found some references where the config file could be the reason of the sigfault I removed them all, and still get a sigfault.
This was just to find if it was something with the default config files.
(The same .sample config files are also present in StrongSwan-5.9.14. Normally the startup script will copy the .sample config file without .sample if it is not already present)
Btw, I opened a bug report for this issue here:
https://github.com/strongswan/strongswan/issues/2421
curaga:
Rich, I believe that error code has a different meaning from the usual ones: https://utcc.utoronto.ca/~cks/space/blog/linux/KernelSegfaultErrorCodes
Rich:
Hi rhermsen
I take it that means if /usr/local/etc/strongswan/strongswan.conf
is present, the segfault does not occur?
--- Quote from: rhermsen on August 25, 2024, 05:47:18 AM --- ... Normally the startup script will copy the .sample config file without .sample if it is not already present) ...
--- End quote ---
I think the startup scripts are unique to Tinycore. They get run not
only when an extension first gets installed, but every time you boot.
This is because Tinycore does not use a persistent file system for the
operating system, but rebuilds it from scratch when it boots.
This is the startup file from TC13 usr/local/tce.installed/strongswan :
--- Code: ---for dir in /usr/local/etc/strongswan/ /usr/local/etc/strongswan/strongswan.d/ /usr/local/etc/strongswan/strongswan.d/charon/ /usr/local/etc/strongswan/swanctl/
do
cd $dir
for file in *.sample
do
if [ -r ${file%.sample} ]; then
echo "Verify if $dir/${file%.sample} requires changes."
echo "See $dir/$file for the example."
else
sudo -u tc cp $file ${file%.sample}
fi
done
done
--- End code ---
There really should be a #!/bin/sh for the first line.
I don't believe this came from the strongswan source package.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version