[wp-trac] [WordPress Trac] #54546: Fatal error receive while updating WP 5.8.2 to WP 5.9.

WordPress Trac noreply at wordpress.org
Thu Dec 2 18:59:29 UTC 2021


#54546: Fatal error receive while updating WP 5.8.2 to WP 5.9.
---------------------------------------+---------------------
 Reporter:  apeksha10                  |       Owner:  (none)
     Type:  defect (bug)               |      Status:  new
 Priority:  normal                     |   Milestone:  5.9
Component:  Upgrade/Install            |     Version:  trunk
 Severity:  normal                     |  Resolution:
 Keywords:  needs-patch needs-testing  |     Focuses:
---------------------------------------+---------------------
Changes (by hellofromTonya):

 * keywords:   => needs-patch needs-testing


Comment:

 Replying to [comment:17 SergeyBiryukov]:
 > I can confirm that `wp-admin/includes/update-core.php` is indeed
 [source:tags/5.8.2/src/wp-admin/includes/class-core-upgrader.php#L156
 specifically copied from the new package], however the rest of the code,
 including the Requests library, appears to be loaded from the current
 (older) install.

 Thank you Sergey for confirming.

 == What's Known

 What's known about the upgrade process:

 * The "from" version of the Core code is loaded into memory and is
 running, including HTTP and Requests
 * The "to" version of the `wp-admin/includes/update-core.php` code is
 running as it's injected/copied to run (makes sense)
 * But the filesystem no longer has the "from" version files available,
 meaning if some file was not loaded into memory before `update_core(
 $from, $to )` runs (i.e. which is in the "to" version of the the `wp-
 admin/includes/update-core.php` file), then a fatal error can happen
 * And a cURL timeout error happens which so far is isolated to only
 Windows OS
 * And because an error happens, to "to" version of the exception file
 isn't loaded into memory causing the fatal error

 === The 2 Known Problems

 There are 2 problems surfaced from this ticket:

 1. Problem 1: Fatal error. Root cause reason is known.
     * Root cause reason: Not all of the needed upgrade code is loaded into
 memory ''before'' the filesystem is changed with the new "to" version of
 the files.
     * Note: In this specific case, it's the exception file within
 Requests. But it could easily be some other code for a different or future
 scenario.
 2. Problem 2: cURL timeout error happens. Root cause reason is unknown.
     * Root cause reason: ??

 == Solving Problem 1

 Problem 1 is solvable by doing what @jrf recommended: identify what files
 are needed for the upgrade and then get them loaded into memory before
 changing the filesystem. This can happen in the "to" version of the `wp-
 admin/includes/update-core.php` file by:

 * Identifying which "from" version files needed to be loaded.
 * Doing a `require_once` to load each of those files at the top of
 `update_core()`, i.e. before delete and copy filesystem code.

 I'm adding `needs-patch` and `needs-testing` for fixing this problem.

 == Solving Problem 2

 Ideas?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/54546#comment:20>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list