Skip to content

Support for saving data from background profiler n the event of a hang or watchdog event #537

@lupusagax

Description

@lupusagax

Description

One common issue on servers is watchdog crashes from reaching the max tick time limit. Sometimes the world is left in a state where it will repeatedly trigger a watchdog on start until something is changed. Many times this is due to an excessive number of entities and the crash report will indicate this, but not all situations are like this.

I think that if the background profiler is already running, it should have access to at least some incomplete information that could make debugging the complex instances of this easier if saved to disk.

Proposed Behaviour

If the background profiler is running and a watchdog event happens, dump the profile information into a file before the server exits so it can be uploaded manually and used to debug if needed.

Ideally, there would be a way to call special attention to profile data of just the last tick which triggered the crash the time limit so you could have some good insight of what was taking up so much time on that particular tick. This is not essential for this feature to be useful, but would be very helpful when dealing with mod[packs] with complicated scripts and worldgen behaviors which could cause hangs when triggered on an event.

Extra Details

I am not sure what all is possible with this when running on the integrated server and getting a hang, but make sure you can get some profile data would be nice. Getting players to setup an external profiler to diagnose a hang can be a lot of work that they will rarely do.

Metadata

Metadata

Assignees

No one assigned

    Labels

    suggestionNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions