imageio / imageio-ffmpeg

FFMPEG wrapper for Python
BSD 2-Clause "Simplified" License
221 stars 50 forks source link

SIGSEGV when using threads #20

Closed christopherhesse closed 4 years ago

christopherhesse commented 5 years ago

This script will segfault pretty reliably when using imageio. It's hard to say if this is an imageio error, or even an imageio-ffmpeg error (maybe this python build is broken or something), but doesn't happen when using the image loading backend and may be related to #17.

https://github.com/christopherhesse/imageio-sigsegv

almarklein commented 5 years ago

Thanks for making this reproducible with the Docker image. I will have a look when I can, but I do'nt have much free cycles right now, and have a conf + holiday coming up, so it can be a while :)

almarklein commented 4 years ago

Have you tried to do this with just imageio-ffmpeg (no imageio)? That might help narrow it down ...

christopherhesse commented 4 years ago

I'm not familiar with the api of imageio-ffmpeg, so I have not. Being able to cause a segfault in python is odd, and makes me think this is some thread related thing, or else a python issue that would require some workaround in imageio-ffmpeg.

almarklein commented 4 years ago

@christopherhesse Thanks again for providing the example to reproduce the issue!

I can reproduce this on a VM (Ubunty 18.04). Results:

I am in the dark as to where the segfault comes from, but this is another confirmation that (with ffmpeg) p.communictate should be avoided. Anyway, will be fixed in #29! New release coming up!