Some missing coffee needed - removed ImageMagick and ImageMagick-c++ and reinstalled and same tests again - same results. No threads in user program.
Code: Select all
$ convert --version
Version: ImageMagick 6.9.9-13 Q16 x86_64 2017-09-14 http://www.imagemagick.org
Copyright: © 1999-2017 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC Modules OpenMP
Delegates (built-in): bzlib cairo djvu fftw fontconfig freetype gslib jbig jng jp2 jpeg lcms ltdl lzma openexr pangocairo png ps rsvg tiff webp wmf x xml zlib
$ ldd /usr/bin/convert
linux-vdso.so.1 (0x00007ffccad52000)
libMagickCore-6.Q16.so.5 => /lib64/libMagickCore-6.Q16.so.5 (0x00007f1de89f3000)
libMagickWand-6.Q16.so.5 => /lib64/libMagickWand-6.Q16.so.5 (0x00007f1de86d6000)
liblcms2.so.2 => /lib64/liblcms2.so.2 (0x00007f1de847b000)
libfftw3.so.3 => /lib64/libfftw3.so.3 (0x00007f1de807e000)
libfontconfig.so.1 => /lib64/libfontconfig.so.1 (0x00007f1de7e3a000)
libfreetype.so.6 => /lib64/libfreetype.so.6 (0x00007f1de7b88000)
libXext.so.6 => /lib64/libXext.so.6 (0x00007f1de7976000)
libXt.so.6 => /lib64/libXt.so.6 (0x00007f1de770e000)
liblzma.so.5 => /lib64/liblzma.so.5 (0x00007f1de74e8000)
libbz2.so.1 => /lib64/libbz2.so.1 (0x00007f1de72d8000)
libz.so.1 => /lib64/libz.so.1 (0x00007f1de70c1000)
libltdl.so.7 => /lib64/libltdl.so.7 (0x00007f1de6eb5000)
libSM.so.6 => /lib64/libSM.so.6 (0x00007f1de6cad000)
libICE.so.6 => /lib64/libICE.so.6 (0x00007f1de6a91000)
libX11.so.6 => /lib64/libX11.so.6 (0x00007f1de6753000)
libgomp.so.1 => /lib64/libgomp.so.1 (0x00007f1de6524000)
libm.so.6 => /lib64/libm.so.6 (0x00007f1de620e000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f1de5fed000)
libc.so.6 => /lib64/libc.so.6 (0x00007f1de5c1c000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f1de5a05000)
libexpat.so.1 => /lib64/libexpat.so.1 (0x00007f1de57d2000)
libpng16.so.16 => /lib64/libpng16.so.16 (0x00007f1de559f000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f1de5399000)
libuuid.so.1 => /lib64/libuuid.so.1 (0x00007f1de5194000)
libxcb.so.1 => /lib64/libxcb.so.1 (0x00007f1de4f6c000)
/lib64/ld-linux-x86-64.so.2 (0x0000564d59d0e000)
libXau.so.6 => /lib64/libXau.so.6 (0x00007f1de4d68000)
user program deps:
Code: Select all
$ ldd leak
linux-vdso.so.1 (0x00007fff95523000)
libexiv2.so.14 => /lib64/libexiv2.so.14 (0x00007f8970f57000)
libMagick++-6.Q16.so.8 => /lib64/libMagick++-6.Q16.so.8 (0x00007f8970ccf000)
libMagickWand-6.Q16.so.5 => /lib64/libMagickWand-6.Q16.so.5 (0x00007f89709b2000)
libMagickCore-6.Q16.so.5 => /lib64/libMagickCore-6.Q16.so.5 (0x00007f89704ec000)
libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f8970164000)
libm.so.6 => /lib64/libm.so.6 (0x00007f896fe4c000)
libgomp.so.1 => /lib64/libgomp.so.1 (0x00007f896fc1d000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f896fa06000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f896f7e7000)
libc.so.6 => /lib64/libc.so.6 (0x00007f896f416000)
/lib64/ld-linux-x86-64.so.2 (0x0000561fd6219000)
libz.so.1 => /lib64/libz.so.1 (0x00007f896f1ff000)
libexpat.so.1 => /lib64/libexpat.so.1 (0x00007f896efca000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f896edc6000)
liblcms2.so.2 => /lib64/liblcms2.so.2 (0x00007f896eb6b000)
libfftw3.so.3 => /lib64/libfftw3.so.3 (0x00007f896e76e000)
libfontconfig.so.1 => /lib64/libfontconfig.so.1 (0x00007f896e52a000)
libfreetype.so.6 => /lib64/libfreetype.so.6 (0x00007f896e27a000)
libXext.so.6 => /lib64/libXext.so.6 (0x00007f896e066000)
libXt.so.6 => /lib64/libXt.so.6 (0x00007f896ddfe000)
liblzma.so.5 => /lib64/liblzma.so.5 (0x00007f896dbd8000)
libbz2.so.1 => /lib64/libbz2.so.1 (0x00007f896d9c8000)
libltdl.so.7 => /lib64/libltdl.so.7 (0x00007f896d7be000)
libSM.so.6 => /lib64/libSM.so.6 (0x00007f896d5b6000)
libICE.so.6 => /lib64/libICE.so.6 (0x00007f896d398000)
libX11.so.6 => /lib64/libX11.so.6 (0x00007f896d05a000)
libpng16.so.16 => /lib64/libpng16.so.16 (0x00007f896ce27000)
libuuid.so.1 => /lib64/libuuid.so.1 (0x00007f896cc22000)
libxcb.so.1 => /lib64/libxcb.so.1 (0x00007f896c9f8000)
libXau.so.6 => /lib64/libXau.so.6 (0x00007f896c7f4000)
Running
convert through GDB - threads spawned
Code: Select all
$ gdb convert
GNU gdb (GDB) Fedora 8.0-24.fc26
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from convert...Reading symbols from /home/ray/dev/eog-plugin-exif-rating-raw-viewer/gdk-pixbuf/convert...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Missing separate debuginfos, use: dnf debuginfo-install ImageMagick-6.9.9.13-1.fc26.x86_64
(gdb) run logo: -resize 200% null:
Starting program: /usr/bin/convert logo: -resize 200% null:
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7fffeb451700 (LWP 8739)]
[New Thread 0x7fffeac50700 (LWP 8744)]
[New Thread 0x7fffea44f700 (LWP 8746)]
[Thread 0x7fffea44f700 (LWP 8746) exited]
[Thread 0x7fffeac50700 (LWP 8744) exited]
[New Thread 0x7fffea44f700 (LWP 8755)]
[New Thread 0x7fffeac50700 (LWP 8756)]
[Thread 0x7fffeac50700 (LWP 8756) exited]
[Thread 0x7fffea44f700 (LWP 8755) exited]
[Thread 0x7ffff7fc57c0 (LWP 8591) exited]
[Inferior 1 (process 8591) exited normally]
(gdb) sharedlibrary Magick
Symbols already loaded for /lib64/libMagickCore-6.Q16.so.5
Symbols already loaded for /lib64/libMagickWand-6.Q16.so.5
(gdb)
Running
user program - no threads
Code: Select all
$ gdb ./leak
GNU gdb (GDB) Fedora 8.0-24.fc26
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./leak...(no debugging symbols found)...done.
(gdb) set args /export/public/imgs/RAW_CANON_6D.CR2
(gdb) run
Starting program: /home/ray/dev/eog-plugin-exif-rating-raw-viewer/gdk-pixbuf/leak /export/public/imgs/RAW_CANON_6D.CR2
Missing separate debuginfos, use: dnf debuginfo-install glibc-2.25-10.fc26.x86_64
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
EXIV2_PIXBUF_LOADER_SCALE_LIMIT=4288
EXIV2_PIXBUF_LOADER_CONVERT_SRGB=1
EXIV2_PIXBUF_LOADER_ROTATE=1
[Inferior 1 (process 17198) exited normally]
Missing separate debuginfos, use: dnf debuginfo-install ImageMagick-c++-6.9.9.13-1.fc26.x86_64 ImageMagick-libs-6.9.9.13-1.fc26.x86_64 bzip2-libs-1.0.6-22.fc26.x86_64 exiv2-libs-0.25-4.fc26.x86_64 expat-2.2.4-1.fc26.x86_64 fftw-libs-double-3.3.5-4.fc26.x86_64 fontconfig-2.12.1-4.fc26.x86_64 freetype-2.7.1-9.fc26.x86_64 lcms2-2.8-3.fc26.x86_64 libICE-1.0.9-9.fc26.x86_64 libSM-1.2.2-5.fc26.x86_64 libX11-1.6.5-2.fc26.x86_64 libXau-1.0.8-7.fc26.x86_64 libXext-1.3.3-5.fc26.x86_64 libXt-1.1.5-4.fc26.x86_64 libgcc-7.1.1-3.fc26.x86_64 libgomp-7.1.1-3.fc26.x86_64 libjpeg-turbo-1.5.1-0.fc26.x86_64 libpng-1.6.28-2.fc26.x86_64 libstdc++-7.1.1-3.fc26.x86_64 libtool-ltdl-2.4.6-17.fc26.x86_64 libuuid-2.30.1-1.fc26.x86_64 libxcb-1.12-3.fc26.x86_64 xz-libs-5.2.3-2.fc26.x86_64 zlib-1.2.11-2.fc26.x86_64
(gdb) sharedlibrary Magick
Symbols already loaded for /lib64/libMagick++-6.Q16.so.8
Symbols already loaded for /lib64/libMagickWand-6.Q16.so.5
Symbols already loaded for /lib64/libMagickCore-6.Q16.so.5
Symbols already loaded for /usr/lib64/ImageMagick-6.9.9/modules-Q16/coders/jpeg.so
Symbols already loaded for /usr/lib64/ImageMagick-6.9.9/modules-Q16/coders/xc.so
(gdb) quit
Same MagickWand and MagickCore libs
For those interested, user code:
https://github.com/whatdoineed2do/eog-p ... gdk-pixbuf
The file ImageFactory.cc:1156 is where the resize() is called from the stack leak.cc:379:main()
the Github doesn't have the -fopenmp flags. Building locally we see:
Code: Select all
$ make leak
g++ -c -fopenmp -pthread -fpermissive -Wconversion-null -Wno-write-strings -fPIC -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -pthread -I/usr/include/libpng16 -I/usr/include/ImageMagick-6 -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 leak.cc
g++ -c -fopenmp -pthread -fpermissive -Wconversion-null -Wno-write-strings -fPIC -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -pthread -I/usr/include/libpng16 -I/usr/include/ImageMagick-6 -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 ImgFactory.cc
g++ -c -fopenmp -pthread -fpermissive -Wconversion-null -Wno-write-strings -fPIC -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -pthread -I/usr/include/libpng16 -I/usr/include/ImageMagick-6 -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 DbgHlpr.cc
g++ -ggdb -fopenmp -pthread -I/usr/include/ImageMagick-6 -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 leak.o ImgFactory.o DbgHlpr.o -lexiv2 -lMagick++-6.Q16 -lMagickWand-6.Q16 -lMagickCore-6.Q16 -lpthread -o leak
Is there somethign I'm missing on the compiler flags?