Closed blowekamp closed 1 month ago
@blowekamp are you set up to use TSan, or do you want me to try with patch with TSan?
I believe this does not patch it, it just explicitly checks for label overlaps.
I think this is pretty close to fixing the issue, more testing is needed.
@seanm You can run the sanitizer. However I was able to detect the bug with additional checks before the threading issue occurs.
I'm getting a build error:
/Users/sean/external/ITK/Modules/Filtering/LabelMap/test/itkStatisticsUniqueLabelMapFilterTest1.cxx:46:7: error: use of undeclared identifier 'TEST_EXPECT_TRUE'
/Users/sean/external/ITK/Modules/Filtering/LabelMap/test/itkStatisticsUniqueLabelMapFilterTest1.cxx:158:18: note: in instantiation of function template specialization 'CheckLabelMapOverlap<itk::LabelMap<itk::StatisticsLabelObject<unsigned char, 2>>>' requested here
int exitCode = CheckLabelMapOverlap(unique->GetOutput());
^
and
/Users/sean/external/ITK/Modules/Filtering/LabelMap/test/itkStatisticsUniqueLabelMapFilterTest1.cxx:46:7: error: attempt to use a poisoned identifier
TEST_EXPECT_TRUE(line.GetLength() <= labelObject->GetNumberOfPixels());
^
@seanm Thanks looks like that should have been ITK_TEST_EXPECT_TRUE. I am surprised that did not produce a warning on any of the builds.
So this is mergeable now?
@thewtex I was hoping to get this in for 5.4 but missed it. The current target branch is release-5.4. What should be do to merge this patch?
@thewtex I was hoping to get this in for 5.4 but missed it. The current target branch is release-5.4. What should be do to merge this patch?
@blowekamp outstanding!
I will go ahead and merge this one. For future reference, the process is:
release-5.4
via GitHub Web UIrelease-5.4
into release
locally (git checkout release-5.4; git pull --ff-only upstream release-5.4; git checkout release; git pull --ff-only upstream release; git merge release-5.4
)release
into master
locally (git checkout master; git pull --ff-only upstream master; git merge release
)git push upstream release master
Cool, I'm excited to see on tomorrow's TSan cdash is this fixes any other tests too:
Seems it fixed itkStatisticsUniqueLabelMapFilterTest2
, but not any other test.
Seems it fixed
itkStatisticsUniqueLabelMapFilterTest2
, but not any other test.
Are any of the other failure related to label maps?
Are any of the other failure related to label maps?
I haven't analyzed each in depth, but here's the list:
https://open.cdash.org/viewTest.php?onlyfailed&buildid=9652708
Address bugs in unique label map filters Two bugs were addressed which could cause overlapping and/or errouneous outputs.
closes #4655 closes #3031
PR Checklist
Refer to the ITK Software Guide for further development details if necessary.