News:

Simutrans Sites
Know our official sites. Find tools and resources for Simutrans.

SIGSEGV when trying to start a headless server

Started by garro, March 26, 2019, 11:48:49 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

garro

Hi all.
I am trying to run a headless server.
I compiled Simutrans from sources as explained in a previous post.
I created the map using a instance of simutrans compiled with sdl2 (because I was unable to create it directly form the headless server - got ERROR: modal_dialogue():  called without a display driver => nothing will be shown!) and then launch the server with the following command:
./sim -server -objects pak128 -debug 5 -load server.
It outputs the following:
Use work dir /home/garro/Desktop/simutrans-src-120-4-1/build/default/
Reading low level config data ...
Simutrans version 120.4.1 from Mar 26 2019
parse_simuconf() at config/simuconf.tab: Reading simuconf.tab successful!
Server started, added 2 server sockets
Loading BDF font 'font/cyr.bdf'
Init done.
parse_colours() at config/simuconf.tab: Reading simuconf.tab successful!
Calculating textures ...done
Segmentation fault (core dumped)

EDIT: Running with -debug 5 I get

...
Message: pakset_info_t::debug: VHCskoda180 -> sha1 = 3F6B824260C57A7C015A59B310C52050F6207664
Message: simmain(): Reading menu configuration ...
Message: simmain(): loading savegame "server"
Message: simmain(): Midi disabled ...
Calculating textures ...done
Warning: karte_t::load: disconnecting all clients
Message: karte_t::load(): Prepare for loading
Warning: karte_t::load: Fileversion: 120007
Message: nwc_auth_player_t::init_player_lock_server: new = 32767
Message: nwc_auth_player_t::init_player_lock_server: new = 32767
Warning: karte_t::load(): loaded savegame from 0/1930, next month=524288, ticks=44040 (per month=1<<19)
Message: simmain(): Running world, pause=0, fast forward=0 ...
Message: network_command_t::rdwr: write packet_id=16, client_id=0
Message: network_command_t::rdwr: write packet_id=16, client_id=0
Message: network_command_t::rdwr: write packet_id=16, client_id=0
Message: network_command_t::rdwr: write packet_id=8, client_id=0
Warning: nwc_tool_t::rdwr: rdwr id=8 client=0 plnr=255 pos=koord3d invalid tool_id=8224 defpar=32768,Adesso sono connessi 0 giocatori. init=1 flags=0
Warning: karte_t::interactive: server lagging by 384
Message: network_command_t::rdwr: write packet_id=9, client_id=0
Warning: nwc_tool_t::clone: send sync_steps=1  tool_id=8224 init
Message: network_command_t::rdwr: write packet_id=8, client_id=0
Warning: nwc_tool_t::rdwr: rdwr id=8 client=0 plnr=255 pos=koord3d invalid tool_id=8224 defpar=32768,Adesso sono connessi 0 giocatori. init=1 flags=0
Message: network_command_t::rdwr: write packet_id=16, client_id=0
Message: network_command_t::rdwr: write packet_id=16, client_id=0
Segmentation fault (core dumped)

Dwachs

Does this happen reproducibly? Can you please upload the savegame to test it?
Parsley, sage, rosemary, and maggikraut.

garro

Yes it is reproducible. I also tried with 2 paksets (pak128 and pak64).
STEPS TO REPRODUCE
1. Download the latest version of Simutrans (simutrans-src-120-4-1.zip) on Ubuntu 18.04
2. Extract two times
3. Compile one version with BACKEND=posix COLOUR_DEPTH=16 OSTYPE=linux
4. Compile the other with BACKEND=sdl2 COLOUR_DEPTH=16 OSTYPE=linux
5. Download a pakset and install it in both versions.
6. Use the version compiled with sdl2 to make a new map (FEATURE REQUEST: add the possibility to make a map directly from the headless server) and save it
7. Execute the server.
8. The server segfaults

The map seems too big to be uploaded even on the German forum. Anyway, it was a new map generated only to be played on the server.

Vladki


ceeac

Hm, tried to reproduce the crash but couldn't with the latest svn version (r8742) on Ubuntu 18.10.
@garro:
Could you try reproducing the crash with the latest version? You can download the sources for the latest svn version from the github mirror here -> https://github.com/aburch/simutrans/archive/master.zip or directly via svn.
Like Vladki suggested, does the crash still occur when compiling the server with COLOUR_DEPTH=0 ?
If yes, what are your map generation settings (size, number of industries etc.)?

garro

The crash does NOT occur with COLOR_DEPTH=0.
Thank you

Vladki

This should be put in some simutrans server howto ;)

prissi

Or the built should abort if color depth != 0 when compiling posix like in r8743 ...

Dwachs

Parsley, sage, rosemary, and maggikraut.

prissi

But compiling posix without using it as a server is somewhat pointless ...