Crash due to server overload ... perhaps?

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
guillaumech
Posts: 32
Joined: 2011-04-23T05:53:09-07:00
Authentication code: 8675308

Crash due to server overload ... perhaps?

Post by guillaumech »

Hello everyone,

I need your advice to solve a bug. I've a server with a weather map generation script, this script use the resizing picture. I noticed that at different times, the script did not give the same result. Server load could have an impact? This is a script that uses lots of memory, and threads.

Sorry for my English, I'm French ... :(
Thx a lot.

Guillaume
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Crash due to server overload ... perhaps?

Post by anthony »

Different results is not a crash! And more information is a must.

Typically the the causes of different results for the same data in Im has been attributed to a problem with OpenMP (multi-threaded). Typically the differences will be scan line oriented as most thread in IM is done by assigning different image rows to different threads.

The first test of this is to turn off threading and see if the data comes out correct (though typically slower), one simple way is to set the environment variable MAGICK_THREAD_LIMIT=1 the other is to compile IM with openmp disabled from the build configuration.

I do however recommend you ensure your IM is the latest (or near latest) version. Version 6.1.7-7 is avaible, 6.1.7-8 will be out in a few days. But any 6.1 version should be okay.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
guillaumech
Posts: 32
Joined: 2011-04-23T05:53:09-07:00
Authentication code: 8675308

Re: Crash due to server overload ... perhaps?

Post by guillaumech »

Thank you Anthony for your answer.

More informations: the script uses two threads, but I locked the call for IM in both threads. That is to say that IM is not called at the same time in parallel. That said, I can run the script with data at time t and at time t +1 (so the server will not have the same load), the generation of maps is different because the interpolation for resizing is not the same.
I will try to take the latest version of IM. But it is as if the server memory failed in t and it was a different interpolation at t+1 when it has more memory. It's complicated to explain...
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Crash due to server overload ... perhaps?

Post by anthony »

It sounds like it. It also sounds like you are calling some type of ImageMagick API from a threaded program.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply