- lt-test: magick/blob.c:3759: WriteBlob: Assertion `image->blob->type != UndefinedStream' failed.
my test application just loads a jpeg file an starts threads that are doing all the same processing:
zoom, modulate and despeckle the image, always with the same parameters.
after having started some threads and processing simultaneosly this assertion occurs. Sometime just when 10 threads are running, sometimes after started 80 threads.
so it looks to me as this could be a race condition.
I was able to generate an according output from helgrind just before the assertion occured:
- ==13038== Possible data race during read of size 4 at 0x88cf694 by thread #5
==13038== at 0x5FF5EA7: WriteBlob (blob.c:3759)
==13038== by 0x5B6FF85: TerminateDestination (jpeg.c:1380)
==13038== by 0x5BBEA51: jpeg_finish_compress (in /usr/lib/libjpeg.so.62.0.0)
==13038== by 0x602582A: WriteImage (constitute.c:1168)
==13038== by 0x5FF9D5A: ImageToBlob (blob.c:1366)
==13038== by 0x5D2AFD8: Magick::Image::write(Magick::Blob*) (in /usr/lib/libMagick++.so.2.0.0)
==13038== Possible data race during read of size 4 at 0x88cf694 by thread #22
==13038== at 0x5FF80D1: CloseBlob (blob.c:478)
==13038== by 0x5FF9D31: ImageToBlob (blob.c:1363)
==13038== by 0x5D2AFD8: Magick::Image::write(Magick::Blob*) (in /usr/lib/libMagick++.so.2.0.0)
==13038== This conflicts with a previous write of size 4 by thread #8
==13038== at 0x5FF81B9: CloseBlob (blob.c:486)
==13038== by 0x5FF9D31: ImageToBlob (blob.c:1363)
==13038== by 0x5D2AFD8: Magick::Image::write(Magick::Blob*) (in /usr/lib/libMagick++.so.2.0.0)
Please let me know if I can do any tests in my environment.
Version: ImageMagick 6.5.0-3 2009-03-21 Q8
~artur
