← Back to team overview

yade-dev team mailing list archive

[Bug 1105177] Re: segfault on appending facets with active capillary law

 

>> else if (fusionDetection) bodiesMenisciiList.remove((*ii));

Sounds like a call to me, but I have not much time at the moment.
Clearly, this line was typed years ago (by Luc or me) for a specific type of simulation, and it was not anticipated that someone would insert facets in the middle of a simulation, and that it would happen  after a change in contact logic...

There is maybe a need to re-design something. I'll try and answer basic
questions on this problem but I can't dig into the code immediatly.

-- 
You received this bug notification because you are a member of Yade
developers, which is subscribed to Yade.
https://bugs.launchpad.net/bugs/1105177

Title:
  segfault on appending facets with active capillary law

Status in Yet Another Dynamic Engine:
  New

Bug description:
  Hi,

  
  I get a segfault when running a script in a loop as follows:

  O.load( ... )
   ...

  for cc in range (0,1):
   O.run(100,True)
   ...

  The first execution of O.run() works well. Segfault occurs, when cc =
  1.

  I commented out everything, that could be responsible for the
  segfault, but it always happens with this loop. It is possible to run
  simulation without segfault by:

  O.run(1000000)

  No problem, but I have no chance with the loop.

  I compiled the same yade version in debug mode to get additional
  informations:

  ###################### start

  christian@fast-machine:~/YADE/my-yade-projects/10-prediction-model$ yade201209-debug 0-MASTERtest2.py 
  Welcome to Yade Unknown%s
  TCP python prompt on localhost:9001, auth cookie `ckyasd'
  XMLRPC info provider on http://localhost:21001
  /home/christian/YADE/YADEgit-20120906-debug/lib/yade-Unknown/py/yade/__init__.py:14: RuntimeWarning: to-Python converter for boost::shared_ptr<SnapshotEngine> already registered; second conversion method ignored.
    
  Running script 0-MASTERtest2.py
  /home/christian/YADE/YADEgit-20120906-debug/lib/yade-Unknown/py/yade/utils.py:55: UserWarning: Overwriting yade.params.values which already exists.
    if mark in yade.params.__dict__: warnings.warn('Overwriting yade.params.%s which already exists.'%mark)
  SIGSEGV/SIGABRT handler called; gdb batch file is `/tmp/yade-k0c8qG/tmp-0'
  GNU gdb (GDB) 7.4.1-debian
  Copyright (C) 2012 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
  This is free software: you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
  and "show warranty" for details.
  This GDB was configured as "x86_64-linux-gnu".
  For bug reporting instructions, please see:
  <http://www.gnu.org/software/gdb/bugs/>.
  [Thread debugging using libthread_db enabled]
  Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
  [New Thread 0x7ffc13f9d700 (LWP 8540)]
  [New Thread 0x7ffc2276a700 (LWP 8537)]
  [New Thread 0x7ffc22f6b700 (LWP 8536)]
  0x00007ffc4c4788ad in nanosleep () at ../sysdeps/unix/syscall-template.S:82
  82      ../sysdeps/unix/syscall-template.S: Datei oder Verzeichnis nicht gefunden.
  No symbol "info" in current context.

  Thread 4 (Thread 0x7ffc22f6b700 (LWP 8536)):
  #0  0x00007ffc4b914573 in select () at ../sysdeps/unix/syscall-template.S:82
  #1  0x0000000000507518 in ?? ()
  #2  0x00000000004b074e in PyEval_EvalFrameEx ()
  #3  0x00000000004b3fd8 in PyEval_EvalCodeEx ()
  #4  0x00000000004acb98 in PyEval_EvalFrameEx ()
  #5  0x00000000004b3fd8 in PyEval_EvalCodeEx ()
  #6  0x00000000004acb98 in PyEval_EvalFrameEx ()
  #7  0x00000000004b3fd8 in PyEval_EvalCodeEx ()
  #8  0x00000000004b4b4c in ?? ()
  #9  0x0000000000481cc4 in ?? ()
  #10 0x0000000000460d0e in PyEval_CallObjectWithKeywords ()
  #11 0x00007ffc22f76102 in ?? () from /usr/lib/python2.7/dist-packages/sip.so
  #12 0x00007ffc23220887 in ?? () from /usr/lib/python2.7/dist-packages/PyQt4/QtCore.so
  #13 0x00007ffc232617b0 in ?? () from /usr/lib/python2.7/dist-packages/PyQt4/QtCore.so
  #14 0x00007ffc3b8c2d0b in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
  #15 0x00007ffc4c470b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
  #16 0x00007ffc4b91aa7d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
  #17 0x0000000000000000 in ?? ()

  Thread 3 (Thread 0x7ffc2276a700 (LWP 8537)):
  #0  0x00007ffc4b914573 in select () at ../sysdeps/unix/syscall-template.S:82
  #1  0x0000000000507518 in ?? ()
  #2  0x00000000004b074e in PyEval_EvalFrameEx ()
  #3  0x00000000004b3fd8 in PyEval_EvalCodeEx ()
  #4  0x00000000004acb98 in PyEval_EvalFrameEx ()
  #5  0x00000000004b3fd8 in PyEval_EvalCodeEx ()
  #6  0x00000000004acb98 in PyEval_EvalFrameEx ()
  #7  0x00000000004b3fd8 in PyEval_EvalCodeEx ()
  #8  0x00000000004b4b4c in ?? ()
  #9  0x0000000000481cc4 in ?? ()
  #10 0x0000000000460d0e in PyEval_CallObjectWithKeywords ()
  #11 0x00007ffc22f76102 in ?? () from /usr/lib/python2.7/dist-packages/sip.so
  #12 0x00007ffc23220887 in ?? () from /usr/lib/python2.7/dist-packages/PyQt4/QtCore.so
  #13 0x00007ffc232617b0 in ?? () from /usr/lib/python2.7/dist-packages/PyQt4/QtCore.so
  #14 0x00007ffc3b8c2d0b in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
  #15 0x00007ffc4c470b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
  #16 0x00007ffc4b91aa7d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
  #17 0x0000000000000000 in ?? ()

  Thread 2 (Thread 0x7ffc13f9d700 (LWP 8540)):
  #0  0x00007ffc4b8eb7fd in __libc_waitpid (pid=8541, stat_loc=<optimized out>, options=0) at ../sysdeps/unix/sysv/linux/waitpid.c:41
  #1  0x00007ffc4b87fc99 in do_system (line=<optimized out>) at ../sysdeps/posix/system.c:149
  #2  0x00007ffc4b87ffd0 in __libc_system (line=<optimized out>) at ../sysdeps/posix/system.c:190
  #3  0x00007ffc4b0571a3 in crashHandler (sig=11) at /home/christian/YADE/yade-trunk-20120906/core/main/pyboot.cpp:21
  #4  <signal handler called>
  #5  0x00007ffc4901ae19 in std::_List_iterator<boost::shared_ptr<Interaction> >::operator++ (this=0x7ffc13f9c940) at /usr/include/c++/4.7/bits/stl_list.h:156
  #6  0x00007ffc4901b4aa in std::list<boost::shared_ptr<Interaction>, std::allocator<boost::shared_ptr<Interaction> > >::remove (this=0x39cc630, __value=...) at /usr/include/c++/4.7/bits/list.tcc:248
  #7  0x00007ffc49012735 in BodiesMenisciiList::remove (this=0x38a7e50, interaction=...) at /home/christian/YADE/yade-trunk-20120906/pkg/dem/Law2_ScGeom_CapillaryPhys_Capillarity.cpp:564
  #8  0x00007ffc4900fd41 in Law2_ScGeom_CapillaryPhys_Capillarity::action (this=0x38a7e00) at /home/christian/YADE/yade-trunk-20120906/pkg/dem/Law2_ScGeom_CapillaryPhys_Capillarity.cpp:176
  #9  0x00007ffc43fc8113 in Scene::moveToNextTimeStep (this=0x38b1180) at /home/christian/YADE/yade-trunk-20120906/core/Scene.cpp:97
  #10 0x00007ffc43f79f78 in SimulationFlow::singleAction (this=0x1ad7700) at /home/christian/YADE/yade-trunk-20120906/core/SimulationFlow.cpp:21
  #11 0x00007ffc43fbef46 in ThreadWorker::callSingleAction (this=0x1ad7700) at /home/christian/YADE/yade-trunk-20120906/core/ThreadWorker.cpp:71
  #12 0x00007ffc43f4aae5 in ThreadRunner::call (this=0x3bf2c50) at /home/christian/YADE/yade-trunk-20120906/core/ThreadRunner.cpp:54
  #13 0x00007ffc43f4a8f1 in ThreadRunner::run (this=0x3bf2c50) at /home/christian/YADE/yade-trunk-20120906/core/ThreadRunner.cpp:28
  #14 0x00007ffc43f4c38f in boost::_mfi::mf0<void, ThreadRunner>::operator() (this=0x388f410, p=0x3bf2c50) at /usr/include/boost/bind/mem_fn_template.hpp:49
  #15 0x00007ffc43f4bf78 in boost::_bi::list1<boost::_bi::value<ThreadRunner*> >::operator()<boost::_mfi::mf0<void, ThreadRunner>, boost::_bi::list0> (this=0x388f420, f=..., a=...) at /usr/include/boost/bind/bind.hpp:253
  #16 0x00007ffc43f4bd2d in boost::_bi::bind_t<void, boost::_mfi::mf0<void, ThreadRunner>, boost::_bi::list1<boost::_bi::value<ThreadRunner*> > >::operator() (this=0x388f410) at /usr/include/boost/bind/bind_template.hpp:20
  #17 0x00007ffc43f4bb72 in boost::detail::function::void_function_obj_invoker0<boost::_bi::bind_t<void, boost::_mfi::mf0<void, ThreadRunner>, boost::_bi::list1<boost::_bi::value<ThreadRunner*> > >, void>::invoke (function_obj_ptr=...) at /usr/include/boost/function/function_template.hpp:153
  #18 0x00007ffc43f4c5f6 in boost::function0<void>::operator() (this=0x388f408) at /usr/include/boost/function/function_template.hpp:760
  #19 0x00007ffc43f4c5a2 in boost::detail::thread_data<boost::function0<void> >::run (this=0x388f280) at /usr/include/boost/thread/detail/thread.hpp:62
  #20 0x00007ffc42e49169 in ?? () from /usr/lib/libboost_thread.so.1.49.0
  #21 0x00007ffc4c470b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
  #22 0x00007ffc4b91aa7d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
  #23 0x0000000000000000 in ?? ()

  Thread 1 (Thread 0x7ffc4c87e700 (LWP 8533)):
  #0  0x00007ffc4c4788ad in nanosleep () at ../sysdeps/unix/syscall-template.S:82
  #1  0x00007ffc2949283c in pyOmega::wait (this=0x1a77170) at /home/christian/YADE/yade-trunk-20120906/py/wrapper/yadeWrapper.cpp:373
  #2  0x00007ffc294926c1 in pyOmega::run (this=0x1a77170, numIter=100, doWait=true) at /home/christian/YADE/yade-trunk-20120906/py/wrapper/yadeWrapper.cpp:367
  #3  0x00007ffc295b4786 in boost::python::detail::invoke<int, void (pyOmega::*)(long, bool), boost::python::arg_from_python<pyOmega&>, boost::python::arg_from_python<long>, boost::python::arg_from_python<bool> > (f=@0x1bac608: (void (pyOmega::*)(pyOmega * const, long, bool)) 0x7ffc2949264c <pyOmega::run(long, bool)>, tc=..., ac0=..., ac1=...) at /usr/include/boost/python/detail/invoke.hpp:94
  #4  0x00007ffc2959667e in boost::python::detail::caller_arity<3u>::impl<void (pyOmega::*)(long, bool), boost::python::default_call_policies, boost::mpl::vector4<void, pyOmega&, long, bool> >::operator() (this=0x1bac608, args_=0x32ea820) at /usr/include/boost/python/detail/caller.hpp:223
  #5  0x00007ffc295700b1 in boost::python::objects::caller_py_function_impl<boost::python::detail::caller<void (pyOmega::*)(long, bool), boost::python::default_call_policies, boost::mpl::vector4<void, pyOmega&, long, bool> > >::operator() (this=0x1bac600, args=0x32ea820, kw=0x0) at /usr/include/boost/python/object/py_function.hpp:38
  #6  0x00007ffc4308115b in boost::python::objects::function::call(_object*, _object*) const () from /usr/lib/libboost_python-py27.so.1.49.0
  #7  0x00007ffc43081378 in ?? () from /usr/lib/libboost_python-py27.so.1.49.0
  #8  0x00007ffc4308a39b in boost::python::handle_exception_impl(boost::function0<void>) () from /usr/lib/libboost_python-py27.so.1.49.0
  #9  0x00007ffc4307f635 in ?? () from /usr/lib/libboost_python-py27.so.1.49.0
  #10 0x00000000004acc66 in PyEval_EvalFrameEx ()
  #11 0x00000000004b3fd8 in PyEval_EvalCodeEx ()
  #12 0x0000000000536723 in ?? ()
  #13 0x0000000000446bf2 in PyRun_FileExFlags ()
  #14 0x0000000000446dbc in ?? ()
  #15 0x00000000004ac5ce in PyEval_EvalFrameEx ()
  #16 0x00000000004b3fd8 in PyEval_EvalCodeEx ()
  #17 0x0000000000536723 in ?? ()
  #18 0x0000000000446bf2 in PyRun_FileExFlags ()
  #19 0x0000000000446dbc in ?? ()
  #20 0x00000000004ac5ce in PyEval_EvalFrameEx ()
  #21 0x00000000004b3fd8 in PyEval_EvalCodeEx ()
  #22 0x00000000004acb98 in PyEval_EvalFrameEx ()
  #23 0x00000000004b3fd8 in PyEval_EvalCodeEx ()
  #24 0x00000000004acb98 in PyEval_EvalFrameEx ()
  #25 0x00000000004b3fd8 in PyEval_EvalCodeEx ()
  #26 0x0000000000536723 in ?? ()
  #27 0x0000000000446bf2 in PyRun_FileExFlags ()
  #28 0x00000000004470ec in PyRun_SimpleFileExFlags ()
  #29 0x0000000000447cdc in Py_Main ()
  #30 0x00007ffc4b85eead in __libc_start_main (main=<optimized out>, argc=<optimized out>, ubp_av=<optimized out>, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff53ea5838) at libc-start.c:228
  #31 0x00000000004c7f39 in _start ()
  segmentation fault

  ################end

  I see, that in thread 1 py/wrapper/yadeWrapper.cpp:367 and 373 is
  executed (looking at source code of this yade version tells me, that
  lines 367 and 371 ... 376 is the code of wait() ...).

  Also very curios is, that the same script was working several times before. In the previous script I deleted some particles.
  Example:
  - script works well for deletion of any amount of particles (clumps)
  - script works well for deletion of 20 particles (spheres)
  - script work end with segfault for deletion of 15 or 10 particles (spheres) ?!

  
  Regards,

  christian

To manage notifications about this bug go to:
https://bugs.launchpad.net/yade/+bug/1105177/+subscriptions


References