Segfault observed in SystemAssembler
Issue #822
resolved
Just dumping this here now for the record:
fem/test_system_assembler.py::test_facet_assembly
Thread 1 "python" received signal SIGSEGV, Segmentation fault.
dolfin::SystemAssembler::compute_interior_facet_tensor (ufc=..., ufc_cell=...,
coordinate_dofs=..., tensor_required_cell=..., tensor_required_facet=...,
cell=..., local_facet=..., facet_owner=true, cell_integrals=...,
interior_facet_integrals=..., matrix_size=..., vector_size=0,
compute_cell_tensor=...) at ../../dolfin/fem/SystemAssembler.cpp:955
---Type <return> to continue, or q <return> to quit---
955 interior_facet_integrals[form]->enabled_coefficients());
A debugging session is active.
Inferior 1 [process 6606] will be killed.
Quit anyway? (y or n) n
Not confirmed.
(gdb) where
#0 dolfin::SystemAssembler::compute_interior_facet_tensor (ufc=...,
ufc_cell=..., coordinate_dofs=..., tensor_required_cell=...,
tensor_required_facet=..., cell=..., local_facet=..., facet_owner=true,
cell_integrals=..., interior_facet_integrals=..., matrix_size=...,
vector_size=0, compute_cell_tensor=...)
at ../../dolfin/fem/SystemAssembler.cpp:955
#1 0x00007fffdc7fbf20 in dolfin::SystemAssembler::facet_wise_assembly (
tensors=..., ufc=..., data=...,
boundary_values=std::vector of length 1, capacity 1 = {...}, cell_domains=
std::shared_ptr (empty) 0x0,
exterior_facet_domains=std::shared_ptr (empty) 0x0,
interior_facet_domains=std::shared_ptr (empty) 0x0)
at ../../dolfin/fem/SystemAssembler.cpp:737
#2 0x00007fffdc7f7f3a in dolfin::SystemAssembler::assemble (this=0x23560e0, A=
0x23b3b60, b=0x0, x0=0x0) at ../../dolfin/fem/SystemAssembler.cpp:290
#3 0x00007fffdc7f5afa in dolfin::SystemAssembler::assemble (this=0x23560e0, A=
...) at ../../dolfin/fem/SystemAssembler.cpp:68
#4 0x00007fffbf16f690 in _wrap_SystemAssembler_assemble__SWIG_1 (nobjs=2,
swig_obj=0x7fffffff6850) at modulePYTHON_wrap.cxx:27200
#5 0x00007fffbf170367 in _wrap_SystemAssembler_assemble (self=0x7fffbf7abd18,
args=0x7fffee406cc8) at modulePYTHON_wrap.cxx:27451
#6 0x00000000004e172f in PyCFunction_Call ()
The problem seems to be that interior_facet_integrals[1]
on the last line here is nullptr:
// Compute facet contribution to tensor, if required
// Loop over lhs and then rhs facet contributions
for (std::size_t form = 0; form < 2; ++form)
{
// Compute interior facet integral
if (tensor_required_facet[form] && facet_owner)
{
// Update to current pair of cells
ufc[form]->update(cell[0], coordinate_dofs[0], ufc_cell[0],
cell[1], coordinate_dofs[1], ufc_cell[1],
interior_facet_integrals[form]->enabled_coefficients());
Comments (3)
-
reporter -
reporter Fix found and just pushed to https://bitbucket.org/fenics-project/dolfin/pull-requests/336/check-petscvector-errorcodes/diff because it's small and uncontroversial.
-
reporter - changed status to resolved
- Log in to comment
Quite reproducible:
This was with branch martinal/topic-check-petscvector-errorcodes and a Debug build, don't know if that has anything to do with it.