Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] ARAP_parameterizer_3/Eigen crash when launched in parallel

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] ARAP_parameterizer_3/Eigen crash when launched in parallel


Chronological Thread 
  • From: Sebastien Tourneux <>
  • To:
  • Subject: Re: [cgal-discuss] ARAP_parameterizer_3/Eigen crash when launched in parallel
  • Date: Tue, 14 Dec 2021 15:29:59 +0100
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-data: A9a23:OwSsRKy8hVSMnQyB04Z6t+eMxCrEfRIJ4+MujC/XYbTApGx33j1UnTAeXW+FPquKMGvxLtpzbt7ipBgA6p7dxoJjOVdlrnsFo1Bi+ZOUX4zBRqvTF3rPdZObFBoPA/3z27AsFehsJpPnjkrrYuiJQUVUj/nSH+OmUbKcYEideCc9IMsfoUI78wIGqtUw6TSJK1vlVeLa+6UzCnf9s9JHGj58B5a4lf9alK+aVAX0EbAJTasjUFf2zxH5BX+ETE27ByOQroJ8RoZWSwtfpYxV8F81/z91Yj+kuqj+N0gaG/jYIAbIgX1TM0SgqkIb/Wprj/x9badaMBYK49mKt4gZJNFlroC3VB0vM7DcsO4AXV9TFCQW0ahuoeeWeSjn7Z37I0ruKCGwnao0XSnaJ7Yw8el+BSRC9OcTNSsWRguSgvq/hrO9UOhlwMo5RPQHlqsL4iQ4i2nNVKN+B8jXGfCSo4JMh2JowJ1aQqPgZu8NMGI6MEuEOkUQakN/5IkWguLtg2mmNTdFphSeoq9f3oQa9yQpuJCFDTYfUo3bLSmUoqqZmo4C13r8RxQKbZqV1DTD+XWp7gMKtUsXR6pKfIBUNNYz6LFQ+oDXIBcLWx2wpvzRZouWRYdEM0JNksYxhfFayaFoJ+URmzWyvXDCtRkZMzaVO4XW9ynVopfpD82l6qTog9KPhBHKdCP7eNDy6mK0og==
  • Ironport-hdrordr: A9a23:Xmkt/aiflpzBdpg9Lj7O9pLfqXBQXs8ji2hC6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+j3WkPoqdPYDwQ5PBCpw+b8E9VwzZgeWGKKAq+BKqzeq16I5uQ1I+mNfoAZojj9K+J2r8Lp2HQ2kFtYcaiy1oYMc1i5GO5nKgOXeynCmNAERFwHtAMlUO3njhW+ViNJYXuvT+po/S08FZigAJrTboqwjvqK2yLtTc4eXXxPFl3ZSSSgTI6DQfpZMEp6w+d/l3kBReHnQZIvkxqpsV2io1KCBuDJ9GsTspexjLCdCMXZiB90/jtxXZ317g==

Sorry for the late answer, I was indeed unintentionally sharing the parametrized between threads. Thanks a lot !


On a side note, when using the ARAP parametrization, I sometimes get a "Border is not simple!" warning that cannot be silenced I think (std::cerr). https://github.com/CGAL/cgal/blob/33fd57c0f117296c3e0708b6652cd5bf9093ac6d/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/MVC_post_processor_3.h#L695

This is unnecessary as we have the return code ERROR_NON_CONVEX_BORDER indicating the problem.

 Thanks again for you answer,

On 12/3/21 3:37 PM, Sebastien Loriot ( via cgal-discuss Mailing List) wrote:
Do you have a minimal example showing the problem?
In particular, I wonder if you have share the parameterization class between threads.

Best regards,

Sebastien.

On 12/2/21 3:57 PM, Sebastien Tourneux wrote:
Hello,

I use ARAP_parameterizer_3 to parametrize a model made of several disconnected parts. I want to parametrize independently each part. When each part is processed sequentially, everything is fine, but when processed in parallel, I got a free/malloc crash (see backtrace below) from an `Eigen::SparseLU::factorize` call from `ARAP_parameterizer_3::parameterize`. I use TBB to handle the parallelization.

I am not sure if it is an actual issue or if ARAP_parameterizer_3 (or Eigen factorize) is not supposed to be launched in parallel. Looking very briefly at the code, I found `output_uvmap` that seems to write to an hardcoded file (I believe), could it be the cause ?

I am using CGAL_VERSION 5.3 (CGAL_GIT_HASH caacd806dc55c61cc68adaad99f2240f00493b29) on Debian 10.

Thanks in advance for you help,

Sébastien Tourneux


Backtrace :

malloc(): mismatching next->prev_size (unsorted)
free(): invalid size
munmap_chunk(): invalid pointer
munmap_chunk(): invalid pointermunmap_chunk(): invalid pointer

double free or corruption (out)
corrupted size vs. prev_size while consolidating
malloc(): invalid next size (unsorted)
munmap_chunk(): invalid pointer
munmap_chunk(): invalid pointer
munmap_chunk(): invalid pointer
free(): corrupted unsorted chunks
double free or corruption (!prev)

Thread 128 "exec" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fff217f7700 (LWP 3382513)]
0x00007fffddd46125 in Eigen::SparseLU<Eigen::SparseMatrix<double, 0, int>, Eigen::COLAMDOrdering<int>  >::factorize(Eigen::SparseMatrix<double, 0, int> const&) () from /path/to/lib/libCgalModel.so
#0  0x00007fffddd46125 in Eigen::SparseLU<Eigen::SparseMatrix<double, 0, int>, Eigen::COLAMDOrdering<int>  >::factorize(Eigen::SparseMatrix<double, 0, int> const&) () at /path/to/lib/libCgalModel.so
#1  0x00007fffde22cb2c in CGAL::Eigen_solver_traits<Eigen::SparseLU<Eigen::SparseMatrix<double, 0, int>, Eigen::COLAMDOrdering<int> >  >::linear_solver(CGAL::Eigen_sparse_matrix<double> const&, CGAL::Eigen_vector<double, -1> const&, CGAL::Eigen_vector<double, -1>&, double&) ()
     at /path/to/lib/libCgalModel.so
#2  0x00007fffde216a95 in CGAL::Surface_mesh_parameterization::Error_code CGAL::Surface_mesh_parameterization::ARAP_parameterizer_3<CGAL::Surface_mesh<CGAL::Point_3<CGAL::Simple_cartesian<double>  > >, CGAL::Surface_mesh_parameterization::Two_vertices_parameterizer_3<CGAL::Surface_mesh<CGAL::Point_3<CGAL::Simple_cartesian<double>  > > >, CGAL::Default>::update_solution<CGAL::Surface_mesh<CGAL::Point_3<CGAL::Simple_cartesian<double>  > >::Property_map<CGAL::SM_Vertex_index, CGAL::Point_2<CGAL::Simple_cartesian<double> > >, CGAL::internal::Dynamic<CGAL::Surface_mesh<CGAL::Point_3<CGAL::Simple_cartesian<double>  > >, CGAL::Surface_mesh<CGAL::Point_3<CGAL::Simple_cartesian<double> >  >::Property_map<CGAL::SM_Vertex_index, int> >, CGAL::internal::Dynamic<CGAL::Surface_mesh<CGAL::Point_3<CGAL::Simple_cartesian<double>  > >, CGAL::Surface_mesh<CGAL::Point_3<CGAL::Simple_cartesian<double> >  >::Property_map<CGAL::SM_Vertex_index, bool> >  >(CGAL::Surface_mesh<CGAL::Point_3<CGAL::Simple_cartesian<double> > > const&, boost::unordered::unordered_set<CGAL::SM_Vertex_index, boost::hash<CGAL::SM_Vertex_index>, std::equal_to<CGAL::SM_Vertex_index>, std::allocator<CGAL::SM_Vertex_index> > const&, boost::associative_property_map<CGAL::Unique_hash_map<CGAL::SM_Halfedge_index, double, boost::hash<CGAL::SM_Halfedge_index>, std::allocator<double> >  >, std::vector<CGAL::Point_2<CGAL::Simple_cartesian<double> >, std::allocator<CGAL::Point_2<CGAL::Simple_cartesian<double> > > > const&, boost::associative_property_map<CGAL::Unique_hash_map<CGAL::SM_Halfedge_index, std::pair<int, int>, boost::hash<CGAL::SM_Halfedge_index>, std::allocator<std::pair<int, int> > > >, boost::associative_property_map<CGAL::Unique_hash_map<CGAL::SM_Face_index, std::pair<double, double>, boost::hash<CGAL::SM_Face_index>, std::allocator<std::pair<double, double> > > >, CGAL::Surface_mesh<CGAL::Point_3<CGAL::Simple_cartesian<double> >  >::Property_map<CGAL::SM_Vertex_index, CGAL::Point_2<CGAL::Simple_cartesian<double> > >, CGAL::internal::Dynamic<CGAL::Surface_mesh<CGAL::Point_3<CGAL::Simple_cartesian<double>  > >, CGAL::Surface_mesh<CGAL::Point_3<CGAL::Simple_cartesian<double> >  >::Property_map<CGAL::SM_Vertex_index, int> >, CGAL::internal::Dynamic<CGAL::Surface_mesh<CGAL::Point_3<CGAL::Simple_cartesian<double>  > >, CGAL::Surface_mesh<CGAL::Point_3<CGAL::Simple_cartesian<double> >  >::Property_map<CGAL::SM_Vertex_index, bool> >, CGAL::Eigen_sparse_matrix<double> const&) ()
     at /path/to/lib/libCgalModel.so
#3  0x00007fffde2139b5 in CGAL::Surface_mesh_parameterization::Error_code CGAL::Surface_mesh_parameterization::ARAP_parameterizer_3<CGAL::Surface_mesh<CGAL::Point_3<CGAL::Simple_cartesian<double>  > >, CGAL::Surface_mesh_parameterization::Two_vertices_parameterizer_3<CGAL::Surface_mesh<CGAL::Point_3<CGAL::Simple_cartesian<double>  > > >, CGAL::Default>::parameterize<CGAL::Surface_mesh<CGAL::Point_3<CGAL::Simple_cartesian<double>  > >::Property_map<CGAL::SM_Vertex_index, CGAL::Point_2<CGAL::Simple_cartesian<double> > >, CGAL::internal::Dynamic<CGAL::Surface_mesh<CGAL::Point_3<CGAL::Simple_cartesian<double>  > >, CGAL::Surface_mesh<CGAL::Point_3<CGAL::Simple_cartesian<double> >  >::Property_map<CGAL::SM_Vertex_index, int> >, CGAL::internal::Dynamic<CGAL::Surface_mesh<CGAL::Point_3<CGAL::Simple_cartesian<double>  > >, CGAL::Surface_mesh<CGAL::Point_3<CGAL::Simple_cartesian<double> >  >::Property_map<CGAL::SM_Vertex_index, bool> >  >(CGAL::Surface_mesh<CGAL::Point_3<CGAL::Simple_cartesian<double> > >&, CGAL::SM_Halfedge_index, CGAL::Surface_mesh<CGAL::Point_3<CGAL::Simple_cartesian<double> >  >::Property_map<CGAL::SM_Vertex_index, CGAL::Point_2<CGAL::Simple_cartesian<double> > >, CGAL::internal::Dynamic<CGAL::Surface_mesh<CGAL::Point_3<CGAL::Simple_cartesian<double>  > >, CGAL::Surface_mesh<CGAL::Point_3<CGAL::Simple_cartesian<double> >  >::Property_map<CGAL::SM_Vertex_index, int> >, CGAL::internal::Dynamic<CGAL::Surface_mesh<CGAL::Point_3<CGAL::Simple_cartesian<double>  > >, CGAL::Surface_mesh<CGAL::Point_3<CGAL::Simple_cartesian<double> >  >::Property_map<CGAL::SM_Vertex_index, bool> >) () at /path/to/lib/libCgalModel.so
#4  0x00007fffde210c7d in CGAL::Surface_mesh_parameterization::Error_code CGAL::Surface_mesh_parameterization::parameterize<CGAL::Surface_mesh<CGAL::Point_3<CGAL::Simple_cartesian<double>  > >, CGAL::Surface_mesh_parameterization::ARAP_parameterizer_3<CGAL::Surface_mesh<CGAL::Point_3<CGAL::Simple_cartesian<double>  > >, CGAL::Surface_mesh_parameterization::Two_vertices_parameterizer_3<CGAL::Surface_mesh<CGAL::Point_3<CGAL::Simple_cartesian<double>  > > >, CGAL::Default>, CGAL::SM_Halfedge_index, CGAL::Surface_mesh<CGAL::Point_3<CGAL::Simple_cartesian<double> >  >::Property_map<CGAL::SM_Vertex_index, CGAL::Point_2<CGAL::Simple_cartesian<double> > >  >(CGAL::Surface_mesh<CGAL::Point_3<CGAL::Simple_cartesian<double> > >&, CGAL::Surface_mesh_parameterization::ARAP_parameterizer_3<CGAL::Surface_mesh<CGAL::Point_3<CGAL::Simple_cartesian<double>  > >, CGAL::Surface_mesh_parameterization::Two_vertices_parameterizer_3<CGAL::Surface_mesh<CGAL::Point_3<CGAL::Simple_cartesian<double>  > > >, CGAL::Default>, CGAL::SM_Halfedge_index, CGAL::Surface_mesh<CGAL::Point_3<CGAL::Simple_cartesian<double> >  >::Property_map<CGAL::SM_Vertex_index, CGAL::Point_2<CGAL::Simple_cartesian<double> > >) () at /path/to/lib/libCgalModel.so




-- 
Sebastien Tourneux
Buf Compagnie - R&D



Archive powered by MHonArc 2.6.19+.

Top of Page