Hangs for a few seconds when entering the last page when the metrics server is unavailable

Bug #1761742 reported by Iain Lane
20
This bug affects 7 people
Affects Status Importance Assigned to Milestone
gnome-initial-setup (Ubuntu)
Fix Released
High
Nathan Teodosio

Bug Description

This server doesn't work at the minute.

When advancing to the last page of the wizard, the following message is displayed:

** (gnome-initial-setup:803): WARNING **: 13:44:36.643: Failed to send decline: data were not delivered successfully to metrics server: couldn't send post http request: Post https://metrics.ubuntu.com/ubuntu/desktop/18.04: dial tcp 127.0.0.53:53: i/o timeout

and there is a delay of a few seconds displaying the page.

I suppose the calls to sysmetrics to send the report/decline should be done asynchronously. It's probably not a big problem if a few people manage to quit before the submission is finished, but if it is then there would need to be a way for the quit button to wait for all save calls to finish their async work.

Jeremy Bícha (jbicha)
description: updated
Revision history for this message
Robert Ancell (robert-ancell) wrote :

@didrocks - is libsysmetrics thread-safe? I guess I should just wrap the call in a thread?

Changed in gnome-initial-setup (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

libsysmetrics is using multiple goroutines (and potentially threads), but all the external API is thread-safe, I took care to not do any operations which can change the global state for that purpose.

Revision history for this message
Matthew Paul Thomas (mpt) wrote :

I think “Continue” should advance immediately to the next step, regardless of how long any submission takes or whether it fails. The user is doing us a favour by submitting data, and there’s no need for us to bother them at all if it happens not to work. It’s not as if we’re desperately short of submissions.

Revision history for this message
Nathan Teodosio (nteodosio) wrote :

Linked LP:2043838 to this report.

Now getting

--->
(gnome-initial-setup:3824): InitialSetup-WARNING **: 10:13:22.589: Failed to send decline: data were not delivered successfully to metrics server, saving for a later automated report: couldn't send post http request: Post "https://metrics.ubuntu.com/ubuntu/desktop/23.10": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
<---

Let's just put that part in a thread? I see no reason to be blocking, it's causing 10 s hangs in the application.

Changed in gnome-initial-setup (Ubuntu):
assignee: nobody → Nathan Teodosio (nteodosio)
importance: Medium → High
Revision history for this message
Nathan Teodosio (nteodosio) wrote :

> The user is doing us a favour by submitting data

This also happens even if the user chooses not to submit data.

Revision history for this message
Nathan Teodosio (nteodosio) wrote :
Changed in gnome-initial-setup (Ubuntu):
status: Triaged → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-initial-setup - 45.0-1ubuntu4

---------------
gnome-initial-setup (45.0-1ubuntu4) noble; urgency=medium

  [ Nathan Pratta Teodosio ]
  * Do not block on calls to Ubuntu Report (LP: #1761742).
  * Do not set the page as skippable.

  [ Marco Trevisan (Treviño) ]
  * debian/patches: Refresh indexes
  * ubuntu-report-page: Use linked style for show-report buttons
  * ubuntu-report-page: Fix error handling on show report
  * ubuntu-report-page: Avoid firing a new thread if the report is available
  * ubuntu-report-page: Go to next page once report is sent or on error
  * ubuntu-report-page: Add timeout before failing during report send
  * ubuntu-report-page: translate errors

 -- Marco Trevisan (Treviño) <email address hidden> Mon, 11 Dec 2023 22:58:05 +0100

Changed in gnome-initial-setup (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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