Re: [FFmpeg-trac] #6431(undetermined:closed): Linux ffmpeg always segfaults using NVIDIA hw decoders/encoders

2018-04-13 Thread FFmpeg
#6431: Linux ffmpeg always segfaults using NVIDIA hw decoders/encoders
-+-
 Reporter:  bubbleguuum  |Owner:
 Type:  defect   |   Status:  closed
 Priority:  normal   |Component:
  Version:  unspecified  |  undetermined
 Keywords:   |   Resolution:
 Blocking:   |  worksforme
Analyzed by developer:  0|   Blocked By:
 |  Reproduced by developer:  0
-+-
Changes (by cehoyos):

 * keywords:  nvidia =>
 * reproduced:  1 => 0


--
Ticket URL: 
FFmpeg 
FFmpeg issue tracker
___
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-trac


Re: [FFmpeg-trac] #6431(undetermined:closed): Linux ffmpeg always segfaults using NVIDIA hw decoders/encoders

2017-06-01 Thread FFmpeg
#6431: Linux ffmpeg always segfaults using NVIDIA hw decoders/encoders
-+-
 Reporter:  bubbleguuum  |Owner:
 Type:  defect   |   Status:  closed
 Priority:  normal   |Component:
  Version:  unspecified  |  undetermined
 Keywords:  nvidia   |   Resolution:
 Blocking:   |  worksforme
Analyzed by developer:  0|   Blocked By:
 |  Reproduced by developer:  1
-+-

Comment (by bubbleguuum):

 I compiled ffmpeg myself and found the explanation for this crash.

 long story short: nvdec, cuda and friends using dlopen() are not
 compatible with ffmpeg compiled with -static generally used to produce a
 fully static build.

 The reason is that it segfaults dlopen'ing libcuda.so.1, due to this
 warning displayed at compilation:

  warning: Using 'dlopen' in statically linked applications requires at
 runtime the shared libraries from the glibc version used for linking

 After much tinkering, I was able to produce a build with all libraries
 statically linked except the glibc (and thus libdl):

 1. pass --extra-ldexeflags="-Wl,-Bstatic"  to configure. This replaces
 -static and the libraries following this option will be linked statically
 *exept the glibc*. Thus this is not the same thing than -static that force
 static linking for all libraries including the glibc.

 2. pass --extra-libs="-Wl,-Bdynamic -lm -ldl".  This force dynamic linking
 for libm and libdl  . This override is necessary because these libraries
 cannot be linked statically when the glibc is linked dynamically

 3. You must edit the configure script (yuk), function probe_cc():

 change:

 _flags_filter=echo

 to:

 _flags_filter='filter_out -lm|-ldl'

 This will filter out all -lm and -ldl occurences before -Wl,-Bdynamic.
 This is necessary for both these libs to not be linked statically. Finding
 this trick took me forever.


 If all goes well, at the end you have a ffmpeg binary with everything
 statically linked except the glibc and dynamic linker, with working NVIDIA
 support:

 {{{
 ldd ffmpeg
 linux-vdso.so.1 =>  (0x7ffece9e6000)
 libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x7f19931dc000)
 libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2
 (0x7f1992fd8000)
 libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1
 (0x7f1992dc1000)
 libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
 (0x7f1992ba4000)
 libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x7f19927db000)
 /lib64/ld-linux-x86-64.so.2 (0x560591227000)

 }}}


 Suggestion: make the configure script issue a big fat warning (or fail
 entirely) if -static is specified and any library using dlopen() is to be
 included in the build.

--
Ticket URL: 
FFmpeg 
FFmpeg issue tracker
___
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-trac


Re: [FFmpeg-trac] #6431(undetermined:closed): Linux ffmpeg always segfaults using NVIDIA hw decoders/encoders

2017-05-31 Thread FFmpeg
#6431: Linux ffmpeg always segfaults using NVIDIA hw decoders/encoders
-+-
 Reporter:  bubbleguuum  |Owner:
 Type:  defect   |   Status:  closed
 Priority:  normal   |Component:
  Version:  unspecified  |  undetermined
 Keywords:  nvidia   |   Resolution:
 Blocking:   |  worksforme
Analyzed by developer:  0|   Blocked By:
 |  Reproduced by developer:  1
-+-

Comment (by bubbleguuum):

 I tried to contact John for something else and he's slow to respond, if he
 responds at all.

 By curiosity, what is your output for 'ldd ffmpeg' ? Also can you tell
 what distro and NVIDIA driver version do you use ?

 In any case, looks like the only solution left I have is to give a go at
 compiling ffmpeg myself...

--
Ticket URL: 
FFmpeg 
FFmpeg issue tracker
___
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-trac


Re: [FFmpeg-trac] #6431(undetermined:closed): Linux ffmpeg always segfaults using NVIDIA hw decoders/encoders

2017-05-31 Thread FFmpeg
#6431: Linux ffmpeg always segfaults using NVIDIA hw decoders/encoders
-+-
 Reporter:  bubbleguuum  |Owner:
 Type:  defect   |   Status:  closed
 Priority:  normal   |Component:
  Version:  unspecified  |  undetermined
 Keywords:  nvidia   |   Resolution:
 Blocking:   |  worksforme
Analyzed by developer:  0|   Blocked By:
 |  Reproduced by developer:  1
-+-

Comment (by oromit):

 Depends on what you mean by static build.
 I used the default configuration, which links the libav* libraries
 statically, but I did not make special efforts to have no dynamic
 dependencies.
 nvenc/cuvid are not any different in a static vs. a shared build, they
 always load their stuff at runtime via dlopen.

 I tested current master and ffmpeg 3.3.1, so the exact same version you
 can download statically from that site, and it did not crash for me.

 The build seems to be lacking debug symbols, and I can't see any on the
 site either, so I guess we're not getting a trace from that build. I'd
 contact the author of those builds about the issue.

--
Ticket URL: 
FFmpeg 
FFmpeg issue tracker
___
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-trac


Re: [FFmpeg-trac] #6431(undetermined:closed): Linux ffmpeg always segfaults using NVIDIA hw decoders/encoders

2017-05-31 Thread FFmpeg
#6431: Linux ffmpeg always segfaults using NVIDIA hw decoders/encoders
-+-
 Reporter:  bubbleguuum  |Owner:
 Type:  defect   |   Status:  closed
 Priority:  normal   |Component:
  Version:  unspecified  |  undetermined
 Keywords:  nvidia   |   Resolution:
 Blocking:   |  worksforme
Analyzed by developer:  0|   Blocked By:
 |  Reproduced by developer:  1
-+-

Comment (by bubbleguuum):

 backtrace is not super explicit :(

 {{{
 [AVFilterGraph @ 0x3c9d060] query_formats: 4 queried, 3 merged, 0 already
 done, 0 delayed

 Thread 1 "ffmpeg" received signal SIGSEGV, Segmentation fault.
 0x in ?? ()
 (gdb) bt
 #0  0x in ?? ()
 #1  0x7fffc8e80fa9 in ?? ()
 #2  0x7fffcb50 in ?? ()
 #3  0x0010 in ?? ()
 #4  0x0080 in ?? ()
 #5  0x80010001 in ?? ()
 #6  0x043a5640 in ?? ()
 #7  0x0005 in ?? ()
 #8  0x0002 in ?? ()
 #9  0x0001 in ?? ()
 #10 0x0006 in ?? ()
 #11 0x7fff0008 in ?? ()
 #12 0x7fffcc00 in ?? ()
 #13 0x7fffcdc0 in ?? ()
 #14 0x in ?? ()[AVFilterGraph @ 0x3c9d060] query_formats:
 4 queried, 3 merged, 0 already done, 0 delayed
 }}}

--
Ticket URL: 
FFmpeg 
FFmpeg issue tracker
___
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-trac


Re: [FFmpeg-trac] #6431(undetermined:closed): Linux ffmpeg always segfaults using NVIDIA hw decoders/encoders

2017-05-31 Thread FFmpeg
#6431: Linux ffmpeg always segfaults using NVIDIA hw decoders/encoders
-+-
 Reporter:  bubbleguuum  |Owner:
 Type:  defect   |   Status:  closed
 Priority:  normal   |Component:
  Version:  unspecified  |  undetermined
 Keywords:  nvidia   |   Resolution:
 Blocking:   |  worksforme
Analyzed by developer:  0|   Blocked By:
 |  Reproduced by developer:  1
-+-

Comment (by bubbleguuum):

 Replying to [comment:2 oromit]:
 > I can confirm that it crashes with the static build from
 https://johnvansickle.com/ffmpeg/
 > As it works with all local builds of the same commits I have done, this
 is an issue with that specific build, not ffmpeg itself.

 Thank you for the test.

 Is it possible this issue has been fixed recently, in the last 2 weeks ?
 John's static git build from 20170517 also crashes.
 Also, I suppose you did not test your build as a static build ?

--
Ticket URL: 
FFmpeg 
FFmpeg issue tracker
___
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-trac


Re: [FFmpeg-trac] #6431(undetermined:closed): Linux ffmpeg always segfaults using NVIDIA hw decoders/encoders

2017-05-31 Thread FFmpeg
#6431: Linux ffmpeg always segfaults using NVIDIA hw decoders/encoders
-+-
 Reporter:  bubbleguuum  |Owner:
 Type:  defect   |   Status:  closed
 Priority:  normal   |Component:
  Version:  unspecified  |  undetermined
 Keywords:  nvidia   |   Resolution:
 Blocking:   |  worksforme
Analyzed by developer:  0|   Blocked By:
 |  Reproduced by developer:  1
-+-
Changes (by oromit):

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


Comment:

 I can confirm that it crashes with the static build from
 https://johnvansickle.com/ffmpeg/
 As it works with all local builds of the same commits I have done, this is
 an issue with that specific build, not ffmpeg itself.

--
Ticket URL: 
FFmpeg 
FFmpeg issue tracker
___
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-trac