gnome-shell crashing (libffi8ubuntu1 upgrade issue)

Bug #1892915 reported by satmandu
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
gnome-shell (Ubuntu)
Fix Released
Undecided
Unassigned
libffi (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Seeing this on groovy installs after an update.

ProblemType: Bug
DistroRelease: Ubuntu 20.10
Package: gnome-shell 3.36.4-1ubuntu2~build1
Uname: Linux 5.8.3-050803-generic x86_64
ApportVersion: 2.20.11-0ubuntu44
Architecture: amd64
CasperMD5CheckResult: skip
Date: Tue Aug 25 15:49:17 2020
DisplayManager: gdm3
InstallationDate: Installed on 2019-10-19 (311 days ago)
InstallationMedia: Ubuntu 19.10 "Eoan Ermine" - Release amd64 (20191017)
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
RelatedPackageVersions: mutter-common 3.36.4-1ubuntu2
ShellJournal:
 -- Logs begin at Tue 2020-06-16 11:50:01 EDT, end at Tue 2020-08-25 15:49:37 EDT. --
 -- No entries --
SourcePackage: gnome-shell
UpgradeStatus: No upgrade log present (probably fresh install)
modified.conffile..etc.default.apport: [modified]
mtime.conffile..etc.default.apport: 2020-08-10T16:14:34.416087

Revision history for this message
satmandu (satadru-umich) wrote :
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It sounds like some part of the system has crashed. To help us find the cause of the crash please follow these steps:

1. Look in /var/crash for crash files and if found run:
    ubuntu-bug YOURFILE.crash
Then tell us the ID of the newly-created bug.

2. If step 1 failed then look at https://errors.ubuntu.com/user/ID where ID is the content of file /var/lib/whoopsie/whoopsie-id on the machine. Do you find any links to recent problems on that page? If so then please send the links to us.

3. If step 2 also failed then apply the workaround from bug 994921, reboot, reproduce the crash, and retry step 1.

Please take care to avoid attaching .crash files to bugs as we are unable to process them as file attachments. It would also be a security risk for yourself.

Changed in gnome-shell (Ubuntu):
status: New → Incomplete
Revision history for this message
satmandu (satadru-umich) wrote :

This problem went away once I stopped using groovy-proposed and (painfully) removed libffi8ubuntu1 and all dependencies which used it.

summary: - gnome-shell crashing with Wayland
+ gnome-shell crashing (libffi8 upgrade issue)
summary: - gnome-shell crashing (libffi8 upgrade issue)
+ gnome-shell crashing (libffi8ubuntu1 upgrade issue)
Revision history for this message
Steve Langasek (vorlon) wrote :

In order to address this bug, a backtrace is still needed.

Changed in libffi (Ubuntu):
status: New → Incomplete
Revision history for this message
Steve Langasek (vorlon) wrote :

I see that the libffi transition in -proposed is as-yet incomplete. So one possible explanation for the crash would be if pointers to libffi objects are being passed between other libraries that are linked to different versions of libffi, resulting in a crash.

 #if defined (X86_64) || defined(X86_WIN64) \
     || (defined (__x86_64__) && defined (X86_DARWIN))
-# define FFI_TRAMPOLINE_SIZE 24
+/* 4 bytes of ENDBR64 + 7 bytes of LEA + 6 bytes of JMP + 7 bytes of NOP
+ + 8 bytes of pointer. */
+# define FFI_TRAMPOLINE_SIZE 32
 # define FFI_NATIVE_RAW_API 0
 #else
-# define FFI_TRAMPOLINE_SIZE 12
+/* 4 bytes of ENDBR32 + 5 bytes of MOV + 5 bytes of JMP + 2 unused
+ bytes. */
+# define FFI_TRAMPOLINE_SIZE 16
 # define FFI_NATIVE_RAW_API 1 /* x86 has native raw api support */
 #endif

There are definitely libffi structures that have changed size between releases.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I'm not sure we do need a backtrace now. libffi is used everywhere in gnome-shell/gjs for calls between C and JavaScript. The exact location of the crash might not matter if it's just an ABI break as Steve suggests. In theory that shouldn't happen though, as gnome-shell/gjs is strictly linked to libffi.so.7. Or it *was* until https://launchpad.net/ubuntu/+source/gjs/1.64.3-1build1

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

The deps are now out of date. At least mozjs68 has now moved.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

also using groovy-proposed is not supported, as it contains incompatible mix of packages.

Revision history for this message
satmandu (satadru-umich) wrote :

Fully aware that proposed is not supported, and that this may cause instability.

Just trying to be helpful as per https://wiki.ubuntu.com/Testing/EnableProposed

"Proposed updates are only for testing updates and providing development feedback. Enabling this may introduce instability."

This bug report was intended to help provide development feedback.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

@satmandu

Thank you for pointing that documentation out.

It is correct that it is helpful to test Proposed, but I think that information was written when packages in proposed were only published for stable series, which only contain prospective Stable Release Updates, and is the way "for testing updates".

That is not true for devel series. In devel series, -proposed is not for human consumption. Instead simply running devel series, release pocket is already testing and providing feedback from such config is useful.

I'm not sure how we can update that testing page to be more informative.

Revision history for this message
Steve Langasek (vorlon) wrote : Re: [Bug 1892915] Re: gnome-shell crashing (libffi8ubuntu1 upgrade issue)

On Fri, Aug 28, 2020 at 03:01:13PM -0000, Dimitri John Ledkov wrote:
> I'm not sure how we can update that testing page to be more informative.

I don't find that cited text on this wiki page at all.

I *do* find that the page advises to enable "selective upgrading from
-proposed", which would have avoided this particular problem.

Revision history for this message
satmandu (satadru-umich) wrote :

@vorlon it is in the graphic which shows up in the GUI surrounding the checkbox to enable -proposed
here: https://wiki.ubuntu.com/Testing/EnableProposed?action=AttachFile&do=get&target=devoptions_1604.png

Thank you @knox for the clarification. This was largely my fault for doing a 's/focal/groovy/g' in my sources.list.

I can't speak to whether the GUI source selection interface allows one to add -proposed to the primary sources.list when the devel series is running though.

Is there a way to tell apt that packages which have a dependency upon libffi7 should absolutely not be mixed with packages which depend upon libffi8 because there is a breaking change? (I imagine there is no automated way to notice that hey data structures have changed between library versions.)

And for the benefit of users in the future who accidentally hit this sort of issue, can anyone recommend a best practices way to downgrade all packages which are for instance built against libffi8ubuntu1?

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

This should be not affecting gnome-shell anymore.

Changed in gnome-shell (Ubuntu):
status: Incomplete → Fix Released
Changed in libffi (Ubuntu):
status: Incomplete → Invalid
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.