[cgma-dev] CGMA check for *64-acis* failed.

Steve Jackson sjackson at cae.wisc.edu
Thu Sep 24 15:10:05 CDT 2009


Last night's iGeom test cases failed for ACIS, not OCC, suggesting a hitherto 
unknown issue.  Below is what I've been able to learn about the crash after a 
bit of investigation.  (Tim, if you want me to look into this further, please 
let me know.)

The crash occurs in testgeom.cc's construct_test() function, when an entity
is swept about an axis.  On my machine, the crash only happens when the ACIS
debugging libraries are used-- there is no segfault caused under the release
libraries, although valgrind does detect some possible memory corruption.
This test has been in CGM for quite a while (since before nightly builds were
regularly failing), so it's possible that it was passing before because
the debug libraries weren't being used.  

Below is the valgrind output for the crash under the debug libraries, leading
to the segfault.  
~S


sjackson at kermit:/local.hd/cnergg/sjackson/CGM-build/itaps> valgrind ./testgeom
==9190== Memcheck, a memory error detector.
==9190== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==9190== Using LibVEX rev 1854, a library for dynamic binary translation.
==9190== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==9190== Using valgrind-3.3.1-Debian, a dynamic binary instrumentation framework.
==9190== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==9190== For more details, rerun with: -v
==9190== 
Using default input file: ../../CGM-fresh/itaps/testgeom.sat
Geometry engine set to: ACIS Version 16.0.7.0


ITAPS GEOMETRY INTERFACE TEST PROGRAM:

   gLoad: Read 1 ACIS Entities from the input file


Constructed 1 Volume: 1
Model contents: 
vertices: 36
edges: 60
faces: 33
regions: 1
Success
   tags: Tags defined on model: GLOBAL_ID, NAME
Success
   gentity sets: Success
   topology adjacencies: Success
==9190== Invalid read of size 8
==9190==    at 0x4820C2: FACE::shell() const (face.hxx:561)
==9190==    by 0x4B99EF: AcisQueryEngine::get_BODY_of_ENTITY(FACE*) const (AcisQueryEngine.cpp:2615)
==9190==    by 0x46FEA5: AcisModifyEngine::sweep_rotational(DLIList<GeometryEntity*>&, DLIList<BodySM*>&, CubitVector const&, CubitVector const&, double, int, double, int, bool, bool, bool, Surface*, BodySM*) const (AcisModifyEngine.cpp:8403)
==9190==    by 0x673820: GeometryModifyTool::sweep_rotational(DLIList<RefEntity*>&, CubitVector const&, CubitVector const&, double, int, double, int, bool, bool, bool) (GeometryModifyTool.cpp:2872)
==9190==    by 0x429F3A: igeom_sweepentaboutaxis_ (iGeom_CGMA.cc:5152)
==9190==    by 0x419054: construct_test(iGeom_Instance_Private*) (testgeom.cc:981)
==9190==    by 0x41C858: main (testgeom.cc:212)
==9190==  Address 0x94fae00 is 64 bytes inside a block of size 112 free'd
==9190==    at 0x4C2130F: free (vg_replace_malloc.c:323)
==9190==    by 0x82EDC39: acis_discard_debug(void*, AcisMemCall, unsigned long) (mmgr.cpp:632)
==9190==    by 0x481709: ACIS_OBJECT::operator delete(void*, unsigned long) (mmgr.hxx:849)
==9190==    by 0x6D25CF3: FACE::~FACE() (face.cpp:543)
==9190==    by 0x698FF45: BULLETIN::~BULLETIN() (bulletin.cpp:2844)
==9190==    by 0x698D94A: BULLETIN_BOARD::~BULLETIN_BOARD() (bulletin.cpp:1913)
==9190==    by 0x698B97C: DELTA_STATE::~DELTA_STATE() (bulletin.cpp:1182)
==9190==    by 0x6991FC4: open_bulletin_board(int) (bulletin.cpp:3748)
==9190==    by 0x6846C49: api_bb_begin(int) (bbbegin.cpp:89)
==9190==    by 0x48ACF9: api_bb_save::api_bb_save(outcome&, api_bb_save::e_bb_type) (api.hxx:480)
==9190==    by 0x7538701: api_set_int_option(char const*, int) (setintop.cpp:106)
==9190==    by 0x45FA42: AcisModifyEngine::sweep_FACE_about_axis(FACE*&, CubitVector const&, CubitVector const&, double, bool&, bool, int, double, int, bool, FACE*, BODY*) const (AcisModifyEngine.cpp:3149)
==9190== 
==9190== Invalid read of size 8
==9190==    at 0x4823E0: SHELL::lump() const (shell.hxx:441)
==9190==    by 0x4B99AF: AcisQueryEngine::get_BODY_of_ENTITY(SHELL*) const (AcisQueryEngine.cpp:2609)
==9190==    by 0x4B99FB: AcisQueryEngine::get_BODY_of_ENTITY(FACE*) const (AcisQueryEngine.cpp:2615)
==9190==    by 0x46FEA5: AcisModifyEngine::sweep_rotational(DLIList<GeometryEntity*>&, DLIList<BodySM*>&, CubitVector const&, CubitVector const&, double, int, double, int, bool, bool, bool, Surface*, BodySM*) const (AcisModifyEngine.cpp:8403)
==9190==    by 0x673820: GeometryModifyTool::sweep_rotational(DLIList<RefEntity*>&, CubitVector const&, CubitVector const&, double, int, double, int, bool, bool, bool) (GeometryModifyTool.cpp:2872)
==9190==    by 0x429F3A: igeom_sweepentaboutaxis_ (iGeom_CGMA.cc:5152)
==9190==    by 0x419054: construct_test(iGeom_Instance_Private*) (testgeom.cc:981)
==9190==    by 0x41C858: main (testgeom.cc:212)
==9190==  Address 0x7ff77ff77ff78047 is not stack'd, malloc'd or (recently) free'd
==9190== 
==9190== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==9190==  General Protection Fault
==9190==    at 0x4823E0: SHELL::lump() const (shell.hxx:441)
==9190==    by 0x4B99AF: AcisQueryEngine::get_BODY_of_ENTITY(SHELL*) const (AcisQueryEngine.cpp:2609)
==9190==    by 0x4B99FB: AcisQueryEngine::get_BODY_of_ENTITY(FACE*) const (AcisQueryEngine.cpp:2615)
==9190==    by 0x46FEA5: AcisModifyEngine::sweep_rotational(DLIList<GeometryEntity*>&, DLIList<BodySM*>&, CubitVector const&, CubitVector const&, double, int, double, int, bool, bool, bool, Surface*, BodySM*) const (AcisModifyEngine.cpp:8403)
==9190==    by 0x673820: GeometryModifyTool::sweep_rotational(DLIList<RefEntity*>&, CubitVector const&, CubitVector const&, double, int, double, int, bool, bool, bool) (GeometryModifyTool.cpp:2872)
==9190==    by 0x429F3A: igeom_sweepentaboutaxis_ (iGeom_CGMA.cc:5152)
==9190==    by 0x419054: construct_test(iGeom_Instance_Private*) (testgeom.cc:981)
==9190==    by 0x41C858: main (testgeom.cc:212)
   construct: ==9190== 
==9190== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 8 from 1)
==9190== malloc/free: in use at exit: 1,054,249 bytes in 4,912 blocks.
==9190== malloc/free: 19,989 allocs, 15,077 frees, 2,027,078 bytes allocated.
==9190== For counts of detected errors, rerun with: -v
==9190== searching for pointers to 4,912 not-freed blocks.
==9190== checked 2,419,312 bytes.
==9190== 
==9190== LEAK SUMMARY:
==9190==    definitely lost: 0 bytes in 0 blocks.
==9190==      possibly lost: 594 bytes in 15 blocks.
==9190==    still reachable: 1,053,655 bytes in 4,897 blocks.
==9190==         suppressed: 0 bytes in 0 blocks.
==9190== Rerun with --leak-check=full to see details of leaked memory.
Segmentation fault


More information about the cgma-dev mailing list