Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] anybody knows why an upgrade of our product (but not an eclipse upgrade) goes wrong like this?

if it does work then the stack looks different

instead of PlatformActivator is being loaded and that triggers our plugin itis suddenly the other way around:


Daemon Thread [Start Level: Equinox Container: 9d6cebde-df6c-44ee-a043-cdd013a5b6ef] (Suspended (breakpoint at line 34 in PlatformActivator))
owns: Object  (id=71)
PlatformActivator.start(BundleContext) line: 34  <<< So here really in the core.runtime activator
BundleContextImpl$3.run() line: 842
BundleContextImpl$3.run() line: 1
AccessController.doPrivileged(PrivilegedExceptionAction<T>) line: not available
BundleContextImpl.startActivator(BundleActivator) line: 834
BundleContextImpl.start() line: 791
EquinoxBundle.startWorker0() line: 1013
EquinoxBundle$EquinoxModule.startWorker() line: 365
EquinoxBundle$EquinoxModule(Module).doStart(Module$StartOptions...) line: 598
EquinoxBundle$EquinoxModule(Module).start(Module$StartOptions...) line: 462
SecureAction.start(Module, Module$StartOptions...) line: 493
EclipseLazyStarter.postFindLocalClass(String, Class<?>, ClasspathManager) line: 117
ClasspathManager.findLocalClass(String) line: 570
EquinoxClassLoader(ModuleClassLoader).findLocalClass(String) line: 330
BundleLoader.findLocalClass(String) line: 396
BundleLoader.findClassInternal(String, boolean) line: 474
BundleLoader.findClass(String, boolean) line: 423
BundleLoader.findClass(String) line: 415
BundleContextImpl.loadBundleActivator() line: 824  << This is now our tweaks.Activator 
BundleContextImpl.start() line: 778
EquinoxBundle.startWorker0() line: 1013
EquinoxBundle$EquinoxModule.startWorker() line: 365
EquinoxBundle$EquinoxModule(Module).doStart(Module$StartOptions...) line: 598
EquinoxBundle$EquinoxModule(Module).start(Module$StartOptions...) line: 462
SecureAction.start(Module, Module$StartOptions...) line: 493
EclipseLazyStarter.postFindLocalClass(String, Class<?>, ClasspathManager) line: 117
ClasspathManager.findLocalClass(String) line: 570
EquinoxClassLoader(ModuleClassLoader).findLocalClass(String) line: 330
BundleLoader.findLocalClass(String) line: 396
BundleLoader.findClassInternal(String, boolean) line: 474
BundleLoader.findClass(String, boolean) line: 423
BundleLoader.findClass(String) line: 415
EquinoxClassLoader(ModuleClassLoader).loadClass(String, boolean) line: 155
EquinoxClassLoader(ClassLoader).loadClass(String) line: not available
XmlHandler.startElement(String, String, KXml2SAXParser$Attributes) line: 260
KXml2SAXParser.parseXML(KXml2SAXHandler) line: 76
BundleComponentActivator.loadDescriptor(URL) line: 429
BundleComponentActivator.initialize(String) line: 315
BundleComponentActivator.<init>(ScrLogger, ComponentRegistry, ComponentActorThread, BundleContext, ScrConfiguration) line: 270
Activator.loadComponents(Bundle) line: 379
Activator.access$200(Activator, Bundle) line: 49
Activator$ScrExtension.start() line: 263
Activator(AbstractExtender).createExtension(Bundle) line: 196
Activator(AbstractExtender).modifiedBundle(Bundle, BundleEvent, Bundle) line: 169
Activator(AbstractExtender).addingBundle(Bundle, BundleEvent) line: 139
Activator(AbstractExtender).addingBundle(Bundle, BundleEvent) line: 49
BundleTracker$Tracked.customizerAdding(Bundle, BundleEvent) line: 475
BundleTracker$Tracked.customizerAdding(Object, Object) line: 1
BundleTracker$Tracked(AbstractTracked<S,T,R>).trackAdding(S, R) line: 256
BundleTracker$Tracked(AbstractTracked<S,T,R>).track(S, R) line: 229
BundleTracker$Tracked.bundleChanged(BundleEvent) line: 450
BundleContextImpl.dispatchEvent(Object, Object, int, Object) line: 973
EventManager.dispatchEvent(Set<Entry<K,V>>, EventDispatcher<K,V,E>, int, E) line: 234
ListenerQueue<K,V,E>.dispatchEventSynchronous(int, E) line: 151
EquinoxEventPublisher.publishBundleEventPrivileged(BundleEvent) line: 234
EquinoxEventPublisher.publishBundleEvent(BundleEvent) line: 140
EquinoxEventPublisher.publishBundleEvent(int, Bundle, Bundle) line: 132
EquinoxContainerAdaptor.publishModuleEvent(ModuleContainerAdaptor$ModuleEvent, Module, Module) line: 231
EquinoxBundle$EquinoxModule(Module).publishEvent(ModuleContainerAdaptor$ModuleEvent) line: 493
EquinoxBundle$EquinoxModule(Module).start(Module$StartOptions...) line: 480
ModuleContainer$ContainerStartLevel$1.run() line: 1820
EquinoxContainerAdaptor$2$1.execute(Runnable) line: 150
ModuleContainer$ContainerStartLevel.incStartLevel(int, List<Module>) line: 1813
ModuleContainer$ContainerStartLevel.incStartLevel(int, List<Module>, List<Module>) line: 1769
ModuleContainer$ContainerStartLevel.doContainerStartLevel(Module, int, FrameworkListener...) line: 1735
ModuleContainer$ContainerStartLevel.dispatchEvent(Module, FrameworkListener[], int, Integer) line: 1661
ModuleContainer$ContainerStartLevel.dispatchEvent(Object, Object, int, Object) line: 1
EventManager.dispatchEvent(Set<Entry<K,V>>, EventDispatcher<K,V,E>, int, E) line: 234
EventManager$EventThread<K,V,E>.run() line: 345 


so it now comes from a totally different stack.

this: (not workign)

EquinoxBundle$EquinoxModule.startWorker() line: 365
EquinoxBundle$EquinoxModule(Module).doStart(Module$StartOptions...) line: 598
EquinoxBundle$EquinoxModule(Module).start(Module$StartOptions...) line: 462
ModuleContainer$ContainerStartLevel$1.run() line: 1820
EquinoxContainerAdaptor$2$1.execute(Runnable) line: 150
ModuleContainer$ContainerStartLevel.incStartLevel(int, List<Module>) line: 1813 

compared to (working)

  EquinoxBundle$EquinoxModule(Module).publishEvent(ModuleContainerAdaptor$ModuleEvent) line: 493
EquinoxBundle$EquinoxModule(Module).start(Module$StartOptions...) line: 480
ModuleContainer$ContainerStartLevel$1.run() line: 1820
EquinoxContainerAdaptor$2$1.execute(Runnable) line: 150
ModuleContainer$ContainerStartLevel.incStartLevel(int, List<Module>) line: 1813   
 


On Wed, 4 Dec 2019 at 16:14, Johan Compagner <jcompagner@xxxxxxxxx> wrote:
ok it is busy doing that.. (loading that activator of core.runtime)

see some inline comments:


Daemon Thread [Start Level: Equinox Container: 2a210fff-de19-4244-8631-718f72829b73] (Suspended (breakpoint at line 229 in InternalPlatform))
owns: Object  (id=86)
InternalPlatform.getBundles(String, String) line: 229     <<<< SO here it goes wrong InternalPlatform is already used.
InternalPlatform.getBundle(String) line: 224
Platform.getBundle(String) line: 1410
WorkbenchPlugin.start(BundleContext) line: 782
BundleContextImpl$3.run() line: 842
BundleContextImpl$3.run() line: 1
AccessController.doPrivileged(PrivilegedExceptionAction<T>) line: not available
BundleContextImpl.startActivator(BundleActivator) line: 834
BundleContextImpl.start() line: 791
EquinoxBundle.startWorker0() line: 1013
EquinoxBundle$EquinoxModule.startWorker() line: 365
EquinoxBundle$EquinoxModule(Module).doStart(Module$StartOptions...) line: 598
EquinoxBundle$EquinoxModule(Module).start(Module$StartOptions...) line: 462
SecureAction.start(Module, Module$StartOptions...) line: 493
EclipseLazyStarter.postFindLocalClass(String, Class<?>, ClasspathManager) line: 117
ClasspathManager.findLocalClass(String) line: 570
EquinoxClassLoader(ModuleClassLoader).findLocalClass(String) line: 330
BundleLoader.findLocalClass(String) line: 396
BundleLoader.findClassInternal(String, boolean) line: 474
BundleLoader.findClass(String, boolean) line: 423
BundleLoader.findClass(String) line: 415
BundleContextImpl.loadBundleActivator() line: 824 <<<<< This is our com.servoy.eclipse.ui.tweaks.Activator which is our Weaver plugin for adjusting many things (like replacing icons of core eclipse)
BundleContextImpl.start() line: 778
EquinoxBundle.startWorker0() line: 1013
EquinoxBundle$EquinoxModule.startWorker() line: 365
EquinoxBundle$EquinoxModule(Module).doStart(Module$StartOptions...) line: 598
EquinoxBundle$EquinoxModule(Module).start(Module$StartOptions...) line: 462
SecureAction.start(Module, Module$StartOptions...) line: 493
EclipseLazyStarter.postFindLocalClass(String, Class<?>, ClasspathManager) line: 117
ClasspathManager.findLocalClass(String) line: 570
EquinoxClassLoader(ModuleClassLoader).findLocalClass(String) line: 330
BundleLoader.findLocalClass(String) line: 396
BundleLoader.findClassInternal(String, boolean) line: 474
BundleLoader.findClass(String, boolean) line: 423
BundleLoader.findClass(String) line: 415
BundleContextImpl.loadBundleActivator() line: 824  <<<< this is loading: org.eclipse.core.internal.runtime.PlatformActivator
BundleContextImpl.start() line: 778
EquinoxBundle.startWorker0() line: 1013
EquinoxBundle$EquinoxModule.startWorker() line: 365
EquinoxBundle$EquinoxModule(Module).doStart(Module$StartOptions...) line: 598
EquinoxBundle$EquinoxModule(Module).start(Module$StartOptions...) line: 462
ModuleContainer$ContainerStartLevel$1.run() line: 1820
EquinoxContainerAdaptor$2$1.execute(Runnable) line: 150
ModuleContainer$ContainerStartLevel.incStartLevel(int, List<Module>) line: 1813
ModuleContainer$ContainerStartLevel.incStartLevel(int, List<Module>, List<Module>) line: 1770
ModuleContainer$ContainerStartLevel.doContainerStartLevel(Module, int, FrameworkListener...) line: 1735
ModuleContainer$ContainerStartLevel.dispatchEvent(Module, FrameworkListener[], int, Integer) line: 1661
ModuleContainer$ContainerStartLevel.dispatchEvent(Object, Object, int, Object) line: 1
EventManager.dispatchEvent(Set<Entry<K,V>>, EventDispatcher<K,V,E>, int, E) line: 234
EventManager$EventThread<K,V,E>.run() line: 345 

so for some reason when i don't do a clean the PlatformActivator results in our tweaks.Activator to be called and that results via via via that the core.runtime is hit again without the activator be able to do it.
(so it seems to be cyclic here)

Because after our tweaks.Activater a lot of stuff is also actived like Workbench stuff.

Not sure what the actual loading order is when it works normally..
will need to test this.


On Wed, 4 Dec 2019 at 15:53, Johan Compagner <jcompagner@xxxxxxxxx> wrote:
yes that is the problem
start is not hit for me, it comes directly in getBundles()

the thing is how is that possible? because InternalPlatform is in org.eclipse.core.runtime
and that plugin has a Activator and  Bundle-ActivationPolicy: lazy (which i think in the ui stands for "activate this plugin if one of its classes is loaded"

any good place where i can place a breakpoint?



On Wed, 4 Dec 2019 at 14:57, Thomas Watson <tjwatson@xxxxxxxxxx> wrote:
My guess is that org.eclipse.core.runtime isn't getting activated at all or is failing to activate resulting in a null fwkWiring.  Although I would have expected some other exception in the log about failing to activate the org.eclipse.core.runtime bundle.  If you are able to debug check that the org.eclipse.core.internal.runtime.InternalPlatform.start(BundleContext) method is even getting called.

Tom
 
 
 
----- Original message -----
From: Johan Compagner <jcompagner@xxxxxxxxx>
Sent by: p2-dev-bounces@xxxxxxxxxxx
To: P2 developer discussions <p2-dev@xxxxxxxxxxx>
Cc:
Subject: [EXTERNAL] Re: [p2-dev] anybody knows why an upgrade of our product (but not an eclipse upgrade) goes wrong like this?
Date: Wed, Dec 4, 2019 7:36 AM
 
there is no simple test i am afraid
its really our install from a product version 2019.9 -> 2019.12
(and i think even the latest version of our product of .9 because it seems that bit older 2019.9_rc -> .12 works)
 
i checked the code
 
  Collection<BundleCapability> matchingBundleCapabilities = fwkWiring.findProviders(ModuleContainer
 
and it bombs out there
so very like the fwkWiring is null
 
that is assigned in the start() method 
 
 public void start(BundleContext runtimeContext) {
this.context = runtimeContext;
this.fwkWiring = runtimeContext.getBundle(Constants.SYSTEM_BUNDLE_LOCATION).adapt(FrameworkWiring.class);
 
so it seems that somehow that returns null (i guess that start() method has to be called)
 
i can try to debug it a bit.
 
 
On Wed, 4 Dec 2019 at 13:23, Mickael Istria <mistria@xxxxxxxxxx> wrote:
Hi,
 
In any case, a NPE is a bug. So please report it, with the simplest steps to reproduce you can figure out.
_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/p2-dev
_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/p2-dev
 

_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/p2-dev

Back to the top