When booting Ubuntu (live session or for the first time) an 'ld-2.23.so' process consumes 100% CPU for minutes

Bug #1861648 reported by Daniel van Vugt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd
Confirmed
Undecided
Unassigned
snapd (Ubuntu)
Confirmed
High
Unassigned

Bug Description

When booting 20.04 (for the first time?) an 'ld-2.23.so' process consumes 100% CPU for minutes. It appears to be a child process of snapd.

This is happening consistently on multiple laptops.

affects: ubuntu → snapd (Ubuntu)
description: updated
description: updated
summary: - When booting 20.04 ISOs, a 'ld-2.23.so' process consumes 100% CPU for
+ When booting 20.04 ISOs, an 'ld-2.23.so' process consumes 100% CPU for
minutes
description: updated
summary: - When booting 20.04 ISOs, an 'ld-2.23.so' process consumes 100% CPU for
- minutes
+ When booting 20.04 an 'ld-2.23.so' process consumes 100% CPU for minutes
description: updated
Revision history for this message
Daniel van Vugt (vanvugt) wrote : Re: When booting 20.04 an 'ld-2.23.so' process consumes 100% CPU for minutes

If this is really a necessary process then I suggest at least not running it in live sessions. It's seriously degrading to the user experience.

Revision history for this message
Michael Vogt (mvo) wrote :

I suspect this is the fontconfig cache generation, we run this during the install of a desktop snap. What does the live session seed? Maybe it can pre-generate the fontconfig caches during image build?

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

I would not have thought that 'ld-2.23.so' was related to font caching. It's the dynamic linker/loader for shared libraries (man ld.so).

Revision history for this message
Maciej Borzecki (maciek-borzecki) wrote :

It is, the process is quite elaborate. Snapd runs fc-cache-* binary from the core snap by directly invoking ld.so (the interpreter) from the core snap, passing library path arguments that ensure that library dependencies come from core and lastly the binary itself. You can see it in action here: https://github.com/snapcore/snapd/blob/d4a45e9771e535da9bbe82be7c12e537d83e58cd/cmd/cmdutil/cmdutil.go#L100-L139

The side effect is that argv[0] is set to ld.so, so in ps output it looks like as if ld.so is running.

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Daniel, can you clarify two aspects please:

1) Were you booting a live CD or an installed system?
2) Were the machines reasonably fast or very old? Knowing the rough manufacture date, number of cores and amount of memory would help.

Changed in snapd:
status: New → Incomplete
Changed in snapd (Ubuntu):
status: New → Incomplete
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

1. Live USB
2. Reasonably fast i7-8500U (4 cores), 16GB RAM

Changed in snapd:
status: Incomplete → New
Changed in snapd (Ubuntu):
status: Incomplete → New
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

We don't necessarily need to redesign things and eliminate the process. If it's just given a very low priority so it doesn't impact the user experience then it wouldn't matter.

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

Sorry comment #6 wasn't quite right. That machine is faster, but the problem still stands:

Asus Zenbook, i7-8550U (4 cores), 16GB RAM
snapd and its children hog one CPU core for 2 minutes
ld-2.23.so hogs a CPU core for less than 20 seconds

Microsoft Surface 3, x7-Z8700 (4 cores), 2GB RAM
snapd and its children hog one CPU core for 4 minutes
ld-2.23.so hogs a CPU core for a couple of minutes

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

Again, using 100% CPU probably wouldn't matter if background tasks like snapd and its children had much lower priority.

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

Fixed (?)

focal 20200124: This bug.
focal 20200220: No bug.

There were no QA-certified daily images between those two so I haven't dug any deeper to find out when the bug went away.

Changed in snapd (Ubuntu):
status: New → Fix Released
Changed in snapd:
status: New → Fix Released
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

The bug is back in the latest certified ISO:
http://cdimage.ubuntu.com/daily-live/20200309/

Changed in snapd:
status: Fix Released → Confirmed
Changed in snapd (Ubuntu):
status: Fix Released → Confirmed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

On a (different) i7-8550U machine ld-2.23.so uses 100% CPU for about 18 seconds.

tags: added: rls-ff-incoming
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Still happening in 20200401. The noisy laptop fan is a giveaway and 'top' confirms it's still this bug.

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

Also observed on a fresh install of 18.04.3

summary: - When booting 20.04 an 'ld-2.23.so' process consumes 100% CPU for minutes
+ When booting Ubuntu (live session or for the first time) an 'ld-2.23.so'
+ process consumes 100% CPU for minutes
tags: added: bionic
removed: champagne
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.