My computer is bluescreening (KERNEL_SECURITY_CHECK_FAILURE) when running ffmpeg from bash (from python) and trying to kill the process (This is on WINDOWS with Windows Subsystem for Linux).

The processes are opened from python (subprocess.Popen) in the form bash -c 'ffmpeg <args>', however, when the python program attempts to kill them (proc.kill()) or python unexpectedly exits (KeyboardInterrupt), the python command line closes, while the bashes stay open, then is immediately followed by the BSoD.

An example of the code is:

formatted_command = ['bash', '-c', "'", 'ffmpeg', '-i', '<input file>',
                     '-vf', 'ass=<sub file>', '-strict', '-2', '<output file>', "'"]
process_list.append(sp.Popen(formatted_command, creationflags=sp.CREATE_NEW_CONSOLE,
                    stderr=sp.PIPE, universal_newlines=True))

And then to kill it:

[proc.kill() for proc in process_list]

Note that the BSoD only occurs when I try to kill the processes (or when python tries to, having errored and killing the processes it spawned), not when they exit successfully.

This could be as much a problem with WSL as with ffmpeg as with subprocess or even with my code, so any direction as to what to do (or how to clarify my question) would be greatly appreciated.

Thanks for the help.


Here is my C:\Windows\Minidump folder as requested by @magicandre1981. All of them most likely are from the same error: http://www.filedropper.com/minidump_2

WinDBG says "Probably caused by : LXCORE.SYS ( LXCORE!LxpFutexEvictWaitQueue+47 )", but unfortunately I have no idea what this means for me. Any help would be appreciated!

Edit 2:

The BSoDs always come whenever I try to kill the bashes externally (task manager, python's subprocess killing, proc.kill() etc.) so it is most definitely a problem with either ffmpeg or WSL. When I directly send ^C to the bashes (by way of making the python console also their stdin), they exit fine, like if they completed successfully.

This has led me to believe it is a problem with just trying to kill the process outside of the subsystem, so if there are any suggestions on how to tell bash itself to kill the process (without it capturing my stdin and pulling it away from python), I would be grateful.

Thanks for any help!

  • share the dmp files, so that we can analyze the dumps – magicandre1981 Jan 23 '18 at 17:32
  • @magicandre1981 I have now edited my answer – Atto Allas Jan 23 '18 at 20:20
  • looks like it is not allowed to kill processes from outside wsl. I have no idea how to force programs to exit correctly – magicandre1981 Jan 24 '18 at 15:29

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.