Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'The connection to the server has been lost' in single player #3307

Closed
Thinker55 opened this issue Feb 11, 2021 · 11 comments
Closed

'The connection to the server has been lost' in single player #3307

Thinker55 opened this issue Feb 11, 2021 · 11 comments
Labels
category:bug The Issue/PR describes or solves a perceived malfunction within the game. component:internal The Issue/PR deals with any project component that has no explicit `component` label. status:works for me The Issue can't be reproduced or it doesn't contain sufficient information to reproduce it.

Comments

@Thinker55
Copy link

Bug Report

Environment

  • FreeOrion Version: 0.4.10+[build 2021-02-09.cb4b741]CMake

  • Operating System:SuSE LEAP 15.2 (New install on 2021-02-06)

  • Graphic card used:Radeon

  • Fetched as

    • Compiled from source

Description

System does not appear to be creating logs in the indicated location

Expected Result

Steps to reproduce

  • First step. start game in single player mode.
  • Second step. Play for 77 turns.
  • Issue occurs.
@Thinker55 Thinker55 added the category:bug The Issue/PR describes or solves a perceived malfunction within the game. label Feb 11, 2021
@geoffthemedio geoffthemedio changed the title Jack Server error? Persistent message 'The connection to the server has been lost' at turn 78 in single player mode game. 'The connection to the server has been lost' at turn 78 in single player mode game. Feb 12, 2021
@geoffthemedio geoffthemedio changed the title 'The connection to the server has been lost' at turn 78 in single player mode game. 'The connection to the server has been lost' in single player Feb 12, 2021
@geoffthemedio
Copy link
Member

geoffthemedio commented Feb 12, 2021

Please attach a save from a turn or two before this happens. It is very unlikely that the specific steps to reproduce are playing a newly started game with any settings for exactly 77 turns.

What is displayed on the options window Directories tab? Is that directory writable by the FreeOrion binaries and the user you're running the game as?

@Thinker55
Copy link
Author

The directory is writable.

I did upload a saved game previously -- or thought I did. It just happened to me again at turn 54 in a new game.
Directories look fine and have files written to them.
Resource: /home/stephen/Projects/freeorion-project/build/default
Save and Server Save: /home/stephen/.local/share/freeorion/save
Config and log file: /home/stephen/.config/freeorion

x-special/nautilus-clipboard
copyx-special/nautilus-clipboard
copy
file:///home/stephen/.local/share/freeorion/save/save-20210211_163040.sav

file:///home/stephen/.local/share/freeorion/save/save-20210211_201249.sav
x-special/nautilus-clipboard
copy
file:///home/stephen/.local/share/freeorion/freeorion.log
x-special/nautilus-clipboard
copy
file:///home/stephen/.local/share/freeorion/freeoriond.log
x-special/nautilus-clipboard
copy
file:///home/stephen/.local/share/freeorion/save/save-20210211_195359.sav
I have attached log files and save games from a couple of turns before both incidents.

@geoffthemedio
Copy link
Member

geoffthemedio commented Feb 12, 2021

I have attached log files and save games from a couple of turns before both incidents.

Not that I can see... Yor comment just has text for the local path where some files are located, but no file attachments.

You might need to zip a .sav file for it to attach, but .log files attach OK for me.

@Thinker55
Copy link
Author

freeorion.log
freeoriond.log
save-20210211_164150.zip
save-20210211_163656.zip
save-20210211_195359.zip
save-20210211_201249.zip
Did these come through? Copy and paste wasn't working, I guess. This is Drag & Drop.

@SpikyCaterpillar
Copy link

SpikyCaterpillar commented Feb 14, 2021

I believe I am getting the same bug: I can play for a while, but eventually the server segfaults, which causes the client to give a message saying the server connection has been lost.

Here's a save right before the crash - all I have to do is advance to the next turn.

crashes.zip

And the gdb traceback for freeoriond when the crash happens:

Program received signal SIGSEGV, Segmentation fault.
__memcmp_sse4_1 () at ../sysdeps/x86_64/multiarch/memcmp-sse4.S:802
802     ../sysdeps/x86_64/multiarch/memcmp-sse4.S: Tiedostoa tai hakemistoa ei ole.
(gdb) bt
#0  __memcmp_sse4_1 () at ../sysdeps/x86_64/multiarch/memcmp-sse4.S:802
#1  0x00007f324c31222d in SpeciesManager::GetSpecies(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
   from /home/gametest/freeorion-git/2019/freeorion/build/libfreeorioncommon.so
#2  0x0000563849191632 in (anonymous namespace)::ShootAllWeapons(std::shared_ptr<UniverseObject> const&, (anonymous namespace)::AutoresolveInfo&, int, std::shared_ptr<SimultaneousEvents>&, std::shared_ptr<WeaponsPlatformEvent>&, std::shared_ptr<FightersAttackFightersEvent>&) [clone .isra.1886] ()
#3  0x000056384919423b in (anonymous namespace)::CombatRound((anonymous namespace)::AutoresolveInfo&) ()
#4  0x0000563849195eb4 in AutoResolveCombat(CombatInfo&) ()
#5  0x00005638492dcec6 in ServerApp::ProcessCombats() ()
#6  0x000056384935283f in ProcessingTurn::react(ProcessTurn const&) [clone .constprop.1818] ()
#7  0x0000563849354e75 in boost::statechart::simple_state<ProcessingTurn, PlayingGame, boost::mpl::list<mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, (boost::statechart::history_mode)0>::react_impl(boost::statechart::event_base const&, void const*) ()
#8  0x00005638492feeeb in boost::statechart::state_machine<ServerFSM, Idle, std::allocator<void>, boost::statechart::null_exception_translator>::process_queued_events() ()
#9  0x00005638492ff048 in boost::statechart::state_machine<ServerFSM, Idle, std::allocator<void>, boost::statechart::null_exception_translator>::process_event(boost::statechart::event_base const&) ()
#10 0x00005638492d8c12 in ServerApp::HandleMessage(Message const&, std::shared_ptr<PlayerConnection>) ()
#11 0x00005638492efb90 in std::_Function_handler<void (Message, std::shared_ptr<PlayerConnection>), boost::_bi::bind_t<void, boost::_mfi::mf2<void, ServerApp, Message const&, std::shared_ptr<PlayerConnection> >, boost::_bi::list3<boost::_bi::value<ServerApp*>, boost::arg<1>, boost::arg<2> > > >::_M_invoke(std::_Any_data const&, Message&&, std::shared_ptr<PlayerConnection>&&) ()
#12 0x00005638493658b2 in std::_Function_handler<void (), boost::_bi::bind_t<boost::_bi::unspecified, std::function<void (Message, std::shared_ptr<PlayerConnection>)>, boost::_bi::list2<boost::_bi::value<Message>, boost::_bi::value<std::shared_ptr<PlayerConnection> > > > >::_M_invoke(std::_Any_data const&) ()
#13 0x0000563849357de2 in ServerNetworking::HandleNextEvent() ()
#14 0x00005638492c093f in ServerApp::Run() ()
#15 0x000056384917cfb3 in main ()

Platform: Debian 10 AMD64.

@Vezzra Vezzra added the component:internal The Issue/PR deals with any project component that has no explicit `component` label. label Feb 14, 2021
@Thinker55
Copy link
Author

Where did you find that? I would go over my logs looking if I knew where to look. I'm experienced in general, but compilers and such are something I haven't used much.

@SpikyCaterpillar
Copy link

To find the process ID, in a terminal:

ps axuw|grep freeoriond
gdb -p 1234

(or whatever the process ID was. Freeorion spawns several processes; freeoriond is the server.)

gdb will pause the server when it attaches; 'c' and enter to resume. Play normally. If the daemon crashes, the debugger will pause the process and give the "Program received SIGSEGV" message. Then type 'bt' and enter to get the backtrace. If you don't have gdb installed, your package manager probably keeps it in a package called gdb.

If #1 in the backtrace ISN'T (big hex number) SpeciesManager::GetSpecies(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) ()
from /home/gametest/freeorion-git/2019/freeorion/build/libfreeorioncommon.so
then we probably have two different bugs that just look the same from outside.

@Thinker55
Copy link
Author

I'm gonna have to start a new game to be able to run the back trace.

@Thinker55
Copy link
Author

Thinker55 commented Feb 16, 2021

Okay, it seems like we're looking at the same thing. Backtrace:

Thread 1 "freeoriond" received signal SIGSEGV, Segmentation fault.
0x00007f2d20291f36 in __memcmp_sse4_1 () from /lib64/libc.so.6
(gdb) bt
#0  0x00007f2d20291f36 in __memcmp_sse4_1 () from /lib64/libc.so.6
#1  0x00007f2d2408d14d in SpeciesManager::GetSpecies(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
   from /home/stephen/Projects/freeorion-project/build/libfreeorioncommon.so
#2  0x0000000000474be7 in (anonymous namespace)::ShootAllWeapons(std::shared_ptr<UniverseObject> const&, (anonymous namespace)::AutoresolveInfo&, int, std::shared_ptr<SimultaneousEvents>&, std::shared_ptr<WeaponsPlatformEvent>&, std::shared_ptr<FightersAttackFightersEvent>&) [clone .isra.1940] ()
#3  0x0000000000475f7c in (anonymous namespace)::CombatRound((anonymous namespace)::AutoresolveInfo&) ()
#4  0x00000000004798dc in AutoResolveCombat(CombatInfo&) ()
#5  0x00000000005b3bce in ServerApp::ProcessCombats() ()
#6  0x0000000000623fa5 in ProcessingTurn::react(ProcessTurn const&) [clone .constprop.1831] ()
#7  0x0000000000628ad5 in boost::statechart::simple_state<ProcessingTurn, PlayingGame, boost::mpl::list<mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, (boost::statechart::history_mode)0>::react_impl(boost::statechart::event_base const&, void const*) ()
#8  0x00000000005d70c3 in boost::statechart::state_machine<ServerFSM, Idle, std::allocator<void>, boost::statechart::null_exception_translator>::process_queued_events() ()

@geoffthemedio geoffthemedio added this to the v0.5 milestone Jun 28, 2021
@geoffthemedio
Copy link
Member

I can't reproduce a crash with the provided saves with (nearly) the latest master. Might be compiler or OS specific. The provided logs appear to be from different runs of the client and server, so I'm not able to determine much from them.

@Thinker55
Copy link
Author

Thinker55 commented Jul 22, 2021 via email

@Vezzra Vezzra added the status:works for me The Issue can't be reproduced or it doesn't contain sufficient information to reproduce it. label Jul 25, 2021
@Vezzra Vezzra modified the milestones: v0.5, Gateway to the Void Jul 25, 2021
@Vezzra Vezzra closed this as completed Jul 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:bug The Issue/PR describes or solves a perceived malfunction within the game. component:internal The Issue/PR deals with any project component that has no explicit `component` label. status:works for me The Issue can't be reproduced or it doesn't contain sufficient information to reproduce it.
Projects
None yet
Development

No branches or pull requests

4 participants