<div dir="ltr">Dear GDAL,<div><br></div><div>We are seeing some strange behavior when reading and writing files with the GZip VSI, and I want to ask in the dev forum first before assuming it's a bug and filing an issue. I can't find anything in the docs or the forum that seems relevant.</div><div><br></div><div>When writing (say) a <font face="monospace">.geojson.gz</font> using the original GeoJSON driver, it seems to create, and then delete, a sibling <font face="monospace">.properties</font> file during the write. Based on the comment at...</div><div><br></div><div><a href="https://github.com/OSGeo/gdal/blob/master/gdal/port/cpl_vsil_gzip.cpp#L68">https://github.com/OSGeo/gdal/blob/master/gdal/port/cpl_vsil_gzip.cpp#L68<br></a></div><div><br></div><div>...this seems fair enough.</div><div><br></div><div>It also seems to try to create the .properties file when READING a GZip file, which is also fair enough, if it can.</div><div><br></div><div>In the case of a read-only file-system, or other read-only VSI source, however, I assume a failure to write this file is supposed to be benign, and indeed I wouldn't expect any user-facing message or error at all.</div><div><br></div><div>We are able to read (say) a <font face="monospace">.geojson.gz</font> from an S3 bucket with no issues.</div><div><br></div><div>However, when we try to read a file from within a gzipped TAR file on an S3 bucket, there is a problem. GDAL throws the following error:</div><div><br></div><div><font face="monospace">DoSinglePartPUT of /vsis3/omnisci-import-test/example.geojson.tar.gz.properties failed (1)</font></div><div><br></div><div>...and in our CI environment with an ASAN test build, ASAN reports a bunch of leaks, which appear to be to do with Curl. I don't have these messages to hand, but I can get them from my colleague if necessary.</div><div><br></div><div>From the code (we're still running 2.4.2, but 3.1.2 appears to be the same) it seem that <font face="monospace">DoSinglePartPUT</font> is only called from <font face="monospace">VSIS3WriteHandle::Close()</font>, so I'm wondering if it's trying to flush out the write of the <font face="monospace">.properties</font> file while closing the data source, and perhaps not knowing to squash any error.</div><div><br></div><div>Here is the path to the file in what should be an open public bucket (in region <font face="monospace">us-west-1</font>) if you want to try it yourself:</div><div><br></div><div>s3://omnisci-import-test/example.geojson.tar.gz with subpath /example/example.geojson</div><div><br clear="all"><div>Thanks in advance!</div><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div style="margin:0px;padding:0px 0px 20px;width:2544px;font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-size:medium"><div><div style="font-size:12.8px;margin:8px 0px 0px;padding:0px"><div><div dir="ltr"><span><font color="#888888"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><table cellpadding="0" cellspacing="0" border="0" style="font-family:Times;width:2544px"><tbody><tr><td align="left" style="vertical-align:top;font-size:0px"><table cellpadding="0" cellspacing="0" border="0"><tbody><tr><td align="left" style="padding:0px 15px 0px 0px;vertical-align:middle"><font face="arial, helvetica, sans-serif" size="2"><a href="http://www.omnisci.com/" target="_blank"><img src="http://www2.omnisci.com/l/298412/2018-09-18/3sqpg/298412/61753/OmniSci_Email_Header2.png"></a><br></font></td><td align="left" style="padding:0px 0px 0px 15px;vertical-align:top"><table cellpadding="0" cellspacing="0" border="0" style="width:215px"><tbody><tr><td align="left" style="vertical-align:top"><span style="white-space:nowrap;color:rgb(0,0,1)"><span style="color:rgb(14,76,144);font-weight:700"><font face="arial, helvetica, sans-serif" size="2">Simon Eves</font></span></span></td></tr><tr><td align="left" style="vertical-align:top"><table cellpadding="0" cellspacing="0" border="0"><tbody><tr><td align="left" style="vertical-align:top"><span style="white-space:nowrap;color:rgb(0,0,1)"><font face="arial, helvetica, sans-serif" size="2">Senior Graphics Engineer, Rendering Group<br>100 Montgomery St (5th Floor), San Francisco, CA 94104, USA<br></font></span></td></tr></tbody></table></td></tr><tr><td align="left" style="vertical-align:top"><table cellpadding="0" cellspacing="0" border="0"><tbody><tr><td align="left" style="padding:0px;vertical-align:top"><br></td><td align="left" style="padding:0px;vertical-align:top"><br></td></tr><tr><td align="left" style="padding:0px;vertical-align:top"><span style="white-space:nowrap;color:rgb(0,0,1)"><font face="arial, helvetica, sans-serif" size="2">Email: <a href="mailto:simon.eves@omnisci.com" target="_blank">simon.eves@omnisci.com</a> | Cell: </font></span></td><td align="left" style="padding:0px;vertical-align:top"><span style="white-space:nowrap;color:rgb(0,0,1)"><font face="arial, helvetica, sans-serif" size="2">+1 (415) 902-1996</font></span></td></tr></tbody></table><br></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table><br></div></div></div></div></div></div></div></div></div></div></font></span></div><div></div></div></div><div></div></div></div></div></div></div></div></div></div></div></div></div></div>