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

segfault when probing any web video #121

Open
mrjohnson22 opened this issue Sep 13, 2020 · 12 comments
Open

segfault when probing any web video #121

mrjohnson22 opened this issue Sep 13, 2020 · 12 comments
Assignees
Labels

Comments

@mrjohnson22
Copy link

Running ffprobe on a video URL always crashes. Running it on a local video file works fine, however.

Example output of /path/to/node_modules/@ffprobe-installer/linux-x64/ffprobe -i <any_video_url>:

ffprobe version N-48944-g9b069eb14e-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2007-2019 the FFmpeg developers
  built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
  configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc-6 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg
  libavutil      56. 28.100 / 56. 28.100
  libavcodec     58. 52.102 / 58. 52.102
  libavformat    58. 27.103 / 58. 27.103
  libavdevice    58.  7.100 / 58.  7.100
  libavfilter     7. 54.101 /  7. 54.101
  libswscale      5.  4.101 /  5.  4.101
  libswresample   3.  4.100 /  3.  4.100
  libpostproc    55.  4.100 / 55.  4.100
Segmentation fault

The file format of the video seems to make no difference.

Meanwhile, running the system-installed ffprobe (I'm using Fedora 32) works just fine. It has the following version information:

ffprobe version 4.2.4 Copyright (c) 2007-2020 the FFmpeg developers
  built with gcc 10 (GCC)
  configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --docdir=/usr/share/doc/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' --extra-ldflags='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld ' --extra-cflags=' ' --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3 --enable-bzlib --disable-crystalhd --enable-fontconfig --enable-frei0r --enable-gcrypt --enable-gnutls --enable-ladspa --enable-libaom --enable-libdav1d --enable-libass --enable-libbluray --enable-libcdio --enable-libdrm --enable-libjack --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libmp3lame --enable-nvenc --enable-openal --enable-opencl --enable-opengl --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librsvg --enable-libsrt --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-version3 --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg --enable-libzvbi --enable-avfilter --enable-avresample --enable-libmodplug --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-libmfx --enable-runtime-cpudetect
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100

This issue affects https://github.com/dyc3/opentogethertube (see dyc3/opentogethertube#297).

@SavageCore
Copy link
Owner

Closing as duplicate of #135?

@sasjafor
Copy link

This doesn't seem like a duplicate of #135, though it might be related. For #135, it seems to be only an error, whereas this issue describes a crash.

I ran into the same problem with the ffprobe version provided by this library. It always crashes with a segfault when run on a URL to a remote file.

@SavageCore SavageCore reopened this Mar 10, 2022
@jkerb8
Copy link

jkerb8 commented Aug 9, 2022

I am also getting this error on a Heroku "Heroku-22" Ubuntu 22.04 server. Segmentation Fault every time when using a remote video URL. Downgrading the server to Ubuntu 20.04 solved the issue for me. It also works fine locally on my Mac.

@dwolfhub
Copy link

dwolfhub commented Dec 5, 2022

I started getting seg faults in my github actions when ubuntu-latest was upgraded to Ubuntu 22. Changing my job to runs-on: ubuntu-20.04 fixed the issue.

@g787543
Copy link

g787543 commented Aug 4, 2023

same issue on Red Hat Enterprise Linux release 8.5
have any solution?

@g787543
Copy link

g787543 commented Aug 4, 2023

I have re-install ffmpeg on server with yum and copy /usr/bin/ffprobe to node_modules.
it works for me.

@creazy231
Copy link

creazy231 commented Aug 23, 2023

same problem using google firebase with node v18
downgrade to node v16 works

@willbattel
Copy link

willbattel commented Sep 20, 2023

Encountering this problem in Google Cloud Functions, 2nd Gen, with Node 20 on Ubuntu 22.04. Discouraging to see how long this seems to have been an issue for people.

Given that people are reporting that this works with older versions of Node and/or Ubuntu, I'm wondering if this is more-so an issue with ffmpeg or Node (or both). Downgrading to older versions isn't an attractive long-term solution so I'm trying to do a little more digging to see if I can find any indication of the root of the problem here.

Edit: Not surprised to find that this is also an issue when using https://github.com/joshwnj/ffprobe-static.

@jeemercado
Copy link

Encountering this problem in Google Cloud Functions, 2nd Gen, with Node 20 on Ubuntu 22.04. Discouraging to see how long this seems to have been an issue for people.

Given that people are reporting that this works with older versions of Node and/or Ubuntu, I'm wondering if this is more-so an issue with ffmpeg or Node (or both). Downgrading to older versions isn't an attractive long-term solution so I'm trying to do a little more digging to see if I can find any indication of the root of the problem here.

Edit: Not surprised to find that this is also an issue when using https://github.com/joshwnj/ffprobe-static.

Did you manage to solve this? or find a work around to it?

@pwetherbee
Copy link

same problem using google firebase with node v18 downgrade to node v16 works

Encountered this issue in AWS App Runner on node.js v18. Downgrading to 16 fixed the issue

@bananemo
Copy link

bananemo commented Apr 20, 2024

I encountered the same issue after upgrading to Node.js v18 and deploying it to AWS Elastic Beanstalk. However, it worked properly on my M3 chip MacBook during local development.

I tried resolve it by manually installing ffmpeg and ffprobe, bypassing the use of this installer (@ffprobe-installer/ffprobe), but unfortunately, the problem persisted. As a workaround, I ended up using exiftool. Hope this issue can be fixed soon.

Error message: ffprobe was killed with signal SIGSEGV

@cgilly2fast
Copy link

Just ran into the same bug when using node-ffprobe-installer while running a git workflow.

I found this conversation to solve without rolling back to older version of software.

https://www.answeroverflow.com/m/1128826942766993490

Basically you don't need to use node-ffprobe-installer if you are using node-ffmpeg-installer because it already has ffprobe in it.

I removed these two lines of code and it worked fine in my git workflow: (ffmpeg is a fluent-ffmpeg reference)

import ffprobeInstaller from '@ffprobe-installer/ffprobe' 
ffmpeg.setFfprobePath(ffprobeInstaller.path

Original Error in git workflow:

Error in processing video: Error: ffprobe was killed with signal SIGSEGV
    ffprobe version N-66595-gc2b38619c0-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2007-2023 the FFmpeg developers
      built with gcc 8 (Debian 8.3.0-6)
      configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg
      libavutil      58. 14.100 / 58. 14.100
      libavcodec     60. 22.100 / 60. 22.100
      libavformat    60. 10.100 / 60. 10.100
      libavdevice    60.  2.101 / 60.  2.101
      libavfilter     9.  8.102 /  9.  8.102
      libswscale      7.  3.100 /  7.  3.100
      libswresample   4. 11.100 /  4. 11.100
      libpostproc    57.  2.100 / 57.  2.100
``
 https://www.answeroverflow.com/m/1128826942766993490

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

No branches or pull requests