A bit of further debugging using -x shows it blocking in /usr/share/debconf/confmodule.
+ . /usr/share/debconf/confmodule ++ '[' '!' 1 ']' ++ '[' -z 1 ']' + db_x_loadtemplatefile /var/lib/dpkg/info/ucf.templates ucf + _db_cmd 'X_LOADTEMPLATEFILE /var/lib/dpkg/info/ucf.templates' ucf + IFS=' ' + printf '%s\n' 'X_LOADTEMPLATEFILE /var/lib/dpkg/info/ucf.templates ucf' + IFS=' ' + read -r _db_internal_line
A bit of further debugging using -x shows it blocking in /usr/share/ debconf/ confmodule.
+ . /usr/share/ debconf/ confmodule tefile /var/lib/ dpkg/info/ ucf.templates ucf dpkg/info/ ucf.templates' ucf dpkg/info/ ucf.templates ucf'
++ '[' '!' 1 ']'
++ '[' -z 1 ']'
+ db_x_loadtempla
+ _db_cmd 'X_LOADTEMPLATEFILE /var/lib/
+ IFS=' '
+ printf '%s\n' 'X_LOADTEMPLATEFILE /var/lib/
+ IFS='
'
+ read -r _db_internal_line