Closed f-bourqui closed 2 months ago
@richardwerkman
@f-bourqui This should be fixed in version 4.0.4 of stryker.
@richardwerkman Nope problem is still present. Have a better look at the stack trace I provided.
It's a HashSet RequireRecursiveRemoval called by RegisterEngine in MutantPlacer class (title of the issue). If it's intended to call RegisterEngine concurrently, a simple lock surrounding access of the HashSet (add and contains) should solve the issue.
Yeah, this is still an issue for us in 4.0.4 as well. We're trying to introduce mutation testing to our organization but right now half or more of our runs fail because of this issue and it makes it hard to enable anywhere (as you manually have to trigger re-runs).
So would be really grateful for a fix on it.
I'm working on a fix right now! It seems I missed that we have some static elements in our mutation process. These are shared between the parallel mutation threads and seem to cause the issue. I'm turning them into non-static elements to resolve this.
Sorry for the inconvenience.
I'm working on a fix right now! It seems I missed that we have some static elements in our mutation process. These are shared between the parallel mutation threads and seem to cause the issue. I'm turning them into non-static elements to resolve this.
Sorry for the inconvenience.
No worry and happy that you're working on it!
I opened PR #2914 to illustrate how simple is that approach. Important side note (independent from implementation strategy): going full parallel for mutation generation makes mutation IDs random (at least, very unstable). I feel this is a regression, and we should devise a stable numeration logic: mutation IDs allows conversation around specific mutations within a team, such as 'why is mutation #123 not covered by any test?'.
It seems that 4.0.5 solved the issue for me.
Describe the bug A concurrent update was performed on this collection and corrupted its state Since 4.0.3, it throw an exception, while no issue with 4.0.0 (4.0.1 and 4.0.2 was not working because of #2881). It seems that some parallel stuff was added/modified in 4.0.3 without looking if it was thread safe.
Logs
Expected behavior Should not throw the exception.
Desktop:
Additional context It happens right after building and discovering the tests. [09:21:05 INF] Number of tests found: 1 for project C:\Dev\AnySolution\AnyProject.csproj. Initial test run started. [09:21:27 ERR] An error occurred during the mutation test run