Segmentation fault in "apt --fix-broken install"

Bug #1743204 reported by Otto
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

Expected: New installation of 'wine'

Result: (See attached screenshot of the terminal.)
The installation failed with unmet dependencies, so I entered "sudo apt --fix-broken install" and in the course of this dpkg encountered a segmentation fault:

Unpacking linux-image-extra-4.13.0-25-generic (4.13.0-25.29) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-extra-4.13.0-25-generic_4.13.0-25.29_amd64.deb (--unpack):
 unable to create new file '/var/lib/dpkg/info/linux-image-extra-4.13.0-25-generic.list-new': Operation not permitted
Segmentation fault

I have seen this before reported as a bug: 1742387

As I cannot attach more than one file (why this?) I'm inserting the full terminal content here:

sudo apt install wine-stable
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies.
 linux-image-generic : Depends: linux-image-extra-4.13.0-25-generic but it is not going to be installed
 wine-stable : Depends: wine64 (>= 2.0.2-2ubuntu1) but it is not going to be installed or
                        wine32 (>= 2.0.2-2ubuntu1)
               Depends: wine64 (< 2.0.2-2ubuntu1.1~) but it is not going to be installed or
                        wine32 (< 2.0.2-2ubuntu1.1~)
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
11:20:56 [root@scotland] ~
sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  linux-image-extra-4.13.0-25-generic
The following NEW packages will be installed
  linux-image-extra-4.13.0-25-generic
0 to upgrade, 1 to newly install, 0 to remove and 0 not to upgrade.
6 not fully installed or removed.
Need to get 0 B/31.5 MB of archives.
After this operation, 163 MB of additional disk space will be used.
Do you want to continue? [Y/n]
(Reading database ... 383838 files and directories currently installed.)
Preparing to unpack .../linux-image-extra-4.13.0-25-generic_4.13.0-25.29_amd64.deb ...
Unpacking linux-image-extra-4.13.0-25-generic (4.13.0-25.29) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-extra-4.13.0-25-generic_4.13.0-25.29_amd64.deb (--unpack):
 unable to create new file '/var/lib/dpkg/info/linux-image-extra-4.13.0-25-generic.list-new': Operation not permitted
Segmentation fault

ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: linux-image-generic 4.13.0.25.26
ProcVersionSignature: Ubuntu 4.13.0-21.24-generic 4.13.13
Uname: Linux 4.13.0-21-generic x86_64
ApportVersion: 2.20.7-0ubuntu3.7
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: john 6019 F.... pulseaudio
 /dev/snd/controlC1: john 6019 F.... pulseaudio
CurrentDesktop: GNOME
Date: Sun Jan 14 11:24:06 2018
HibernationDevice: RESUME=UUID=53ca4e3e-a7f4-4969-ad38-429b38324fed
InstallationDate: Installed on 2017-04-28 (260 days ago)
InstallationMedia: Ubuntu-GNOME 17.04 "Zesty Zapus" - Release amd64 (20170412)
MachineType: Gigabyte Technology Co., Ltd. EP45-DS4
ProcFB: 0 radeondrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.13.0-21-generic root=UUID=4cfb4fad-eedb-4de1-9dd6-b384d7bc18e0 ro quiet splash vt.handoff=7
RelatedPackageVersions:
 linux-restricted-modules-4.13.0-21-generic N/A
 linux-backports-modules-4.13.0-21-generic N/A
 linux-firmware 1.169.1
RfKill:
 0: phy0: Wireless LAN
  Soft blocked: no
  Hard blocked: no
SourcePackage: linux
UpgradeStatus: Upgraded to artful on 2017-11-08 (66 days ago)
dmi.bios.date: 09/30/2008
dmi.bios.vendor: Award Software International, Inc.
dmi.bios.version: F9
dmi.board.name: EP45-DS4
dmi.board.vendor: Gigabyte Technology Co., Ltd.
dmi.chassis.type: 3
dmi.chassis.vendor: Gigabyte Technology Co., Ltd.
dmi.modalias: dmi:bvnAwardSoftwareInternational,Inc.:bvrF9:bd09/30/2008:svnGigabyteTechnologyCo.,Ltd.:pnEP45-DS4:pvr:rvnGigabyteTechnologyCo.,Ltd.:rnEP45-DS4:rvr:cvnGigabyteTechnologyCo.,Ltd.:ct3:cvr:
dmi.product.name: EP45-DS4
dmi.sys.vendor: Gigabyte Technology Co., Ltd.

Revision history for this message
Otto (otto11235) wrote :
Revision history for this message
Otto (otto11235) wrote :

Attempting to remove the linux-generic package Synaptic Package Manager also reported "package is in a very bad inconsistent state" and failed.

Please see the attached terminal log

Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Otto (otto11235) wrote :

Attempting to upgrade the package Synaptic Package Manager failed again with:

E: /var/cache/apt/archives/linux-image-extra-4.13.0-25-generic_4.13.0-25.29_amd64.deb: unable to open '/lib/modules/4.13.0-25-generic/kernel/drivers/leds/leds-dac124s085.ko.dpkg-new': Operation not permitted

Revision history for this message
Otto (otto11235) wrote :

From "https://askubuntu.com/questions/675296/changing-ownership-operation-not-permitted-even-as-root"
looks like "file has the immutable flag set in its extended attributes"
so I reckon it's a problem to be resolved by the package maintainer... or someone who knows better, please help...
If I can do anything to help, just let me know.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

You may need to run the following from a terminal:

sudo apt-get install -f
sudo apt-get clean
sudo apt-get update

Then re-install the package or updates.

If that does not resolve your issue, please mark the bug as "Confirmed"

Changed in linux (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Incomplete
Revision history for this message
Otto (otto11235) wrote :

OK, done that.
I then did 'sudo apt-get update' which started off fine but after some "W: Possible missing firmware' messages the process stalled without using CPU.
Please see attached terminal log

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Otto (otto11235) wrote :

I blacklisted the package "linux-image-extra-4.13.0-25-generic" in 50unattended-upgrades and at least unattended upgrades runs to completion without any errors.

Should I do anything else to allow apt auto-updating to run as normally as possible?

Revision history for this message
Otto (otto11235) wrote :

I also blacklisted it in '/etc/apt/apt.conf.d/01autoremove' and apt update now also runs to completion without any errors.

Revision history for this message
Otto (otto11235) wrote :

I tried to install wine again and got more errors - see the attached terminal log. The base problem seems always to be a authorisation issue. e.g.:

"dpkg: error processing archive /var/cache/apt/archives/libwine_2.0.2-2ubuntu1_amd64.deb (--unpack):
 unable to open '/usr/lib/x86_64-linux-gnu/wine/resutils.dll.so.dpkg-new': Operation not permitted"

Can someone with more know-how than myself divine what the underlying problem is?

From my naive googling it seems to be a problem with "immutable flag set in its extended attributes" as in "https://askubuntu.com/questions/675296/changing-ownership-operation-not-permitted-even-as-root"

The permissions of " /usr/lib/x86_64-linux-gnu/wine" seem to me to be in order e.g.:
-rw-r--r-- 1 root root 79K Oct 13 12:09 acledit.dll.so

How can we proceed in this matter?

Revision history for this message
Otto (otto11235) wrote :

There is one file in /usr/lib/x86_64-linux-gnu/wine/ which lsattr says has the immutable flag set:

-----------I--e---- /usr/lib/x86_64-linux-gnu/wine/fakedlls

Is this the root of the problem?

The file "/usr/lib/x86_64-linux-gnu/wine/resutils.dll.so.dpkg-new" (see above) does not (currently) exist, so the permissions problem must be created in the update process.

Or am I barking up the wrong tree? What does the package maintainer say?

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.