Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SIGSEGV in DefaultFatalErrorHandler #5360

Closed
dahast opened this issue Jul 23, 2022 · 3 comments
Closed

SIGSEGV in DefaultFatalErrorHandler #5360

dahast opened this issue Jul 23, 2022 · 3 comments

Comments

@dahast
Copy link

dahast commented Jul 23, 2022

ImageMagick version

7.1.0-29

Operating system

Other (enter below)

Operating system, version and so on

Illumos

Description

We had a core dump when processing a probably damaged image. The stack traces show many threads executing DefaultFatalErrorHandler() -> MagickCoreTerminus() due to a simultaneous exception in GetImagePixelCache(). The function MagickCoreTerminus() and all the called *Terminus() functions are obviously (and I guess intentionally) not thread safe.

The observed SIGSEGV was in AnnotateComponentTerminus() where global var annotate_semaphore was NULL.

I have no solution to suggest, since I don't know how important the call to MagickCoreTerminus() is. If it is not important, it could just be removed in DefaultFatalErrorHandler() because it is directly followed by exit().

Steps to Reproduce

Sorry, can't reproduce, the image causing the core dump is gone (overwritten by a working version before it could be saved). It was a psd file. I hope the stack trace is helpful enough:

-----------------  lwp# 1  --------------------------------
 feecbe79 __lwp_park (fe45fc60, 0, 803b2b8, feeb2abc, fe45fc60, fef3f000) + 19
 feebf99e sema_wait (fe45fc60, fef40c20, 803b2c8, fe419aa8, fe4b62dc, fe45fc60) + 19
 feeb2c7d sem_wait (fe45fc60, 1, 0, fe49a76d) + 35
 fe49a781 omp_set_lock (fe45fc60, fe419aa8, 803b308, fe1e269b, 4bc97f40, fcc51e00) + 21
 fe1e23ef ActivateSemaphoreInfo (fe45e8e4, 2bc, fe127235, fe04379a) + 5f
 fe0437d1 AnnotateComponentTerminus (fe419aa8, fef40c20, 803b358, fe0ea68f, fe0eb1cf, 2bc) + 41
 fe12b782 MagickCoreTerminus (fe0eb1cf, 2bc, fe0ea61b, fe419aa8, 80b5e70, 80b5df8) + 42
 fe0ea68f DefaultFatalErrorHandler (2bc, 8108f70, 0, 5e40afc8, 803b390, fefc2980) + 7f
 fe0eb1cf CatchException (80b5e70, fe3fbbbd, fe3fb48d, 5e40afc8, 5a614f40, 0) + df
 fe065337 GetImagePixelCache (2fe84008, 1, 80b5f60, 0) + 317
 fe06565b GetAuthenticPixelCacheNexus (2fe84008, 0, 52, 438, 1, 30865a88) + 4b
 fe06a063 GetCacheViewAuthenticPixels (5839bfe0, 0, 52, 438, 1, 80b5f60) + 93
 fe087894 CompositeImage._omp_fn.2 (803ec00, 0, fe0688cb, fe419aa8) + 1c4
 fe49089e GOMP_parallel (fe0876d0, 803ec00, c, 0, fef433c0, fef3f000) + 3e
 fe08f5d9 CompositeImage (2fe84008, 24196008, 803ed18, fe120e1d, 2fe84008, 2493f008) + eb9
 fe120e1d MergeImageLayers (812d008, e, 80b5f60, 0) + 41d
 fe300799 ReadPSDImage (8124008, 80b5f60, 81241f8, 80b5f60, fef42240, 0) + e99
 fe096835 ReadImage (8120008, 80b5f60, 1000, fe13c743, 8042f10, fe3f1cb6) + 285
 fe097d52 ReadImages (811c008, 80d7e70, 80b5f60, 80b5f60) + 132
 fec4fa71 ConvertImageCommand (8118008, 9, 80d3f70, 8045450, 80b5f60, 80477fb) + bf1
 fecaa2cf MagickCommandGenesis (8118008, 8051518, 9, 8047648, 0, 80b5f60) + 1ef
 08051b65 MagickMain (9, 8047648, 8047644, 805212f, 80621d4, 80475f0) + 365
 08051cfb main     (80475dc, fef496a8, 8047618, 8051718, a, 8047644) + 1b
 08051718 _start_crt (a, 8047644, fefd18e9, 0, 0, 0) + 97
 080515ea _start   (a, 80477a8, 80477c8, 80477d0, 80477d8, 80477dd) + 1a
-----------------  lwp# 2  --------------------------------
 feecbe79 __lwp_park (fe45fc60, 0, fcb9b7b8, feeb2abc, 2, fef3f000) + 19
 feebf99e sema_wait (fe45fc60, 80b5830, fcb9b7b8, 0, fe4b62dc, fe45fc60) + 19
 feeb2c7d sem_wait (fe45fc60, fcc51e00, fcb9b7e8, fe49a76d) + 35
 fe49a781 omp_set_lock (fe45fc60, 546b9ee0, fcb9b7f8, fe419aa8, 2, fcc51e00) + 21
 fe1e23ef ActivateSemaphoreInfo (fe45fbe4, 8108c70, fe12437e, fe12faba, fe419aa8, fef40c20) + 5f
 fe12fb09 MonitorComponentTerminus (fe419aa8, fef40c20, fcb9b848, fe0ea68f, 546b9ee0, fe419aa8) + 59
 fe12b76d MagickCoreTerminus (546b9ee0, fe419aa8, fe0ea61b, fe419aa8, 80b5880, 80b5830) + 2d
 fe0ea68f DefaultFatalErrorHandler (2bc, 8108c70, 0, 6b5, 2bc, fe3fbbbd) + 7f
 fe0eb1cf CatchException (80b5880, fe3fbbbd, fe3fb48d, 5e40aee8, fcbdee00, 0) + df
 fe065337 GetImagePixelCache (2fe84008, 1, 80b5f60, 0) + 317
 fe06565b GetAuthenticPixelCacheNexus (2fe84008, 0, cc, 438, 1, 30865abc) + 4b
 fe06a063 GetCacheViewAuthenticPixels (5839bfe0, 0, cc, 438, 1, 80b5f60) + 93
 fe087894 CompositeImage._omp_fn.2 (803ec00, 0, 0, fe498c61, 0, 0) + 1c4
 fe498c73 gomp_thread_start (8034ea0, 0, 0, 0) + 1b3
 feecbc8d _thrp_setup (fca902c0) + 88
 feecbe20 _lwp_start (fca902c0, 0, 0, 0, 0, 0)
-----------------  lwp# 3  --------------------------------
 feed0ad5 _lwp_kill (3, 6, 20, fef3f000, fef3f000, fca8b090) + 15
 fee65e7b raise    (6, 0, fca8b030, fef3f000, 0, 0) + 2b
 fee4091e abort    (fef43800, fca90ac0, fca8b080, 0, 20, 0) + 10e
 fe129d45 MagickSignalHandler (6, 0, fca8b1ac, fef3f000, fca90ac0, fef3f000) + 85
 feecbf05 __sighndlr (6, 0, fca8b1ac, fe129cc0, 0, 0) + 15
 feec07bb call_user_handler (6, 0, fca8b1ac, 0, 0, fefe35ae) + 29a
 feec0850 sigacthandler (6, 0, fca8b1ac) + 77
 --- called from signal handler with signal 6 (SIGABRT) ---
 feed0ad5 _lwp_kill (3, 6, fca8b420, fef3f000, fef3f000, fca90ac0) + 15
 fee65e7b raise    (6, 6, fca8b420, 0, 1, fe129cc0) + 2b
 fee408db abort    (fef3f000, fef43a80, fca90ac0, fca8b47c, feeb9ab1, fca90ac0) + cb
 fe129d45 MagickSignalHandler (b, 0, fca8b580, 0, fef3f000, fca90ac0) + 85
 feecbf05 __sighndlr (b, 0, fca8b580, fe129cc0, fef424c0, fca8b538) + 15
 feec07bb call_user_handler (b, 0, fca8b580, fcbcdd00, 0, 0) + 29a
 feec0850 sigacthandler (b, 0, fca8b580) + 77
 --- called from signal handler with signal 11 (SIGSEGV) ---
 feeb2aca sem_invalid (0, fef40c20, fca8b7b8, feeb2cd5, fe4b62dc, fe45fbf8) + 1a
 feeb2d1a sem_destroy (0, 4bc97f40, fca8b7d8, fe49a76d) + 22
 fe49a74a omp_destroy_lock (0, fe419aa8, fca8b7f8, fe1e269b, 4bc97f40, fcc51e00) + 1a
 fe1e255b RelinquishSemaphoreInfo (fe45fbf8, 8108c10, fe127235, fe1a8f65) + 8b
 fe1a8f9b RegistryComponentTerminus (fe419aa8, fef40c20, fca8b848, fe0ea68f, 546b9fa0, fe419aa8) + 6b
 fe12b778 MagickCoreTerminus (546b9fa0, fe419aa8, fe0ea61b, fe419aa8, 80b57e0, 80b57b8) + 38
 fe0ea68f DefaultFatalErrorHandler (2bc, 8108c10, 0, 6b5, 2bc, fe3fbbbd) + 7f
 fe0eb1cf CatchException (80b57e0, fe3fbbbd, fe3fb48d, 5e40af08, fcbdee00, 0) + df
 fe065337 GetImagePixelCache (2fe84008, 1, 80b5f60, fca8ed54) + 317
 fe06565b GetAuthenticPixelCacheNexus (2fe84008, 0, 15a, 438, 1, 30865af0) + 4b
 fe06a063 GetCacheViewAuthenticPixels (5839bfe0, 0, 15a, 438, 1, 80b5f60) + 93
 fe087894 CompositeImage._omp_fn.2 (803ec00, 0, 0, fe498c61, 0, 0) + 1c4
 fe498c73 gomp_thread_start (8034ee0, 0, 0, 0) + 1b3
 feecbc8d _thrp_setup (fca90ac0) + 88
 feecbe20 _lwp_start (fca90ac0, 0, 0, 0, 0, 0)
-----------------  lwp# 4  --------------------------------
 feecbe79 __lwp_park (fe45fc60, 0, fc98c758, feeb2abc, 5ba6bbc0, fef3f000) + 19
 feebf99e sema_wait (fe45fc60, fe419aa8, fc98c778, feeb2cd5, fe4b62dc, fe45fc60) + 19
 feeb2c7d sem_wait (fe45fc60, 5ba6bbc0, fc98c798, fe49a76d) + 35
 fe49a781 omp_set_lock (fe45fc60, fe419aa8, fc98c7b8, fe1e269b, 5ba6bbc0, fe45fbf4) + 21
 fe1e2553 RelinquishSemaphoreInfo (5e408edc, fe419aa8, fc98c7f8, fe49a76d, fe419aa8, 810f0e0) + 83
 fe1ed160 DestroySplayTree (5e408eb8, fe159910, fe1d870b, fe12640a) + 180
 fe12643f LocaleComponentTerminus (fe419aa8, fef40c20, fc98c848, fe0ea68f, 5ba6bce0, fe419aa8) + 3f
 fe12b81c MagickCoreTerminus (5ba6bce0, fe419aa8, fe0ea61b, fe419aa8, 80b5c40, 80b5c18) + dc
 fe0ea68f DefaultFatalErrorHandler (2bc, 8108eb0, 0, 6b5, 2bc, fe3fbbbd) + 7f
 fe0eb1cf CatchException (80b5c40, fe3fbbbd, fe3fb48d, 5e40af88, fcbdee00, 0) + df
 fe065337 GetImagePixelCache (2fe84008, 1, 80b5f60, fc98fd54) + 317
 fe06565b GetAuthenticPixelCacheNexus (2fe84008, 0, 1f1, 438, 1, 30865b24) + 4b
 fe06a063 GetCacheViewAuthenticPixels (5839bfe0, 0, 1f1, 438, 1, 80b5f60) + 93
 fe087894 CompositeImage._omp_fn.2 (803ec00, 0, 0, fe498c61, 0, 0) + 1c4
 fe498c73 gomp_thread_start (8034f20, 0, 0, 0) + 1b3
 feecbc8d _thrp_setup (fca912c0) + 88
 feecbe20 _lwp_start (fca912c0, 0, 0, 0, 0, 0)
-----------------  lwp# 5  --------------------------------
 feecbe79 __lwp_park (fca91ac0, 0, fef424c0, 0, fca91ac0, fca91ac0) + 19
 feec5ce5 mutex_lock_impl (fef424c0, 0, 0, fef3f000, fef43380, fef3f000) + 291
 feec65ff mutex_lock (fef424c0, e, fc88d7b8, fee6b330, 2, fef3f000) + 19
 feec661e cancel_safe_mutex_lock (fef424c0, 80b58f8, fc88d7b8, feebf99e, fef3f000, fef40c20) + 1d
 fee9de4e _flockget (fef40c20, fcc51c00, fc88d7e8, fee7bb26, e, 4) + 6a
 fee90056 vfprintf (fef40c20, fe3fd686, fc88d828, fe06f9dd, fe419aa8, 8108df0) + 36
 fe1243b5 FormatLocaleFile (fef40c20, fe3fd686, fe45f900, 8108df0) + 45
 fe0ea650 DefaultFatalErrorHandler (2bc, 8108df0, 0, 6b5, 2bc, fe3fbbbd) + 40
 fe0eb1cf CatchException (80b5920, fe3fbbbd, fe3fb48d, 5e40af28, fcbdee00, 0) + df
 fe065337 GetImagePixelCache (2fe84008, 1, 80b5f60, 0) + 317
 fe06565b GetAuthenticPixelCacheNexus (2fe84008, 0, 2b8, 438, 1, 30865b58) + 4b
 fe06a063 GetCacheViewAuthenticPixels (5839bfe0, 0, 2b8, 438, 1, 80b5f60) + 93
 fe087894 CompositeImage._omp_fn.2 (803ec00, 0, 0, fe498c61, 0, 0) + 1c4
 fe498c73 gomp_thread_start (8034f60, 0, 0, 0) + 1b3
 feecbc8d _thrp_setup (fca91ac0) + 88
 feecbe20 _lwp_start (fca91ac0, 0, 0, 0, 0, 0)
-----------------  lwp# 6  --------------------------------
 feecbe79 __lwp_park (fca922c0, 0, fef424c0, 0, fca922c0, fca922c0) + 19
 feec5ce5 mutex_lock_impl (fef424c0, 0, 0, fef3f000, fef43380, fef3f000) + 291
 feec65ff mutex_lock (fef424c0, e, fc78e7b8, fee6b330, 2, fef3f000) + 19
 feec661e cancel_safe_mutex_lock (fef424c0, 80b5da8, fc78e7b8, feebf99e, fef3f000, fef40c20) + 1d
 fee9de4e _flockget (fef40c20, fcc51c00, fc78e7e8, fee7bb26, e, 4) + 6a
 fee90056 vfprintf (fef40c20, fe3fd686, fc78e828, fe06f9dd, fe419aa8, 8108d90) + 36
 fe1243b5 FormatLocaleFile (fef40c20, fe3fd686, fe45f900, 8108d90) + 45
 fe0ea650 DefaultFatalErrorHandler (2bc, 8108d90, 0, 6b5, 2bc, fe3fbbbd) + 40
 fe0eb1cf CatchException (80b5dd0, fe3fbbbd, fe3fb48d, 38ee7048, fcbdee00, 0) + df
 fe065337 GetImagePixelCache (2fe84008, 1, 80b5f60, 0) + 317
 fe06565b GetAuthenticPixelCacheNexus (2fe84008, 0, 337, 438, 1, 30865b8c) + 4b
 fe06a063 GetCacheViewAuthenticPixels (5839bfe0, 0, 337, 438, 1, 80b5f60) + 93
 fe087894 CompositeImage._omp_fn.2 (803ec00, 0, 0, fe498c61, 0, 0) + 1c4
 fe498c73 gomp_thread_start (8034fa0, 0, 0, 0) + 1b3
 feecbc8d _thrp_setup (fca922c0) + 88
 feecbe20 _lwp_start (fca922c0, 0, 0, 0, 0, 0)
-----------------  lwp# 7  --------------------------------
 feecbe79 __lwp_park (fe45fc60, 0, fc68f7b8, feeb2abc, 2, fef3f000) + 19
 feebf99e sema_wait (fe45fc60, 80b5998, fc68f7b8, 0, fe4b62dc, fe45fc60) + 19
 feeb2c7d sem_wait (fe45fc60, fcc51e00, fc68f7e8, fe49a76d) + 35
 fe49a781 omp_set_lock (fe45fc60, 546b9dc0, fc68f7f8, fe419aa8, 2, fcc51e00) + 21
 fe1e23ef ActivateSemaphoreInfo (fe45fbe4, 8108d30, fe12437e, fe12faba, fe419aa8, fef40c20) + 5f
 fe12fb09 MonitorComponentTerminus (fe419aa8, fef40c20, fc68f848, fe0ea68f, 546b9dc0, fe419aa8) + 59
 fe12b76d MagickCoreTerminus (546b9dc0, fe419aa8, fe0ea61b, fe419aa8, 80b59c0, 80b5998) + 2d
 fe0ea68f DefaultFatalErrorHandler (2bc, 8108d30, 0, 6b5, 2bc, fe3fbbbd) + 7f
 fe0eb1cf CatchException (80b59c0, fe3fbbbd, fe3fb48d, 5e40af48, fcbdee00, 0) + df
 fe065337 GetImagePixelCache (2fe84008, 1, 80b5f60, 0) + 317
 fe06565b GetAuthenticPixelCacheNexus (2fe84008, 0, 3ff, 438, 1, 30865bc0) + 4b
 fe06a063 GetCacheViewAuthenticPixels (5839bfe0, 0, 3ff, 438, 1, 80b5f60) + 93
 fe087894 CompositeImage._omp_fn.2 (803ec00, 0, 0, fe498c61, 0, 0) + 1c4
 fe498c73 gomp_thread_start (8034fe0, 0, 0, 0) + 1b3
 feecbc8d _thrp_setup (fca92ac0) + 88
 feecbe20 _lwp_start (fca92ac0, 0, 0, 0, 0, 0)
-----------------  lwp# 8  --------------------------------
 feecbe79 __lwp_park (feaf97f8, feaf9818, fc593f18, feed0fd6, fefb0000, fc593eb8) + 19
 feec5e38 cond_wait_queue (feaf97f8, feaf9818, fc593f18, feea840a, 3, fc593eb8) + 6a
 feec610c cond_wait_common (feaf97f8, feaf9818, fc593f18, feec4a19, fcba0200, 0) + 27b
 feec637a __cond_timedwait (feaf97f8, feaf9818, fc593f9c, feae2000, feae2000, 0) + 111
 feec63b4 cond_timedwait (feaf97f8, feaf9818) + 35
 feab4a98 umem_update_thread (0, 0, 0, 0) + 1f9
 feecbc8d _thrp_setup (fca932c0) + 88
 feecbe20 _lwp_start (fca932c0, 0, 0, 0, 0, 0)
-----------------  lwp# 23  --------------------------------
 feecbe79 __lwp_park (fe45fc60, 0, fc4917b8, feeb2abc, 2, fef3f000) + 19
 feebf99e sema_wait (fe45fc60, 80b5a10, fc4917b8, 0, fe4b62dc, fe45fc60) + 19
 feeb2c7d sem_wait (fe45fc60, fcc51e00, fc4917e8, fe49a76d) + 35
 fe49a781 omp_set_lock (fe45fc60, 546b9c40, fc4917f8, fe419aa8, 2, fcc51e00) + 21
 fe1e23ef ActivateSemaphoreInfo (fe45fbe4, 8108cd0, fe12437e, fe12faba, fe419aa8, fef40c20) + 5f
 fe12fb09 MonitorComponentTerminus (fe419aa8, fef40c20, fc491848, fe0ea68f, 546b9c40, fe419aa8) + 59
 fe12b76d MagickCoreTerminus (546b9c40, fe419aa8, fe0ea61b, fe419aa8, 80b5a60, 80b5a10) + 2d
 fe0ea68f DefaultFatalErrorHandler (2bc, 8108cd0, 0, 6b5, 2bc, fe3fbbbd) + 7f
 fe0eb1cf CatchException (80b5a60, fe3fbbbd, fe3fb48d, 5e40af68, fcbdee00, 0) + df
 fe065337 GetImagePixelCache (2fe84008, 1, 80b5f60, fcc70a3c) + 317
 fe06565b GetAuthenticPixelCacheNexus (2fe84008, 0, 496, 438, 1, 30865bf4) + 4b
 fe06a063 GetCacheViewAuthenticPixels (5839bfe0, 0, 496, 438, 1, 80b5f60) + 93
 fe087894 CompositeImage._omp_fn.2 (803ec00, 0, 0, fe498c61, fef3f000, fca93ac0) + 1c4
 fe498c73 gomp_thread_start (803e930, 0, 0, 0) + 1b3
 feecbc8d _thrp_setup (fca93ac0) + 88
 feecbe20 _lwp_start (fca93ac0, 0, 0, 0, 0, 0)
-----------------  lwp# 24  --------------------------------
 feecbe79 __lwp_park (fca942c0, 0, fef424c0, 0, fc3927f0, fefdb2c6) + 19
 feec5ce5 mutex_lock_impl (fef424c0, 0, fcc40250, fe020f6f, 0, fe038448) + 291
 feec65ff mutex_lock (fef424c0, e, fc3927b8, fee6b330, 2, fef3f000) + 19
 feec661e cancel_safe_mutex_lock (fef424c0, 80b5d08, fc3927b8, feebf99e, fef3f000, fef40c20) + 1d
 fee9de4e _flockget (fef40c20, fcc51c00, fc3927e8, fee7bb26, e, 4) + 6a
 fee90056 vfprintf (fef40c20, fe3fd686, fc392828, 58, fe0ea650, 2bc) + 36
 fe1243b5 FormatLocaleFile (fef40c20, fe3fd686, fe45f900, 8108e50) + 45
 fe0ea650 DefaultFatalErrorHandler (2bc, 8108e50, 0, 6b5, 2bc, fe3fbbbd) + 40
 fe0eb1cf CatchException (80b5d30, fe3fbbbd, fe3fb48d, 38ee7008, fcbdee00, 0) + df
 fe065337 GetImagePixelCache (2fe84008, 1, 80b5f60, fcc70a3c) + 317
 fe06565b GetAuthenticPixelCacheNexus (2fe84008, 0, 55b, 438, 1, 30865c28) + 4b
 fe06a063 GetCacheViewAuthenticPixels (5839bfe0, 0, 55b, 438, 1, 80b5f60) + 93
 fe087894 CompositeImage._omp_fn.2 (803ec00, 0, 0, fe498c61, fef3f000, fca942c0) + 1c4
 fe498c73 gomp_thread_start (803e970, 0, 0, 0) + 1b3
 feecbc8d _thrp_setup (fca942c0) + 88
 feecbe20 _lwp_start (fca942c0, 0, 0, 0, 0, 0)
-----------------  lwp# 25  --------------------------------
 feecbe79 __lwp_park (fe45fc60, 0, fc2937b8, feeb2abc, 2, fef3f000) + 19
 feebf99e sema_wait (fe45fc60, 80b5808, fc2937b8, 0, fe4b62dc, fe45fc60) + 19
 feeb2c7d sem_wait (fe45fc60, fcc51e00, fc2937e8, fe49a76d) + 35
 fe49a781 omp_set_lock (fe45fc60, 4bc97e20, fc2937f8, fe419aa8, 2, fcc51e00) + 21
 fe1e23ef ActivateSemaphoreInfo (fe45fbe4, 8108bb0, fe12437e, fe12faba, fe419aa8, fef40c20) + 5f
 fe12fb09 MonitorComponentTerminus (fe419aa8, fef40c20, fc293848, fe0ea68f, 4bc97e20, fe419aa8) + 59
 fe12b76d MagickCoreTerminus (4bc97e20, fe419aa8, fe0ea61b, fe419aa8, 80b5858, 80b5808) + 2d
 fe0ea68f DefaultFatalErrorHandler (2bc, 8108bb0, 0, 6b5, 2bc, fe3fbbbd) + 7f
 fe0eb1cf CatchException (80b5858, fe3fbbbd, fe3fb48d, 5e40aec8, fcbdee00, 0) + df
 fe065337 GetImagePixelCache (2fe84008, 1, 80b5f60, 0) + 317
 fe06565b GetAuthenticPixelCacheNexus (2fe84008, 0, 5f0, 438, 1, 30865c5c) + 4b
 fe06a063 GetCacheViewAuthenticPixels (5839bfe0, 0, 5f0, 438, 1, 80b5f60) + 93
 fe087894 CompositeImage._omp_fn.2 (803ec00, 0, 0, fe498c61, 0, 0) + 1c4
 fe498c73 gomp_thread_start (803e9b0, 0, 0, 0) + 1b3
 feecbc8d _thrp_setup (fca94ac0) + 88
 feecbe20 _lwp_start (fca94ac0, 0, 0, 0, 0, 0)
-----------------  lwp# 26  --------------------------------
 feecbe79 __lwp_park (810f0e0, 0, fc1947a8, feeb2abc, fe45fc60, fef3f000) + 19
 feebf99e sema_wait (810f0e0, fe45fbf4, fc1947c8, fe49a7aa, fe4b62dc, 810f0e0) + 19
 feeb2c7d sem_wait (810f0e0, fe419aa8, fc1947f8, fe49a76d) + 35
 fe49a781 omp_set_lock (810f0e0, fe45fc50, fe1e24db, fe1e245d) + 21
 fe1e249b LockSemaphoreInfo (810f0e0, fef40c20, fe1d870b, fe12640a, fe419aa8, fe45fb80) + 4b
 fe126429 LocaleComponentTerminus (fe419aa8, fef40c20, fc194848, fe0ea68f, fe0eb1cf, 2bc) + 29
 fe12b81c MagickCoreTerminus (fe0eb1cf, 2bc, fe0ea61b, fe419aa8, 80b5d80, 80b5d58) + dc
 fe0ea68f DefaultFatalErrorHandler (2bc, 8108f10, 0, 6b5, 2bc, fe3fbbbd) + 7f
 fe0eb1cf CatchException (80b5d80, fe3fbbbd, fe3fb48d, 38ee7028, fcbdee00, 0) + df
 fe065337 GetImagePixelCache (2fe84008, 1, 80b5f60, 0) + 317
 fe06565b GetAuthenticPixelCacheNexus (2fe84008, 0, 69c, 438, 1, 30865c90) + 4b
 fe06a063 GetCacheViewAuthenticPixels (5839bfe0, 0, 69c, 438, 1, 80b5f60) + 93
 fe087894 CompositeImage._omp_fn.2 (803ec00, 0, 0, fe498c61, 0, 0) + 1c4
 fe498c73 gomp_thread_start (803e9f0, 0, 0, 0) + 1b3
 feecbc8d _thrp_setup (fca952c0) + 88
 feecbe20 _lwp_start (fca952c0, 0, 0, 0, 0, 0)
-----------------  lwp# 27  --------------------------------
 feecbe79 __lwp_park (fca95ac0, 0, fef424c0, 0, 0, 0) + 19
 feec5ce5 mutex_lock_impl (fef424c0, 0, 0, fef3f000, fef3f000, fca95ac0) + 291
 feec65ff mutex_lock (fef424c0, fef45d1c, 0, fed80e51, 0, fef3f000) + 19
 feec661e cancel_safe_mutex_lock (fef424c0, fca95ac0, fcc51800, fc09566c, fef3f000, fef40c20) + 1d
 fee9de4e _flockget (fef40c20, fcc00340, fef45d1c, 0, fca95ab8, 0) + 6a
 fee9e85f fflush   (fef40c20, fea8bc60, feed01c5, fea60b8c) + 3a
 fea60c0c fflush   (fef40c20, fe3fd69e, 59, 59) + f4
 fe0ea687 DefaultFatalErrorHandler (2bc, 8108b50, 0, 6b5, 2bc, fe3fbbbd) + 77
 fe0eb1cf CatchException (80b5bf0, fe3fbbbd, fe3fb48d, 5e40afa8, fcbdee00, 0) + df
 fe065337 GetImagePixelCache (2fe84008, 1, 80b5f60, 0) + 317
 fe06565b GetAuthenticPixelCacheNexus (2fe84008, 0, 737, 438, 1, 30865cc4) + 4b
 fe06a063 GetCacheViewAuthenticPixels (5839bfe0, 0, 737, 438, 1, 80b5f60) + 93
 fe087894 CompositeImage._omp_fn.2 (803ec00, 0, 0, fe498c61, 0, 0) + 1c4
 fe498c73 gomp_thread_start (803ea30, 0, 0, 0) + 1b3
 feecbc8d _thrp_setup (fca95ac0) + 88
 feecbe20 _lwp_start (fca95ac0, 0, 0, 0, 0, 0)

Images

No response

@urban-warrior
Copy link
Member

Thanks for the problem report. We can reproduce it and will have a patch to fix it in the GIT main branch @ https://github.com/ImageMagick/ImageMagick later today. The patch will be available in the beta releases of ImageMagick @ https://imagemagick.org/archive/beta/ by sometime tomorrow.

@dahast
Copy link
Author

dahast commented Jul 25, 2022

Great, thank you very much for the quick fix. Looks reasonable.

I have one doubt regarding use of InitializeMagickMutex() in MagickCoreTerminus(). Doesn't this, in case of defined(MAGICKCORE_OPENMP_SUPPORT), initialize a semaphore that another thread possibly currently owns?

@urban-warrior
Copy link
Member

Thanks for the problem report. We can reproduce it and will have a patch to fix it in the GIT main branch @ https://github.com/ImageMagick/ImageMagick later today. The patch will be available in the beta releases of ImageMagick @ https://imagemagick.org/archive/beta/ by sometime tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants