MFXClose crash inside std::_Rb_tree_rebalance_for_erase

MFXClose crash inside std::_Rb_tree_rebalance_for_erase

We have experienced Media SDK crash several times around MFXClose funciton, basically when application close, we free the resource and close the SDK session instance by call MFXClose(session). But sometimes it crash inside. the back trace looks like this.  Any suggestion? thx

#0  0x00007fa6f744389c in std::_Rb_tree_rebalance_for_erase(std::_Rb_tree_node_base*, std::_Rb_tree_node_base&) ()
   from /usr/lib64/
(gdb) bt
#0  0x00007fa6f744389c in std::_Rb_tree_rebalance_for_erase(std::_Rb_tree_node_base*, std::_Rb_tree_node_base&) ()
   from /usr/lib64/
#1  0x00007fa6e1933ad9 in ?? () from /opt/intel-media/lib64/
#2  0x00007fa6e19324b7 in ?? () from /opt/intel-media/lib64/
#3  0x00007fa6e19316a3 in ?? () from /opt/intel-media/lib64/
#4  0x00007fa6e195d91c in ?? () from /opt/intel-media/lib64/
#5  0x00007fa6e195d99b in ?? () from /opt/intel-media/lib64/
#6  0x00007fa6e195db39 in ?? () from /opt/intel-media/lib64/
#7  0x00007fa6e1929ca9 in ?? () from /opt/intel-media/lib64/
#8  0x00007fa6e1929d2d in ?? () from /opt/intel-media/lib64/
#9  0x00007fa6e19259ca in MFXClose () from /opt/intel-media/lib64/
#10 0x00007fa6ea0b109d in MFX_DISP_HANDLE::UnLoadSelectedDLL() ()
   from /opt/americandynamics/venvr/lib/gstreamer-0.10/
#11 0x00007fa6ea0b1109 in MFX_DISP_HANDLE::Close() () from /opt/americandynamics/venvr/lib/gstreamer-0.10/
#12 0x00007fa6ea0b072a in MFXClose () from /opt/americandynamics/venvr/lib/gstreamer-0.10/


8 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Thanks for this report.  Could you provide a few more details about your configuration?

  * Which release are you using?  
  * Which processor?
  * Which Linux distro and kernel version? 
Some more details about your application could help too.  I see gstreamer in your trace.  Are there other packages integrated with your application?

Do you see this with any of the sample applications?  Is it possible to show this behavior with a small reproducer?  If so, you can post it here?  If you have any concerns about public posting send me a private message so we can find a way to transfer it.





Here is the answer   

Which release are you using?   :   intel-media-sdk-
Which processor?     Intel(R) Core(TM) i5-4570 CPU @ 3.20GH

Which Linux distro and kernel version?    SUSE Linux Enterprise Server 11 SP3, Kernel version: 3.0.101-

We do use gstreamer as well in our system and here is code looks like:

class IntelSDK{

public: IntelSDK();


   mfxSesssion  m_mfxSession;



 mfxVersion ver = {{0, 1}};
    mfxStatus sts = MFXInit(MFX_IMPL_HARDWARE_ANY, &ver, &m_mfxSession);
    if (MFX_ERR_NONE == sts)
        sts = MFXQueryVersion(m_mfxSession, &ver);
    if (MFX_ERR_NONE != sts)
        throw runtime_error("Unable to initialize Intel Media SDK session");




When we create the application the IntelSDK class get initialized, and when we delete this object, the MFXClose function get called. We do a testing when allocate and delete this IntelSDK object with 3 seconds interval and in the overnight testing, it crash few times.









Thank you for the details.  Have you tried the latest release (16.3.15249) yet?  Every release includes new features as well as bug fixes.  Some similar issues have been taken care of.  I'll investigate more and get back to you.

we try the latest release but one Hardware engineer said it is not work well on the certain hardware platform, that why we still use old version.

So far I have not been able to reproduce with current versions.  Could you tell me a little bit more about the problems you've encountered with the newer versions which do not occur with older releases?  In general, the releases are expected to move forward -- we would definitely like to hear about any possible regressions.

Regards, Jeff

Hi Jeff:  Thanks for your effort,  at moment, we havn't upgrade our system to the latest SDK since we find certain platform is not supported by the latest release ( i3  I remember). That's why we stuck with the older release which come across this issue. I will let you know if we decide to use the latest release and retest it.


While there is an ongoing thread about i3-4130 this does not apply to all i3 systems.  Additional PCIids have been added, none have been removed.  If your i3 works with a previous release it should work with the current one too.

Leave a Comment

Please sign in to add a comment. Not a member? Join today