Segfault when loading unitsync (need SpringDataDir write access)

Segfault when loading unitsync (need SpringDataDir write access)

SpringRTS Perl Autohost for Dedicated Server

Moderators: Moderators, Lobby Developers, SPADS AutoHost

Post Reply
User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

Segfault when loading unitsync (need SpringDataDir write access)

Post by yuritch »

I'm trying to run SPADS on openSUSE 11.0 and I'm getting this:

ERROR - [SPADS] [SimpleLog] No log file configured, redirecting to standard output
ERROR - [SPADS] Unable to read configuration file (/usr/share/games/spads/helpSettings.dat: No such file or directory)
ERROR - [SPADS] Unable to load commands, help and permission system
CRITICAL - [SPADS] Unable to load SPADS configuration at startup

That's with the 'testing' build, with 'stable' it loads (and then segfaults).
The file helpSettings.dat is surely not there (and is not getting installed by autoupdater), I tried to make that a symlink to "help_0.8.2.dat" and then it complains like so:

ERROR - [SPADS] Invalid help section 'unban' in file "/usr/share/games/spads/helpSettings.dat"

Something must be wrong there.
User avatar
bibim
Lobby Developer
Posts: 952
Joined: 06 Dec 2007, 11:12

Re: SPADS AutoHost beta release

Post by bibim »

yuritch wrote:I'm trying to run SPADS on openSUSE 11.0 and I'm getting this:

ERROR - [SPADS] [SimpleLog] No log file configured, redirecting to standard output
ERROR - [SPADS] Unable to read configuration file (/usr/share/games/spads/helpSettings.dat: No such file or directory)
ERROR - [SPADS] Unable to load commands, help and permission system
CRITICAL - [SPADS] Unable to load SPADS configuration at startup

That's with the 'testing' build
Sorry, I forgot to include the settings help file download in latest testing/unstable installers. Should be fixed now.
yuritch wrote:with 'stable' it loads (and then segfaults)
When exactly does it segfault ? What does it print on your standard output and in your spads.log file ? Can you try to put all log levels to debug in your spads.conf:

Code: Select all

lobbyInterfaceLogLevel:5
autoHostInterfaceLogLevel:5
updaterLogLevel:5
spadsLogLevel:5
User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

Re: SPADS AutoHost beta release

Post by yuritch »

I changed log levels to 5, with stable build, this is all that is getting logged:

Code: Select all

20090506175910 - NOTICE   - [SPADS] Initializing SPADS
This is the error message in the console:

Code: Select all

NOTICE   - [SPADS] Initializing SPADS
./spads.sh: line 6: 16036 Segmentation fault      /usr/share/games/spads/spads.pl /usr/share/games/spads/etc/spads.conf
spads.sh is a little script I use to set environment vars and launch spads, it's like so:

Code: Select all

#!/bin/bash
LD_LIBRARY_PATH=/usr/lib/spring:$LD_LIBRARY_PATH
SPRING_DATA_DIR=~/.spring
# echo $SPRING_DATA_DIR
# echo $LD_LIBRARY_PATH
/usr/share/games/spads/spads.pl /usr/share/games/spads/etc/spads.conf
Line 6 is the one that calls spads.pl there.

I then deleted the stable build and used the installer to get testing one. It did not complain about helpSettings this time, but it also segfaulted. I set the log levels to 5 and still the log only contains 1 line about initializing (same as stable build). Console also shows the same error, only the code after 'line 6' is different every time.

Edit: if I do 'sudo ./spads.sh', it actually works (no segfault) and shows up in the lobby. I surely hope it's not supposed to be run under root however?
User avatar
bibim
Lobby Developer
Posts: 952
Joined: 06 Dec 2007, 11:12

Re: SPADS AutoHost beta release

Post by bibim »

yuritch wrote:Edit: if I do 'sudo ./spads.sh', it actually works (no segfault) and shows up in the lobby. I surely hope it's not supposed to be run under root however?
No, it doesn't require root.
Actually, the only thing I can think about that could cause a segfault is the Perl UnitSync module, if it's linked against different binaries at run time than the ones used during installation.

During SPADS installation, a Perl Module is built using the default GCC and Swig binaries available in the environment. Then this module is tested by the installer to ensure it runs normally. Since you didn't get any problem during installation, it means this module works in the environment used during installation. I think the environment you're using to launch SPADS is somewhat different from the environment used during installation, as if it was using different library paths (since you're using a bash script, check your .bashrc and .profile files maybe ?). This bug could happen if you used an environment with 64bits system libraries during installation, and then try to launch SPADS in an environment using 32bits system libraries, or if you have a different unitsync library in your library path than the one used during installation for example...

If you try to launch SPADS directly without using a bash script, do you still have the error ?
User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

Re: SPADS AutoHost beta release

Post by yuritch »

Problem solved - it was because spads needs write access to Spring data dir.
User avatar
bibim
Lobby Developer
Posts: 952
Joined: 06 Dec 2007, 11:12

Re: SPADS AutoHost beta release

Post by bibim »

Actually SPADS doesn't need it directly. Unitsync does.
Post Reply

Return to “SPADS AutoHost”