package libssl3:amd64 3.0.2-0ubuntu1.8 failed to install/upgrade: installed libssl3:amd64 package post-installation script subprocess returned error exit status 1

Bug #2008846 reported by Ahmad F. Faiz
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
needrestart (Ubuntu)
New
Undecided
Unassigned
openssl (Ubuntu)
Incomplete
Undecided
Unassigned

Bug Description

encounter error when attempting to do sudo update, upgrade, and full-upgrade

ProblemType: Package
DistroRelease: Ubuntu 22.04
Package: libssl3:amd64 3.0.2-0ubuntu1.8
ProcVersionSignature: Ubuntu 5.15.0-58.64-generic 5.15.74
Uname: Linux 5.15.0-58-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.11-0ubuntu82.3
Architecture: amd64
CasperMD5CheckResult: pass
Date: Wed Mar 1 10:28:26 2023
ErrorMessage: installed libssl3:amd64 package post-installation script subprocess returned error exit status 1
InstallationDate: Installed on 2022-10-01 (150 days ago)
InstallationMedia: Ubuntu 22.04 LTS "Jammy Jellyfish" - Release amd64 (20220419)
Python3Details: /usr/bin/python3.10, Python 3.10.6, python3-minimal, 3.10.6-1~22.04
PythonDetails: N/A
RebootRequiredPkgs: Error: path contained symlinks.
RelatedPackageVersions:
 dpkg 1.21.1ubuntu2.1
 apt 2.4.8
SourcePackage: openssl
Title: package libssl3:amd64 3.0.2-0ubuntu1.8 failed to install/upgrade: installed libssl3:amd64 package post-installation script subprocess returned error exit status 1
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Ahmad F. Faiz (affxubuntu) wrote :
Revision history for this message
Adrien Nader (adrien) wrote (last edit ):

This doesn't seem to be an issue with the openssl package itself.

(oops, sent my message too quickly)

In DpkgTerminalLog.gz there is this line:

    debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable

In general you might be able to check which file hoids the lock with "sudo fuser -v /var/cache/debconf/config.dat".

I'm going to mark the bug as Incomplete but change the status if there are more hints that this may be specific to openssl. Also, I guess that this issue already went away by itself, or at most after a reboot.

Changed in openssl (Ubuntu):
status: New → Incomplete
Adrien Nader (adrien)
Changed in openssl (Ubuntu):
status: Incomplete → Invalid
status: Invalid → Incomplete
Revision history for this message
Derek (diseno-web-mallorca) wrote :

I have the same issue after running "sudo fuser -v /var/cache/debconf/config.dat".

I get this result.

 USER PID ACCESS COMMAND
/var/cache/debconf/config.dat:
                     root 1224024 F.... frontend

But no idea what process is it and if I can just kill it. Can I?

This is the complete error log

Update failed.
Update utility stdout:
Setting up libssl3:amd64 (3.0.2-0ubuntu1.10) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing package libssl3:amd64 (--configure):
installed libssl3:amd64 package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
libssl3:amd64
Update utility stderr:
2023-06-01 00:36:06 INFO: pum is called with arguments: ['--update', '--json', '--', 'cloud-init', 'docker-ce', 'docker-ce-cli', 'docker-compose-plugin', 'grafana', 'libssl-dev', 'libssl3', 'linux-libc-dev', 'openssl', 'plesk-php80', 'plesk-php80-bcmath', 'plesk-php80-cli', 'plesk-php80-dba', 'plesk-php80-enchant', 'plesk-php80-fpm', 'plesk-php80-gd', 'plesk-php80-imagick', 'plesk-php80-imap', 'plesk-php80-intl', 'plesk-php80-ldap', 'plesk-php80-mbstring', 'plesk-php80-mysql', 'plesk-php80-odbc', 'plesk-php80-opcache', 'plesk-php80-pdo', 'plesk-php80-pear', 'plesk-php80-pgsql', 'plesk-php80-process', 'plesk-php80-pspell', 'plesk-php80-redis', 'plesk-php80-snmp', 'plesk-php80-soap', 'plesk-php80-sodium', 'plesk-php80-tidy', 'plesk-php80-xdebug', 'plesk-php80-xml']
2023-06-01 00:36:08 WARNING: package 'libssl-dev' not installed
MarkUpgrade() called on a non-upgradeable pkg: 'libssl3'
2023-06-01 00:36:09 INFO: updating packages: docker-compose-plugin plesk-php80-opcache docker-ce-cli plesk-php80-imagick plesk-php80-gd plesk-php80-sodium plesk-php80-xdebug plesk-php80-tidy plesk-php80-imap plesk-php80-intl plesk-php80-pgsql plesk-php80-odbc plesk-php80-pspell plesk-php80-bcmath grafana plesk-php80-mysql plesk-php80-pear docker-ce cloud-init plesk-php80-ldap plesk-php80-process plesk-php80-cli plesk-php80-redis plesk-php80-dba plesk-php80-enchant plesk-php80-fpm plesk-php80-pdo plesk-php80-mbstring plesk-php80 plesk-php80-xml plesk-php80-snmp plesk-php80-soap openssl linux-libc-dev
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
E:Sub-process /usr/bin/dpkg returned an error code (1)
2023-06-01 00:36:12 ERROR: installArchives() failed
2023-06-01 00:36:12 ERROR: Exited with returncode 1.

Revision history for this message
Adrien Nader (adrien) wrote :

I expect "frontend" to be "/usr/share/debconf/frontend" and therefore that you have another update (still) running somewhere, waiting for you to answer a question from debconf.

I like to look at the output of "ps faux" to get more context into what has started process. You can either "ps faux | less" and "/frontend", or soemthing like "ps faux | grep -B 4 -A 1 frontend" (show 4 lines Before and 1 line After the match).

Revision history for this message
Derek (diseno-web-mallorca) wrote :

This is what I got from ps faux | less" and "/frontend.

Do you think is ok to kill the process? I can't think about that update running, has I always get the same response since 7 days.

root 1422 0.0 0.0 15424 7740 ? Ss Mar30 2:37 sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups
root 3400080 0.0 0.0 21632 13336 ? Ss 13:04 0:00 \_ sshd: root@pts/1
root 3413447 0.0 0.0 9140 5864 pts/1 Ss 13:04 0:00 \_ -bash
root 3812617 0.0 0.0 10872 4288 pts/1 R+ 14:32 0:00 \_ ps faux
root 3812618 0.0 0.0 6560 2188 pts/1 S+ 14:32 0:00 \_ grep --color=auto -B 4 -A 1 frontend
root 1497 0.0 0.0 107116 15836 ? Ssl Mar30 0:00 /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal
--
root 1224019 0.0 0.0 13716 2516 ? Ss Apr24 0:00 /usr/bin/dpkg --force-confdef --force-confold --status-fd 63 --configure --pending
root 1224020 0.0 0.0 2888 880 ? S Apr24 0:00 \_ sh -c (test -x /usr/lib/needrestart/dpkg-status && /usr/lib/needrestart/dpkg-status || cat > /dev/null)
root 1224021 0.0 0.0 2888 4 ? S Apr24 0:00 | \_ sh -c (test -x /usr/lib/needrestart/dpkg-status && /usr/lib/needrestart/dpkg-status || cat > /dev/null)
root 1224022 0.0 0.0 2888 848 ? S Apr24 0:00 | \_ /bin/sh /usr/lib/needrestart/dpkg-status
root 1224024 1.7 0.0 26288 8432 ? S Apr24 988:49 \_ /usr/bin/perl -w /usr/share/debconf/frontend /var/lib/dpkg/info/grub-efi-amd64-signed.postinst configure 1.182~22.04.1+2.06-2ubuntu10
root 1224036 0.0 0.0 2888 892 ? S Apr24 0:00 \_ /bin/sh /var/lib/dpkg/info/grub-efi-amd64-signed.postinst configure 1.182~22.04.1+2.06-2ubuntu10

Revision history for this message
Seth Arnold (seth-arnold) wrote :

Am I reading the ps faux output from comment #5 correctly, that needrestart is responsible for starting a dpkg process that starts a debconf frontend, but there's no terminal available to this process?

Why is needrestart doing operations that would need a debconf frontend? Should it be doing them, or is it a surprise? Should it be setting the frontend non-interactive environment variable? Or should it stop doing the dpkg operations?

Or, did I misread the thing?

Thanks

Revision history for this message
Adrien Nader (adrien) wrote :

Derek, do you have more logs for April 24? It would be very valuable to know what started the apt/dpkg processes. These files would be useful (most are rotated: most likely data for April 24 is in a foo.*.gz file):

apt/dpkg/unattended-upgrades logs:
- /var/log/apt/history.log*
- /var/log/apt/term.log*
- /var/log/dpkg.log*
 -/var/log/unattended-upgrades/*

system logs (in order to find out connection/disconnection times and possible other errors)
- /var/log/syslog*
- /var/log/auth.log*

System logs likely contain private information, especially syslog and auth.log. All logs fairly explicit when it comes to dates and it should be easy to narrow logs down to the appropriate time range and remove whatever needs to be removed.

Thanks a lot. That would be tremendously helpful since, as you can see, the actual error happens weeks before the report and it has been difficult to collect useful logs.

Seth, I don't think needrestart spawns debconf (but launchpad/HTML doesn't display consecutive spaces as several ones). My understanding is as follows:

dpkg (1224019) sources/runs /etc/dpkg/dpkg.cfg.d/needrestart as PID 1224020
sh (1224020) spawns a subshell as PID 1224021
sh (1224021) spawns /sh /usr/lib/needrestart/dpkg-status as PID 1224022
dpkg-status (1224022) reads dpkg's output, probably until dpkg exits

dpkg (1224019) runs the grub postinst script, probably as PID 1224023 (not listed)
grub's postinst (1224023?) sources debconf's script which notices debconf is not running and therefore execs debconf which then spawns the grub postinst again as PID 1224024; AFAIU that's the intended behavior
grub's postinst (1224023) sits there waiting, possibly for results from debconf

Since the grub postinst never finishes, dpkg itself never finishes and needrestart doesn't finish either.

Btw, I'm getting more motivated to get rid of the current postinst in openssl because it's responsible for a large number of bug reports (both because the behaviour is suboptimal and because it uses debconf and gathers such bug reports [ I would also like this to be fixed debconf side obviously ]).

Revision history for this message
Seth Arnold (seth-arnold) wrote :

Thanks Adrien, that feels less worrying than I initially thought. Yesterday I missed an unattended-upgrades that's been running since March. Oof.

I honestly don't know what to suggest to Derek; killing those processes feels like a good idea, since there's no terminal available to interact with debconf, and sooner or later the consequences of that are going to have to be faced. It's probably enough to kill it, and then do:

sudo apt install -f
sudo apt update && sudo apt upgrade

by hand afterwards, that'd probably get to a happy place. But I'm not confident.

I like the idea of removing / pruning / moving the openssl maintainer scripts; a lot of it feels like it was made for a previous world. And it's certainly fragile, I see enough of these bug reports, too.

Thanks

Revision history for this message
Derek (diseno-web-mallorca) wrote :

I'm afraid I cant access the logs when that happened. Actually I don't know the exact date that this started happening on the updates. The thing is that I cant use apt anymore, I wanted to install a package to create a complete copy of the server in case something goes wrong.

Maybe the best solution is to restart the server instead of killing this process?
Please I would need some advice as I have clients projects there.

I was thinking of buying a new server, try duplicate the plesk there and all configuration, but that is a lot of work. So I will have this 3 options.

1.- Kill the process and see if it did work, if not... I wont have server for at least 4-5 hours until I configure and install all again.
2.- restart the server, this looks like a better aproach instead of killing services in the middle. and cross fingers that ubuntu solve it self. but again if not, and system just does not go will be in trouble.
3.- duplicating all server on other server.

What are your opinion?

Thank you in advance.

Revision history for this message
Seth Arnold (seth-arnold) wrote :

Of your suggestions, I like #1 the most; a reboot is usually a good idea *anyway*, since there's always kernel updates to install, but I'd hold off rebooting until you get the machine back into a happy state.

Try:

sudo kill 1224036
sudo apt install -f

You might also need:

sudo dpkg --configure -a

Then:

sudo apt update && sudo apt upgrade

Thanks

Revision history for this message
Derek (diseno-web-mallorca) wrote :
Download full text (21.3 KiB)

This is the current complete log if could help.

Execution failed.
Command: autoinstaller
Arguments: Array
(
    [0] => --select-product-id
    [1] => plesk
    [2] => --select-release-current
    [3] => --upgrade-installed-components
)

Details: Downloading file products.inf3: 0%
Downloading file products.inf3: 100% was finished.
Downloading file pool/PSA_18.0.52_11753/release.inf3: 0%
Downloading file pool/PSA_18.0.52_11753/release.inf3: 100% was finished.
Downloading file pool/PSA_18.0.51_11495/release.inf3: 0%
Downloading file pool/PSA_18.0.51_11495/release.inf3: 100% was finished.
Downloading file pool/PSA_18.0.50_11079/release.inf3: 0%
Downloading file pool/PSA_18.0.50_11079/release.inf3: 100% was finished.
Downloading file pool/PSA_18.0.49_10759/release.inf3: 0%
Downloading file pool/PSA_18.0.49_10759/release.inf3: 100% was finished.
Downloading file pool/PSA_18.0.48_10183/release.inf3: 0%
Downloading file pool/PSA_18.0.48_10183/release.inf3: 100% was finished.
Downloading file pool/PSA_18.0.47_10005/release.inf3: 0%
Downloading file pool/PSA_18.0.47_10005/release.inf3: 100% was finished.
Downloading file pool/PSA_18.0.46_9775/release.inf3: 0%
Downloading file pool/PSA_18.0.46_9775/release.inf3: 100% was finished.
Downloading file plesk.inf3: 0%
Downloading file plesk.inf3: 100% was finished.
Downloading file sitebuilder.inf3: 0%
Downloading file sitebuilder.inf3: 100% was finished.
Downloading file pool/WPB_18.0.51_64/release.inf3: 0%
Downloading file pool/WPB_18.0.51_64/release.inf3: 100% was finished.
Downloading file PHP82_17/release.inf3: 0%
Downloading file PHP82_17/release.inf3: 100% was finished.
Downloading file php82.inf3: 0%
Downloading file php82.inf3: 100% was finished.
Downloading file PHP81_17/release.inf3: 0%
Downloading file PHP81_17/release.inf3: 100% was finished.
Downloading file php81.inf3: 0%
Downloading file php81.inf3: 100% was finished.
Downloading file PHP80_17/release.inf3: 0%
Downloading file PHP80_17/release.inf3: 100% was finished.
Downloading file php80.inf3: 0%
Downloading file php80.inf3: 100% was finished.
Downloading file php72.inf3: 0%
Downloading file php72.inf3: 100% was finished.
Downloading file PHP74_17/release.inf3: 0%
Downloading file PHP74_17/release.inf3: 100% was finished.
Downloading file php74.inf3: 0%
Downloading file php74.inf3: 100% was finished.
Downloading file php73.inf3: 0%
Downloading file php73.inf3: 100% was finished.
Downloading file php71.inf3: 0%
Downloading file php71.inf3: 100% was finished.
Downloading file setemplates.inf3: 0%
Downloading file setemplates.inf3: 100% was finished.
Downloading file pp-sitebuilder.inf3: 0%
Downloading file pp-sitebuilder.inf3: 100% was finished.
Downloading file billing.inf3: 0%
Downloading file billing.inf3: 100% was finished.
Downloading file mysql.inf3: 0%
Downloading file mysql.inf3: 100% was finished.
Downloading file apache.inf3: 0%
Downloading file apache.inf3: 100% was finished.
Downloading file nginx.inf3: 0%
Downloading file nginx.inf3: 100% was finished.
Downloading file php70.inf3: 0%
Downloading file php70.inf3: 100% was finished.
Downloading file php56.inf3: 0%
Downloading file php56.inf3: 100% was finished.
Downloading file ph...

Revision history for this message
Derek (diseno-web-mallorca) wrote :

and also get this from plesk

Hello, Winston Derek
Some problems occurred with the System Updates tool on your server mystifying-swartz.212-227-218-70.plesk.page. Please resolve them manually.

Reason: 2023-06-03 06:25:22 INFO: pum is called with arguments: ['--list', '--repo-info', '--json']
2023-06-03 06:25:22 ERROR: Previous Plesk installer call finished unsuccessfully. PUM will not perform any update operations until Plesk installation is fixed.
2023-06-03 06:25:22 ERROR: Exited with returncode 50.

Revision history for this message
Derek (diseno-web-mallorca) wrote :

dpkg: error processing package libssl3:amd64 (--configure):
 installed libssl3:amd64 package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 libssl3:amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
Adrien Nader (adrien) wrote :

I came back to this bug report several times but was unable to progress much. An elephant in the room is plesk which apparently has a component which does updates itself and I don't know how it does it since it's closed source and not accessible nor publicly documented. There are also additional apt repositories which can be an issue even though it's less likely.

Anyway, since I don't think it is possible to move forward on this specific bug entry, I'm going to mark it as duplicate of the main bug for this kind of error. Don't hesite to comment nonetheless if you still have something broken or have additional infos.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.