Skip to content

Conversation

@CyberiaResurrection
Copy link
Collaborator

This was more than a little weird - I was consistently getting a KeyError on line 589 of collect_stat, which maps return codes to a mutmut status.

More digging into the underlying boomage revealed the mutant that caused it, along with the tests that rumbled it. For whatever reason, the process was getting killed but not segfaulting. This manifested as a -9 return code, and thus kaboom in collect_stat.

To avoid generating another mutant status, and because "segfault" is the least-worst match, map the newly-problematic return code to "segfault".

This was more than a little weird - I was consistently getting a
KeyError on line 589 of collect_stat, which maps return codes to
a mutmut status.

More digging into the underlying boomage revealed the mutant that
caused it, along with the tests that rumbled it.  For whatever
reason, the process was getting killed _but not segfaulting_.  This
manifested as a -9 return code, and thus kaboom in collect_stat.

To avoid generating another mutant status, and because "segfault"
is the least-worst match, map the newly-problematic return code to
"segfault".
@boxed
Copy link
Owner

boxed commented Aug 27, 2025

Makes sense. Maybe the code should default to some "unknown kill state" for any return code it doesn't have a mapping for? Seems more robust.

@Otto-AA
Copy link
Collaborator

Otto-AA commented Aug 27, 2025

Is "suspicious" (code 35) a specific case? If not, we could use this one as the default.

@boxed
Copy link
Owner

boxed commented Aug 27, 2025

I think it is. But I can't remember anymore 😅 So sounds good to me.

@CyberiaResurrection
Copy link
Collaborator Author

CyberiaResurrection commented Aug 27, 2025

@Otto-AA - "suspicious" is a specific state, so that may not work. I'll roll this PR up as is and then look at adding an "unknown" status in a separate PR.

@CyberiaResurrection CyberiaResurrection merged commit 1e46f1b into boxed:main Aug 27, 2025
5 checks passed
@CyberiaResurrection CyberiaResurrection deleted the HandleMinusNinePyTestReturnCode branch August 27, 2025 23:42
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.

3 participants