Unable to Upgrade my FerenOS Linux System

Not sure what has happened on my FerenOS 21.10 (based on Ubuntu 21.10) system, but for the past 2 or more weeks I’ve been unable to upgrade packages that are available for upgrade. My system information is as follows:
December-10-2021-18-30-45-ferenOSSysInfo

I can run sudo apt update successfully, but when I run sudo apt upgrade or … dist-upgrade, I receive the error: E: Sub-process /usr/bin/dpkg returned an error code (1) and the process ends in unsuccessful update of any packages.

I’ve tried the following to resolve this issue: (1)

which indicates that error were encountered with four packages: samba-common, smbclient, ubuntu-advantage-tools, and python3-samba. I’ve attempted to reinstall each of these packages and none of them will reinstall. So, I resorted to another potential fix by running: (2)

to no avail. I’m at my wits end as to what I should do to allow my system to be upgradeable once again. It appears that dpkg is broken. However, this does not show up in Synaptic as a “broken” package.

Any advice for me that can assist in fixing this issue would be greatly appreciated.

Just a wild guess, but could those two deb files in the cache be corrupt? Maybe just delete them and try updating again?

Thanks for the advice, but as I suspected, after deleting the two .deb files and verifying they had been removed, rerunning the update and/or upgrade process rebuilds /var/cache/apt/archives and puts them right back with the same error being generated since these two files are fetched in the upgrade process.

I appreciate your help. If you have any other ideas, I’m all ears. Short of reinstalling FerenOS and rebuilding, I’m not sure what else can be done with a broken dpkg package not being able to execute a split package reassembly (dkpkg-split). I did roll back my system 6 days from a daily backup using Timeshift, but apparently I waited too long and the 6th day in retrospect contained the broken dkpg as well.

One additional noteworthy discovery that I made tonight that might shed some light on the resolution for this issue is that I ran Synaptic Package Manager and clicked on Broken to see if I had broken packages. Indeed, I noted that the python3-samba package is broken. I assumed it might be since when I attempted to place an upgrade hold on python3-samba as well as the ubuntu-advantage-tools packages using sudo apt-mark hold , and reran an update, then an upgrade of the system from the Terminal, it reported that I was attempting to upgrade the system with a broken package: python3-samba. I am unable to remove or completely remove this package in Synaptic as it fails in either case, and, I’m unable to reinstall the package since it states package is in a very bad inconsistent state and then recommends a reinstall. However, this package has unmet dependencies. Attempting to install these unmet dependencies reports that the source is unavailable. I’m in a Catch 22 here and don’t know where to turn.

One other thing that I did, however, was to go outside of the Termial to the Update Manager GUI and uncheck both the python3-samba and ubuntu-advantage-tools packages, then click on Install Updates. Surprisingly, the icon in the system tray is showing as a green checkmark indicating my System is Up To Date. Returning to the Terminal however and attempting to Update, then Upgrade the system fails as before.

Does anyone know if the information regarding the apt issue in debian/NEWS | Fossies that points to an apt bug caused by the developers of PopOS that make fixing broken packages for distros based on Debian (which FerenOS is since it’s based on Debian and Ubuntu) may be why I’m unable to fix the broken python3-samba package?

I believe all those changes are in apt itself, and would stop things before a dpkg process was even spawned. Your problem looks to be much deeper into the process than the LTT bug.

The error looks like something is wrong with the files or disk, with dpkg-split reporting that “Input/output error”. You could check that the files are readable by just doing this, which should just silently complete (after sudo asks your pw, of course):

$ sudo cat  /var/cache/apt/archives/*deb > /dev/null

On the output side, dpkg-split is putting the output files somewhere, but where? Off the top of my head, an output error could occur if it’s writing to a full partition (no room in /tmp?), so maybe check your drives and see if anything is near full. df -h and see what they look like.

I’m unaware of how to get apt to show the commands it’s executing internally, which would help here immensely. If we could narrow it down to just the dpkg-split blah blah blah, then it would be a lot easier to chase.

efahl,

I ran the command that you asked me to run and it did run silently and nothing was returned in the stdout. I then ran sudo df -kh > filespace.txt to redirect the output to the file: filespace.txt, but it appears I’m unable to attach it here so I’ve linked it to my online storage account. I’m currently at 76% disk utilization on a 1TB SSD. The /tmp file is only 1% utilized according to the results of the command execution.

It doesn’t appear that I’m near drive capacity and the drive hasn’t given me any indications of drive I/O errors with other apps or copy / paste operations.

Again, thank you for looking at this. Hopefully the stdout of the df -kh command will give you some insight.

Yeah, disk space certainly doesn’t look like an issue. Here’s the df for posterity, with all the snaps removed.

Filesystem      Size  Used Avail Use% Mounted on
udev            7.8G     0  7.8G   0% /dev
tmpfs           1.6G   11M  1.6G   1% /run
/dev/sda2       916G  617G  253G  71% /
tmpfs           7.8G  220M  7.6G   3% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           7.8G     0  7.8G   0% /sys/fs/cgroup
tmpfs           7.8G  2.8M  7.8G   1% /tmp
/dev/sda1       300M  9.0M  291M   3% /boot/efi
tmpfs           1.6G   32K  1.6G   1% /run/user/1000
/dev/sdb1       110G   79G   25G  76% /media/datapioneer/LocalStorage
/dev/sr1         47M   47M     0 100% /media/datapioneer/Clickfree_System1
/dev/sdc        916G  236G  634G  28% /media/datapioneer/Backups

How about another read test? I was looking through the dpkg man pages and found dpkg-deb --info <some.deb>. I grabbed a random file in the archive on my Ubuntu box and checked it, you could try it on your python3-samba and ubuntu-advantage-tools debs and see if it tells us anything more… I’m sort of leaning towards “all this will work, something with that apt-mark is the cause.”

$ dpkg-deb --info /var/cache/apt/archives/libssl1.1_1.1.1f-1ubuntu2.10_amd64.deb

 new Debian package, version 2.0.
 size 1321716 bytes: control archive=40324 bytes.
     872 bytes,    19 lines      control
     609 bytes,     8 lines      md5sums
    7855 bytes,   226 lines   *  postinst             #!/bin/sh
     219 bytes,     8 lines   *  postrm               #!/bin/sh
     163 bytes,     4 lines      shlibs
  201671 bytes,  4896 lines      symbols
   47382 bytes,   384 lines      templates
      73 bytes,     2 lines      triggers
 Package: libssl1.1
 Source: openssl
 Version: 1.1.1f-1ubuntu2.10
 Architecture: amd64
 Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
 Installed-Size: 4027
 Depends: libc6 (>= 2.25), debconf (>= 0.5) | debconf-2.0
 Breaks: isync (<< 1.3.0-2), lighttpd (<< 1.4.49-2), python-boto (<< 2.44.0-1.1),
         python-httplib2 (<< 0.11.3-1), python-imaplib2 (<< 2.57-5),
         python3-boto (<< 2.44.0-1.1), python3-imaplib2 (<< 2.57-5)
 Section: libs
 Priority: optional
 Multi-Arch: same
 Homepage: https://www.openssl.org/
 Description: Secure Sockets Layer toolkit - shared libraries
  This package is part of the OpenSSL project's implementation of the SSL
  and TLS cryptographic protocols for secure communication over the
  Internet.
  .
  It provides the libssl and libcrypto shared libraries.
 Original-Maintainer: Debian OpenSSL Team <pkg-openssl-devel@lists.alioth.debian.org>

efahi,

I located the .deb associated with python3-samba deb file and ran the dpkg-deb --info against it. The results are shown below:

datapioneer@ferenOS-MainPC:~$ dpkg-deb --info /var/cache/apt/archives/python3-samba_2%3a4.13.14+dfsg-0ubuntu0.20.04.3_amd64.deb
new Debian package, version 2.0.
size 2612168 bytes: control archive=11064 bytes.
1192 bytes, 20 lines control
35839 bytes, 373 lines md5sums
252 bytes, 12 lines * postinst #!/bin/sh
401 bytes, 12 lines * prerm #!/bin/sh
5391 bytes, 67 lines shlibs
120 bytes, 3 lines triggers
Package: python3-samba
Source: samba
Version: 2:4.13.14+dfsg-0ubuntu0.20.04.3
Architecture: amd64
Maintainer: Ubuntu Developers ubuntu-devel-discuss@lists.ubuntu.com
Installed-Size: 20338
Depends: python3-crypto, python3-ldb (>= 2:2.1.0), python3-tdb, samba-libs (= 2:4.13.14+dfsg-0ubuntu0.20.04.3), python3 (<< 3.9), python3 (>= 3.8~), python3:any, libbsd0 (>= 0.0), libc6 (>= 2.14), libgnutls30 (>= 3.6.10), libldb2 (>= 2:2.2.3~), libpython3.8 (>= 3.8.2), libtalloc2 (>= 2.3.1~), libtevent0 (>= 0.10.2~), libwbclient0 (= 2:4.13.14+dfsg-0ubuntu0.20.04.3), python3-talloc (>= 2.3.1~)
Recommends: python3-gpg
Provides: python3.8-samba
Section: python
Priority: optional
Homepage: http://www.samba.org
Description: Python 3 bindings for Samba
Samba is an implementation of the SMB/CIFS protocol for Unix systems,
providing support for cross-platform file sharing with Microsoft Windows, OS X,
and other Unix systems. Samba can also function as a domain controller
or member server in both NT4-style and Active Directory domains.
.
This package contains Python 3 bindings for most Samba libraries.
Original-Maintainer: Debian Samba Maintainers pkg-samba-maint@lists.alioth.debian.org

Repeating this process for the ubuntu-advantage-tools deb file, I received the following stdout:

datapioneer@ferenOS-MainPC:~$ dpkg-deb --info /var/cache/apt/archives/ubuntu-advantage-tools_27.4.2~20.04.1_amd64.deb new Debian package, version 2.0.
size 858628 bytes: control archive=8660 bytes.
302 bytes, 7 lines conffiles
413 bytes, 14 lines * config #!/bin/sh
782 bytes, 16 lines control
5603 bytes, 65 lines md5sums
20848 bytes, 541 lines * postinst #!/bin/sh
3636 bytes, 111 lines * postrm #!/bin/sh
965 bytes, 17 lines * preinst #!/bin/sh
1950 bytes, 58 lines * prerm #!/bin/sh
199 bytes, 6 lines templates
Package: ubuntu-advantage-tools
Version: 27.4.2~20.04.1
Architecture: amd64
Maintainer: Ubuntu Developers ubuntu-devel-discuss@lists.ubuntu.com
Installed-Size: 3166
Depends: debconf (>= 0.5) | debconf-2.0, python3-yaml, python3:any, libapt-pkg6.0 (>= 0.8.0), libc6 (>= 2.14), libgcc-s1 (>= 3.0), libstdc++6 (>= 9), python3-apt, python3-pkg-resources, distro-info (>= 0.18ubuntu0.18.04.1)
Section: misc
Priority: important
Homepage: https://buy.ubuntu.com
Description: management tools for Ubuntu Advantage
Ubuntu Advantage is the professional package of tooling, technology
and expertise from Canonical, helping organisations around the world
manage their Ubuntu deployments.
.
Subscribers to Ubuntu Advantage will find helpful tools for accessing
services in this package.

Hope you can learn something from the output that is helpful.

Need to let you know that this morning I did a workaround to remove the broken package: python3-samba which I have been unable to fix in Synaptic Package Manager or otherwise, install or remove, etc. What I did was change directory to /var/lib/dpkg/info/ and edit the file python3-samba.prerm, adding “set -x” on line 2 and commenting out the line after that, which was “set -e”. After performing this, I ran the command: dpkg -r --force-all /var/lib/dpkg/info/python3-samba . After performing this action in the Terminal, I ran a sudo apt update followed by sudo apt upgrade and it completed successfully (NO ERRORS). I then navigated to Synaptic Package Manager to check whether the python3-samba package was still broken only to discover that it was NO LONGER BROKEN. I thought that the issue had been resolved, so I ran a Timeshift backup manually. When I returned to the Terminal and ran the command: sudo apt remove htop, to remove that package, it completed successfully and htop was not found. However, when I ran the command: sudo apt install htop, the dpkg-split Error returned and htop was not installed.

Oh, man, it never ends, does it? :slight_smile: Maybe apt update and apt upgrade after you restore to a good state, but before you do anything else? I wonder if there were other things out of sync after you got samba fixed.

Not totally sure, but all I know is that now I still cannot remove a package and reinstall it successfully. The reason is that dpkg-split fails to disassemble and reassemble the package that is being installed. Can’t figure out why this happened, but I’m at a point now where I feel a wipe-and-load is the only real solution.

Thank you, Efahl, for all your assistance with my issue. I concluded that my FerenOS system was just simply corrupted by what might have been something as simple as an unexpected interruption in AC power to my PC (which did occur just prior to the behavior I reported). This corruption was too great to tackle. So, yesterday, I performed a wipe-and-load of my system with Feren 21.10 build and all is well.

Thanks, again.

1 Like