With python3-dbg and python3.6-examples installed, here's a commandline for getting to the problematic getrandom() call.
# PYTHONPATH=/usr/share/doc/python3.6/examples/gdb PYTHONHASHSEED=1 gdb -ex 'break getrandom' -ex run -ex 'cont 4' -ex "python import libpython" -ex py-bt --args /usr/bin/python3-dbg /usr/bin/cloud-init init
With python3-dbg and python3.6-examples installed, here's a commandline for getting to the problematic getrandom() call.
# PYTHONPATH= /usr/share/ doc/python3. 6/examples/ gdb PYTHONHASHSEED=1 gdb -ex 'break getrandom' -ex run -ex 'cont 4' -ex "python import libpython" -ex py-bt --args /usr/bin/ python3- dbg /usr/bin/cloud-init init