The International Simutrans Forum

 

Author Topic: -Experimental causing freezes on Linux  (Read 3012 times)

0 Members and 1 Guest are viewing this topic.

Offline TygerFish

  • *
  • Posts: 107
-Experimental causing freezes on Linux
« on: January 03, 2011, 04:40:03 AM »
Occasionally, Simutrans-Experimental will cause my computer to "freeze."  I can still move the cursor around the screen, but no mouseovers or clicks -- on Simutrans, GNOME elements, or other running applications -- will have any kind of effect.  

This happens after a random interval, anywhere from a few seconds to more than an hour.  It has happened while in pause as well as with time running, although it seems to happen less frequently while paused.  I have also tried turning off network access, as well as Dropbox (which syncs my savegames), and neither prevented the freezing.

I have only seen this behavior on my laptop running Ubuntu 10.10 64-bit (as mentioned here: http://forum.simutrans.com/index.php?topic=6478.0) even though my desktop uses the same operating system with almost the exact same set of applications running and has not once had this behavior.  This freeze happens equally often with different recent versions and architectures; I've experienced it with the pre-compiled 32-bit versions of 9.0 and 9.1 as well as with a locally-compiled 64-bit version from 1/1/11 code (9.1).

I have only ever experienced this freeze when Simutrans-Experimental was running.  I have tested Simutrans vanilla for a substantial amount of time and this behavior did not occur.  (And I've gotten so accustomed to Experimental, it was tedious work playing vanilla long enough to rule it out!  :))

Attached is the tail of a -debug 3 log from when the freeze happened within a few seconds of starting the game.  I used ctrl-alt-F1 to switch to a terminal and observe the logfile, where I could see new "no route" messages being added in real time, so the game was presumably still processing something in the background.  I have also attached the tail of a sample logfile where the freeze happened many minutes after the game had been launched.  Both full logfiles are available here:
http://tygerfish.homelinux.net/simutrans/simu.log.instant_freeze.txt
http://tygerfish.homelinux.net/simutrans/simu.log.freeze2.txt

Since it does not cause a "crash" per se, getting a stack trace might be problematic (also because I can't figure out how to access the same console from within the graphical session and the terminal session), although any further instructions for getting more information would be appreciated.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18425
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: -Experimental causing freezes on Linux
« Reply #1 on: January 03, 2011, 10:34:08 AM »
Hmm - I wonder whether this might be hardware related. One feature in Experimental that takes a great deal of processing power is the system of checking whether private cars can find routes to their destinations: it is that method that is being invoked very frequently in your examples by the looks of the outputs. It may be that this is all too much for your laptop in one way or another. Can you try starting a new game with assume_everywhere_connected_by_road=1 in simuconf.tab and see whether this problem still occurs?

Another possibility is that the problem is caused by the 64-bit issues in the graphics module described here. That should be fixed with the next version, so I'd be interested if you could try that when it is released and see whether there are any improvements.

Offline TygerFish

  • *
  • Posts: 107
Re: -Experimental causing freezes on Linux
« Reply #2 on: January 03, 2011, 02:43:51 PM »
Hmm - I wonder whether this might be hardware related. One feature in Experimental that takes a great deal of processing power is the system of checking whether private cars can find routes to their destinations: it is that method that is being invoked very frequently in your examples by the looks of the outputs. It may be that this is all too much for your laptop in one way or another. Can you try starting a new game with assume_everywhere_connected_by_road=1 in simuconf.tab and see whether this problem still occurs?
Good thought...
Turns out, I already did; that's the default setting in Pak.German-ex, which I also tested to make sure it wasn't Pak128.Britain that was causing the problems.

Another possibility is that the problem is caused by the 64-bit issues in the graphics module described here. That should be fixed with the next version, so I'd be interested if you could try that when it is released and see whether there are any improvements.
I await it eagerly!  :)

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9418
  • Languages: De,EN,JP
Re: -Experimental causing freezes on Linux
« Reply #3 on: January 03, 2011, 02:47:23 PM »
No, the graphcis problem will cause a crash due to a segmentation fault. This cannot be the cause.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18425
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: -Experimental causing freezes on Linux
« Reply #4 on: January 03, 2011, 04:54:54 PM »
Hmm, that's very odd. I'm not sure that I understand why a freeze should occur in one environment and not another. In any event, give it a go with the next version and see whether that makes any difference. Sorry that you've been having trouble.

Offline TygerFish

  • *
  • Posts: 107
Re: -Experimental causing freezes on Linux
« Reply #5 on: January 03, 2011, 05:37:23 PM »
I tested my hunch that the freezing seemed to happen less often while paused, and thus far that seems supported.  Building, altering convoys, etc. only while the game is paused definitely seems to help.

I'll upgrade to 9.2 and do some more testing...


Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18425
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: -Experimental causing freezes on Linux
« Reply #6 on: January 03, 2011, 05:46:31 PM »
Thank you - let me know your results. Does anything else cause that laptop to freeze?

Offline inkelyad

  • Devotees (Inactive)
  • *
  • Posts: 482
  • Languages: EN, RU
Re: -Experimental causing freezes on Linux
« Reply #7 on: January 07, 2011, 10:54:06 PM »
Userland Linux program should not cause any kind of freeze in stable system.
Even fork/memory bomb can't that. System just kill it. But ulimits not often enabled in desktop systems.
Usual source of freeze -- you need more  memory. Simutrans-Exp is memory hungry and your GNOME applications and X server are swapped out to disk.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18425
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: -Experimental causing freezes on Linux
« Reply #8 on: January 07, 2011, 11:25:55 PM »
A user who was experiencing freezes in Standard has had this advice from Prissi. Can you try the same thing and see whether it helps you?

Offline TygerFish

  • *
  • Posts: 107
Re: -Experimental causing freezes on Linux
« Reply #9 on: January 08, 2011, 03:41:02 AM »
Userland Linux program should not cause any kind of freeze in stable system.
Even fork/memory bomb can't that. System just kill it. But ulimits not often enabled in desktop systems.
Usual source of freeze -- you need more  memory. Simutrans-Exp is memory hungry and your GNOME applications and X server are swapped out to disk.
Actually, I just upgraded the memory on the system from 2GB to 4GB in the middle of this and it was still doing it... 

A user who was experiencing freezes in Standard has had this advice from Prissi. Can you try the same thing and see whether it helps you?
Interesting, I'll give it a try... problem is, now that I'm home from the holidays, I'm having too much fun playing the game on my desktop with no crashes and a 30" monitor.  :D

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18425
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: -Experimental causing freezes on Linux
« Reply #10 on: January 08, 2011, 12:37:53 PM »
30" monitor? Goodness!

Do let me know when you get a chance to test it with -nomidi, though!

Offline fabio85

  • *
  • Posts: 32
Re: -Experimental causing freezes on Linux
« Reply #11 on: January 08, 2011, 03:42:15 PM »
At the moment -no_midi seems to work  ;)

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18425
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: -Experimental causing freezes on Linux
« Reply #12 on: January 08, 2011, 03:48:46 PM »
Excellent!

Offline TygerFish

  • *
  • Posts: 107
Re: -Experimental causing freezes on Linux
« Reply #13 on: January 21, 2011, 03:41:17 PM »
30" monitor? Goodness!
One of the best technology investments I've made!
http://support.dell.com/support/edocs/monitors/3008wfp/en/ug/about.htm#Product Features

Do let me know when you get a chance to test it with -nomidi, though!
Alas, I tried both -nomidi and -no_midi and still got the freeze.  Guess I'm stumped.  I'll keep checking from time to time if I think of something else to try or when there's a new version.