Project

General

Profile

Actions

Bug #16341

open

Error notification and log message ``"Updating repositories metadata" returned error code 1`` at boot

Added by Jim Pingle 2 months ago. Updated 13 days ago.

Status:
Feedback
Priority:
Normal
Assignee:
-
Category:
Package System
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
25.11
Release Notes:
Default
Affected Version:
Affected Architecture:

Description

There are certain environments where users see an error notification when logging in after (re)booting which reads:

check_upgrade: "Updating repositories metadata" returned error code 1

This does not affect most installations, and can be difficult to reproduce. Most devices never encounter the error, some devices only encounter the error occasionally, a handful encounter the error at every boot. The error is too vague to know if each potential problem scenario is related.

At least at boot this error may be due to a race condition between /etc/rc.update_pkg_metadata attempting to run while certctl rehash is still running. On slow systems the certctl rehash process can take about 2 minutes to finish.

On a VM which can reproduce this error at every boot, delaying /etc/rc.update_pkg_metadata by 130 seconds allows it to complete without error. Similarly, commenting out the call to certctl rehash in the CA trust store process also allows it to complete without error.

Actions #1

Updated by Jim Pingle 20 days ago

  • Status changed from Confirmed to Feedback
  • % Done changed from 0 to 100

They may be a non-issue now on current dev snapshots. The latest upstream src merge brought in the new certctl implementation from upstream which was rewritten in C.

That new implementation is much, much faster , sometimes finishing in under a second even on slow hardware, rather than taking several minutes.

Once on a current dev snapshot (as of today, at minimum) this particular race shouldn't be a concern. If it still happens, add a comment here with more info.

Actions #2

Updated by Jordan G 13 days ago

I think this was occurring on one of my test systems, I haven't seen the error recently and have rebooted a few times while running pfSense+ 25.11.a.20250918.1857

Actions

Also available in: Atom PDF