Last couple of days update.php is hosed..

the error is coming from a d7 fresh install. On running update.php it want's to run update_fix_d7_requirements(), major WTF. Traced the problem down to all the schema_version fields being reset to the default of -1

CommentFileSizeAuthor
#4 remove_cache_clear.patch699 bytescatch

Comments

berdir’s picture

This is probably related to #706608: system_update_files_database() called from update_get_projects() breaks system table on cache clear since status is also set to 0. This also happened in the tests but has been fixed there by running cron as the installer does.

dave reid’s picture

Status: Active » Postponed (maintainer needs more info)

Have any idea how they got reset?

ctmattice1’s picture

Status: Postponed (maintainer needs more info) » Active

Confirm it has to do with cache.

On line 220 of update.php I change the cache_clear_all function from TRUE to FALSE

cache_clear_all('*', 'cache_update', FALSE);

The update process works, modules retain their schema_version field, and remain enabled.

catch’s picture

Status: Active » Needs review
StatusFileSize
new699 bytes

That's equivalent to removing it entirely. I'm sure it needs to be cleared but let's see what happens if you don't.

berdir’s picture

- *Something* seems to be causing this, right now, it's update.module but removing the clear_cache_all() is imho not a proper fix. This could as well happen in a contrib module and then it will be a lot harder to debug. How can a clear_cache_all() have any effect on the {system} table? That shouldn't be possible...

- Once fixed, this imho needs a test case to reproduce the breaking behavior to make sure that it doesn't happen again.

I'll try to go over this with an debugger...

catch’s picture

Yeah it's not a proper fix, I just want to see if that's actually what's causing it.

catch’s picture

Title: Schema Version reset to -1 running update.php » Schema Version reset to -1 when update.module cache is cleared
Component: update system » update.module

Also, the presence of that cache_clear_all() is troubling in itself, as far as I know dww wrote a bunch of helper functions to avoid using cache_set() cache_get() and cache_clear_all() on {cache_update}, however it's now in system_flush_all_caches() and explicitly cleared in update.php, so something's dodgy there anyway. Changing component.

ctmattice1’s picture

Uploaded todays HEAD then ran update.php (D7). WSOD - System table trashed, same as on D5-D6-D7 database attempt, schema_version set to default.

Applied the patch and it works. I don't know enough about the cache system

catch’s picture

Status: Needs review » Closed (duplicate)

This has to be the same bug as #706608: system_update_files_database() called from update_get_projects() breaks system table on cache clear, so marking as duplicate. See you over there.

troks’s picture

Status: Closed (duplicate) » Needs review
webchick’s picture

Status: Needs review » Closed (duplicate)