Fedora-based VMs freezes when execute a python script which has no shebang

$ cat test.py
import requests
$ ./test.py

VMs based on Fedora 34 and 33 templates froze with this. I wondered, and then I live booted the Fedora-Workstation iso and tried the same thing, but no problem.
Why does it only affect Fedora templates? Or is it just me?

After a little googling, I found this.

1 Like

Extremely interesting. I’ve now reproduced it. To have this happen you just need to run import:

import something

Here’s a summary of the results.

qube type result
fedora-33 appVM freeze
fedora-34 appVM freeze
dom0 (r4.1) dom0 no freeze: ran without output.
debian-10 appVM no freeze: import-im6.q16: attempt to perform an operation not allowed by the security policy PS' @ error/consitute.c/IsCoderAuthorized/408.

The debian situation reminds me of this Error with qvm-convert-pdf, where debian was also blocking something. A fix for this will probably be something similar, except in this case the opposite.

1 Like

Without shebang, the default interpreter when you execute your script is BASH for Fedora. You are trying to execute code that BASH understands… First statement import (if the ImageMagick is installed) is simply the cause. How to check, do like @deeplow did :slight_smile:


Thanks for that good overview and testing. I tried it on debian-11 and it froze. Well, it’s not actually freezing, it’s more like waiting for the mouse to specify the range of the window to capture. I’m not sure why debian-10 can specify a range without freezing…

Yes, apparently I didn’t understand what import does, the article I found explained it but I missed it.

Lastly, sorry for the late reply.