salilab / imp

The Integrative Modeling Platform
https://integrativemodeling.org
GNU General Public License v3.0
73 stars 30 forks source link

CGAL-related memory error revisited #615

Closed barakr closed 10 years ago

barakr commented 10 years ago

On Fedora, develop revision 7b3bda528509688e9084c6e61ce3f379b9018e7eIn, both in release and debug builds:

I now get a memory error, when running npctransport. It seems to be in _IMP::cgal::internal::get_surface_area_andvolume(), following a call propagated from _atom::getvolume(). What was the solution for Riccardo? This is the log from gdb:

(gdb) backtrace
#0  0x00000035b280ca38 in pthread_once () from /lib64/libpthread.so.0
#1  0x00000035b2109d1c in backtrace () from /lib64/libc.so.6
#2  0x00000035b2075d34 in __libc_message () from /lib64/libc.so.6
#3  0x00000035b207e21c in _int_malloc () from /lib64/libc.so.6
#4  0x00000035b208002c in malloc () from /lib64/libc.so.6
#5  0x00000035b1c0d379 in _dl_map_object_deps () from /lib64/ld-linux-x86-64.so.2
#6  0x00000035b1c138bc in dl_open_worker () from /lib64/ld-linux-x86-64.so.2
#7  0x00000035b1c0f304 in _dl_catch_error () from /lib64/ld-linux-x86-64.so.2
#8  0x00000035b1c131eb in _dl_open () from /lib64/ld-linux-x86-64.so.2
#9  0x00000035b21305d2 in do_dlopen () from /lib64/libc.so.6
#10 0x00000035b1c0f304 in _dl_catch_error () from /lib64/ld-linux-x86-64.so.2
#11 0x00000035b2130692 in __libc_dlopen_mode () from /lib64/libc.so.6
#12 0x00000035b2109c05 in init () from /lib64/libc.so.6
#13 0x00000035b280ca40 in pthread_once () from /lib64/libpthread.so.0
#14 0x00000035b2109d1c in backtrace () from /lib64/libc.so.6
#15 0x00000035b2075d34 in __libc_message () from /lib64/libc.so.6
#16 0x00000035b207d0b8 in _int_free () from /lib64/libc.so.6
#17 0x00007ffff74eb0d2 in deallocate (this=<optimized out>, __p=<optimized out>) at /usr/include/c++/4.8.2/ext/new_allocator.h:110
#18 _M_deallocate (this=<optimized out>, __n=<optimized out>, __p=<optimized out>) at /usr/include/c++/4.8.2/bits/stl_vector.h:174
#19 ~_Vector_base (this=0x7fffffffbf90, __in_chrg=<optimized out>) at /usr/include/c++/4.8.2/bits/stl_vector.h:160
#20 ~vector (this=0x7fffffffbf90, __in_chrg=<optimized out>) at /usr/include/c++/4.8.2/bits/stl_vector.h:416
#21 CGAL::Triangulation_data_structure_3<CGAL::Fixed_alpha_shape_vertex_base_3<CGAL::Regular_triangulation_euclidean_traits_3<CGAL::Epick, double, true>, CGAL::Triangulation_vertex_base_3<CGAL::Regular_triangulation_euclidean_traits_3<CGAL::Epick, double, true>, CGAL::Triangulation_ds_vertex_base_3<void> > >, CGAL::Fixed_alpha_shape_cell_base_3<CGAL::Regular_triangulation_euclidean_traits_3<CGAL::Epick, double, true>, CGAL::Triangulation_cell_base_3<CGAL::Regular_triangulation_euclidean_traits_3<CGAL::Epick, double, true>, CGAL::Triangulation_ds_cell_base_3<void> > > >::insert_increase_dimension (
this=this@entry=0x7fffffffc3c8, star=...) at /usr/include/CGAL/Triangulation_data_structure_3.h:2520
#22 0x00007ffff74faf23 in CGAL::Triangulation_3<CGAL::Regular_triangulation_euclidean_traits_3<CGAL::Epick, double, true>, CGAL::Triangulation_data_structure_3<CGAL::Fixed_alpha_shape_vertex_base_3<CGAL::Regular_triangulation_euclidean_traits_3<CGAL::Epick, double, true>, CGAL::Triangulation_vertex_base_3<CGAL::Regular_triangulation_euclidean_traits_3<CGAL::Epick, double, true>, CGAL::Triangulation_ds_vertex_base_3<void> > >, CGAL::Fixed_alpha_shape_cell_base_3<CGAL::Regular_triangulation_euclidean_traits_3<CGAL::Epick, double, true>, CGAL::Triangulation_cell_base_3<CGAL::Regular_triangulation_euclidean_traits_3<CGAL::Epick, double, true>, CGAL::Triangulation_ds_cell_base_3<void> > > > >::insert_outside_affine_hull (this=this@entry=0x7fffffffc3c0, p=...)
at /usr/include/CGAL/Triangulation_3.h:3180
#23 0x00007ffff755aeb4 in CGAL::Triangulation_3<CGAL::Regular_triangulation_euclidean_traits_3<CGAL::Epick, double, true>, CGAL::Triangulation_data_structure_3<CGAL::Fixed_alpha_shape_vertex_base_3<CGAL::Regular_triangulation_euclidean_traits_3<CGAL::Epick, double, true>, CGAL::Triangulation_vertex_base_3<CGAL::Regular_triangulation_euclidean_traits_3<CGAL::Epick, double, true>, CGAL::Triangulation_ds_vertex_base_3<void> > >, CGAL::Fixed_alpha_shape_cell_base_3<CGAL::Regular_triangulation_euclidean_traits_3<CGAL::Epick, double, true>, CGAL::Triangulation_cell_base_3<CGAL::Regular_triangulation_euclidean_traits_3<CGAL::Epick, double, true>, CGAL::Triangulation_ds_cell_base_3<void> > > > >::insert_in_conflict<CGAL::Regular_triangulation_3<CGAL::Regular_triangulation_euclidean_traits_3<CGAL::Epick, double, true>, CGAL::Triangulation_data_structure_3<CGAL::Fixed_alpha_shape_vertex_base_3<CGAL::Regular_triangulation_euclidean_traits_3<CGAL::Epick, double, true>, CGAL::Triangulation_vertex_base_3<CGAL::Regular_triangulation_euclidean_traits_3<CGAL::Epick, double, true>, CGAL::Triangulation_ds_vertex_base_3<void> > >, CGAL::Fixed_alpha_shape_cell_base_3<CGAL::Regular_triangulation_euclidean_traits_3<CGAL::Epick, double, true>, CGAL::Triangulation_cell_base_3<CGAL::Regular_triangulation_euclidean_traits_3<CGAL::Epick, double, true>, CGAL::Triangulation_ds_cell_base_3<void> > > > >::Conflict_tester_2, CGAL::Regular_triangulation_3<CGAL::Regular_triangulation_euclidean_traits_3<CGAL::Epick, double, true>, CGAL::Triangulation_data_structure_3<CGAL::Fixed_alpha_shape_vertex_base_3<CGAL::Regular_triangulation_euclidean_traits_3<CGAL::Epick, double, true>, CGAL::Triangulation_vertex_base_3<CGAL::Regular_triangulation_euclidean_traits_3<CGAL::Epick, double, true>, CGAL::Triangulation_ds_vertex_base_3<void> > >, CGAL::Fixed_alpha_shape_cell_base_3<CGAL::Regular_triangulation_euclidean_traits_3<CGAL::Epick, double, true>, CGAL::Triangulation_cell_base_3<CGAL::Regular_triangulation_euclidean_traits_3<CGAL::Epick, double, true>, CGAL::Triangulation_ds_cell_base_3<void> > > > >::Hidden_point_visitor> (this=this@entry=0x7fffffffc3c0, p=..., lt=<optimized out>, 
c=..., li=<optimized out>, tester=..., hider=...) at /usr/include/CGAL/Triangulation_3.h:2958
#24 0x00007ffff7587448 in CGAL::Regular_triangulation_3<CGAL::Regular_triangulation_euclidean_traits_3<CGAL::Epick, double, true>, CGAL::Triangulation_data_structure_3<CGAL::Fixed_alpha_shape_vertex_base_3<CGAL::Regular_triangulation_euclidean_traits_3<CGAL::Epick, double, true>, CGAL::Triangulation_vertex_base_3<CGAL::Regular_triangulation_euclidean_traits_3<CGAL::Epick, double, true>, CGAL::Triangulation_ds_vertex_base_3<void> > >, CGAL::Fixed_alpha_shape_cell_base_3<CGAL::Regular_triangulation_euclidean_traits_3<CGAL::Epick, double, true>, CGAL::Triangulation_cell_base_3<CGAL::Regular_triangulation_euclidean_traits_3<CGAL::Epick, double, true>, CGAL::Triangulation_ds_cell_base_3<void> > > > >::insert (this=this@entry=0x7fffffffc3c0, p=..., lt=<optimized out>, 
c=..., li=<optimized out>, lj=-689630773) at /usr/include/CGAL/Regular_triangulation_3.h:1387
#25 0x00007ffff7489ed1 in insert<__gnu_cxx::__normal_iterator<CGAL::Weighted_point<CGAL::Point_3<CGAL::Epick>, double>*, std::vector<CGAL::Weighted_point<CGAL::Point_3<CGAL::Epick>, double>, std::allocator<CGAL::Weighted_point<CGAL::Point_3<CGAL::Epick>, double> > > > > (last=..., first=..., 
this=0x7fffffffc3c0) at /usr/include/CGAL/Regular_triangulation_3.h:189
#26 Regular_triangulation_3<__gnu_cxx::__normal_iterator<CGAL::Weighted_point<CGAL::Point_3<CGAL::Epick>, double>*, std::vector<CGAL::Weighted_point<CGAL::Point_3<CGAL::Epick>, double>, std::allocator<CGAL::Weighted_point<CGAL::Point_3<CGAL::Epick>, double> > > > > (gt=..., last=..., first=..., 
this=0x7fffffffc3c0) at /usr/include/CGAL/Regular_triangulation_3.h:155
#27 IMP::cgal::internal::get_surface_area_and_volume (ss=...) at /piri1/home/barak/imp_git/repository/modules/cgal/src/internal/union_of_balls.cpp:1898
#28 0x00007ffff7109b09 in IMP::algebra::get_surface_area_and_volume (ss=...) at /piri1/home/barak/imp_git/repository/modules/algebra/src/Sphere3D.cpp:49
#29 0x00007ffff5edb95c in IMP::atom::get_volume (h=...) at /piri1/home/barak/imp_git/repository/modules/atom/src/Selection.cpp:651
#30 0x00007ffff7d4b920 in IMP::npctransport::Statistics::update_fg_stats (this=this@entry=0x664950, stats=stats@entry=0x1da22c0, 
nf_new=nf_new@entry=30679, zr_hist=zr_hist@entry=0x7fffffffc9c0) at /piri1/home/barak/imp_git/repository/modules/npctransport/src/Statistics.cpp:252
#31 0x00007ffff7d4e96e in IMP::npctransport::Statistics::update (this=0x664950, timer=..., nf_new=nf_new@entry=30679)
at /piri1/home/barak/imp_git/repository/modules/npctransport/src/Statistics.cpp:359
#32 0x00007ffff7d508d6 in run_it (silent_statistics=false, max_frames_per_chunk=100000, total_time=<synthetic pointer>, timer=..., number_of_frames=30679, 
sd=0x65fdf0) at /piri1/home/barak/imp_git/repository/modules/npctransport/src/main.cpp:253
#33 IMP::npctransport::do_main_loop (sd=0x65fdf0, init_restraints=...) at /piri1/home/barak/imp_git/repository/modules/npctransport/src/main.cpp:364
#34 0x00000000004154a8 in main (argc=<optimized out>, argv=<optimized out>)
at /piri1/home/barak/imp_git/repository/modules/npctransport/bin/fg_simulation.cpp:279
drussel commented 10 years ago

@Ben needs to patch the g++ c++ lib headers on your machine. It is a bug in the g++ library.

On Mon, Nov 18, 2013 at 2:16 PM, barakr notifications@github.com wrote:

On Fedore, develop revision 7b3bda528509688e9084c6e61ce3f379b9018e7eIn, both on release and debug builds:

I now get a memory error, when running npctransport. It seems to be in _IMP::cgal::internal::get_surface_area_andvolume(), following a call propagated from _atom::getvolume(). What was the solution for Riccardo? This is the log from gdb:

(gdb) backtrace

0 0x00000035b280ca38 in pthread_once () from /lib64/libpthread.so.0

1 https://github.com/salilab/imp/issues/1 0x00000035b2109d1c in

backtrace () from /lib64/libc.so.6

2 https://github.com/salilab/imp/issues/2 0x00000035b2075d34 in

*libc_message () from /lib64/libc.so.6 #3 https://github.com/salilab/imp/issues/3 0x00000035b207e21c in intmalloc () from /lib64/libc.so.6 #4 https://github.com/salilab/imp/issues/4 0x00000035b208002c in malloc () from /lib64/libc.so.6 #5 https://github.com/salilab/imp/issues/5 0x00000035b1c0d379 in dlmap_object_deps () from /lib64/ld-linux-x86-64.so.2 #6 https://github.com/salilab/imp/issues/6 0x00000035b1c138bc in dl_open_worker () from /lib64/ld-linux-x86-64.so.2 #7 https://github.com/salilab/imp/issues/7 0x00000035b1c0f304 in dlcatch_error () from /lib64/ld-linux-x86-64.so.2 #8 https://github.com/salilab/imp/issues/8 0x00000035b1c131eb in dlopen () from /lib64/ld-linux-x86-64.so.2 #9 https://github.com/salilab/imp/issues/9 0x00000035b21305d2 in do_dlopen () from /lib64/libc.so.6 #10 https://github.com/salilab/imp/issues/10 0x00000035b1c0f304 in dlcatch_error () from /lib64/ld-linux-x86-64.so.2 #11 https://github.com/salilab/imp/issues/11 0x00000035b2130692 in libc_dlopen_mode () from /lib64/libc.so.6 #12 https://github.com/salilab/imp/issues/12 0x00000035b2109c05 in init () from /lib64/libc.so.6 #13 https://github.com/salilab/imp/issues/13 0x00000035b280ca40 in pthread_once () from /lib64/libpthread.so.0 #14 https://github.com/salilab/imp/issues/14 0x00000035b2109d1c in backtrace () from /lib64/libc.so.6 #15 https://github.com/salilab/imp/issues/15 0x00000035b2075d34 in __libc_message () from /lib64/libc.so.6 #16 https://github.com/salilab/imp/issues/16 0x00000035b207d0b8 in intfree () from /lib64/libc.so.6 #17 https://github.com/salilab/imp/issues/17 0x00007ffff74eb0d2 in deallocate (this=, p=) at /usr/include/c++/4.8.2/ext/new_allocator.h:110 #18 https://github.com/salilab/imp/issues/18 Mdeallocate (this=, n=, p=) at /usr/include/c++/4.8.2/bits/stl_vector.h:174 #19 https://github.com/salilab/imp/issues/19 ~Vectorbase (this=0x7fffffffbf90, in_chrg=) at /usr/include/c++/4.8.2/bits/stl_vector.h:160 #20 https://github.com/salilab/imp/issues/20 ~vector (this=0x7fffffffbf90, in_chrg=) at /usr/include/c++/4.8.2/bits/stl_vector.h:416 #21 https://github.com/salilab/imp/issues/21 CGAL::Triangulation_data_structure_3, CGAL::Triangulation_vertex_base_3, CGAL::Triangulation_ds_vertex_base_3 > >, CGAL::Fixed_alpha_shape_cell_base_3, CGAL::Triangulation_cell_base_3, CGAL::Triangulation_ds_cell_base_3 > > >::insert_increase_dimension ( this=this@entry=0x7fffffffc3c8, star=...) at /usr/include/CGAL/Triangulation_data_structure_3.h:2520 #22 https://github.com/salilab/imp/issues/22 0x00007ffff74faf23 in CGAL::Triangulation_3, CGAL::Triangulation_data_structure_3, CGAL::Triangulation_vertex_base_3, CGAL::Triangulation_ds_vertex_base_3 >

, CGAL::Fixed_alpha_shape_cell_base_3, CGAL::Triangulation_cell_base_3, CGAL::Triangulation_ds_cell_base_3 > > > >::insert_outside_affine_hull (this=this@entry=0x7fffffffc3c0, p=...) at /usr/include/CGAL/Triangulation_3.h:3180 #23 https://github.com/salilab/imp/issues/23 0x00007ffff755aeb4 in CGAL::Triangulation_3, CGAL::Triangulation_data_structure_3, CGAL::Triangulation_vertex_base_3, CGAL::Triangulation_ds_vertex_base_3 > , CGAL::Fixed_alpha_shape_cell_base_3, CGAL::Triangulation_cell_base_3, CGAL::Triangulation_ds_cell_base_3 > > > >::insert_in_conflict, CGAL::Triangulation_data_structure_3, CGAL::Triangulation_vertex_base_3, CGAL::Triangulation_ds_vertex_base_3 > >, CGAL::Fixed_alpha_shape_cell_base_3, CGAL::Triangulation_cell_base_3, CGAL::Triangulation_ds_cell_base_3 > > > >::Conflict_tester_2, CGAL::Regular_triangulation_3, CGAL::Triangulation_data_structure_3 to continue, or q to quit--- AL::Fixed_alpha_shape_vertex_base_3, CGAL::Triangulation_vertex_base_3, CGAL::Triangulation_ds_vertex_base_3 > , CGAL::Fixed_alpha_shape_cell_base_3, CGAL::Triangulation_cell_base_3, CGAL::Triangulation_ds_cell_base_3 > > > >::Hidden_point_visitor> (this=this@entry=0x7fffffffc3c0, p=..., lt=, c=..., li=, tester=..., hider=...) at /usr/include/CGAL/Triangulation_3.h:2958 #24 https://github.com/salilab/imp/issues/24 0x00007ffff7587448 in CGAL::Regular_triangulation_3, CGAL::Triangulation_data_structure_3, CGAL::Triangulation_vertex_base_3, CGAL::Triangulation_ds_vertex_base_3 > , CGAL::Fixed_alpha_shape_cell_base_3, CGAL::Triangulation_cell_base_3, CGAL::Triangulation_ds_cell_base_3 > > > >::insert (this=this@entry=0x7fffffffc3c0, p=..., lt=, c=..., li=, lj=-689630773) at /usr/include/CGAL/Regular_triangulation_3.h:1387 #25 https://github.com/salilab/imp/issues/25 0x00007ffff7489ed1 in insert<* gnu_cxx::

_normal_iteratorCGAL::Weighted_point<CGAL::Point3<CGAL::Epick, double>, std::vectorCGAL::Weighted_point<CGAL::Point_3<CGAL::Epick, double>, std::allocatorCGAL::Weighted_point<CGAL::Point_3<CGAL::Epick, double> > > >

(last=..., first=..., this=0x7fffffffc3c0) at /usr/include/CGAL/Regular_triangulation_3.h:189 #26 https://github.com/salilab/imp/issues/26 Regular_triangulation_3< gnu_cxx::__normal_iteratorCGAL::Weighted_point<CGAL::Point_3<CGAL::Epick, double>, std::vectorCGAL::Weighted_point<CGAL::Point_3<CGAL::Epick, double>, std::allocatorCGAL::Weighted_point<CGAL::Point_3<CGAL::Epick, double> > > > > (gt=..., last=..., first=..., this=0x7fffffffc3c0) at /usr/include/CGAL/Regular_triangulation_3.h:155

27 https://github.com/salilab/imp/issues/27IMP::cgal::internal::get_surface_area_and_volume (ss=...) at

/piri1/home/barak/imp_git/repository/modules/cgal/src/internal/union_of_balls.cpp:1898

28 https://github.com/salilab/imp/issues/28 0x00007ffff7109b09 in

IMP::algebra::get_surface_area_and_volume (ss=...) at /piri1/home/barak/imp_git/repository/modules/algebra/src/Sphere3D.cpp:49

29 https://github.com/salilab/imp/issues/29 0x00007ffff5edb95c in

IMP::atom::get_volume (h=...) at /piri1/home/barak/imp_git/repository/modules/atom/src/Selection.cpp:651

30 https://github.com/salilab/imp/issues/30 0x00007ffff7d4b920 in

IMP::npctransport::Statistics::update_fg_stats (this=this@entry=0x664950, stats=stats@entry=0x1da22c0, nf_new=nf_new@entry=30679, zr_hist=zr_hist@entry=0x7fffffffc9c0) at /piri1/home/barak/imp_git/repository/modules/npctransport/src/Statistics.cpp:252

31 https://github.com/salilab/imp/issues/31 0x00007ffff7d4e96e in

IMP::npctransport::Statistics::update (this=0x664950, timer=..., nf_new=nf_new@entry=30679) at /piri1/home/barak/imp_git/repository/modules/npctransport/src/Statistics.cpp:359

32 https://github.com/salilab/imp/issues/32 0x00007ffff7d508d6 in

run_it (silent_statistics=false, max_frames_per_chunk=100000, total_time=, timer=..., number_of_frames=30679, sd=0x65fdf0) at /piri1/home/barak/imp_git/repository/modules/npctransport/src/main.cpp:253

33 https://github.com/salilab/imp/issues/33IMP::npctransport::do_main_loop (sd=0x65fdf0, init_restraints=...) at

/piri1/home/barak/imp_git/repository/modules/npctransport/src/main.cpp:364

34 https://github.com/salilab/imp/issues/34 0x00000000004154a8 in main

(argc=, argv=) at /piri1/home/barak/imp_git/repository/modules/npctransport/bin/fg_simulation.cpp:279

— Reply to this email directly or view it on GitHubhttps://github.com/salilab/imp/issues/615 .