[0.18.35] Hung without log output, currently unknown cause

Bugs that are actually features.
Adamo
Filter Inserter
Filter Inserter
Posts: 481
Joined: Sat May 24, 2014 7:00 am
Contact:

[0.18.35] Hung without log output, currently unknown cause

Post by Adamo »

Hi All,

I need some help with this one before I can tell you much more about what's going on. I can provide a savefile -- http://adamo.network/factorio/paludis.zip -- and a mod pack to go with it -- http://adamo.network/factorio/mods.zip. I would like to do more to diagnose this issue myself, but if there's a way for me to produce more output and interpret that, I need some help to learn how. I can say right now that if this savefile is loaded with that set of mods, the game will freeze after running for a few minutes. Consistently, it freezes a few moments after the gas train at the northeast end of the base leaves and returns with its next tank of gas. The only other thing I can think of is that maybe you need to set your player name to "Adamo". We noticed this error on a headless server, which "hung" at this moment, but it is reproducible in singleplayer.

Sorry I can't say more about what I think is happening. I wish I could. There is no log output indicating a problem, just a freeze/hang.

Here is the log from the latest attempt: http://adamo.network/factorio/factorio-current.log.

Thanks!
Last edited by Adamo on Thu Jul 09, 2020 9:28 pm, edited 1 time in total.
posila
Factorio Staff
Factorio Staff
Posts: 5371
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [0.18.35] Hung without log output, currently unknown cause

Post by posila »

From what I can tell, it's hanging in on_tick handler of Powered Entities ... it seems to do something (searches entities and reads entity prototypes), but does too much work in single tick or is stuck in infinite loop.
Adamo
Filter Inserter
Filter Inserter
Posts: 481
Joined: Sat May 24, 2014 7:00 am
Contact:

Re: [0.18.35] Hung without log output, currently unknown cause

Post by Adamo »

Thanks posila. I'll try running the recalculate function in his mod to see if that fixes it, or keep that in mind to remove and reinstall if we see a similar hang. We actually have a plan to write another mod that does a similar function, so maybe that will light the fire for us to get on that.

Would you help me to understand how you were able to troubleshoot that? I'd like to be able to dig in more on my side, but maybe you're using some developer tools I don't have access to, or could I be using some useful command line arguments to spit out data I could watch?
posila
Factorio Staff
Factorio Staff
Posts: 5371
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [0.18.35] Hung without log output, currently unknown cause

Post by posila »

Adamo wrote: Mon Jul 13, 2020 5:02 pmWould you help me to understand how you were able to troubleshoot that? I'd like to be able to dig in more on my side, but maybe you're using some developer tools I don't have access to, or could I be using some useful command line arguments to spit out data I could watch?
I reproduced the issue and then attached debugger to factorio process - I am using debugger from Visual Studio, on Linux you'd probably use GDB. I paused the execution and search for a thread that was doing soming (was not in sleep, or waiting for something), and inspected its callstack. Then I resumed the execution and paused it again to check if it is maybe something in our side of Lua API that is looping infinitelly.
Getting useful information from callstack (like finding out which event handler of which mod is being executed) might be challenging without source code or knowledge of our codebase, but still doable since we distribute the game with debug symbols.
Adamo
Filter Inserter
Filter Inserter
Posts: 481
Joined: Sat May 24, 2014 7:00 am
Contact:

Re: [0.18.35] Hung without log output, currently unknown cause

Post by Adamo »

That's helpful. Thanks.
Post Reply

Return to “Not a bug”