Project

General

Profile

Actions

Bug #22645

closed

A deadlock can occur at boot (also a cause of slow initialization)

Added by François ARMAND about 1 year ago. Updated 12 months ago.

Status:
Released
Priority:
N/A
Category:
Architecture - Internal libs
Target version:
Severity:
Major - prevents use of part of Rudder | no simple workaround
UX impact:
I hate Rudder for that
User visibility:
Operational - other Techniques | Rudder settings | Plugins
Effort required:
Medium
Priority:
83
Name check:
To do
Fix check:
Checked
Regression:
No

Description

Sometimes, we see a deadlock around boot time in rudder.
it seems to be more frequent with 7.3 (and so likely b/c of switch to zio 2).

Perhaps a reproduce is that it boil down to a much more maze like instance of an early init problem as minimized here : https://github.com/zio/zio/issues/8044

Since RudderConfig is growing very complicated and zio2 seems to be more agressive in creation of instance needed a lock, it is likely to be that.

The correct, principle solution to that problem is to a principle depency injection framework like zio layers. But it won't be even remotely compatible with what we have.

We could also come back to the "lazy val everywhere" solution that we used to use in early version of rudder but abandoned because it created surprises with late init of services (like batch not started or service init error lurking undetected before a very long time).

Plus, we have to keep the current existing RudderConfig API which is used pervasively in Rudder.

So, the solution is to split cleanly appart RudderConfig init from the init of other services/etc.

So RudderConfig needs to just assign all its public fields in one go by calling a method which does all the current init logic and returns all the initialized services in a data container class.

I'm not sure it's possible or if it will just add a level of turtles.


Subtasks 2 (0 open2 closed)

Bug #22681: Change workflow service type in init to repair plugin buildReleasedAlexis MoussetActions
Bug #22682: Rudder config miss some parameters for secret management pluginReleasedAlexis MoussetActions
Actions #1

Updated by François ARMAND about 1 year ago

  • Category set to Architecture - Internal libs
  • Assignee set to François ARMAND
  • Target version set to 7.3.1
  • Severity set to Major - prevents use of part of Rudder | no simple workaround
  • UX impact set to I hate Rudder for that
  • User visibility set to Operational - other Techniques | Rudder settings | Plugins
  • Effort required set to Medium
  • Priority changed from 0 to 83
Actions #2

Updated by François ARMAND about 1 year ago

  • Status changed from New to In progress
Actions #3

Updated by François ARMAND about 1 year ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from François ARMAND to Alexis Mousset
  • Pull Request set to https://github.com/Normation/rudder/pull/4760
Actions #4

Updated by Anonymous about 1 year ago

  • Status changed from Pending technical review to Pending release
Actions #5

Updated by François ARMAND about 1 year ago

  • Status changed from Pending release to In progress

This is not merged yet

Actions #6

Updated by Anonymous almost 1 year ago

  • Status changed from In progress to Pending release
Actions #7

Updated by Vincent MEMBRÉ 12 months ago

  • Subtask #22681 added
Actions #8

Updated by Vincent MEMBRÉ 12 months ago

  • Subtask #22682 added
Actions #9

Updated by Vincent MEMBRÉ 12 months ago

  • Subject changed from Deadlock in rudder 7.3 (and perhaps 7.2) to A deadlock can occur at boot (also a cause of slow initialization)
Actions #10

Updated by Vincent MEMBRÉ 12 months ago

  • Fix check changed from To do to Checked
Actions #11

Updated by Vincent MEMBRÉ 12 months ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 7.3.1 which was released today.

Actions

Also available in: Atom PDF