[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#983860: segfaults because tries to use non-free kernels



Package: intel-media-va-driver
Version: 21.1.1+dfsg1-1
Severity: important

On my CPU iHD_drv_video.so segfaults when decoding an MP4 movie. I can for
example reproduce it by installing gstreamer1.0-vaapi and running:

$ gst-launch-1.0 playbin uri=https://test-
videos.co.uk/vids/bigbuckbunny/mp4/h264/360/Big_Buck_Bunny_360_10s_1MB.mp4

Gdb shows this backtrace (truncated, because it's more than 100 frames,
and the interesting ones are at the top):

#0  KernelDll_AllocateStates(void*, uint32_t, void*, uint32_t, Kdll_RuleEntry
const*, void (*)(PKdll_State)) (pKernelBin=pKernelBin@entry=0x7fffd42e59f0,
uKernelSize=0x0, pFcPatchCache=pFcPatchCache@entry=0x0,
uFcPatchCacheSize=<optimized out>, pDefaultRules=0x0,
ModifyFunctionPointers=0x0) at
./media_driver/agnostic/common/vp/kdll/hal_kerneldll.c:3350
#1  0x00007fffd296bfdb in VphalRenderer::Initialize(VphalSettings const*, bool)
(this=0x7fffd4327e30, pSettings=0x7ffff1745ac0, isApoEnabled=<optimized out>)
at ./media_driver/agnostic/common/vp/hal/vphal_renderer.cpp:1414
#2  0x00007fffd2952e15 in VphalState::Allocate(VphalSettings const*)
(pVpHalSettings=0x7ffff1745ac0, this=0x7fffd42e23a0) at
./media_driver/agnostic/common/vp/hal/vphal.cpp:146
#3  VphalState::Allocate(VphalSettings const*) (this=0x7fffd42e23a0,
pVpHalSettings=0x7ffff1745ac0) at
./media_driver/agnostic/common/vp/hal/vphal.cpp:75
#4  0x00007fffd2b56105 in DdiVp_InitVpHal(DDI_VP_CONTEXT*)
(pVpCtx=0x7fffd42c1680) at
./media_driver/linux/common/vp/ddi/media_libva_vp.c:1800
#5  0x00007fffd2b5a59f in DdiVp_InitCtx(VADriverContext*, DDI_VP_CONTEXT*)
(pVaDrvCtx=<optimized out>, pVpCtx=0x7fffd42c1680) at
./media_driver/linux/common/vp/ddi/media_libva_vp.c:1660
#6  0x00007fffd2b5a99e in DdiVp_CreateContext(VADriverContext*, unsigned int,
int, int, int, unsigned int*, int, unsigned int*)
(pVaDrvCtx=pVaDrvCtx@entry=0x7fffd4265240, vaConfigID=vaConfigID@entry=0x0,
iWidth=iWidth@entry=0x0, iHeight=iHeight@entry=0x0, iFlag=iFlag@entry=0x0,
vaSurfIDs=vaSurfIDs@entry=0x0, iNumSurfs=0x0, pVaCtxID=0x7ffff1745dec) at
./media_driver/linux/common/vp/ddi/media_libva_vp.c:3109
#7  0x00007fffd2b21be2 in DdiMedia_PutImage(VADriverContext*, unsigned int,
unsigned int, int, int, unsigned int, unsigned int, int, int, unsigned int,
unsigned int) (ctx=0x7fffd4265240, surface=0x0, image=<optimized out>,
src_x=0x0, src_y=0x0, src_width=0x40, src_height=0x40, dest_x=0x0, dest_y=0x0,
dest_width=0x40, dest_height=0x40) at
./media_driver/linux/common/ddi/media_libva.cpp:5407
#8  0x00007ffff006a17c in vaPutImage () at /usr/lib/x86_64-linux-gnu/libva.so.2
#9  0x00007ffff00efb2c in gst_vaapi_surface_put_image
(surface=surface@entry=0x7fffd4252d60, image=image@entry=0x7fffd42742d0) at
../gst-libs/gst/vaapi/gstvaapisurface.c:761
#10 0x00007ffff00ae476 in extract_allowed_surface_formats
(img_formats=0x7fffd425c290, display=0x7fffec0046c0
[GstVaapiDisplay|vaapidisplayglx0]) at ../gst/vaapi/gstvaapipluginbase.c:1451
#11 ensure_allowed_raw_caps (plugin=0x7fffd424e910) at
../gst/vaapi/gstvaapipluginbase.c:1483
#12 gst_vaapi_plugin_base_get_allowed_sinkpad_raw_caps
(plugin=plugin@entry=0x7fffd424e910) at ../gst/vaapi/gstvaapipluginbase.c:1515
#13 0x00007ffff00b567e in ensure_allowed_sinkpad_caps (postproc=0x7fffd424e910)
at ../gst/vaapi/gstvaapipostproc.c:1312
#14 gst_vaapipostproc_transform_caps_impl (direction=<optimized out>,
trans=0x7fffd424e910 [GstBaseTransform|vaapipostproc0]) at
../gst/vaapi/gstvaapipostproc.c:1422
#15 gst_vaapipostproc_transform_caps (trans=0x7fffd424e910
[GstBaseTransform|vaapipostproc0], direction=<optimized out>,
caps=0x7fffd4264ad0, filter=0x7fffd4264c50) at
../gst/vaapi/gstvaapipostproc.c:1445
#16 0x00007ffff67154b3 in gst_base_transform_transform_caps
(trans=trans@entry=0x7fffd424e910 [GstBaseTransform|vaapipostproc0],
direction=GST_PAD_SRC, caps=caps@entry=0x7fffd4264ad0,
filter=filter@entry=0x7fffd4264c50) at ../libs/gst/base/gstbasetransform.c:474
#17 0x00007ffff6718e6d in gst_base_transform_query_caps (filter=0x7fffd4264c50,
pad=0x7fffd41f9840 [GstPad|sink], trans=0x7fffd424e910
[GstBaseTransform|vaapipostproc0]) at ../libs/gst/base/gstbasetransform.c:698
#18 gst_base_transform_default_query (trans=0x7fffd424e910
[GstBaseTransform|vaapipostproc0], direction=<optimized out>,
query=0x7fffd4264ca0) at ../libs/gst/base/gstbasetransform.c:1597
#19 0x00007ffff7eace58 in gst_pad_query (pad=pad@entry=0x7fffd41f9840
[GstPad|sink], query=query@entry=0x7fffd4264ca0) at ../gst/gstpad.c:4144
#20 0x00007ffff7ead5bb in gst_pad_peer_query (pad=pad@entry=0x7fffd41f95f0
[GstPad|src], query=query@entry=0x7fffd4264ca0) at ../gst/gstpad.c:4276

Debugging more in depth, I discovered that pKernelBin and uKernelSize
(parameters
of KernelDll_AllocateStates, frame #0) are not initialized by the caller. The
caller
(VphalRenderer::Initialize in
media_driver/agnostic/common/vp/hal/vphal_renderer.cpp)
should initialize the parameters from VphalRenderer members pcKernelBin and
dwKernelBinSize, but these members are in turn never changed from their default
zero value. Initialization should happen (on my CPU, at least) in
VphalRendererG9::InitKdllParam, but the assignment is disabled because the
macro
_FULL_OPEN_SOURCE is defined.

Of course I am not contesting that non-free kernels are not provided in the
free
version of the package; but if they are not provided, neither should they be
expected by another piece of the code.

Thanks, Giovanni.


-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'unstable'), (500, 'testing'), (1,
'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.10.0-3-amd64 (SMP w/12 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE,
TAINT_UNSIGNED_MODULE
Locale: LANG=it_IT.utf8, LC_CTYPE=it_IT.utf8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages intel-media-va-driver depends on:
ii  libc6                           2.31-9
ii  libgcc-s1                       10.2.1-6
ii  libigdgmm11                     20.4.1+ds1-1
ii  libstdc++6                      10.2.1-6
ii  libva2 [libva-driver-abi-1.10]  2.10.0-1

intel-media-va-driver recommends no packages.

intel-media-va-driver suggests no packages.


Reply to: