Subject: CGAL users discussion list
List archive
- From: Sebastien Loriot <>
- To:
- Subject: Re: [cgal-discuss] ARAP_parameterizer_3/Eigen crash when launched in parallel
- Date: Fri, 3 Dec 2021 15:37:49 +0100
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-data: A9a23:dovbxKAlK8GBXhVW/0Xiw5YqxClBgxIJ4g17XOLfBQPt0Wkk3zFRnzZJWG+OO/fcYWuhfN5xbYS39kgE65Skm99gGjLY11k9FiMQ8ZKt6fexdxqrYXvKdqUvdK/WhiknQoGowPscEzmM+X9BDpC79SMljPvQHeKlYAL5EnkZqTFMGH9JZS1LwLZRbr5A2bBVMivV0T/Ai5W31GyNh1aYBlkpB5er83uDihhdVAQw5TTSbdgT1LPXeuJ84Jg3fcldJFOgKmVY83LTegrN8F251juxExYFD9qklvP2fhRPTOOOeweJjXVSVu6phR0qSi4aiP5qcqpBLx0P23PUw7idy/0V3XC0YRwtObfNn/hbVh1wHCR3PKkA87jCSZS6mZzJlBKdIyuEL/JGVRlqZ+X04N1fCm5H8bkUKSsGcwuYr/mnxaqyDOhqnMUqasfxVL7zEFl0lWSDS6kyGMWbBf3ev4oAmm1h15laRqOGIZcNNm9GcjDrZjljOnM2AbQChsOWh1zrKmUN8QnR/b5fD3P7yQVw1P3gPIOQdIHWA8pSmUmcqyTN+GGRP/3TD/THoRLtz55mrrSnceLHtIMu+HmQ8/drhBieyjVWBkBKE1S8pva9hwi1XNc3x4k8ksYxhfBayaBpZoCVs96ETLqssRsVWt4WGOo/gO1I4rSB+B6XXwDoURYYAOHLd6YKqfgC2VqAntevDjtq2FFQYRpx6Z/MxQ6P1eMpwaPuqMPKocbpIzUunW3rsi/ycw==
- Ironport-hdrordr: A9a23:hZghLa5OgCxiqM9LTwPXwMPXdLJyesId70hD6qm+c3Bom62j9/xG885x6faZslwssRIb+OxoWpPufZq0z/cc3WB7B9mftXzdyQ6VxfZZnO/fKlPbdhEWjtQtt5uIJJIOa+H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H3qtYHC2YD+AQkH8Lwj1jXajNZbm2uXq86rhU8EoOhEc+XXYSqmr2GwGG+GrVZY2lHDhaHFnK+JNbMYOsFdC/HepwpqTcDT7X0E+fJMDmhsQb7z/xsKe+GokXwWrrs0dF046vYkhRgrFSc7uyY2mCJCmx4xyYGGmNw06d4rkhwjFyE1Pog68E=
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
- [cgal-discuss] ARAP_parameterizer_3/Eigen crash when launched in parallel, Sebastien Tourneux, 12/02/2021
- Re: [cgal-discuss] ARAP_parameterizer_3/Eigen crash when launched in parallel, Sebastien Tourneux, 12/02/2021
- Re: [cgal-discuss] ARAP_parameterizer_3/Eigen crash when launched in parallel, Sebastien Loriot, 12/03/2021
- Re: [cgal-discuss] ARAP_parameterizer_3/Eigen crash when launched in parallel, Sebastien Tourneux, 12/14/2021
Archive powered by MHonArc 2.6.19+.