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

[openbsd] server crash on pickDeliver/pickDeliver/innerQuery.sql and vrp_basic/no_crash_test-vrpOneDepot.sql #1725

Closed
landryb opened this issue Nov 6, 2020 · 12 comments · Fixed by #1782 or #1784

Comments

@landryb
Copy link

landryb commented Nov 6, 2020

Describe the bug
running tests on OpenBSD, two tests crash the remote server (figured out the two after removing them selectively, all tests pass, per openbsd/ports@d4bd6a5) - cf #1356 (comment)

that's with head of master and head of release-3.0 branch.

../../pgtap/pickDeliver/pickDeliver-VS-pickDeliverEuclidean.sql ........................................ ok            
psql:../../pgtap/pickDeliver/pickDeliver/innerQuery.sql:285: server closed the connection unexpectedly                                                                                                                                         
        This probably means the server terminated abnormally                                                           
        before or while processing the request.                                                                        
psql:../../pgtap/pickDeliver/pickDeliver/innerQuery.sql:285: fatal: connection to server was lost                                                                                                                                              
../../pgtap/pickDeliver/pickDeliver/innerQuery.sql .....................................................               
Dubious, test returned 2 (wstat 512, 0x200)                                                                            
Failed 45/77 subtests                                                                                                                                                                                                                          
psql: error: could not connect to server: FATAL:  the database system is in recovery mode                              
../../pgtap/pickDeliver/pickDeliver/types_check.sql ....................................................               
Dubious, test returned 2 (wstat 512, 0x200)                                                                                                                                                                                                    
No subtests run  
@landryb landryb added the bug Something isn't working label Nov 6, 2020
@landryb
Copy link
Author

landryb commented Nov 6, 2020

same failure on develop branch.

@landryb landryb changed the title server crash on pickDeliver/pickDeliver/innerQuery.sql [openbsd] server crash on pickDeliver/pickDeliver/innerQuery.sql Nov 6, 2020
@landryb landryb changed the title [openbsd] server crash on pickDeliver/pickDeliver/innerQuery.sql [openbsd] server crash on pickDeliver/pickDeliver/innerQuery.sql and vrp_basic/no_crash_test-vrpOneDepot.sql Nov 6, 2020
@cvvergara
Copy link
Member

cvvergara commented Nov 27, 2020

@landryb
Maybe this issue is related with #1760
There is code that pgr_TSP & pgr_PickDeliver share
I wonder if you can try 2 things:

  1. Test the code posted on the issue TSP server crash on ubuntu 20.04 #1760 on openbsd and see if you are getting the same error
  2. Test if with the fix I am working for TSP server crash on ubuntu 20.04 #1760 also fixes this issue, you can find it here: https://github.com/cvvergara/pgrouting/tree/issue-1760-3.1

@landryb
Copy link
Author

landryb commented Nov 27, 2020

tried with cvvergara/pgrouting@a62cd7801 backported on top of 3.1.1 but alas the test still fails:

../../pgtap/pickDeliver/pickDeliver-VS-pickDeliverEuclidean.sql ........................................ ok                                                                                                                                    
psql:../../pgtap/pickDeliver/pickDeliver/innerQuery.sql:322: server closed the connection unexpectedly                                                                                                                                         
        This probably means the server terminated abnormally                                                                                                                                                                                   
        before or while processing the request.                                                                                                                                                                                                
psql:../../pgtap/pickDeliver/pickDeliver/innerQuery.sql:322: fatal: connection to server was lost 

fwiw that's with clang 10.0.1

@landryb
Copy link
Author

landryb commented Nov 27, 2020

oh wait, i think i tested that wrong. retesting.

@landryb
Copy link
Author

landryb commented Nov 27, 2020

well, smth feels wrong because now it fails on the previous test (unless tests are run several at a time in parallel ?):

../../pgtap/mincut/stoerWagner-types-check.sql ......................................................... ok                                                                                                                                    
../../pgtap/pickDeliver/order_id_is_neg1.sql ........................................................... ok   
psql:../../pgtap/pickDeliver/pickDeliver-VS-pickDeliverEuclidean.sql:33: server closed the connection unexpectedly                                                                                                                             

@cvvergara cvvergara added OpenBSD Bug Report and removed bug Something isn't working labels Nov 27, 2020
@cvvergara
Copy link
Member

@cvvergara cvvergara added this to the Release 3.1.2 milestone Nov 28, 2020
@landryb
Copy link
Author

landryb commented Nov 30, 2020

build from a tarball taken from this branch (eg https://github.com/cvvergara/pgrouting/archive/bf23f07e3f9bdc97ba184e61ae012b3c63d30948.tar.gz but thats based off 3.0 branch, right ?) but sadly that fails the same:

../../pgtap/pickDeliver/pickDeliver-VS-pickDeliverEuclidean.sql ........................................ ok            
psql:../../pgtap/pickDeliver/pickDeliver/innerQuery.sql:273: server closed the connection unexpectedly                                                                                                                                         
        This probably means the server terminated abnormally                                                                                                                                                                                   
        before or while processing the request.
psql:../../pgtap/pickDeliver/pickDeliver/innerQuery.sql:273: fatal: connection to server was lost

which particular commit did you have in mind from that branch that should fix this crash ?

@cvvergara
Copy link
Member

Well, on CENTOS there was a problem with boost version so I added external boost for geometries I was thinking that that might have been the problem, v3.0.0-alpha does not have those external geometries. I was thinking that that was the source of the problem

git diff --name-only v3.0.0-alpha v3.0.0 include
include/boost/bgeometry/algorithms/append.hpp
include/boost/bgeometry/algorithms/area.hpp
include/boost/bgeometry/algorithms/assign.hpp
include/boost/bgeometry/algorithms/centroid.hpp
include/boost/bgeometry/algorithms/clear.hpp
include/boost/bgeometry/algorithms/convert.hpp
include/boost/bgeometry/algorithms/correct.hpp
include/boost/bgeometry/algorithms/covered_by.hpp
...

@cvvergara
Copy link
Member

Don't know exactly how yet, but basically working on removing warnings from clang as a compiler, I could finally duplicate a server crash with pgr_pickDeliver on ubuntu
https://github.com/cvvergara/pgrouting/runs/1493551654?check_suite_focus=true#step:9:405
Note:
Before trying to attempt to fix the issue I need to finish removing clang's warnings. hopefully nothing else will come up.

@cvvergara
Copy link
Member

@landryb
Can you try this one please
https://github.com/cvvergara/pgrouting/tree/dec-11-fix-server-crash-on-pickDeliver-for-3.1

Please let me know if it works, so that I start cleaning all the code mess I created to find & fix the server crash.

@landryb
Copy link
Author

landryb commented Dec 14, 2020

victory ! 🎉

All tests successful.

Test Summary Report
-------------------
../../pgtap/alpha_shape/s_shape-test.sql                                                             (Wstat: 0 Tests: 167 Failed: 0)
  TODO passed:   95
../../pgtap/trsp/trsp/innerQuery.sql                                                                 (Wstat: 0 Tests: 162 Failed: 0)
  TODO passed:   4-6, 10-12, 16-18, 34-36, 40-42, 46-48
                58-60, 64-66, 70-72, 88-90, 94-96, 100-102
                112-114, 118-120, 124-126, 142-144, 148-150
                154-156
../../pgtap/trsp/trspViaEdges/innerQuery.sql                                                         (Wstat: 0 Tests: 162 Failed: 0)
  TODO passed:   4-6, 10-12, 16-18, 34-36, 40-42, 46-48
                58-60, 64-66, 70-72, 88-90, 94-96, 100-102
                112-114, 118-120, 124-126, 142-144, 148-150
                154-156
../../pgtap/trsp/trspViaVertices/innerQuery.sql                                                      (Wstat: 0 Tests: 162 Failed: 0)
  TODO passed:   4-6, 10-12, 16-18, 34-36, 40-42, 46-48
                58-60, 64-66, 70-72, 88-90, 94-96, 100-102
                112-114, 118-120, 124-126, 142-144, 148-150
                154-156
Files=302, Tests=32094, 595 wallclock secs ( 5.31 usr  5.31 sys +  1.89 cusr  8.75 csys = 21.26 CPU)
Result: PASS

@cvvergara
Copy link
Member

Ok, perfect will proceed to clean up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment