[ITK] Threading issues
Bradley Lowekamp
brad at lowekamp.net
Wed Jul 13 20:35:13 EDT 2016
Hello,
My guess it something is clobbering the stack. Does this occur with all of itk or just a specific filter?
> On Jul 13, 2016, at 4:12 AM, Laurențiu Nicola <lnicola at dend.ro> wrote:
>
> Hi,
>
> This is a bit of a shot in the dark asking this, but we're working on a project that uses a library based on ITK (OTB). We noticed two issues:
>
> 1. We've seen processes with a single remaining thread that's stuck in pthread_join().
> 2. We're getting some segfaults in libpthread.so:
>
> [Jul13 09:42] otbApplicationL[37610]: segfault at 7ff2f27fc9d0 ip 00007ff3375c2e61 sp 00007ffd9ef0d620 error 4 in libpthread-2.17.so[7ff3375ba000+16000]
> [ +0.002159] otbApplicationL[31064]: segfault at 2d3 ip 00007fd3bf636e61 sp 00007fff2446f210 error 4 in libpthread-2.17.so[7fd3bf62e000+16000]
> [ +0.007911] otbApplicationL[10366]: segfault at 7feb000008cc ip 00007febeaa15e61 sp 00007ffe34bb1e10 error 4 in libpthread-2.17.so[7febeaa0d000+16000]
> [Jul13 09:44] maccs-processin[39138]: segfault at 7f6b713979d0 ip 00007f6b767cae61 sp 00007ffe09fe6410 error 4 in libpthread-2.17.so[7f6b767c2000+16000]
> [ +0.000092] otbApplicationL[22007]: segfault at 2d0 ip 00007f06a6541e61 sp 00007fffb4299660 error 4 in libpthread-2.17.so[7f06a6539000+16000]
> [ +0.000384] otbApplicationL[33830]: segfault at 100001626 ip 00007f37c1f90e61 sp 00007fff8a0f44d0 error 4 in libpthread-2.17.so[7f37c1f88000+16000]
>
> My theory is that 2d0 is an offset into a NULL pthread struct, but I couldn't find the definition of that structure (pthread_t is an opaque handle).
>
> I suspect that the two issues are related. The weird part is that those segfaults tend to happen for multiple processes at the same time. The system was probably loaded, but I don't think it was an OOM situation.
>
> Right now we're on ITK 4.9.1. Is there anyone else who encountered this or knows about recent ITK fixes related to multithreading?
>
> Regards,
> Laurentiu Nicola
>
> (gdb) bt
> #0 0x00007f0d74650ef7 in pthread_join () from /usr/lib64/libpthread.so.0
> #1 0x00007f0d74dd1cca in itk::MultiThreader::SpawnWaitForSingleMethodThread (this=this at entry=0x2411670, threadHandle=<optimized out>)
> at /home/cudroiu/sen2agri/packaging/Sen2AgriPlatform/build/OTB-5.0-BUILD/ITK/src/ITK/Modules/Core/Common/src/itkMultiThreaderPThreads.cxx:239
> #2 0x00007f0d74dd244b in itk::MultiThreader::WaitForSingleMethodThread (this=this at entry=0x2411670, threadHandle=<optimized out>)
> at /home/cudroiu/sen2agri/packaging/Sen2AgriPlatform/build/OTB-5.0-BUILD/ITK/src/ITK/Modules/Core/Common/src/itkMultiThreader.cxx:480
> #3 0x00007f0d74dd2f7d in itk::MultiThreader::SingleMethodExecute (this=0x2411670) at /home/cudroiu/sen2agri/packaging/Sen2AgriPlatform/build/OTB-5.0-BUILD/ITK/src/ITK/Modules/Core/Common/src/itkMultiThreader.cxx:389
> #4 0x00007f0d7cedb87d in itk::ImageSource<otb::VectorImage<float, 2u> >::GenerateData (this=0x23fff10) at /home/cudroiu/sen2agri/packaging/Sen2AgriPlatform/install/otb-install/usr/include/ITK-4.8/itkImageSource.hxx:254
> #5 0x00007f0d74dcdc00 in itk::ProcessObject::UpdateOutputData (this=0x23fff10) at /home/cudroiu/sen2agri/packaging/Sen2AgriPlatform/build/OTB-5.0-BUILD/ITK/src/ITK/Modules/Core/Common/src/itkProcessObject.cxx:1739
> #6 0x00007f0d74dcdcc0 in itk::ProcessObject::UpdateOutputData (this=0x23e9b00) at /home/cudroiu/sen2agri/packaging/Sen2AgriPlatform/build/OTB-5.0-BUILD/ITK/src/ITK/Modules/Core/Common/src/itkProcessObject.cxx:1700
> #7 0x00007f0d4af29368 in otb::StreamingImageVirtualWriter<otb::VectorImage<float, 2u> >::GenerateData (this=0x23e9700)
> at /home/cudroiu/sen2agri/packaging/Sen2AgriPlatform/build/OTB-5.0/Modules/Core/Streaming/include/otbStreamingImageVirtualWriter.txx:248
> #8 0x00007f0d4af1c8ce in otb::StreamingImageVirtualWriter<otb::VectorImage<float, 2u> >::Update (this=0x23e9700)
> at /home/cudroiu/sen2agri/packaging/Sen2AgriPlatform/build/OTB-5.0/Modules/Core/Streaming/include/otbStreamingImageVirtualWriter.txx:156
> #9 0x00007f0d4af11aad in otb::PersistentFilterStreamingDecorator<otb::PersistentShrinkImageFilter<otb::VectorImage<float, 2u>, otb::VectorImage<float, 2u> > >::GenerateData (this=0x2466c20)
> at /home/cudroiu/sen2agri/packaging/Sen2AgriPlatform/build/OTB-5.0/Modules/Core/Streaming/include/otbPersistentFilterStreamingDecorator.txx:52
> #10 0x00007f0d4af1f4be in otb::Wrapper::Quicklook::DoExecute (this=0x23a9540) at /home/cudroiu/sen2agri/packaging/Sen2AgriPlatform/build/OTB-5.0/Modules/Applications/AppImageUtils/app/otbQuicklook.cxx:272
> #11 0x00007f0d7d2026c8 in otb::Wrapper::Application::Execute (this=this at entry=0x23a9540) at /home/cudroiu/sen2agri/packaging/Sen2AgriPlatform/build/OTB-5.0/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx:223
> #12 0x00007f0d7d202789 in otb::Wrapper::Application::ExecuteAndWriteOutput (this=0x23a9540) at /home/cudroiu/sen2agri/packaging/Sen2AgriPlatform/build/OTB-5.0/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx:230
> #13 0x00007f0d7d60b2c9 in otb::Wrapper::CommandLineLauncher::ExecuteAndWriteOutput (this=0x2366aa0) at /home/cudroiu/sen2agri/packaging/Sen2AgriPlatform/build/OTB-5.0/Modules/Wrappers/CommandLine/src/otbWrapperCommandLineLauncher.cxx:158
> #14 0x00000000004034a8 in main (argc=<optimized out>, argv=<optimized out>) at /home/cudroiu/sen2agri/packaging/Sen2AgriPlatform/build/OTB-5.0/Modules/Wrappers/CommandLine/src/otbApplicationLauncherCommandLine.cxx:299
>
> (gdb) info threads
> Id Target Id Frame
> * 1 Thread 0x7f0d63055880 (LWP 21145) "otbApplicationL" 0x00007f0d74650ef7 in pthread_join () from /usr/lib64/libpthread.so.0
> _______________________________________________
> Community mailing list
> Community at itk.org
> http://public.kitware.com/mailman/listinfo/community
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20160713/750edbf0/attachment.html>
More information about the Community
mailing list