project is over 1year old now. has been up-to-date with all releases. project is Composer driven -- most modules are locked to specific versions. since update form 8.8.0 to 8.8.1 every merge is has been needed manual truncate of cache_discovery after regular Drush CR. this was noticed due to Content Editing was un-able to save new or updated any Node Type. also then same for saving terms, etc..

*Is occurring in merges that do not contain any module updates (or removals) nor any composer updates as well (regular bug fixes, enhancements..)

workaround has been custom drush command to do regular cache clear then truncate cache_discovery (triggered by hooks when merges are done).

Comments

SKAUGHT created an issue. See original summary.

skaught’s picture

Priority: Normal » Critical

increasing priority as this is causing "failed form submission"

skaught’s picture

Priority: Critical » Major

correction. major.

avpaderno’s picture

Title: missing plugin notice after every merge and cache clear. cache_discovery table. » Missing plugin notice after every merge and cache clear, cache_discovery table
Version: 8.8.1 » 8.8.x-dev
berdir’s picture

Status: Active » Postponed (maintainer needs more info)

We need the full backtrace of that, enable verbose error logging.

skaught’s picture

StatusFileSize
new451.54 KB

full backtrace. 'gbe' is the machine name of the content type being saved. it has 3 regular text inputs, a paragraph and a duration_field on it.

this does occur at this point for all content types & vocabs. can save a new user.

skaught’s picture

Status: Postponed (maintainer needs more info) » Active
berdir’s picture

\Drupal\Core\Entity\Plugin\DataType\Deriver\EntityDeriver::getDerivativeDefinitions should populate the bundle-based plugins, no reason why that shouldn't be there. Could be some really weird race condition.

I don't think this is a cache problem, but either the entity or typed data systems that just use cache, like everything else in Drupal.

Only idea I have right now is to add some debugging in there, if at the end of that loop you don't have the definition for node:gbe in there, log the backtrace to see how/when the cache is rebuilt.

Also, when this happens, what does getBundleInfo() return? Maybe there is a bad alter hook for either typed data or bundle info that's messing with the built definitions.

nterbogt’s picture

I'm experiencing a very similar problem. I enable a module via CLI and cache_discovery isn't being updated and module fails through the UI (appears checked on module page, no routes, php errors for class discovery, etc).
This _only_ happens on my live environment though... works fine in local development and PR built environments. May be due to a PHP configuration difference between them?

nterbogt’s picture

I _think_ there is a race condition between an APCU cache and the database cache. The action of changing a module status is unstable (will enable, but menus won't show, classes will fail, etc) unless I clear all cache_ tables manually and force an APCU cache clear.

longwave’s picture

Perhaps related to #2347867: Race conditions with lock/cache, session storage - add a non-transactional database connection where the database cache items are held up in a transaction, but other cache backends are not, leading to possible coherency issues?

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

rishi.kulshreshtha’s picture

Just to mention that we had this issue showing up only when clearing with drush using the 10.3.6 version, but got fixed using ^10.6.

avpaderno’s picture

Version: 9.2.x-dev » 9.4.x-dev

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

dieterholvoet’s picture

We're encountering the same issue on one of our sites. On our production environment, after clearing caches, a couple users get fatal errors. Here's a couple of those errors with full stack traces:

The situations in which these errors seem to happen vary a lot, the only thing they have in common is the cache rebuild that just happened. I think the fact that we're only encountering this on our production environment is because only there people are still using the site when we're clearing caches.

Just to mention that we had this issue showing up only when clearing with drush using the 10.3.6 version, but got fixed using ^10.6.

We're using the latest Drush 11, still encountering the issue

Perhaps related to #2347867: Race conditions with lock/cache using non-database storage - add a non-transactional database connection where the database cache items are held up in a transaction, but other cache backends are not, leading to possible coherency issues?

We're only using standard database storages.

dieterholvoet’s picture

I noticed we were only getting these kind of errors for ECK entity types. Turns out eck_entity_type_build was not being invoked in certain situations, causing all ECK entity types to be missing. I then found #3207813: ModuleHandler skips all hook implementations when invoked before the module files have been loaded, and it looks like the latest patch from that issue fixes this issue for me.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

bburg’s picture

I am wondering if we are seeing the same issue in #3260465: \RouteNotFoundException: Route "entity.node.vmd_preview_list" does not exist., it seems that conditions exist that allow dynamically defined routes via "DeriverBase" classes to be passed over before the available plugins list is cached.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.