ubuntu debug build crashing

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
TheMarkster
Veteran
Posts: 5513
Joined: Thu Apr 05, 2018 1:53 am

ubuntu debug build crashing

Post by TheMarkster »

This is on Ubuntu 18.04 running inside a virtual box vm. Host OS is windows 10, 64 bit, 16 gb ram, ati 4550.

OS: Ubuntu 18.04.1 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.14267 (Git)
Build type: DEBUG
Branch: master
Hash: f99940ff1943a8985d76b339ea973191b71986b8
Python version: 2.7.15rc1
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)

gdb backtrace:

Code: Select all

(gdb) bt
#0  0x00007ffff26459f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x555555eca428)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1  0x00007ffff26459f3 in __pthread_cond_wait_common (abstime=0x0, mutex=0x555555eca3a8, cond=0x555555eca400) at pthread_cond_wait.c:502
#2  0x00007ffff26459f3 in __pthread_cond_wait (cond=0x555555eca400, mutex=0x555555eca3a8) at pthread_cond_wait.c:655
#3  0x00007ffff352faae in cc_condvar_wait ()
    at /usr/lib/x86_64-linux-gnu/libCoin.so.80
#4  0x00007ffff352f3bb in cc_rwmutex_write_lock ()
    at /usr/lib/x86_64-linux-gnu/libCoin.so.80
#5  0x00007ffff34a4e02 in SoVertexShape::generateAndReadLockNormalCache(SoState*) () at /usr/lib/x86_64-linux-gnu/libCoin.so.80
#6  0x00007ffff346c14a in SoIndexedShape::getVertexData(SoState*, SoCoordinateElement const*&, SbVec3f const*&, int const*&, int const*&, int const*&, int const*&, int&, int, int&) () at /usr/lib/x86_64-linux-gnu/libCoin.so.80
#7  0x00007ffff3464d40 in SoIndexedLineSet::GLRender(SoGLRenderAction*) ()
    at /usr/lib/x86_64-linux-gnu/libCoin.so.80
#8  0x00007fff55755cf1 in PartGui::SoBrepEdgeSet::GLRender(SoGLRenderAction*) (this=0x555555a2a1c0, action=0x555557032820)
    at /home/mwganson/builds/free-cad-code/src/Mod/Part/Gui/SoBrepEdgeSet.cpp:89
#9  0x00007fff55755d73 in PartGui::SoBrepEdgeSet::GLRenderBelowPath(SoGLRenderAc---Type <return> to continue, or q <return> to quit---
tion*) (this=0x555555a2a1c0, action=0x555557032820)
    at /home/mwganson/builds/free-cad-code/src/Mod/Part/Gui/SoBrepEdgeSet.cpp:102
#10 0x00007ffff3434d88 in SoSeparator::GLRenderBelowPath(SoGLRenderAction*) ()
    at /usr/lib/x86_64-linux-gnu/libCoin.so.80
#11 0x00007ffff3434d88 in SoSeparator::GLRenderBelowPath(SoGLRenderAction*) ()
    at /usr/lib/x86_64-linux-gnu/libCoin.so.80
#12 0x00007ffff3421c78 in SoNode::GLRenderS(SoAction*, SoNode*) ()
    at /usr/lib/x86_64-linux-gnu/libCoin.so.80
#13 0x00007ffff31c6a54 in SoAction::traverse(SoNode*) ()
    at /usr/lib/x86_64-linux-gnu/libCoin.so.80
#14 0x00007ffff332c425 in SoChildList::traverse(SoAction*, int, int) ()
    at /usr/lib/x86_64-linux-gnu/libCoin.so.80
#15 0x00007ffff3439acf in SoSwitch::doAction(SoAction*) ()
    at /usr/lib/x86_64-linux-gnu/libCoin.so.80
#16 0x00007ffff3434d88 in SoSeparator::GLRenderBelowPath(SoGLRenderAction*) ()
    at /usr/lib/x86_64-linux-gnu/libCoin.so.80
#17 0x00007ffff3434d88 in SoSeparator::GLRenderBelowPath(SoGLRenderAction*) ()
    at /usr/lib/x86_64-linux-gnu/libCoin.so.80
#18 0x00007ffff7325c9d in Gui::SoFCUnifiedSelection::GLRenderBelowPath(SoGLRenderAction*) (this=0x555556d9f180, action=0x555557032820)
    at /home/mwganson/builds/free-cad-code/src/Gui/SoFCUnifiedSelection.cpp:594
#19 0x00007ffff3434d88 in SoSeparator::GLRenderBelowPath(SoGLRenderAction*) ()
Crash happens if I go to Mesh Design, create a mesh from object, then select any object in the tree view. It's possible it can be reproduced (not sure) by other means, but that method does it every time. If I debug using qtcreator and select interrupt from the debug menu when the crash happens I end up on the last line (inherited::GLRender(action);) in SoBrepEdgeSet.cpp here:

Code: Select all

void SoBrepEdgeSet::GLRender(SoGLRenderAction *action)
{
    if (this->selectionIndex.getNum() > 0)
        renderSelection(action);
    if (this->highlightIndex.getValue() >= 0)
        renderHighlight(action);
    inherited::GLRender(action);
Any ideas? I'm guessing I need to do a dual boot rather than doing it inside the virtualbox vm, but it's just so convenient this way.
wmayer
Founder
Posts: 20324
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: ubuntu debug build crashing

Post by wmayer »

So, this happens only for a Debug build while for a Release build it works normally?
I think it would be good to test this on a native Ubuntu because sometimes the VM causes problems that don't occur in a native environment.
TheMarkster
Veteran
Posts: 5513
Joined: Thu Apr 05, 2018 1:53 am

Re: ubuntu debug build crashing

Post by TheMarkster »

wmayer wrote: Thu Aug 09, 2018 8:33 am So, this happens only for a Debug build while for a Release build it works normally?
I think it would be good to test this on a native Ubuntu because sometimes the VM causes problems that don't occur in a native environment.
I installed the freecad-daily release build after posting this and tried it -- does the same thing -- crashes, too. I should have edited this post to add that information. I have 3 builds in this vm: 1) freecad-daily installed via apt, 2)debug build using unmodified code, and 3) debug build using code I have modified. All exhibit the same behavior. But I think (not absolutely sure) it only happens with creating a mesh from shape, so if I avoid doing that everything seems to work okay.
wmayer
Founder
Posts: 20324
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: ubuntu debug build crashing

Post by wmayer »

But I think (not absolutely sure) it only happens with creating a mesh from shape, so if I avoid doing that everything seems to work okay.
Which of the offered methods do you use? Standard, Mefisto or Netgen?
TheMarkster
Veteran
Posts: 5513
Joined: Thu Apr 05, 2018 1:53 am

Re: ubuntu debug build crashing

Post by TheMarkster »

wmayer wrote: Fri Aug 10, 2018 5:42 pm
But I think (not absolutely sure) it only happens with creating a mesh from shape, so if I avoid doing that everything seems to work okay.
Which of the offered methods do you use? Standard, Mefisto or Netgen?
Happens on both Standard and Mefisto. Netgen option is grayed out (grayed out in all 3 versions, including the daily build -- should this be the case?)
TorstenT
Posts: 2
Joined: Wed Aug 15, 2018 7:08 pm

Re: ubuntu debug build crashing

Post by TorstenT »

Hi All,
Just wanted to confirm that I'm experiencing this as well. Behaviour is exactly as described by OP.
OS:
Ubuntu: 18.04.1
Kernel: 4.15.0-32-generic x86_64
Desktop: MATE 1.20.1

FreeCAD:
OS: Ubuntu 18.04.1 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.14220 (Git)
Build type: None
Branch: master
Hash: 1d81fd66b84af9ef8330ba1f1f6d1c5d6443f0c4
Python version: 2.7.15rc1
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Canada (en_CA)

Regards,
-T
TheMarkster
Veteran
Posts: 5513
Joined: Thu Apr 05, 2018 1:53 am

Re: ubuntu debug build crashing

Post by TheMarkster »

TorstenT wrote: Wed Aug 15, 2018 7:16 pm Hi All,
Just wanted to confirm that I'm experiencing this as well. Behaviour is exactly as described by OP.
You are also inside a virtualbox virtual machine?
TorstenT
Posts: 2
Joined: Wed Aug 15, 2018 7:08 pm

Re: ubuntu debug build crashing

Post by TorstenT »

Sorry for the lack of clarity and delayed response.
I'm not running virtually. This is a direct install. This issue is occurring on two of my systems both with very different HW configurations and two different versions of Ubuntu Mate.
wmayer
Founder
Posts: 20324
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: ubuntu debug build crashing

Post by wmayer »

Fetch the latest changes from the master branch and check if this fixes the issue. Today I merged a related PR
What we have is a deadlock (not a crash) which happens because an explicit function call is needed to unlock an internal cache. On Windows the issue doesn't appear because the used Coin version is built without the option "thread-safe" while it is enabled on Linux platforms.
TheMarkster
Veteran
Posts: 5513
Joined: Thu Apr 05, 2018 1:53 am

Re: ubuntu debug build crashing

Post by TheMarkster »

wmayer wrote: Mon Sep 03, 2018 3:53 pm Fetch the latest changes from the master branch and check if this fixes the issue. Today I merged a related PR
What we have is a deadlock (not a crash) which happens because an explicit function call is needed to unlock an internal cache. On Windows the issue doesn't appear because the used Coin version is built without the option "thread-safe" while it is enabled on Linux platforms.
Yes, this seems to have fixed that issue.

OS: Ubuntu 18.04.1 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.14553 (Git)
Build type: DEBUG
Branch: master
Hash: 11ee021fec2fa415a71d1263dfcaba3f13991207
Python version: 2.7.15rc1
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
Post Reply