-
Notifications
You must be signed in to change notification settings - Fork 824
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
visual test -j randomly running out of memory (linux) #3339
Comments
Roughly half of the threads in core dump were in
|
I actually have a branch from two weeks ago called |
this might be related to the conclusion at #3093 that we still need to fix: we are not using gdal register function correctly (need to call once rather than per datasource). |
I see, so it's not in cache singleton creation (misinterpreted the backtrace), but further in datasource creation. |
Update: It's not (only) static const bool once = (GDALAllRegister(), true); I'm still able to reproduce. There doesn't seem to be ubuntu/debian package with gdal debug symbols, so I'm kinda lost once it gets into I'm not even sure the issue lies within gdal plugin. Because memory allocation needs to be synchronized, if something higher in the stack goes wrong and starts creating datasources like crazy, it's expectable that when I kill the process, the threads will be waiting on a memory lock. But the original problem may be elsewhere. |
|
|
Now this is weird:
load_map.cpp:768 is the final closing brace of |
There's a race condition in GDAL's libgeotiff function XTIFFInitialize Funny that after I found it, I googled the function and we're not the first to get hit: https://sourceforge.net/p/freeimage/discussion/36109/thread/9e5ba9b7/ |
Question is, how should I call
|
The issue is fixed in gdal 2.0.2 |
@lightmare - can you try testing again after #3395 just to confirm things work still? As far as the race condition - how about we just refer people to use gdal 2.0.2 when/if they hit this? |
585de59 still running out of memory with the above loop. This has nothing to do with GDALRegisterAll, the race condition is in libgeotiff initialization which happens later, when the first gtiff is loaded. Better refer to 2.0.2 preventively - i.e. using gdal plugin in multithreaded program requires libgdal 2.0.2+ ;; Which is quite new, the upcoming Ubuntu LTS has 1.11.3 atm http://packages.ubuntu.com/xenial/libgdal-dev |
Confirming that running |
I'm on gdal-config --version |
@lightmare per your comment I added GDAL min recommended version in 2a46e45. Not seeing any other actions here. Closing. Thanks everyone! |
It happened to me a few times already, the test kept allocating memory until killed. So today I decided to stress it.
First a little function I use to kill it when it exceeds 2GB -- because if I let it run wild, it starts swapping and freezes the whole system.
In another terminal
edit: changed command to run 20 jobs with the same style; fails more reliably
The text was updated successfully, but these errors were encountered: