[FFmpeg-trac] #9832(ffmpeg:new): Avisynth source on Linux: Address boundary error

FFmpeg trac at avcodec.org
Sat Jul 16 18:20:23 EEST 2022


#9832: Avisynth source on Linux: Address boundary error
-------------------------------------+-------------------------------------
             Reporter:  Hanuman      |                    Owner:  (none)
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:  ffmpeg
              Version:  unspecified  |               Resolution:
             Keywords:  avisynth,    |               Blocked By:
  ffmpeg                             |
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
Description changed by Hanuman:

Old description:

> Running this command to encode an Avisynth script works on Windows but
> not on Linux: terminated by signal SIGSEGV (Address boundary error)
>
> OS: Garuda Linux (arch-based)
>
> {{{
> "ffmpeg" -y -i "Avisynth.avs" -vcodec libx264 -an -preset ultrafast
> "AvisynthToFFmpeg Avisynth.mp4"
>
> ffmpeg version n5.0.1 Copyright (c) 2000-2022 the FFmpeg developers
> built with gcc 12.1.0 (GCC)
> configuration: --prefix=/usr --disable-debug --disable-static --disable-
> stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto
> --enable-fontconfig --enable-gmp
> --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-
> libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-
> libfreetype--enable-libfribidi --enable-libgsm
> --enable-libiec61883 --enable-libjack --enable-libmfx --enable-libmodplug
> --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb
> --enable-libopenjpeg
> --enable-libopus --enable-libpulse --enable-librav1e --enable-librsvg
> --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh
> --enable-libsvtav1 --enable-libtheora
> -enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis
> --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265
> --enable-libxcb --enable-libxml2
> --enable-libxvid --enable-libzimg --enable-nvdec --enable-nvenc --enable-
> shared --enable-version3
> libavutil      57. 17.100 / 57. 17.100
> libavcodec     59. 18.100 / 59. 18.100
> libavformat    59. 16.100 / 59. 16.100
> libavdevice    59.  4.100 / 59.  4.100
> libavfilter     8. 24.100 /  8. 24.100
> libswscale      6.  4.100 /  6.  4.100
> libswresample   4.  3.100 /  4.  3.100
> libpostproc    56.  3.100 / 56.  3.100
> Guessed Channel Layout for Input Stream #0.1 : mono
> Input #0, avisynth, from 'Avisynth.avs':
> Duration: 00:00:04.17, start: 0.000000, bitrate: 0 kb/s
> Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 640x480, 24
> fps, 24 tbr, 24 tbn
> Stream #0:1: Audio: pcm_s16le, 44100 Hz, mono, s16, 705 kb/s
> Stream mapping:
> Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
> Press [q] to stop, [?] for help
> [libx264 @ 0x55d73af1f240] using cpu capabilities: MMX2 SSE2Fast SSSE3
> SSE4.2 AVX FMA3 BMI2 AVX2
> [libx264 @ 0x55d73af1f240] profile Constrained Baseline, level 3.0,
> 4:2:0, 8-bit
> [libx264 @ 0x55d73af1f240] 264 - core 164 r3081 19856cc - H.264/MPEG-4
> AVC codec - Copyleft 2003-2021 - http://www.videolan.org/x264.html -
> options: cabac=0 ref=1
> deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00
> mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0
> deadzone=21,11 fast_pskip=1
> chroma_qp_offset=0 threads=15 lookahead_threads=2 sliced_threads=0 nr=0
> decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0
> weightp=0 keyint=250
> keyint_min=24 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0
> qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0
> Output #0, mp4, to 'AvisynthToFFmpeg Avisynth.mp4':
> Metadata:
> encoder         : Lavf59.16.100
> Stream #0:0: Video: h264 (avc1 / 0x31637661), yuv420p(progressive),
> 640x480, q=2-31, 24 fps, 12288 tbn
> Metadata:
> encoder         : Lavc59.18.100 libx264
> Side data:
> cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
> frame=  100 fps=0.0 q=-1.0 Lsize=       4kB time=00:00:04.12 bitrate=
> 7.5kbits/s speed= 123x
> video:3kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
> muxing overhead: 47.157574%
> [libx264 @ 0x55d73af1f240] frame I:1     Avg QP:20.00  size:   932
> [libx264 @ 0x55d73af1f240] frame P:99    Avg QP:12.02  size:    11
> [libx264 @ 0x55d73af1f240] mb I  I16..4: 100.0%  0.0%  0.0%
> [libx264 @ 0x55d73af1f240] mb P  I16..4:  0.0%  0.0%  0.0%  P16..4:  0.0%
> 0.0%  0.0%  0.0%  0.0%    skip:100.0%
> [libx264 @ 0x55d73af1f240] coded y,uvDC,uvAC intra: 0.0% 0.1% 0.0% inter:
> 0.0% 0.0% 0.0%
> [libx264 @ 0x55d73af1f240] i16 v,h,dc,p: 97%  0%  3%  0%
> [libx264 @ 0x55d73af1f240] i8c dc,h,v,p: 100%  0%  0%  0%
> [libx264 @ 0x55d73af1f240] kb/s:3.88
> fish: Job 1, '"ffmpeg" -y -i "Avisynth.avs" -…' terminated by signal
> SIGSEGV (Address boundary error)
> }}}

New description:

 Running this command to encode an Avisynth script works on Windows but not
 on Linux.

 The output file DOES get created, but the process ends with an error:
 terminated by signal SIGSEGV (Address boundary error)

 OS: Garuda Linux (arch-based)

 Avisynth Script:

 {{{
 BlankClip(pixel_type="YUV420", length=100, color = $AA0000)
 }}}

 Run command

 {{{
 ffmpeg -y -i "Avisynth.avs" -vcodec libx264 -an -preset ultrafast
 "AvisynthToFFmpeg Avisynth.mp4"

 ffmpeg version n5.0.1 Copyright (c) 2000-2022 the FFmpeg developers
 built with gcc 12.1.0 (GCC)
 configuration: --prefix=/usr --disable-debug --disable-static --disable-
 stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto
 --enable-fontconfig --enable-gmp
 --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-
 libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-
 libfreetype--enable-libfribidi --enable-libgsm
 --enable-libiec61883 --enable-libjack --enable-libmfx --enable-libmodplug
 --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb
 --enable-libopenjpeg
 --enable-libopus --enable-libpulse --enable-librav1e --enable-librsvg
 --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh
 --enable-libsvtav1 --enable-libtheora
 -enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis
 --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265
 --enable-libxcb --enable-libxml2
 --enable-libxvid --enable-libzimg --enable-nvdec --enable-nvenc --enable-
 shared --enable-version3
 libavutil      57. 17.100 / 57. 17.100
 libavcodec     59. 18.100 / 59. 18.100
 libavformat    59. 16.100 / 59. 16.100
 libavdevice    59.  4.100 / 59.  4.100
 libavfilter     8. 24.100 /  8. 24.100
 libswscale      6.  4.100 /  6.  4.100
 libswresample   4.  3.100 /  4.  3.100
 libpostproc    56.  3.100 / 56.  3.100
 Guessed Channel Layout for Input Stream #0.1 : mono
 Input #0, avisynth, from 'Avisynth.avs':
 Duration: 00:00:04.17, start: 0.000000, bitrate: 0 kb/s
 Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 640x480, 24
 fps, 24 tbr, 24 tbn
 Stream #0:1: Audio: pcm_s16le, 44100 Hz, mono, s16, 705 kb/s
 Stream mapping:
 Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
 Press [q] to stop, [?] for help
 [libx264 @ 0x55d73af1f240] using cpu capabilities: MMX2 SSE2Fast SSSE3
 SSE4.2 AVX FMA3 BMI2 AVX2
 [libx264 @ 0x55d73af1f240] profile Constrained Baseline, level 3.0, 4:2:0,
 8-bit
 [libx264 @ 0x55d73af1f240] 264 - core 164 r3081 19856cc - H.264/MPEG-4 AVC
 codec - Copyleft 2003-2021 - http://www.videolan.org/x264.html - options:
 cabac=0 ref=1
 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00
 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0
 deadzone=21,11 fast_pskip=1
 chroma_qp_offset=0 threads=15 lookahead_threads=2 sliced_threads=0 nr=0
 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0
 weightp=0 keyint=250
 keyint_min=24 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0
 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0
 Output #0, mp4, to 'AvisynthToFFmpeg Avisynth.mp4':
 Metadata:
 encoder         : Lavf59.16.100
 Stream #0:0: Video: h264 (avc1 / 0x31637661), yuv420p(progressive),
 640x480, q=2-31, 24 fps, 12288 tbn
 Metadata:
 encoder         : Lavc59.18.100 libx264
 Side data:
 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
 frame=  100 fps=0.0 q=-1.0 Lsize=       4kB time=00:00:04.12 bitrate=
 7.5kbits/s speed= 123x
 video:3kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: 47.157574%
 [libx264 @ 0x55d73af1f240] frame I:1     Avg QP:20.00  size:   932
 [libx264 @ 0x55d73af1f240] frame P:99    Avg QP:12.02  size:    11
 [libx264 @ 0x55d73af1f240] mb I  I16..4: 100.0%  0.0%  0.0%
 [libx264 @ 0x55d73af1f240] mb P  I16..4:  0.0%  0.0%  0.0%  P16..4:  0.0%
 0.0%  0.0%  0.0%  0.0%    skip:100.0%
 [libx264 @ 0x55d73af1f240] coded y,uvDC,uvAC intra: 0.0% 0.1% 0.0% inter:
 0.0% 0.0% 0.0%
 [libx264 @ 0x55d73af1f240] i16 v,h,dc,p: 97%  0%  3%  0%
 [libx264 @ 0x55d73af1f240] i8c dc,h,v,p: 100%  0%  0%  0%
 [libx264 @ 0x55d73af1f240] kb/s:3.88
 fish: Job 1, '"ffmpeg" -y -i "Avisynth.avs" -…' terminated by signal
 SIGSEGV (Address boundary error)
 }}}

 Someone else is unable to reproduce the problem on Linux

 Here's my inxi system information

 {{{
 System:
 Kernel: 5.18.11-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 12.1.0
 parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
 root=UUID=58203bda-e2e2-4c32-a006-c91d933cad4e rw rootflags=subvol=@
 loglevel=3 quiet intel_iommu=on iommu=pt ibt=off
 Desktop: KDE Plasma v: 5.25.3 tk: Qt v: 5.15.5 info: latte-dock
 wm: kwin_x11 vt: 1 dm: SDDM Distro: Garuda Linux base: Arch Linux
 Machine:
 Type: Laptop System: Acer product: Predator PH315-53 v: V1.01
 serial: <superuser required>
 Mobo: CML model: QX50_CMS v: V1.01 serial: <superuser required>
 UEFI: Insyde v: 1.01 date: 04/27/2020
 Battery:
 ID-1: BAT1 charge: 42.6 Wh (99.8%) condition: 42.7/58.8 Wh (72.7%)
 volts: 16.4 min: 15.4 model: SMP AP18E7M type: Li-ion serial: <filter>
 status: N/A
 CPU:
 Info: model: Intel Core i7-10750H bits: 64 type: MT MCP arch: Comet Lake
 gen: core 10 built: 2020 process: Intel 14nm family: 6 model-id: 0xA5
 (165)
 stepping: 2 microcode: 0xF0
 Topology: cpus: 1x cores: 6 tpc: 2 threads: 12 smt: enabled cache:
 L1: 384 KiB desc: d-6x32 KiB; i-6x32 KiB L2: 1.5 MiB desc: 6x256 KiB
 L3: 12 MiB desc: 1x12 MiB
 Speed (MHz): avg: 899 high: 900 min/max: 800/5000 scaling:
 driver: intel_pstate governor: powersave cores: 1: 900 2: 900 3: 900 4:
 900
 5: 900 6: 900 7: 898 8: 897 9: 900 10: 900 11: 900 12: 900
 bogomips: 62399
 Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
 Vulnerabilities:
 Type: itlb_multihit status: KVM: VMX disabled
 Type: l1tf status: Not affected
 Type: mds status: Not affected
 Type: meltdown status: Not affected
 Type: mmio_stale_data mitigation: Clear CPU buffers; SMT vulnerable
 Type: spec_store_bypass
 mitigation: Speculative Store Bypass disabled via prctl
 Type: spectre_v1
 mitigation: usercopy/swapgs barriers and __user pointer sanitization
 Type: spectre_v2
 mitigation: Enhanced IBRS, IBPB: conditional, RSB filling
 Type: srbds mitigation: Microcode
 Type: tsx_async_abort status: Not affected
 Graphics:
 Device-1: Intel CometLake-H GT2 [UHD Graphics]
 vendor: Acer Incorporated ALI driver: i915 v: kernel arch: Gen9.5
 process: Intel 14nm built: 2016-20 ports: active: none off: eDP-1
 empty: HDMI-A-1 bus-ID: 00:02.0 chip-ID: 8086:9bc4 class-ID: 0300
 Device-2: NVIDIA TU106M [GeForce RTX 2060 Mobile]
 vendor: Acer Incorporated ALI driver: nvidia v: 515.57
 alternate: nouveau,nvidia_drm non-free: 515.xx+
 status: current (as of 2022-06) arch: Turing process: TSMC 12nm
 built: 2018-22 pcie: gen: 1 speed: 2.5 GT/s lanes: 16 link-max: gen: 3
 speed: 8 GT/s ports: active: none off: HDMI-A-2 empty: DP-1
 bus-ID: 01:00.0 chip-ID: 10de:1f15 class-ID: 0300
 Device-3: Quanta HD User Facing type: USB driver: uvcvideo bus-ID: 1-5:3
 chip-ID: 0408:a061 class-ID: 0e02
 Display: x11 server: X.Org v: 21.1.4 with: Xwayland v: 22.1.3
 compositor: kwin_x11 driver: X: loaded: modesetting,nvidia
 gpu: i915,nvidia,nvidia-nvswitch display-ID: :0 screens: 1
 Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.00x11.22")
 s-diag: 582mm (22.93")
 Monitor-1: HDMI-A-2 mapped: HDMI-0 note: disabled pos: primary
 model: Samsung serial: <filter> built: 2016 res: 1920x1080 hz: 60 dpi: 40
 gamma: 1.2 size: 1210x680mm (47.64x26.77") diag: 1168mm (46") ratio: 16:9
 modes: max: 1920x1080 min: 640x480
 Monitor-2: eDP-1 mapped: eDP-1-1 note: disabled
 model: AU Optronics 0x82ed built: 2018 res: 1920x1080 dpi: 142 gamma: 1.2
 size: 344x194mm (13.54x7.64") diag: 394mm (15.5") ratio: 16:9
 modes: 1920x1080
 OpenGL: renderer: NVIDIA GeForce RTX 2060/PCIe/SSE2
 v: 4.6.0 NVIDIA 515.57 direct render: Yes
 Audio:
 Device-1: Intel Comet Lake PCH cAVS vendor: Acer Incorporated ALI
 driver: snd_hda_intel bus-ID: 1-1.3:6 v: kernel
 alternate: snd_soc_skl,snd_sof_pci_intel_cnl chip-ID: 08bb:29b0
 bus-ID: 00:1f.3 class-ID: 0300 chip-ID: 8086:06c8 class-ID: 0403
 Device-2: NVIDIA TU106 High Definition Audio
 vendor: Acer Incorporated ALI driver: snd_hda_intel v: kernel pcie: gen: 3
 speed: 8 GT/s lanes: 16 bus-ID: 01:00.1 chip-ID: 10de:10f9 class-ID: 0403
 Device-3: Texas Instruments PCM2900B Audio CODEC type: USB
 driver: hid-generic,snd-usb-audio,usbhid
 Sound Server-1: ALSA v: k5.18.11-zen1-1-zen running: yes
 Sound Server-2: PulseAudio v: 16.1 running: no
 Sound Server-3: PipeWire v: 0.3.55 running: yes
 Network:
 Device-1: Intel Comet Lake PCH CNVi WiFi vendor: Rivet Networks
 driver: iwlwifi v: kernel bus-ID: 00:14.3 chip-ID: 8086:06f0 class-ID:
 0280
 IF: wlp0s20f3 state: up mac: <filter>
 Device-2: Realtek vendor: Acer Incorporated ALI driver: r8169 v: kernel
 pcie: gen: 1 speed: 2.5 GT/s lanes: 1 port: 3000 bus-ID: 07:00.0
 chip-ID: 10ec:2600 class-ID: 0200
 IF: enp7s0 state: down mac: <filter>
 IF-ID-1: anbox0 state: down mac: <filter>
 IF-ID-2: virbr0 state: down mac: <filter>
 IF-ID-3: virbr1 state: down mac: <filter>
 Bluetooth:
 Device-1: Intel AX201 Bluetooth type: USB driver: btusb v: 0.8
 bus-ID: 1-14:5 chip-ID: 8087:0026 class-ID: e001
 Report: bt-adapter ID: hci0 rfk-id: 1 state: down
 bt-service: enabled,running rfk-block: hardware: no software: yes
 address: <filter>
 Drives:
 Local Storage: total: 1.63 TiB used: 1.1 TiB (67.6%)
 SMART Message: Unable to run smartctl. Root privileges required.
 ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Western Digital
 model: PC SN730 SDBQNTY-512G-1014 size: 476.94 GiB block-size:
 physical: 512 B logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD
 serial: <filter> rev: 11101100 temp: 24.9 C scheme: GPT
 ID-2: /dev/sda maj-min: 8:0 vendor: HGST (Hitachi) model: HTS721010A9E630
 size: 931.51 GiB block-size: physical: 4096 B logical: 512 B
 speed: 6.0 Gb/s type: HDD rpm: 7200 serial: <filter> rev: A3J0
 scheme: GPT
 ID-3: /dev/sdb maj-min: 8:16 vendor: Crucial model: CT275MX300SSD4
 size: 256.17 GiB block-size: physical: 512 B logical: 512 B speed: 6.0
 Gb/s
 type: SSD serial: <filter> rev: R060 scheme: GPT
 Partition:
 ID-1: / raw-size: 468.84 GiB size: 468.84 GiB (100.00%)
 used: 285.08 GiB (60.8%) fs: btrfs dev: /dev/nvme0n1p5 maj-min: 259:3
 ID-2: /boot/efi raw-size: 100 MiB size: 96 MiB (96.00%)
 used: 51.2 MiB (53.4%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
 ID-3: /home raw-size: 468.84 GiB size: 468.84 GiB (100.00%)
 used: 285.08 GiB (60.8%) fs: btrfs dev: /dev/nvme0n1p5 maj-min: 259:3
 ID-4: /var/log raw-size: 468.84 GiB size: 468.84 GiB (100.00%)
 used: 285.08 GiB (60.8%) fs: btrfs dev: /dev/nvme0n1p5 maj-min: 259:3
 ID-5: /var/tmp raw-size: 468.84 GiB size: 468.84 GiB (100.00%)
 used: 285.08 GiB (60.8%) fs: btrfs dev: /dev/nvme0n1p5 maj-min: 259:3
 Swap:
 Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
 ID-1: swap-1 type: zram size: 15.46 GiB used: 475.5 MiB (3.0%)
 priority: 100 dev: /dev/zram0
 Sensors:
 System Temperatures: cpu: 59.0 C pch: 69.0 C mobo: N/A gpu: nvidia
 temp: 59 C
 Fan Speeds (RPM): N/A
 Info:
 Processes: 388 Uptime: 21h 26m wakeups: 1 Memory: 15.46 GiB
 used: 5.72 GiB (37.0%) Init: systemd v: 251 default: graphical
 tool: systemctl Compilers: gcc: 12.1.0 alt: 11 clang: 14.0.6 Packages:
 pacman: 1892 lib: 506 Shell: fish v: 3.4.1 default: Bash v: 5.1.16
 running-in: konsole inxi: 3.3.19
 Garuda (2.6.5-1):
 System install date:     2021-11-24
 Last full system update: 2022-07-14
 Is partially upgraded:   No
 Relevant software:       NetworkManager
 Windows dual boot:       Probably (Run as root to verify)
 Snapshots:               Snapper
 Failed units:            anbox-container-manager.service systemd-networkd-
 wait-online.service systemd-sysctl.service
 }}}

--
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/9832#comment:2>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list