disable test parallelization for ML.Test assembly to avoid crash - #4896
Merged
Conversation
harishsk
reviewed
Feb 27, 2020
|
|
||
| // TODO: disable test parallelization for this assembly as running test in parallel sometimes cause test host process to crash | ||
| [assembly: CollectionBehavior(DisableTestParallelization = true)] | ||
|
|
Contributor
There was a problem hiding this comment.
Can you please add an additional tag after the TODO to help us search for tags associated with this work item. Say something like // TODO: TEST_STABILITY #Resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In ML.Tests assembly, when some tests run in parallel, there are chance the host process will crash due to below exception:
The thread tried to read from or write to a virtual address for which it does not have the appropriate access.
Unhandled exception at 0x00007FFA70E7B049 (ntdll.dll) in dotnet.exe.12884.dmp: 0xC0000374: A heap has been corrupted (parameters: 0x00007FFA70EE27F0).
Looked into this error in detail, they come from LightGBM/OnnxRuntime dll we are referencing, seems like null pointer error during object finalization.

These crash issue can be mitigated if we disable test parallelization. At the meantime, I'm contacting LightGBM and OnnxRuntime team to take a deeper look, maybe they should do null pointer check at their end.
Below are combination of tests run in parallel likely to cause crash, there maybe more:
LightGBMBinaryEstimatorUnbalanced and BinaryClassificationTrainersOnnxConversionTest
LightGBMRegressorEstimator and BinaryClassificationTrainersOnnxConversionTest
LightGBMBinaryEstimatorUnbalanced and TestSGDBinary
LightGBMBinaryEstimatorUnbalanced and CommandLineOnnxConversionTest
LightGBMBinaryEstimatorCorrectSigmoid and MulticlassConfusionMatrixSlotNames
IrisVectorLightGbmWithLoadColumnName and PlattCalibratorOnnxConversionTest