[FFmpeg-trac] #5920(ffmpeg:closed): static build FFmpeg segfault when VA-API hardware encoding

FFmpeg trac at avcodec.org
Mon Oct 31 23:14:59 EET 2016

#5920: static build FFmpeg segfault when VA-API hardware encoding
             Reporter:  warp         |                    Owner:
                 Type:  defect       |                   Status:  closed
             Priority:  normal       |                Component:  ffmpeg
              Version:  unspecified  |               Resolution:  invalid
             Keywords:  vaapi VA-    |               Blocked By:
  API ffmpeg                         |  Reproduced by developer:  0
             Blocking:               |
Analyzed by developer:  0            |
Changes (by jkqxz):

 * status:  new => closed
 * resolution:   => invalid


 This is nothing to do with ffmpeg: libva cannot be linked statically
 because it requires the dynamic linker to do driver loading.

 Try building any of the libva test programs such as vainfo statically and
 you will find exactly the same problem:
 $ file vainfo
 vainfo: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux),
 statically linked, for GNU/Linux 2.6.32,
 BuildID[sha1]=41fb267b358b93b746803212bf305b6d6eca07f2, not stripped
 $ gdb --args ./vainfo
 GNU gdb (Debian 7.11.1-2) 7.11.1
 Copyright (C) 2016 Free Software Foundation, Inc.
 License GPLv3+: GNU GPL version 3 or later
 This is free software: you are free to change and redistribute it.
 There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
 and "show warranty" for details.
 This GDB was configured as "x86_64-linux-gnu".
 Type "show configuration" for configuration details.
 For bug reporting instructions, please see:
 Find the GDB manual and other documentation resources online at:
 For help, type "help".
 Type "apropos word" to search for commands related to "word"...
 Reading symbols from ./vainfo...done.
 (gdb) r
 Starting program: /home/mrt/video/libva/static/test/vainfo/vainfo
 error: XDG_RUNTIME_DIR not set in the environment.
 error: can't connect to X server!
 libva info: VA-API version 0.39.4
 libva info: va_getDriverName() returns 0
 libva info: Trying to open /usr/local/lib/dri/i965_drv_video.so
 [Thread debugging using libthread_db enabled]
 Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

 Program received signal SIGSEGV, Segmentation fault.
 0x0000000000000000 in ?? ()
 (gdb) bt
 #0  0x0000000000000000 in ?? ()
 #1  0x00007ffff79cffd0 in __pthread_initialize_minimal_internal () at
 #2  0x00007ffff79cf5b9 in _init () at ../sysdeps/x86_64/crti.S:72
 #3  0x00007ffff7bfc010 in ?? () from /usr/local/lib/dri/i965_drv_video.so
 #4  0x0000000000529e2a in call_init.part ()
 #5  0x0000000000529fe5 in _dl_init ()
 #6  0x000000000050702e in dl_open_worker ()
 #7  0x0000000000505244 in _dl_catch_error ()
 #8  0x00000000005069e9 in _dl_open ()
 #9  0x00000000004b6797 in dlopen_doit ()
 #10 0x0000000000505244 in _dl_catch_error ()
 #11 0x00000000004b6be2 in _dlerror_run ()
 #12 0x00000000004b67ee in __dlopen ()
 #13 0x00000000004019e9 in va_openDriver (dpy=dpy at entry=0x811e90,
 driver_name=0x812370 "i965") at ../../git/va/va.c:235
 #14 0x0000000000402ad3 in vaInitialize (dpy=dpy at entry=0x811e90,
 major_version=major_version at entry=0x7fffffffe430,
 minor_version=minor_version at entry=0x7fffffffe434) at ../../git/va/va.c:563
 #15 0x0000000000400980 in main (argc=<optimized out>, argv=0x7fffffffe5d8)
 at ../../../git/test/vainfo/vainfo.c:120

Ticket URL: <https://trac.ffmpeg.org/ticket/5920#comment:1>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker

More information about the FFmpeg-trac mailing list