Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Arc A750 (DG2) shows segfault or bus error with raw video from GStreamer ximagesrc (works fine with AMD) #1800

Open
ehfd opened this issue May 12, 2024 · 8 comments
Assignees
Labels
Common memory, surface, ddi

Comments

@ehfd
Copy link

ehfd commented May 12, 2024

Which component impacted?

Encode, Video Processing

Is it regression? Good in old configuration?

No, this issue exist a long time

What happened?

  1. Ubuntu 24.04, Intel Arc A750
  2. Default in Ubuntu 24.04 (Kernel: 6.8.0-31-generic, i915 driver, intel-media-va-driver-non-free 24.1.0+ds1-1, libva 2.20.0), GStreamer 1.24.2
  3. gdb --args gst-launch-1.0 ximagesrc show-pointer=0 remote=1 blocksize=16384 use-damage=0 ! "video/x-raw,framerate=60/1" ! vapostproc scale-method=fast ! "video/x-raw(memory:VAMemory),format=NV12" ! vah264lpenc aud=false b-frames=0 cpb-size=67 dct8x8=false key-int-max=1024 mbbrc=enabled num-slices=4 rate-control=cbr target-usage=4 bitrate=4000 ! "video/x-h264,profile=high,stream-format=byte-stream" ! h264parse ! queue ! fakesink

Similar issue with AV1 and VP9 encoder and replacing vapostproc to software videoconvert works fine, so very likely that this is a postproc issue.

ximagesrc outputs a BGRx format video/x-raw stream.

The same pipeline works totally fine in an AMD Vega Frontier Edition in the same environment. The GStreamer va plugin maintainer (He Junyan, Intel @HeJunyan) requested to post the issue here, as this is seemingly an Arc driver issue.
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3331

Backtrace:

arc_segfault.txt

arc_segfault2.txt

arc_bus.txt

Either the segfault or the bus error (after a brief flash of valid video) happens about 80-90% of the time (the parameters of the encoder and postproc doesn't matter), and even if the encoder is started, it is stuck at around 30 fps (the AMD encoder achieves full 60 fps). Similar issues existed back in Ubuntu 22.04 with Intel's repository but was expected to be fixed in Ubuntu 24.04 and kernel module 6.8.

What's the usage scenario when you are seeing the problem?

Transcode for media delivery

What impacted?

Basic postproc and encoding is very unstable on the Arc A750 GPU with Linux, thus usage for transcoding is very unreliable.

Debug Information

  1. Default in Ubuntu 24.04 (Kernel: 6.8.0-31-generic, intel-media-va-driver-non-free 24.1.0+ds1-1, libva 2.20.0), GStreamer 1.24.2
  2. by-path card0 card1 renderD128 renderD129 & pci-0000:07:00.0-card pci-0000:07:00.0-render pci-0000:0e:00.0-card pci-0000:0e:00.0-render (by-path)

07:00.0 VGA compatible controller [0300]: Intel Corporation DG2 [Arc A750] [8086:56a1] (rev 08)
0e:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Vega 10 XTX [Radeon Vega Frontier Edition] [1002:6863]
4.

libva info: VA-API version 1.20.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_20
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.20 (libva 2.12.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 24.1.0 ()
vainfo: Supported profile and entrypoints
      VAProfileNone                   : VAEntrypointVideoProc
      VAProfileNone                   : VAEntrypointStats
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSliceLP
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSliceLP
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointEncPicture
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
      VAProfileHEVCMain               : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointEncSliceLP
      VAProfileHEVCMain10             : VAEntrypointVLD
      VAProfileHEVCMain10             : VAEntrypointEncSliceLP
      VAProfileVP9Profile0            : VAEntrypointVLD
      VAProfileVP9Profile0            : VAEntrypointEncSliceLP
      VAProfileVP9Profile1            : VAEntrypointVLD
      VAProfileVP9Profile1            : VAEntrypointEncSliceLP
      VAProfileVP9Profile2            : VAEntrypointVLD
      VAProfileVP9Profile2            : VAEntrypointEncSliceLP
      VAProfileVP9Profile3            : VAEntrypointVLD
      VAProfileVP9Profile3            : VAEntrypointEncSliceLP
      VAProfileHEVCMain12             : VAEntrypointVLD
      VAProfileHEVCMain422_10         : VAEntrypointVLD
      VAProfileHEVCMain422_10         : VAEntrypointEncSliceLP
      VAProfileHEVCMain422_12         : VAEntrypointVLD
      VAProfileHEVCMain444            : VAEntrypointVLD
      VAProfileHEVCMain444            : VAEntrypointEncSliceLP
      VAProfileHEVCMain444_10         : VAEntrypointVLD
      VAProfileHEVCMain444_10         : VAEntrypointEncSliceLP
      VAProfileHEVCMain444_12         : VAEntrypointVLD
      VAProfileHEVCSccMain            : VAEntrypointVLD
      VAProfileHEVCSccMain            : VAEntrypointEncSliceLP
      VAProfileHEVCSccMain10          : VAEntrypointVLD
      VAProfileHEVCSccMain10          : VAEntrypointEncSliceLP
      VAProfileHEVCSccMain444         : VAEntrypointVLD
      VAProfileHEVCSccMain444         : VAEntrypointEncSliceLP
      VAProfileAV1Profile0            : VAEntrypointVLD
      VAProfileAV1Profile0            : VAEntrypointEncSliceLP
      VAProfileHEVCSccMain444_10      : VAEntrypointVLD
      VAProfileHEVCSccMain444_10      : VAEntrypointEncSliceLP

libva_trace.zip
6.
No Hanging

Do you want to contribute a patch to fix the issue?

None

@Jexu Jexu removed their assignment May 13, 2024
@Jexu Jexu added the VP Video Processing label May 13, 2024
@Jexu
Copy link
Contributor

Jexu commented May 13, 2024

unaligned size when copy vaImage data to surface

@intel-mediadev
Copy link
Contributor

Auto Created VSMGWL-73515 for further analysis.

@fenhu
Copy link
Contributor

fenhu commented May 20, 2024

@ehfd
I see your comments" Similar issues existed back in Ubuntu 22.04 with Intel's repository but was expected to be fixed in Ubuntu 24.04 and kernel module 6.8."

Do you mean it is Kernel espcail issue?

Thanks
Molly

@ehfd
Copy link
Author

ehfd commented May 20, 2024

@fenhu
Copy link
Contributor

fenhu commented May 20, 2024

@ehfd
How to reprouduce it? Would you help to share the reproudce steps?

Thanks
Molly

@XinfengZhang
Copy link
Contributor

@fenhu , gdb --args gst-launch-1.0 ximagesrc show-pointer=0 remote=1 blocksize=16384 use-damage=0 ! "video/x-raw,framerate=60/1" ! vapostproc scale-method=fast ! "video/x-raw(memory:VAMemory),format=NV12" ! vah264lpenc aud=false b-frames=0 cpb-size=67 dct8x8=false key-int-max=1024 mbbrc=enabled num-slices=4 rate-control=cbr target-usage=4 bitrate=4000 ! "video/x-h264,profile=high,stream-format=byte-stream" ! h264parse ! queue ! fakesink

@ehfd
Copy link
Author

ehfd commented May 22, 2024

gdb --args gst-launch-1.0 ximagesrc show-pointer=0 remote=1 blocksize=16384 use-damage=0 ! "video/x-raw,framerate=60/1" ! vapostproc scale-method=fast ! "video/x-raw(memory:VAMemory),format=NV12" ! vah264lpenc aud=false b-frames=0 cpb-size=67 dct8x8=false key-int-max=1024 mbbrc=enabled num-slices=4 rate-control=cbr target-usage=4 bitrate=4000 ! "video/x-h264,profile=high,stream-format=byte-stream" ! h264parse ! queue ! fakesink

Install necessary GStreamer 1.24 packages (gst-plugins-{base,good,bad}).

The funny thing here is that when gdb is used the SIGSEGV or bus error occurs less frequently.

@MicroYY MicroYY added Common memory, surface, ddi and removed VP Video Processing labels Jun 6, 2024
@Bin-CI
Copy link

Bin-CI commented Jul 3, 2024

Filter the history test data about upstream for 2 month refer media part on DG2 platform, couldn't find the same issue refer vah264lpenc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Common memory, surface, ddi
Projects
None yet
Development

No branches or pull requests

7 participants