getNeighbors_Segmentation fault (core dumped)

Bug #1732210 reported by Son Pham Thai on 2017-11-14
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Yade
Medium
Bruno Chareyre

Bug Description

Hi,

I got an error "Segmentation fault (core dumped)". I have narrowed down to find out that the problem is about the function getNeighbors(). But this error does not always happen. I got error when num_spheres = 50,100,200,250,300 but when num_spheres = 150 there will be no error with getNeighbors()

My system info:
Ubuntu 14.04 LTS
Yade is compiled using packaged version yade-2017.01a

Regards,
Son

Download full text (29.7 KiB)

-----------------------------------------------------------------------------------------
num_spheres=50
-----------------------------------------------------------------------------------------

Yade [1]: execfile('Error_getNeighbors.py') ####
DEBUG /home/son/Desktop/myYade/trunk/pkg/dem/SpherePack.cpp:129 makeCloud: 0. 0.2995, cdf=0, cdf2=0
DEBUG /home/son/Desktop/myYade/trunk/pkg/dem/SpherePack.cpp:129 makeCloud: 1. 0.3, cdf=0.35, cdf2=1085,8516816647427
DEBUG /home/son/Desktop/myYade/trunk/pkg/dem/SpherePack.cpp:129 makeCloud: 2. 0.4245, cdf=0.35, cdf2=1085,8516816647427
DEBUG /home/son/Desktop/myYade/trunk/pkg/dem/SpherePack.cpp:129 makeCloud: 3. 0.425, cdf=0.7, cdf2=1467,4861723291381
DEBUG /home/son/Desktop/myYade/trunk/pkg/dem/SpherePack.cpp:129 makeCloud: 4. 0.5, cdf=0.7, cdf2=1467,4861723291381
DEBUG /home/son/Desktop/myYade/trunk/pkg/dem/SpherePack.cpp:129 makeCloud: 5. 0.7, cdf=1, cdf2=1590,2628427143145
DEBUG /home/son/Desktop/myYade/trunk/py/wrapper/yadeWrapper.cpp:635 run: RUN (1000 to go)!
DEBUG /home/son/Desktop/myYade/trunk/py/wrapper/yadeWrapper.cpp:641DEBUG wait: WAIT!
/home/son/Desktop/myYade/trunk/pkg/common/InsertionSortCollider.cpp:207 action: Resize bounds containers from 0 to 112, will std::sort.
DEBUG /home/son/Desktop/myYade/trunk/core/ForceContainerParallel.cpp:224 resize: Resize ForceContainer from the size 0 to the size 212
DEBUG /home/son/Desktop/myYade/trunk/py/wrapper/yadeWrapper.cpp:635 run: RUN (1000 to go)!
DEBUG /home/son/Desktop/myYade/trunk/py/wrapper/yadeWrapper.cpp:641 wait: WAIT!
DEBUG /home/son/Desktop/myYade/trunk/py/wrapper/yadeWrapper.cpp:635 run: RUN (1000 to go)!
DEBUG /home/son/Desktop/myYade/trunk/py/wrapper/yadeWrapper.cpp:641 wait: WAIT!
DEBUG /home/son/Desktop/myYade/trunk/py/wrapper/yadeWrapper.cpp:635 run: RUN (1000 to go)!
DEBUG /home/son/Desktop/myYade/trunk/py/wrapper/yadeWrapper.cpp:641 wait: WAIT!
DEBUG /home/son/Desktop/myYade/trunk/py/wrapper/yadeWrapper.cpp:635 run: RUN (1000 to go)!
DEBUG /home/son/Desktop/myYade/trunk/py/wrapper/yadeWrapper.cpp:641 wait: WAIT!
DEBUG /home/son/Desktop/myYade/trunk/py/wrapper/yadeWrapper.cpp:635 run: RUN (1000 to go)!
DEBUG /home/son/Desktop/myYade/trunk/py/wrapper/yadeWrapper.cpp:641 wait: WAIT!
DEBUG /home/son/Desktop/myYade/trunk/py/wrapper/yadeWrapper.cpp:635 run: RUN (1000 to go)!
DEBUG /home/son/Desktop/myYade/trunk/py/wrapper/yadeWrapper.cpp:641 wait: WAIT!
DEBUG /home/son/Desktop/myYade/trunk/py/wrapper/yadeWrapper.cpp:635 run: RUN (1000 to go)!
DEBUG /home/son/Desktop/myYade/trunk/py/wrapper/yadeWrapper.cpp:641 wait: WAIT!
DEBUG /home/son/Desktop/myYade/trunk/py/wrapper/yadeWrapper.cpp:635 run: RUN (1000 to go)!
DEBUG /home/son/Desktop/myYade/trunk/py/wrapper/yadeWrapper.cpp:641 wait: WAIT!
DEBUG /home/son/Desktop/myYade/trunk/py/wrapper/yadeWrapper.cpp:635 run: RUN (1000 to go)!
DEBUG /home/son/Desktop/myYade/trunk/py/wrapper/yadeWrapper.cpp:641 wait: WAIT!
DEBUG /home/son/Desktop/myYade/trunk/py/wrapper/yadeWrapper.cpp:635 run: RUN (1000 to go)!
DEBUG /home/son/Desktop/myYade/trunk/py/wrapper/yadeWrapper.cpp:641 wait: WAIT!
DEBUG /home/son/Desktop/myYade/trunk/py/wrapper/yadeWrapper.cpp:635 run: RUN (1000 to go)!
DEBUG /home/son/Desk...

Bruno Chareyre (bruno-chareyre) wrote :

As was guessed by Son in a separate email the function is_infinite() in [1] gives the segfault randomly (~50% of the cases). When the it does not segfault the output is correct. When it segfaults it starts with the very same sequence of operations (e.g. the cells are visited in the same order) until the segfault occurs.
It seems to be another compiler/cgal a-logical bug, reminiscent of [2].
B

[1] https://github.com/yade/trunk/blob/master/pkg/pfv/TwoPhaseFlowEngine.hpp#L360
[2] https://bugs.launchpad.net/yade/+bug/1666339

Changed in yade:
assignee: nobody → Bruno Chareyre (bruno-chareyre)
importance: Undecided → Medium
status: New → Confirmed
Bruno Chareyre (bruno-chareyre) wrote :

>It seems to be another compiler/cgal a-logical bug

Well... blame the a-logical programmer first.
A redundant and undefined FlowEngine::currentTess was floating around. It was harmless until someone had the idea of using it in some code.
Fixed in [1].
Bruno

[1] https://github.com/yade/trunk/commit/890f2c251657ed851859bdf8b700c400745658a0

Changed in yade:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers