This issue has been created
There are 6 updates.
 
 
XWiki Commons / cid:jira-generated-image-avatar-e8768f42-686e-41c0-900e-b2920cd9c184 XCOMMONS-3907 Open

Reloading the JAR extensions of a wiki registers again the components of their dependencies installed on the farm

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-b6d08c53-fffe-465b-a266-3d6913f59981 Thomas Mortagne created this issue on 17/Nov/26 19:51
 
Summary: Reloading the JAR extensions of a wiki registers again the components of their dependencies installed on the farm
Issue Type: cid:jira-generated-image-avatar-e8768f42-686e-41c0-900e-b2920cd9c184 Bug
Affects Versions: 17.10.0
Assignee: Unassigned
Components: Extension
Created: 17/Nov/26 19:51
Priority: cid:jira-generated-image-static-major-f85cee22-ad35-49d5-8b89-fe537fc3c598 Major
Reporter: Thomas Mortagne
Description:

When a JAR extension is uninstalled (or upgraded) on a wiki, all the JAR extensions of that wiki namespace are reloaded: their components are unregistered, the namespace classloader is recreated and the extensions are initialized again.

The problem is that, while initializing again the extensions of the wiki namespace, the dependencies of those extensions which are installed on the farm (root namespace) are initialized again too, even if they were never unloaded. Their components are registered a second time in the root component manager, which replaces the existing descriptors and disposes the singleton instances currently in use, while anything still holding them (other components, objects which are not components, etc.) keeps using disposed instances.

Steps to reproduce (for example):

  • install an extension on the farm (for example org.xwiki.contrib.oidc:oidc-authenticator, which is forced to the root namespace)
  • install on the main wiki an extension depending on it (for example org.xwiki.contrib.oidc:oauth2-client)
  • install on the main wiki any other JAR extension (for example the Raw macro) and uninstall it

The components of the farm extension are registered again during the reload of the main wiki namespace. In the case of the OIDC authenticator, it leads to every request failing with "Cache 'oidc.client.configuration' is in 'TERMINATED' state" until restart (see OIDC-323).

 
 

6 updates

 
cid:jira-generated-image-avatar-b6d08c53-fffe-465b-a266-3d6913f59981 Changes by Thomas Mortagne on 17/Nov/26 19:51
 
Fix Version: 18.4.9
Fix Version: 17.10.16
Fix Version: 18.10.0-rc-1
Version: 17.10.0
Version: 4.5.2
Assignee: Thomas Mortagne