Skip to content

crash_test.py improvements - #1997

Merged
slipher merged 3 commits into
DaemonEngine:masterfrom
slipher:crashtest
Aug 4, 2026
Merged

crash_test.py improvements#1997
slipher merged 3 commits into
DaemonEngine:masterfrom
slipher:crashtest

Conversation

@slipher

@slipher slipher commented Jul 29, 2026

Copy link
Copy Markdown
Member

No description provided.

Limits it to a rudimentary check that a crash dump is produced, without
generating symbols or analyzing the dump.
Comment thread tools/crash_test.py Outdated
"-homepath", self.dir,
"-set", "vm.sgame.type", vmtype,
"-set", "vm.cgame.type", vmtype,
"-set", "vm.timeout", "30", # in case of emulator

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a side note, in my branch implementing box64 support I also increase this in engine directly.
I don't see why this timeout should be short: the time is only waited when the game is slow to start, and if it's slow to start but not failing, we should not give up. Previously I faced the same timeout problem when running the game on a network file system over a very slow network where it was slow but not failing (that may have been what prompted the introduction of the cvar). When the system is not slow, the delay is never experienced, and when the system is slow, there is no other solution than waiting and it's fine.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How could a slow network cause that? The VM process can't do any I/O other than IPC messages.

@illwieckz illwieckz Jul 30, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That timeout also counts the time between execing the nacl_loader with the nexe and the first actual response from the running nexe on IPC, or something like that. So the timeout counts for all the nacl_runtime and nexe to be read (if slow file system…), then counts for the compatibility layer (box64, rosetta2…) to initialize itself or even do some magic processing on the binaries, etc.

@illwieckz illwieckz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but I would appreciate a TODO: comment on the vm.timeout thing to not forget to revert to the default the day we use a better default in engine, or we rework the engine to not have that timeout also count the runtime startup.

slipher added 2 commits August 4, 2026 16:33
Each diff chunk here stands as a separate patch but let's avoid commit
spam for a script no one cares about.

- Increase NaCl timeout
- Check existence of crash_server
- Fix exception printing for Python < 3.10
- Fix interleaved stackwalk stdout and stderr (due to wrong truncate
  call)
- Add Mac release support: there is no Breakpad, but the NaCl crash
  tests can run successfully (even through Rosetta!)
Report missing function and/or file names from Breakpad stack walk but
pass the test if just 1 is present.
@slipher
slipher merged commit bdaf8f3 into DaemonEngine:master Aug 4, 2026
1 check passed
@slipher
slipher deleted the crashtest branch August 4, 2026 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants