Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.dist > #1148804

Bug#1037042: graphicsmagick: GetImageDepth has a thread arena and memory leak

From Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
Newsgroups linux.debian.bugs.dist
Subject Bug#1037042: graphicsmagick: GetImageDepth has a thread arena and memory leak
Date 2023-06-05 17:40 +0200
Message-ID <GDktj-dRj0-5@gated-at.bofh.it> (permalink)
References (7 earlier) <GDktj-dRj0-9@gated-at.bofh.it> <GCiad-dcqJ-5@gated-at.bofh.it> <GDktj-dRj0-11@gated-at.bofh.it> <GCiad-dcqJ-5@gated-at.bofh.it> <GDktj-dRj0-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, 5 Jun 2023, Beauregard,Christophe (ECCC) wrote:

> FWIW, I think I may have figured out what's happening. It's probably 
> something to note in the http://www.graphicsmagick.org/OpenMP.html 
> documentation.
>
> In a nutshell, my understanding is that libgomp keeps track of its 
> thread pool in thread local storage. When that thread local storage 
> happens to be in the main process, all is well, everything works 
> fine, etc. When that thread local storage is in a transient pthread 
> (and, apparently, you're running on a certain class memory/CPU 
> configuration) and your transient thread terminates, that thread 
> local storage doesn't (always) get cleaned up.

This is very unfortunate and seems like a serious bug.

> I suspect this isn't a particularly desirable situation, as 
> GraphicsMagick appears to have put at least some effort into making 
> the API thread-safe.

Considerable effort has been put into making the API as thread-safe as 
possible, but invoking OpenMP code from a POSIX thread (or other sort 
of thread) has not been significantly tested.

It would be good to write a bug report against gomp (it seems to still 
be a GCC product) so that there is hope to get this fixed, or be 
informed of a work-around.

Bob
-- 
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
Public Key,     http://www.simplesystems.org/users/bfriesen/public-key.txt

Back to linux.debian.bugs.dist | Previous | NextPrevious in thread | Find similar


Thread

Bug#1037042: graphicsmagick: GetImageDepth has a thread arena and memory leak Bob Friesenhahn <bfriesen@simple.dallas.tx.us> - 2023-06-02 21:00 +0200
  Bug#1037042: graphicsmagick: GetImageDepth has a thread arena and memory leak Bob Friesenhahn <bfriesen@simple.dallas.tx.us> - 2023-06-03 16:00 +0200
  Bug#1037042: graphicsmagick: GetImageDepth has a thread arena and memory leak Bob Friesenhahn <bfriesen@simple.dallas.tx.us> - 2023-06-03 20:40 +0200
    Bug#1037042: graphicsmagick: GetImageDepth has a thread arena and memory leak László Böszörményi (GCS) <gcs@debian.org> - 2023-06-04 12:30 +0200
      Bug#1037042: graphicsmagick: GetImageDepth has a thread arena and memory leak Bob Friesenhahn <bfriesen@simple.dallas.tx.us> - 2023-06-04 15:10 +0200
      Bug#1037042: graphicsmagick: GetImageDepth has a thread arena and memory leak Bob Friesenhahn <bfriesen@simple.dallas.tx.us> - 2023-06-04 16:30 +0200
      Bug#1037042: graphicsmagick: GetImageDepth has a thread arena and memory leak Bob Friesenhahn <bfriesen@simple.dallas.tx.us> - 2023-06-05 17:40 +0200

csiph-web