Problem/Motivation

I suddenly started getting this. since it started with scheduler I am assuming that is where the issue started.

See line 31 below and the line in scheduler is identified.

line in code:
/**
* Implements hook_cache_flush().
*/
function scheduler_cache_flush() {
\Drupal::service('scheduler.manager')->invalidatePluginCache(); <--- causing the loop
}

Error output:

Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException: [error]
Circular reference detected for service "entity_type.manager", path: "scheduler.manager
-> date.formatter -> entity_type.manager -> string_translation ->
string_translator.locale.lookup -> config.factory ->
commerce_store_gateways.config_overrider -> commerce_store.current_store ->
commerce_store.chain_store_resolver -> commerce_marketplace.product_store_resolver". in
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php:146
Stack trace:
#0
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(437):
Drupal\Component\DependencyInjection\Container->get()
#1
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(240):
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters()
#2
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(176):
Drupal\Component\DependencyInjection\Container->createService()
#3
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(437):
Drupal\Component\DependencyInjection\Container->get()
#4
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(276):
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters()
#5
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(176):
Drupal\Component\DependencyInjection\Container->createService()
#6
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(437):
Drupal\Component\DependencyInjection\Container->get()
#7
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(240):
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters()
#8
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(176):
Drupal\Component\DependencyInjection\Container->createService()
#9
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(437):
Drupal\Component\DependencyInjection\Container->get()
#10
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(240):
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters()
#11
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(176):
Drupal\Component\DependencyInjection\Container->createService()
#12
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(437):
Drupal\Component\DependencyInjection\Container->get()
#13
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(276):
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters()
#14
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(176):
Drupal\Component\DependencyInjection\Container->createService()
#15
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(437):
Drupal\Component\DependencyInjection\Container->get()
#16
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(240):
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters()
#17
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(176):
Drupal\Component\DependencyInjection\Container->createService()
#18
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(437):
Drupal\Component\DependencyInjection\Container->get()
#19
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(276):
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters()
#20
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(176):
Drupal\Component\DependencyInjection\Container->createService()
#21
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(437):
Drupal\Component\DependencyInjection\Container->get()
#22
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(240):
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters()
#23
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(176):
Drupal\Component\DependencyInjection\Container->createService()
#24
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(437):
Drupal\Component\DependencyInjection\Container->get()
#25
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(240):
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters()
#26
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(176):
Drupal\Component\DependencyInjection\Container->createService()
#27
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(437):
Drupal\Component\DependencyInjection\Container->get()
#28
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(240):
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters()
#29
/d9.2.18/html/core/lib/Drupal/Component/DependencyInjection/Container.php(176):
Drupal\Component\DependencyInjection\Container->createService()
#30
/d9.2.18/html/core/lib/Drupal.php(198):
Drupal\Component\DependencyInjection\Container->get()
#31
/d9.2.18/html/modules/contrib/scheduler/scheduler.module(1138):
Drupal::service()
#32 [internal function]: scheduler_cache_flush()
#33
/d9.2.18/html/core/lib/Drupal/Core/Extension/ModuleHandler.php(403):
call_user_func_array()
#34
/d9.2.18/html/core/includes/common.inc(536):
Drupal\Core\Extension\ModuleHandler->invokeAll()
#35
/d9.2.18/html/core/includes/utility.inc(41):
drupal_flush_all_caches()
#36 phar:///usr/local/bin/drush/commands/core/cache.drush.inc(302): drupal_rebuild()
#37 phar:///usr/local/bin/drush/includes/command.inc(422): drush_cache_rebuild()
#38 phar:///usr/local/bin/drush/includes/command.inc(231): _drush_invoke_hooks()
#39 phar:///usr/local/bin/drush/includes/command.inc(199): drush_command()
#40 phar:///usr/local/bin/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch()
#41 phar:///usr/local/bin/drush/includes/preflight.inc(67):
Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#42 phar:///usr/local/bin/drush/includes/startup.inc(465): drush_main()
#43 phar:///usr/local/bin/drush/includes/startup.inc(369): drush_run_main()
#44 phar:///usr/local/bin/drush/drush(114): drush_startup()
#45 /usr/local/bin/drush(10): require('phar:///usr/loc...')
#46 {main}

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

SocialNicheGuru created an issue. See original summary.

socialnicheguru’s picture

Issue summary: View changes
socialnicheguru’s picture

Issue summary: View changes
socialnicheguru’s picture

Title: Circular reference » Circular reference detected for service "entity_type.manager", path: "scheduler.manager ->
socialnicheguru’s picture

adding a patch to comment out the function. This is NOT a fix but a short term workaround

jonathan1055’s picture

Thanks for reporting this. No one has observed this before, so I wonder why it has just started now?

jonathan1055’s picture

The top line in out output shows

Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException: [error]
Circular reference detected for service
"entity_type.manager", path: "scheduler.manager -> date.formatter -> entity_type.manager -> string_translation ->
string_translator.locale.lookup -> config.factory -> commerce_store_gateways.config_overrider -> commerce_store.current_store ->
commerce_store.chain_store_resolver -> commerce_marketplace.product_store_resolver"

So it is linked to the commerce module relating to commerce store.

jonathan1055’s picture

Category: Bug report » Support request
Status: Active » Closed (works as designed)

Six months, no response, so closing (works as designed)