Update status keeps trying to fetch available updates over and over for projects without a release

Created on 7 October 2010, about 14 years ago
Updated 13 December 2023, 11 months ago

Problem/Motivation

In cases where a module is installed but has no releases, update status treats the absence of releases as a failure to retrieve information, and doesn't save it as a completed check, which re-queues it for the next check. It's possible that this problem is also the source of the bug described in #1352102: pm-update unusable, hangs, loops β†’ .

Proposed resolution

When checking for releases it has been proposed to replace

if (empty($available[$key]['releases']))

with

if (!isset($available[$key]['releases']))

However in comment #27 bfroehle notes that because of the way the XML is parsed the two checks may not produce a different result.

Remaining tasks

In comment #30 NROTC_Webmaster lists steps to reproduce the issue and states that the patch, based on the proposed solution does not work. Additional testing to verify the failure of the patch would be useful, but it seems that a new approach to solve the issue is required.

User interface changes

It might be easier to identify this issue if the Update page was more explicit in list pages where the most recent attempt to retrieve released failed.

API changes

It may be necessary to parse the XML in a different way, or possibly use a different method for handling actual failures to retrieve version data.

Related Issues

Possibly #1352102: pm-update unusable, hangs, loops β†’

Original report by dww

I'm not yet sure how far reaching this bug is, and all the possible conditions that can trigger it. However, it seems likely that it's going to create pretty major trouble for certain sites if we don't fix it... Here's the way I found it:

If you have a module on your site that doesn't actually have any releases, Update status correctly tells you it failed to fetch info about releases of that project. However, due to something about how #597484: Use the Queue API to fetch available update data β†’ is working, it appears that the queue item is never drained (or it's always re-added as soon as it failed). So, every time you reload the available updates report, it tries to fetch release data for this project again. The "Last checked for updates" is always "0 seconds", b/c it happens again every time you visit the page. :(

Granted, projects you deploy from CVS without any releases at all are pretty rare, but I have a sinking suspicion the underlying bug could be triggered by other conditions, too.

And, if you turn on the feature that has update status check status on disabled modules and themes, all you need is a *copy* of a module like this anywhere in your sites directory to hit it. For example, check out a copy of drupalorg β†’ from CVS into a sites directory and turn on the "check for disabled stuff" checkbox and you'll see the bug. Doesn't even have to pretend to be compatible with D7. :(

So, we need tests for this bug, and we need to go through the code paths for all the queue + fetch logic to make this sane.

πŸ› Bug report
Status

Needs work

Version

7.0 ⚰️

Component
UpdateΒ  β†’

Last updated about 6 hours ago

  • Maintained by
  • πŸ‡ΊπŸ‡ΈUnited States @tedbow
  • πŸ‡ΊπŸ‡ΈUnited States @dww
Created by

πŸ‡ΊπŸ‡ΈUnited States dww

Live updates comments and jobs are added and updated live.
  • Needs backport to D7

    After being applied to the 8.x branch, it should be considered for backport to the 7.x branch. Note: This tag should generally remain even after the backport has been written, approved, and committed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024