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

desalloc problem with GDAL #2094

Closed
laurechr opened this issue Dec 11, 2019 · 3 comments
Closed

desalloc problem with GDAL #2094

laurechr opened this issue Dec 11, 2019 · 3 comments

Comments

@laurechr
Copy link

the problem present in previous bug 1829 is explain with a litle prog
and with an example

Expected behavior and actual behavior.

For example (please modify !!!): I expected to be able to open this raster file (with a link to
the raster file, or it as an attachment) and it returns an error message
instead.

Steps to reproduce the problem.

the python program is on server bug
this is nsb_test_gdal.py

the raw image is geo_20190827-20190908_sd_2rlks.int is and the associated file is geo_20190827-20190908_sd_2rlks.int.rsc

create a source files directory and put image files
create a destination file directory (easy to delete)
launch the test with this command
nsb_test_gdal.py -sd tgdal -sf geo_20190827-20190908_sd_2rlks.int -dd testima -lo 500

the aim is open a same file and create a "lo" tiff image ( lo is number a file to create)
this test show my problem that the desallocation of dataset (the del command) generate a allocation problem!!
500 or 1000 is a number of images we want create for one run on our studies

this is the result on HPC with 8 cores:
('create fileima :', 'fileima_0')
('create fileima :', 'fileima_1')
('create fileima :', 'fileima_2')
('create fileima :', 'fileima_3')
('create fileima :', 'fileima_4')
('create fileima :', 'fileima_5')
('create fileima :', 'fileima_6')
('create fileima :', 'fileima_7')
('create fileima :', 'fileima_8')
('create fileima :', 'fileima_9')
Segmentation fault

with a a same program in another context there is a segmentaion fault

Dec 10 09:57:05 luke16 kernel: [240697.584561] python[31495]: segfault at
1000000a9 ip 000014ae0c860408 sp 00007fff4348c470 error 4 in
_gdal.so[14ae0c3c6000+1544000]
Dec 10 09:57:05 luke16 kernel: [240697.584852] Code: f8 0f 9c c0 84 c0 0f
84 cd 01 00 00 8b 45 f8 8d 50 01 48 8b 45 d8 89 d6 48 89 c7 e8 b2 b7 f6 ff
48 8b 10 48 81 c2 a8 00 00 00 <48> 8b 12 48 89 c7 ff d2 89 45 e8 83 7d e8
01 74 1b 83 7d e8 00 74

Operating system

Linux luke 3.16.0-5-amd64 #1 SMP Debian 3.16.51-3+deb8u1 (2018-01-08) x86_64
python 2.7

GDAL version and provenance

2.2.4 but i have the problem on the oldest version

@rouault
Copy link
Member

rouault commented Dec 11, 2019

Works fine for me with GDAL 2.4 or above. I had to replace the "import nsbas.gdal as gdal" by "from osgeo import gdal". I'd presume something is wrong with your GDAL build or you might run into a bug that has been fixed by a later version.

You might also try running your script under Valgrind: valgrind python .... . Possibly with a debug build of GDAL

@laurechr
Copy link
Author

laurechr commented Dec 11, 2019 via email

@rouault
Copy link
Member

rouault commented Dec 11, 2019

with our software, a lot of libraries are embedded like gdal

That might be a problem. You should make sure that you don't have several copies of a same library in different version for example.
Anyway your problem seems to be really linked to your particular setup, and there is no proof that it is something linked to GDAL upstream. That would require in-depth investigation of your setup to figure out the root cause, which is not in the scope of this issue tracker.

@rouault rouault closed this as completed Dec 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants