From: John P. <pet...@cf...> - 2011-03-14 17:08:32
|
On Mon, Mar 14, 2011 at 11:03 AM, Roy Stogner <roy...@ic...> wrote: > > On Mon, 14 Mar 2011, Boyce Griffith wrote: > >> OK, it looks like this was introduced in r4248. > > Wait: r4248, the revision that moved > libmesh_assert_valid_parallel_ids() to MeshBase?? The default > implementation of that is "{}"; how on earth should that be giving us > a segfault? > > Wait, weirder than that: The only places ever calling that changed > code are in MeshRefinement and InfElemBuilder... and your test example > doesn't even indirectly use either! > > I have no idea what could be going on here. Me neither, other than we might have had a bug lurking for years and some slight change somewhere triggered it. Undefined behavior and all that... I can confirm that Boyce's example runs for me in 4247, and segfaults in 4248. My backtrace is a bit different than his, it doesn't get down into the iterators at all: (gdb) bt #0 0x00007fff85bfcfca in __semwait_signal () #1 0x00007fff85bfce59 in nanosleep () #2 0x00007fff85c49df0 in sleep () #3 0x00000001002e8898 in PetscSleep () at mesh.h:72 #4 0x00000001002c4e64 in PetscAttachDebugger () at mesh.h:72 #5 0x00000001002c4ee5 in PetscAttachDebuggerErrorHandler () at mesh.h:72 #6 0x00000001002c580e in PetscError () at mesh.h:72 #7 0x00000001002c8f10 in PetscDefaultSignalHandler () at mesh.h:72 #8 0x00000001002c8fc5 in PetscSignalHandler_Private () at mesh.h:72 #9 <signal handler called> #10 0x0000000100ab2d8c in libMesh::UnstructuredMesh::find_neighbors (this=0x7fff5fbfed10, reset_remote_elements=false, reset_current_list=true) at src/mesh/unstructured_mesh.C:201 #11 0x00000001009906d3 in libMesh::MeshBase::prepare_for_use (this=0x7fff5fbfed10, skip_renumber_nodes_and_elements=false) at src/mesh/mesh_base.C:98 #12 0x00000001009e3186 in libMesh::MeshTools::Generation::build_cube (mesh=@0x7fff5fbfed10, nx=2, ny=2, nz=0, xmin=0, xmax=1, ymin=0, ymax=1, zmin=0, zmax=0, type=libMeshEnums::QUAD4, gauss_lobatto_grid=false) at src/mesh/mesh_generation.C:1438 #13 0x00000001009e3219 in libMesh::MeshTools::Generation::build_square (mesh=@0x7fff5fbfed10, nx=2, ny=2, xmin=0, xmax=1, ymin=0, ymax=1, type=libMeshEnums::QUAD4, gauss_lobatto_grid=false) at src/mesh/mesh_generation.C:1501 #14 0x0000000100002f12 in main (argc=2, argv=0x7fff5fbfedb0) at boyce_bug.cc:26 -- John |