[postgis-users] st_buffer crashes server

Gražvydas Valeika gvaleika at gmail.com
Mon Dec 3 10:27:45 PST 2012


Hi all,

today I had unpleasant situation - st_buffer crashed my server. After some
log inspection I've find that st_buffer, or to be more precise, geos
crashed server. To make situation worse, it happened in the way, when
crashing call was produced by service, service fails, Postgres run in
circles:

terminating any other active server processes
terminating connection because of crash of another server process
The postmaster has commanded this server process to roll back the current
transaction and exit, because another server process exited abnormally and
possibly corrupted shared memory.
In a moment you should be able to reconnect to the database and repeat your
command.
the database system is in recovery mode
redo starts at 26/F8DB1A00
record with zero length at 26/F8DE7D58
redo done at 26/F8DE7D28
last completed transaction was at log time 2012-12-03 17:34:55.285808+02
autovacuum launcher started
database system is ready to accept connections

and then, failed service tries another time to do what it is asked, and
crashes in the same way.

I'm getting geos error: SELECT: RightmostEdgeFinder.cpp:77: void
geos::operation::buffer::RightmostEdgeFinder::findEdge(std::vector<geos::geomgraph::DirectedEdge*,
std::allocator<geos::geomgraph::DirectedEdge*> >*): Assertion `checked>0'
failed.

But this doesn't help much, because in their bugtracker it is mentioned for
years, time to time changing status to 'fixed' , but, as we can see, this
fix doesn't work well. (http://trac.osgeo.org/geos/ticket/473)

This crash happens with same data on Scientific Linux release 6.3, Fedora
release 16, Windows Server 2008 R2 (all of them 64 bits). On linuxes I have
PGDG 9.2.1 PostgreSQL with bundled Postgis 2.0, windows: "POSTGIS="2.0.1
r9979" GEOS="3.3.5-CAPI-1.7.5" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL
1.9.1, released 2012/05/15" LIBXML="2.7.8" LIBJSON="UNKNOWN" RASTER".


Both SL and Fedora have geos-3.3.5-1. Windows - libgeos-3-3-5.dll.

With minor data changes, call works normally. It would be nice to find
workaround which would help to protect DBMS server from crash. Changing of
radius_of_buffer  parameter from 1000 to 1001 in this call helps, but I am
frightented that it will fail with another geometry input.

Best regards,

Grazvydas

Bad behaving query:


select st_buffer(st_geomfromtext('LINESTRING(388198
6056788.3125001,388092.708841545 6056810.2110781,388088.920493843
6056967.93374297,388241.956691708 6057273.06946183,388481.94116096
6057599.24728253,
388450.615057762 6057788.60752023,388636.887768547
6058618.51458289,388575.098744835 6059249.3480535,388474.392698583
6059431.13197422,388252.570132005 6060588.91556507,
388138.573761171 6060963.23473355,388134.221733554
6061168.9551149,388299.160032874 6061394.41812456,388495.538867362
6061924.31858251,388332.370336841 6062138.11937723,
388119.211582829 6062230.26685346,388110.25175897
6062522.42617419,388165.506860547 6062748.51579152,388123.828222584
6062846.8479905,388133.803362367 6063141.16660669,
388064.564019166 6063243.27635235,387716.728231868
6063389.12380394,387453.115341178 6063849.8464528,387188.899722711
6064434.77944927,386726.051764386 6065921.01741559,
386527.803954052 6066405.26080532,386167.716575243
6067005.70139789,385585.129661588 6067750.82724575,384377.479486561
6069706.42224637,381303.184154561 6075430.53477082,
380938.825063071 6075953.44262464,379576.166973678
6077621.16952598,378617.680329676 6079335.72562118,377692.247058369
6080354.61070676,377304.98997202 6080868.84136614,
376119.146366383 6083160.6663075,375533.996242582
6084119.42036258,374831.2997138 6085068.06506297,374239.343010324
6085700.28783992,373667.330967215 6086156.23924685,
372431.267944668 6086964.31974138,371658.572051644
6087723.20126027,371184.358950609 6088414.63985996,369295.313145564
6091948.39630187,368510.010900525 6093900.30288199,
367699.079184587 6095641.17579127,366839.965846187
6097765.46196932,365887.033263914 6100299.38724338,365704.388073836
6100959.46445081,365381.540134711 6102674.28775494,
364698.31205062 6105321.58891112,364420.13298109
6105954.50724961,363567.334008088 6107222.47989483,363378.045274123
6107623.83942034,361272.146778924 6114111.545846,
360696.478924724 6116653.94545047,360625.946490487
6117579.6210964,361085.424946998 6120296.02187525,361129.554866774
6121826.37696278,361221.00136377 6122302.61003117,
361356.311073206 6122507.64959402,359931.783565909
6123603.77468629,359335.92095244 6123981.14671129,359095.301851194
6123744.88716597,358685.742038043 6123598.20791129,
358729 6123404,358729 6123404,358622.693709635
6123764.44708204,357239.91098603 6123124.35800193,357181.5 6123153,357181.5
6123153,357232.159652672 6123120.44225534,
358379.138263059 6123653.23254885,358045.151179082
6124395.52177733,358261.928444251 6124569.618564,358077.865280239
6124838.18210352,358281.044343582 6124982.05367936,
358432.766000182 6125165.71179119,358375.669443869
6125262.28106258,359789.175958758 6126217.21693403,359809.655435652
6126184.44927005,359739.362906316 6126110.63846627,
359825 6125976,359825 6125976,359739.362906316
6126110.63846627,359798.23045867 6126148.42609188,359789.175958758
6126217.21693403,360323.491342721 6126598.10301608,
364105.700770721 6130589.54564699,365851.118627503
6133776.04159448,366074.924340233 6134077.5652318,366321.276893722
6134309.5818053,366752.527028152 6134568.10150752,
373346.647541771 6137433.71166638,373718.872489144
6137668.49630618,375295.498589261 6138886.92620252,380360.32646877
6141721.21191597,380111.862144265 6142591.67766098,
380188.965151436 6142863.32687809,380412.556804893
6143070.19850033,380326.51146761 6143486.2191135,380519.86965456
6143672.04731848,380524.672688485 6143745.65405921,
380333.210322103 6144277.10325332,380366.537370783
6144825.73061995,380268.927547754 6145283.97143005,380101.057446265
6145452.75372955,380072.61124807 6145554.36976643,
379910.941600418 6147258.40194766,379895.687981905
6147888.36419869,379645.66003822 6148831.99607563,379584.096108666
6149348.80443556,379757.037432146 6150109.02363008,
379782.695357509 6151294.47303588,379940.061949347
6151544.25492761,379892.065462456 6152163.0470847,379852.912014202
6152193.70518401,379881.507158488 6152775.52694882,
379735.825345059 6153190.50246425,379798.964041976
6153600.96172558,379604.84141527 6153880.28255335,380274.62842471
6154663.22487804,380296.916351767 6154764.4053277,
380407.96506929 6154758.60352038,380404.973832117
6154930.39286119,380533.266481 6154956.03942,380533.266481
6154956.03942,380697.469609411 6154933.37328515,
380804.601918464 6154718.75524037,380003.000283501
6154234.91781766,379947.596702516 6154268.33657074,379604.84141527
6153880.28255335,379801.104099702 6153581.04862935,
379734.034176517 6153214.61521516,379879.325267865
6152797.41205984,379852.912014202 6152193.70518401,379940.061949347
6151544.25492761,379782.695357509 6151294.47303588,
379757.037432146 6150109.02363008,379584.096108666
6149348.80443556,379645.66003822 6148831.99607563,379895.687981905
6147888.36419869,379910.941600418 6147258.40194766,
380078.689290296 6145509.57402919,380268.927547754
6145283.97143005,380293.424476874 6145037.39476578,380366.235644963
6144852.36309869,380330.160194237 6144288.82245702,
380532.368921331 6143696.47274357,380330.569412652
6143508.9916221,380418.378928402 6143089.13720483,380201.908916375
6142890.21141506,380113.567105044 6142613.12216422,
380358.007167029 6141736.36302396,375141.310137443
6138794.83236084,373718.872489144 6137668.49630618,373346.647541771
6137433.71166638,366752.527028152 6134568.10150752,
366261.351299655 6134260.49101737,365851.118627503
6133776.04159448,364105.700770721 6130589.54564699,360775.41757528
6127074.35479882,360953.797311602 6126892.71824755,
361415.446406647 6124129.77434326,361418.461836166
6123309.50723627,361223.676981864 6122424.10716164,361158.196642996
6122397.73568352,361113.476183368 6122455.98975904,
361231.736678766 6122617.56913771,359931.783565909
6123603.77468629,359335.92095244 6123981.14671129,359095.301851194
6123744.88716597,358685.742038043 6123598.20791129,
358741.0625 6123522,358741.0625 6123522,357971.36255807
6125108.43269709,357920.008042721 6125077.68096362,357679.808786759
6125460.74022553,357213.718482872 6125510.63249069,
357060 6125868,357060 6125868,357003.056253166
6125944.75887484,356749.73178741 6125801.21952087,356576.400427944
6125577.20775089,356509.666450818 6125295.74512354,
356454 6125304,356454 6125304,356509.666450818
6125295.74512354,356485.06516117 6124575.24473136,356746.540496635
6124608.57147991,356808 6124501,356808 6124501,
356841.04623812 6124345.94903632,356917.601431696
6124368.97007825,357540.531428107 6124708.38003617,357962.38036606
6125101.9157808,358337.402089666 6124407.55301858,
358652.565855199 6124352.24990397,359082.983074971
6124156.03807671,359519.418855862 6123853.86577455,359507 6123806,359507
6123806,359519.418855862 6123853.86577455,
358927.509705773 6124235.82599912,358668.99357866
6124346.01258094,358346.979589857 6124383.702781,357971.36255807
6125108.43269709,357540.531428107 6124708.38003617,
356545.762875273 6124169.95952009,356642.213182996
6123954.08053072,356541.426332461 6123823.05777582,356444 6123955,356444
6123955,356528.633898072 6123802.58917791,
356635.327210811 6123941.87391433,356536.358713067
6124164.88456013,357540.531428107 6124708.38003617,357898.367966032
6125061.33495277,358375.669443869 6125262.28106258,
359864.195548135 6126265.27116361,360279.790154604
6126555.44586471,360762.970983925 6127054.06482593,364105.700770721
6130589.54564699,365851.118627503 6133776.04159448,
366074.924340233 6134077.5652318,366360.991546586
6134339.22803017,366752.527028152 6134568.10150752,373346.647541771
6137433.71166638,373718.872489144 6137668.49630618,
375295.498589261 6138886.92620252,380360.32646877
6141721.21191597,380111.862144265 6142591.67766098,380188.965151436
6142863.32687809,380412.556804893 6143070.19850033,
380326.51146761 6143486.2191135,380519.86965456
6143672.04731848,380524.672688485 6143745.65405921,380333.210322103
6144277.10325332,380366.537370783 6144825.73061995,
380268.927547754 6145283.97143005,380101.057446265
6145452.75372955,380072.61124807 6145554.36976643,379910.941600418
6147258.40194766,379895.687981905 6147888.36419869,
379645.66003822 6148831.99607563,379584.096108666
6149348.80443556,379757.037432146 6150109.02363008,379782.695357509
6151294.47303588,379940.061949347 6151544.25492761,
379892.065462456 6152163.0470847,379852.912014202
6152193.70518401,379881.507158488 6152775.52694882,379735.825345059
6153190.50246425,379798.964041976 6153600.96172558,
379604.84141527 6153880.28255335,380274.62842471
6154663.22487804,380270.707586966 6154922.27465547,380401.543492492
6154969.07054731,380395.790832264 6155021.2631309,
380225.171669476 6155038.03451076,380009.961292789
6155174.55789084,380214.541517594 6155508.21736627,380471.273097537
6155787.73721704,380779.514035757 6156457.27872544,
380664.720504259 6156522.49306375,380565.632008301
6156470.80623459,380565.632008301 6156470.80623459,380659.885725872
6156528.60438952,380770.908059047 6156461.95579602,
380471.273097537 6155787.73721704,380224.131766873
6155521.71880139,380009.961292789 6155174.55789084,380241.317773985
6155032.03703938,380395.316987553 6155026.58763786,
380399.760813982 6154978.75127648,380278.928144154
6154937.86254539,380274.62842471 6154663.22487804,379604.84141527
6153880.28255335,379801.104099702 6153581.04862935,
379734.034176517 6153214.61521516,379879.325267865
6152797.41205984,379852.912014202 6152193.70518401,379940.061949347
6151544.25492761,379782.695357509 6151294.47303588,
379757.037432146 6150109.02363008,379584.096108666
6149348.80443556,379645.66003822 6148831.99607563,379895.687981905
6147888.36419869,379910.941600418 6147258.40194766,
380078.689290296 6145509.57402919,380268.927547754
6145283.97143005,380293.424476874 6145037.39476578,380366.235644963
6144852.36309869,380330.160194237 6144288.82245702,
380532.368921331 6143696.47274357,380330.569412652
6143508.9916221,380418.378928402 6143089.13720483,380201.908916375
6142890.21141506,380113.567105044 6142613.12216422,
380358.007167029 6141736.36302396,375141.310137443
6138794.83236084,373718.872489144 6137668.49630618,373346.647541771
6137433.71166638,366826.150471738 6134600.68215773,
366384.177071635 6134356.53424428,366074.924340233
6134077.5652318,365851.118627503 6133776.04159448,364105.700770721
6130589.54564699,360283.950543384 6126559.51325796,
358310.754368459 6125224.10678874,357976.08601118
6125117.84819477,357566.504359631 6124728.78392167,356485.06516117
6124575.24473136,356474.37159831 6124718.01769267,
356394 6124712,356394 6124712,356474.37159831
6124718.01769267,356485.06516117 6124575.24473136,356746.540496635
6124608.57147991,356841.04623812 6124345.94903632,
356917.601431696 6124368.97007825,357540.531428107
6124708.38003617,357898.367966032 6125061.33495277,358375.669443869
6125262.28106258,360279.790154604 6126555.44586471,
364105.700770721 6130589.54564699,365851.118627503
6133776.04159448,366220.074543707 6134224.37808788,366136.936463203
6134224.04608468,366110.33046146 6134300.85927697,
366140.96755391 6135400.4088888,366262.088579507
6135953.44233793,366243.224373423 6136539.96317083,366869.109960216
6139049.28144522,366861.962049922 6139393.21523448,
366783.963283364 6139810.26288602,366810.021621773
6140097.76752051,366909.839012986 6140346.59460061,367483.155296243
6141289.28680997,368491.366973702 6144297.76560617,
368624.352440217 6144834.69168676,368815.544245043
6145099.54822602,369230.077151043 6145239.2445828,370681.28754639
6146615.8063275,371346.506937068 6147048.89562104,
372670.642536898 6148303.46738851,375735.574462588
6153280.35465536,376025.682515648 6153968.41706293,376181.477195906
6154040.98847407,377590.660285194 6154019.98732847,
378068.953140288 6154094.72967084,378572.849829578
6154240.81730227,379168.5625 6154562.5,379168.5625
6154562.5,378596.752745659 6154250.4673199,
378077.605910676 6154096.88336475,377590.660285194
6154019.98732847,376181.477195906 6154040.98847407,376025.682515648
6153968.41706293,375735.574462588 6153280.35465536,
372670.642536898 6148303.46738851,371346.506937068
6147048.89562104,370681.28754639 6146615.8063275,369230.077151043
6145239.2445828,368798.447992323 6145087.03940357,
368624.352440217 6144834.69168676,368491.366973702
6144297.76560617,367483.155296243 6141289.28680997,366909.839012986
6140346.59460061,366810.021621773 6140097.76752051,
366783.963283364 6139810.26288602,366861.962049922
6139393.21523448,366869.109960216 6139049.28144522,366252.868206412
6136622.02568867,366262.088579507 6135953.44233793,
366144.737792622 6135428.89321238,366099.59095496
6134250.64732141,364105.700770721 6130589.54564699,360283.950543384
6126559.51325796,358310.754368459 6125224.10678874,
357976.08601118 6125117.84819477,357566.504359631
6124728.78392167,356027.21875 6124543)'), 1000, 'endcap=round');
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20121203/e1e2004c/attachment.html>


More information about the postgis-users mailing list