#246 Core Dump with mged 'solids' Command

crash or data loss
closed-fixed
7
2010-04-08
2010-03-22
Tom Browder
No

Note: This was originally filed as "Support Request ID: 2972089".

In mged, the command "solids solids.txt spool" (where 'spool' is the object
of interest) resutls in a seg fault. See stack trace attached.

I inserted some debug print statements in vls.c and noted that the size of
vp->vls_max just before the memcpy was -360364840. A brief glance at the
code failed to reveal to me how that could happen. It also seems that the
size variables in struct bu_vls ought to be of unsigned type. I can send
the .g file, but it's 551Kb bzipped.

The dump occurs with version 7.16.6 as well as the trunk. I'm running
Ubuntu 9.10 64-bit.

Discussion

  • Tom Browder

    Tom Browder - 2010-03-22

    stack trace afte seg fault

     
  • Sean Morrison

    Sean Morrison - 2010-04-06

    Tom, I see the session script with the debug statements, but not an actual stack trace. Is there an attachment missing? You can generate the stack trace with gdb as follows:

    tbrowde@bigtom: ~/Downloads/kather$ gdb --args mged -c tst1.g
    run
    [ get it to crash ]
    bt
    [ copy-paste backtrace or attach ]

    The very large vp->vls_len and negative vp->vls_max are probably just signs of corrupted memory, which occurred sometime earlier. Having the backtrace should help identify where.

    Also, sending the actual .g sounds great! Feel free to e-mail or attach.

     
  • Sean Morrison

    Sean Morrison - 2010-04-06
    • priority: 5 --> 7
    • assigned_to: nobody --> brlcad
    • status: open --> pending
     
  • Tom Browder

    Tom Browder - 2010-04-07

    Stack trace from the core dump.

     
  • Tom Browder

    Tom Browder - 2010-04-07

    Hm, the stack trace wasn't--it's attached now.

     
  • Tom Browder

    Tom Browder - 2010-04-07
    • status: pending --> open
     
  • Tom Browder

    Tom Browder - 2010-04-07

    The TGM file.

     
  • Tom Browder

    Tom Browder - 2010-04-07

    The TGM is now attached.

     
  • Tom Browder

    Tom Browder - 2010-04-07

    Note that the core dump does not produce a log file.

     
  • Sean Morrison

    Sean Morrison - 2010-04-08

    Outstanding. With that stack trace in hand, I believe I found the cause of the bug. Testing a fix now.

     
  • Sean Morrison

    Sean Morrison - 2010-04-08

    This should be now fixed as of r38382 and will be in the upcoming 7.16.8 release. Thanks for the outstanding detail, Tom!

     
  • Sean Morrison

    Sean Morrison - 2010-04-08
    • status: open --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks