Update stuck at posttrans script

Hi!

It’s been at least 40 minutes that, after doing a “sudo zypper dup”, the update is stuck at the execution of %posttrans ‘suse-module-tools-16.0.32-1.1.x86_64.rpm’ . What should I do?

Thank you
Paola

If you can find the process that is stuck, you can try killing it. That might need

kill -KILL process-id

because it is probably blocking other signals. With luck, that might allow other posttrans scripts to still run.

If all else fails, you can reboot. The software was updated, but some scripts might not have run. That usually doesn’t cause serious problems.

Maybe make notes about this, and report a bug.

Dup readily installs:

erlangen:~ # journalctl -b -u dup -g suse-module-tools --no-pager
Jul 06 16:43:20 erlangen zypper[16167]:   ghc-aeson ghc-asn1-encoding ghc-asn1-types ghc-assoc ghc-attoparsec ghc-base64 ghc-base64-bytestring ghc-base-compat ghc-base-compat-batteries ghc-basement ghc-bifunctors ghc-bitvec ghc-blaze-builder ghc-blaze-html ghc-blaze-markup ghc-cassava ghc-cereal ghc-citeproc ghc-colour ghc-commonmark ghc-commonmark-extensions ghc-comonad ghc-conduit ghc-conduit-extra ghc-contravariant ghc-cryptonite ghc-digest ghc-foldable1-classes-compat ghc-Glob ghc-haddock-library ghc-hashable ghc-haskell-lexer ghc-hourglass ghc-http-client ghc-http-types ghc-indexed-traversable ghc-integer-logarithms ghc-iproute ghc-jira-wiki-markup ghc-JuicyPixels ghc-libyaml ghc-memory ghc-mono-traversable ghc-network ghc-network-uri ghc-OneTuple ghc-ordered-containers ghc-pandoc ghc-pandoc-types ghc-pem ghc-pretty-show ghc-primitive ghc-QuickCheck ghc-regex-base ghc-regex-tdfa ghc-resourcet ghc-safe ghc-scientific ghc-semialign ghc-semigroupoids ghc-skylighting ghc-skylighting-core ghc-socks ghc-splitmix ghc-streaming-commons ghc-strict ghc-tagged ghc-tagsoup ghc-texmath ghc-text-short ghc-th-abstraction ghc-these ghc-time-compat ghc-tls ghc-transformers-compat ghc-typed-process ghc-typst ghc-typst-symbols ghc-unicode-collation ghc-unicode-data ghc-unicode-transforms ghc-uniplate ghc-unliftio-core ghc-unordered-containers ghc-utf8-string ghc-vector ghc-vector-algorithms ghc-x509 ghc-x509-store ghc-x509-system ghc-x509-validation ghc-xml ghc-xml-conduit ghc-yaml ghc-zlib ghostscript ghostscript-x11 libbfio1 libcfile1 libcpath1 libewf3 libfvalue1 libuna1 mariadb mariadb-client mariadb-errormessages openSUSE-release openSUSE-release-appliance-custom pandoc-cli suse-module-tools suse-module-tools-scriptlets yast2-network yast2-trans-de yast2-trans-en_GB
Jul 06 16:43:31 erlangen zypper[16167]: Retrieving: suse-module-tools-16.0.32-1.1.x86_64 (Haupt-Repository (OSS)) (39/114),  56.5 KiB
Jul 06 16:43:31 erlangen zypper[16167]: Retrieving: suse-module-tools-16.0.32-1.1.x86_64.rpm [..done]
Jul 06 16:43:35 erlangen zypper[16167]: Retrieving: suse-module-tools-scriptlets-16.0.32-1.1.x86_64 (Haupt-Repository (OSS)) (68/114),  23.0 KiB
Jul 06 16:43:35 erlangen zypper[16167]: Retrieving: suse-module-tools-scriptlets-16.0.32-1.1.x86_64.rpm [..done]
Jul 06 16:44:00 erlangen [RPM][17165]: erase suse-module-tools-16.0.31-1.1.x86_64: success
Jul 06 16:44:00 erlangen [RPM][17165]: install suse-module-tools-16.0.32-1.1.x86_64: success
Jul 06 16:44:00 erlangen [RPM][17165]: erase suse-module-tools-16.0.31-1.1.x86_64: success
Jul 06 16:44:00 erlangen zypper[16167]: ( 39/114) Installing: suse-module-tools-16.0.32-1.1.x86_64 [..done]
Jul 06 16:44:04 erlangen [RPM][17301]: erase suse-module-tools-scriptlets-16.0.31-1.1.x86_64: success
Jul 06 16:44:04 erlangen [RPM][17301]: install suse-module-tools-scriptlets-16.0.32-1.1.x86_64: success
Jul 06 16:44:04 erlangen [RPM][17301]: erase suse-module-tools-scriptlets-16.0.31-1.1.x86_64: success
Jul 06 16:44:04 erlangen [RPM][17301]: install suse-module-tools-scriptlets-16.0.32-1.1.x86_64: success
Jul 06 16:44:04 erlangen zypper[16167]: ( 68/114) Installing: suse-module-tools-scriptlets-16.0.32-1.1.x86_64 [..done]
Jul 06 16:44:11 erlangen zypper[16167]: Executing %posttrans script 'suse-module-tools-16.0.32-1.1.x86_64.rpm' [...done]
erlangen:~ # 

In case of trouble retry.

How do I do that? Is it safe to just kill the terminal process with CTRL+C?

As for the pid of the process I tried doing “pidof zypper”. It did gave a number, 20640. Might it be the right process-id?

Anyway, I tried with kill -KILL 20640 but I got “operation not permitted”. Should I do it with sudo?

I Killed the process with CTRL+C, refreshed the repositories and did a new sypper dup. I rebooted and everything seems to work.

1 Like

Yes, you would need “sudo” for that. Instead of killing the “zypper” process, it would be better to try finding just the shell process that is running the script. That’s what would allow other scripts to still run.

Fair enough. You may have skipped running some scripts. But usually that won’t cause problems. The scripts do a little tweaking after installing the package. But what you missed this time will probably be done after a future update.

And yes, I have occasionally had that “stuck update” problem.

1 Like

Put the command in a systemd service and it will take care of all the fuzz:

6700k:~ # systemctl cat dup
# /etc/systemd/system/dup.service
[Unit]
Description=Upgrade System

[Service]
ExecStartPre=/usr/bin/nm-online
ExecStart=/usr/bin/zypper -n dist-upgrade
6700k:~ # 

Nice Icon for the desktop:

karl@erlangen:~/Schreibtisch> cat Dist-Upgrade.desktop
[Desktop Entry]
Comment[en_GB]=
Comment=
Comment[de_DE]=
Exec=/usr/bin/systemctl start dup.service
GenericName[en_GB]=
GenericName=
GenericName[de_DE]=
Icon=system-upgrade
MimeType=
Name[en_GB]=Dist-Upgrade
Name=Dist-Upgrade
Name[de_DE]=Dist-Upgrade
Path=
StartupNotify=true
Terminal=false
TerminalOptions=
Type=Application
X-DBUS-ServiceName=
X-DBUS-StartupType=
X-KDE-SubstituteUID=false
X-KDE-Username=
karl@erlangen:~/Schreibtisch> 

Comprehensive journal available:

6700k:~ # journalctl -q -u dup -p4
May 10 06:45:10 6700k systemd[1]: dup.service: Failed with result 'exit-code'.
May 23 20:55:52 6700k systemd[1]: dup.service: Failed with result 'exit-code'.
Jun 11 08:54:08 6700k systemd[1]: dup.service: Failed with result 'exit-code'.
Jun 30 03:19:37 6700k systemd[1]: dup.service: Failed with result 'exit-code'.
6700k:~ #