<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"MS Gothic";
panose-1:2 11 6 9 7 2 5 8 2 4;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:"Yu Gothic";
panose-1:2 11 4 0 0 0 0 0 0 0;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
{font-family:"MS PGothic";
panose-1:2 11 6 0 7 2 5 8 2 4;}
@font-face
{font-family:"\@Yu Gothic";
panose-1:2 11 4 0 0 0 0 0 0 0;}
@font-face
{font-family:"\@MS PGothic";}
@font-face
{font-family:"\@MS Gothic";
panose-1:2 11 6 9 7 2 5 8 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
text-align:justify;
font-size:10.5pt;
font-family:"Yu Gothic",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#467886;
text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
{mso-style-priority:99;
mso-style-link:"Vain tekstinä Char";
margin:0cm;
text-align:justify;
font-size:10.5pt;
font-family:"Yu Gothic",sans-serif;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:36.0pt;
text-align:justify;
font-size:10.5pt;
font-family:"Yu Gothic",sans-serif;}
span.VaintekstinChar
{mso-style-name:"Vain tekstinä Char";
mso-style-priority:99;
mso-style-link:"Vain tekstinä";
font-family:"Consolas",serif;}
span.Shkpostityyli26
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;
mso-ligatures:none;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:99.25pt 3.0cm 3.0cm 3.0cm;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:1239361752;
mso-list-type:hybrid;
mso-list-template-ids:1769893842 -397275682 67698711 67698705 67698703 67698711 67698705 67698703 67698711 67698705;}
@list l0:level1
{mso-level-number-format:decimal-enclosed-circle;
mso-level-text:%1;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:18.0pt;
text-indent:-18.0pt;}
@list l0:level2
{mso-level-number-format:aiueo-full-width;
mso-level-text:"\(%2\)";
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:44.0pt;
text-indent:-22.0pt;}
@list l0:level3
{mso-level-number-format:decimal-enclosed-circle;
mso-level-text:%3;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:66.0pt;
text-indent:-22.0pt;}
@list l0:level4
{mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:88.0pt;
text-indent:-22.0pt;}
@list l0:level5
{mso-level-number-format:aiueo-full-width;
mso-level-text:"\(%5\)";
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:110.0pt;
text-indent:-22.0pt;}
@list l0:level6
{mso-level-number-format:decimal-enclosed-circle;
mso-level-text:%6;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:132.0pt;
text-indent:-22.0pt;}
@list l0:level7
{mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:154.0pt;
text-indent:-22.0pt;}
@list l0:level8
{mso-level-number-format:aiueo-full-width;
mso-level-text:"\(%8\)";
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:176.0pt;
text-indent:-22.0pt;}
@list l0:level9
{mso-level-number-format:decimal-enclosed-circle;
mso-level-text:%9;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:198.0pt;
text-indent:-22.0pt;}
@list l1
{mso-list-id:1383360617;
mso-list-template-ids:-956775118;}
@list l2
{mso-list-id:1532836607;
mso-list-template-ids:476055116;}
@list l2:level1
{mso-level-start-at:2;
mso-level-tab-stop:36.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
ol
{margin-bottom:0cm;}
ul
{margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="FI" link="#467886" vlink="#96607D" style="word-wrap:break-word;text-justify-trim:punctuation">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">I had a try with your dataset on Windows and I had no segmentation fault. Perhaps not surprise because I do not use the same container
than you. I had some encoding problem but I believe that it is not related. But perhaps you have some use for knowing that the unzipping part is not necessary, shapefile can be read directly from the zip with /vsizip/.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">ogr2ogr -f GeoJSON -oo ENCODING=MS932 d1_raw.geojson /vsizip/test.zip d1 --config CPL_DEBUG ON<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">GDAL: Auto register C:\OSGeo4W\apps\gdal\lib\gdalplugins\gdal_ECW_JP2ECW.dll using GDALRegister_ECW_JP2ECW.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">GDAL: GDALOpen(/vsizip/test.zip, this=0000023F19871250) succeeds as ESRI Shapefile.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">GDAL: GDALDriver::Create(GeoJSON,d1_raw.geojson,0,0,0,Unknown,0000000000000000)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">Shape: DBF Codepage = SJIS for /vsizip/test.zip/d1.shp<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">Shape: Treating as encoding 'MS932'.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">Shape: Cannot recode from 'MS932'. Disabling recoding<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">GDALVectorTranslate: 5315 features written in layer 'd1'<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">Shape: 5315 features read on layer 'd1'.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">GDAL: GDALClose(/vsizip/test.zip, this=0000023F19871250)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">GDAL: GDALClose(d1_raw.geojson, this=0000023F19876CF0)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">GDAL: In GDALDestroy - unloading GDAL shared library.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">-Jukka Rahkonen-<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" align="left" style="text-align:left"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Lähettäjä:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> gdal-dev <gdal-dev-bounces@lists.osgeo.org>
<b>Puolesta </b>?? ?? via gdal-dev<br>
<b>Lähetetty:</b> tiistai 12. maaliskuuta 2024 10.56<br>
<b>Vastaanottaja:</b> Abel Pau <a.pau@creaf.uab.cat>; gdal-dev@lists.osgeo.org<br>
<b>Aihe:</b> Re: [gdal-dev] Segmentation fault (core dumped) occurs when running ogr2ogr command on container<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal" align="left" style="text-align:left"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">I tried executing with --config CPL_DEBUG ON, but it did not provide any useful information.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">I'm sending you the command that's causing the issue.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">We're using curl command to obtain the Shape file from the internet.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">---<o:p></o:p></span></p>
<ol style="margin-top:0cm" start="1" type="">
<li class="MsoListParagraph" style="margin-left:-18.0pt;mso-list:l0 level1 lfo3">
<span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">Obtaining the Shape file:<o:p></o:p></span></li></ol>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">$curl -f --output-dir ./ -O
<a href="https://data.bodik.jp/dataset/d4b9a284-58c0-4559-9e48-b7c83a4275f0/resource/28aa8f13-7cf0-4dc5-9dbf-a77f58c3f2c8/download/shape.zip">
https://data.bodik.jp/dataset/d4b9a284-58c0-4559-9e48-b7c83a4275f0/resource/28aa8f13-7cf0-4dc5-9dbf-a77f58c3f2c8/download/shape.zip</a><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA"><o:p> </o:p></span></p>
<ol style="margin-top:0cm" start="2" type="">
<li class="MsoListParagraph" style="margin-left:-18.0pt;mso-list:l0 level1 lfo3">
<span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">Unzipping the ZIP file:<o:p></o:p></span></li></ol>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">$unzip -o -j -d ./ ./shape.zip<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="JA" style="font-size:11.0pt;mso-fareast-language:JA">③</span><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA"> Converting from Shape format to GeoJSON format:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">$ogr2ogr -f GeoJSON -oo ENCODING=MS932 ./d1_raw.geojson ./d1.shp --config CPL_DEBUG ON<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">---<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">These commands are executed within the convert.sh called from the Dockerfile.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">Best regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" align="left" style="text-align:left"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:JA">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:JA">
Abel Pau <<a href="mailto:a.pau@creaf.uab.cat">a.pau@creaf.uab.cat</a>> <br>
<b>Sent:</b> Wednesday, March 6, 2024 5:53 PM<br>
<b>To:</b> </span><span lang="JA" style="font-size:11.0pt;font-family:"MS PGothic",sans-serif;mso-fareast-language:JA">寛座 智大</span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:JA"> <<a href="mailto:tomohiro.kanza.306@baycurrent.co.jp">tomohiro.kanza.306@baycurrent.co.jp</a>>;
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<b>Subject:</b> RE: Segmentation fault (core dumped) occurs when running ogr2ogr command on container<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="mso-fareast-language:JA"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="ES" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="ES" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">I reduced the amount of memory requested. I could do that because I am developing the driver that failed.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">After my mail I discovered another error, so, perhaps, this was the real cause.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">4Mb it’s so small, so I is not the cause...
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Perhaps you can add --config CPL_DEBUG ON at your command line to see if this give you more information about the place
where it crashes.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">I’m sorry not being able to help you more.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Perhaps you can send me the shape and the command line to see if it crashes in my computer and I can find out the problem.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">See you<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" align="left" style="text-align:left"><b><span lang="ES" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:JA">De:</span></b><span lang="ES" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:JA">
</span><span lang="JA" style="font-size:11.0pt;font-family:"MS Gothic";mso-fareast-language:JA">寛座 智大</span><span lang="ES" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:JA"> <</span><span lang="EN-US" style="mso-fareast-language:JA"><a href="mailto:tomohiro.kanza.306@baycurrent.co.jp"><span lang="ES" style="font-size:11.0pt;font-family:"Calibri",sans-serif">tomohiro.kanza.306@baycurrent.co.jp</span></a></span><span lang="ES" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:JA">>
<br>
<b>Enviado el:</b> dimecres, 6 de març de 2024 7:20<br>
<b>Para:</b> Abel Pau <</span><span lang="EN-US" style="mso-fareast-language:JA"><a href="mailto:a.pau@creaf.uab.cat"><span lang="ES" style="font-size:11.0pt;font-family:"Calibri",sans-serif">a.pau@creaf.uab.cat</span></a></span><span lang="ES" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:JA">>;
</span><span lang="EN-US" style="mso-fareast-language:JA"><a href="mailto:gdal-dev@lists.osgeo.org"><span lang="ES" style="font-size:11.0pt;font-family:"Calibri",sans-serif">gdal-dev@lists.osgeo.org</span></a></span><span lang="ES" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:JA"><br>
<b>Asunto:</b> RE: Segmentation fault (core dumped) occurs when running ogr2ogr command on container<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="CA" style="mso-fareast-language:JA"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">Abel Pau,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">Hi. Thank you for your response.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">>I reduced this capacity 10 times and it worked.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">Does this mean you reduced the size of the Shape file?
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">Or does it mean that you reduced the amount of memory requested?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">(</span><span lang="EN-US" style="mso-fareast-language:JA">
</span><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">If it's the latter, I'd like to learn how to do it.)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">Shape files are typically around 4MB, so I don't consider them to be very large files.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">Additionally, I tried it on an AKS with a free memory size of over 20GB, but encountered the same issue.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">It seems unlikely that there is a lack of specifications in the execution environment.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">Could the issue possibly be due to a bug in the command?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" align="left" style="text-align:left"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:JA">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:JA">
Abel Pau <</span><span lang="EN-US" style="mso-fareast-language:JA"><a href="mailto:a.pau@creaf.uab.cat"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">a.pau@creaf.uab.cat</span></a></span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:JA">>
<br>
<b>Sent:</b> Monday, March 4, 2024 4:57 PM<br>
<b>To:</b> </span><span lang="JA" style="font-size:11.0pt;font-family:"MS PGothic",sans-serif;mso-fareast-language:JA">寛座 智大</span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:JA"> <</span><span lang="EN-US" style="mso-fareast-language:JA"><a href="mailto:tomohiro.kanza.306@baycurrent.co.jp"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">tomohiro.kanza.306@baycurrent.co.jp</span></a></span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:JA">><br>
<b>Subject:</b> RE: Segmentation fault (core dumped) occurs when running ogr2ogr command on container<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="mso-fareast-language:JA"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">I did similar tests with a driver I am implementing and I obtained exact the same behavior as yours.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">After a few speculations I deduced that my driver was asking for too much memory for the docker capacity.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">I reduced this capacity 10 times and it worked.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">So, perhaps, Shape or Geojson asks for too much memory for the docker capacity.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">I don’t know if it’s possible to make it bigger.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Abel.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" align="left" style="text-align:left"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:JA">De:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:JA">
gdal-dev <</span><span lang="EN-US" style="mso-fareast-language:JA"><a href="mailto:gdal-dev-bounces@lists.osgeo.org"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">gdal-dev-bounces@lists.osgeo.org</span></a></span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:JA">>
<b>En nombre de </b>?? ?? via gdal-dev<br>
<b>Enviado el:</b> dilluns, 4 de març de 2024 3:30<br>
<b>Para:</b> </span><span lang="EN-US" style="mso-fareast-language:JA"><a href="mailto:gdal-dev@lists.osgeo.org"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">gdal-dev@lists.osgeo.org</span></a></span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:JA"><br>
<b>Asunto:</b> [gdal-dev] Segmentation fault (core dumped) occurs when running ogr2ogr command on container<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="CA" style="mso-fareast-language:JA"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">I am implementing batch processing to convert Shape files, publicly available as open data,<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">into Geojson format within a container environment.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">I installed gdal-bin on top of ubuntu:22.04 base image.
<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">The Dockerfile I implemented is as follows:<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">```<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">FROM ubuntu:22.04<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">ENV DEBIAN_FRONTEND=noninteractive<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">RUN apt update<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">RUN apt -y install apt-transport-https jq unzip openjdk-17-jdk-headless curl<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA"># Install gdal-bin<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA"># Reference:
</span><span lang="EN-US" style="mso-fareast-language:JA"><a href="https://mothergeo-py.readthedocs.io/en/latest/development/how-to/gdal-ubuntu-pkg.html#how-to-install-gdal-ogr-packages-on-ubuntu"><span style="font-size:11.0pt">https://mothergeo-py.readthedocs.io/en/latest/development/how-to/gdal-ubuntu-pkg.html#how-to-install-gdal-ogr-packages-on-ubuntu</span></a></span><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA"><o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">RUN apt -y install software-properties-common<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">RUN add-apt-repository -y ppa:ubuntugis/ppa<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">RUN apt update<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">RUN apt -y install gdal-bin<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">COPY ./convert.sh /convert.sh<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">CMD ["bash","convert.sh"]<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">```<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">When executing the ogr2ogr command within convert.sh, the following error occurs:<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">```<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">Shape: DBF Codepage = SJIS for /d1.shp<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">Shape: Treating as encoding 'MS932'.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">GDAL: GDALOpen(/d1.shp, this=0x55f1edd77f30) succeeds as ESRI Shapefile.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">GDAL: QuietDelete(/d1_raw.geojson) invoking Delete()<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">GDAL: GDALDriver::Create(GeoJSON,/d1_raw.geojson,0,0,0,Unknown,(nil))<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">GDALVectorTranslate: 5315 features written in layer 'd1'<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">Shape: 5315 features read on layer 'd1'.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">GDAL: GDALClose(/d1.shp, this=0x55f1edd77f30)<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">GDAL: GDALClose(/d1_raw.geojson, this=0x55f1edd75fd0)<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">GDAL: In GDALDestroy - unloading GDAL shared library.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">Segmentation fault (core dumped)<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">```<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">I checked if convert.sh execution is possible on the VM (host OS running Docker).<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">The error seems to occur only when executed within the container.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">How should I resolve this?<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="JA" style="font-size:11.0pt;mso-fareast-language:JA">※</span><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">Environment<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">Host OS: ubuntu 22.04<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">Docker Deamon: 25.0.3<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">gdal-bin: 3.6.4<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA"><o:p> </o:p></span></p>
</div>
</body>
</html>