Crash in MFXClose()

Crash in MFXClose()

Hi,

I'm running simple_transcode_opaque_async_vppresize (from mediasdk-tutorials-0.0.3) with an H264 ES extracted from this file: http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x1.... I'm passing -b 500 -f 24/1 to the program.

Here is the stack trace:

Program received signal SIGSEGV, Segmentation fault.
0x00007fffefe2812d in ?? () from /opt/intel/mediasdk/lib64/iHD_drv_video.so
(gdb) bt
#0  0x00007fffefe2812d in ?? () from /opt/intel/mediasdk/lib64/iHD_drv_video.so
#1  0x00007fffefc24097 in ?? () from /opt/intel/mediasdk/lib64/iHD_drv_video.so
#2  0x00007fffef4a8b79 in CmDevice_RT::OSALExtensionExecution(unsigned int, void*, unsigned int, void**, unsigned int) ()
   from /opt/intel/common/mdf/lib64/igfxcmrt64.so
#3  0x00007fffef4acda3 in CmDevice_RT::Destroy(CmDevice_RT*&) () from /opt/intel/common/mdf/lib64/igfxcmrt64.so
#4  0x00007fffef4ad567 in DestroyCmDevice () from /opt/intel/common/mdf/lib64/igfxcmrt64.so
#5  0x00007ffff59d0256 in ?? () from /opt/intel/mediasdk/lib64/libmfxhw64-p.so.1.16
#6  0x00007ffff59b8321 in ?? () from /opt/intel/mediasdk/lib64/libmfxhw64-p.so.1.16
#7  0x00007ffff59c8e8c in ?? () from /opt/intel/mediasdk/lib64/libmfxhw64-p.so.1.16
#8  0x00007ffff59c8ff9 in ?? () from /opt/intel/mediasdk/lib64/libmfxhw64-p.so.1.16
#9  0x00007ffff59b598a in ?? () from /opt/intel/mediasdk/lib64/libmfxhw64-p.so.1.16
#10 0x00007ffff59b59de in ?? () from /opt/intel/mediasdk/lib64/libmfxhw64-p.so.1.16
#11 0x00007ffff59b5d09 in ?? () from /opt/intel/mediasdk/lib64/libmfxhw64-p.so.1.16
#12 0x00007ffff59acf1a in MFXClose () from /opt/intel/mediasdk/lib64/libmfxhw64-p.so.1.16
#13 0x000000000040d77d in MFX_DISP_HANDLE::UnLoadSelectedDLL() ()
#14 0x000000000040d7e9 in MFX_DISP_HANDLE::Close() ()
#15 0x000000000040a8b2 in MFXClose ()
#16 0x00000000004048d8 in MFXVideoSession::Close (this=0x7fffffffe220) at /opt/intel/mediasdk/include/mfxvideo++.h:50
#17 0x00000000004047d9 in MFXVideoSession::~MFXVideoSession (this=0x7fffffffe220, __in_chrg=<optimized out>)
    at /opt/intel/mediasdk/include/mfxvideo++.h:43
#18 0x000000000040472d in main (argc=7, argv=0x7fffffffe3b8) at src/simple_transcode_opaque_async_vppresize.cpp:695
(gdb) 

System details:

1) Centos 7.1.1503
2) i7-5650U CPU @ 2.20GHz
3) Packages:
  A) intel-linux-media-16.4.2.1-39163.el7.x86_64
  B) intel-gpu-tools-2.99.916-5.el7.x86_64
  C) intel-opencl-1.2-16.4-39163.el7.x86_64

Besides this crash, I ran the sample in valgrind, & there are a lot of invalid reads & writes reported by it. I can attach the log file, if it'll help in debugging further.

Please help!

/shastri 

Thread Topic: 

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

Update: Happens only with the hardware mode. Software mode is clean.

Hi,

Did you get an answer of more info for your problem? Actually, I get the same problem with the Media SDK 2016 R2 under Windows. Everything works well in software mode but crash 1 time out of 4 in hardware mode. I will test with the new Media SDK 2017 R1.

Benjamin

I didn't, Benjamin.

But thankfully, MSS 2017 R2 doesn't have any such issues.

Do you see this behavior with the samples or just with the tutorials?

The tutorials have some known issues and are in need of an update.  One issue is that behavior like this sometimes happens if you call the Release() function before the session goes out of scope and automatically closes.  As a workaround, you may see that the segfault goes away if you comment out Release().

Do transcodes with sample_multi_transcode work for you?

Hi,

After having done a lot of tests under Windows with the Media SDK 2017 R1, the problem still happens.

When several sessions are running (without join) in my software application, 1% of the time, closing a session will crash the application. It only happens when using DirectX 11 GPU h.264 encoding (no problem with software encoding).

With the latest video drivers from Intel, it seems to happen less often, but still there.

I have tried not to close sessions and only re-create a new encoder in the session and re-allocate frames but the behavior of the encoder changes and it doesn’t seem to re-initialize properly.

Are sessions linked even if not joined? Is there a way to prevent crash by adding some critical sections? Is it possible to delete and re-create an encoder in a session (with new allocated frames)?

Thank you

Benjamin

Leave a Comment

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