Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPE on Strand.park, no missing instrumentation highlighted with verifyInstrumentation turned on #182

Open
ChristianStier opened this issue Apr 27, 2016 · 12 comments

Comments

@ChristianStier
Copy link

Hi,

I'm currently getting the following error when using Fibers. I have turned on verifyInstrumentation. I am running the latest 0.7.5 JDK8 build and my agent is running. On top of the agent instrumentation, I am also running a separate QuasarInstrumentor that handles instrumentation of classes that are loaded via the platform's (Equinox OSGI) dependency injection mechanism. I have a minimal test setup that is working in conjunction with this setup.

However, when I use Semaphores I run into the following error.

I would greatly appreciate any help on this matter.

Best regards,
Christian

java.lang.NullPointerException
at co.paralleluniverse.strands.Strand.park(Strand.java:493)
at co.paralleluniverse.strands.concurrent.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:838)
at co.paralleluniverse.strands.concurrent.AbstractQueuedSynchronizer.doAcquireShared(AbstractQueuedSynchronizer.java:969)
at co.paralleluniverse.strands.concurrent.AbstractQueuedSynchronizer.acquireShared(AbstractQueuedSynchronizer.java:1302)
at co.paralleluniverse.strands.concurrent.Semaphore.acquireUninterruptibly(Semaphore.java:333)
at de.uka.ipd.sdq.simulation.abstractsimengine.desmoj.processes.SimProcessFiberStrategy.suspendProcess(SimProcessFiberStrategy.java:78)
at de.uka.ipd.sdq.simulation.abstractsimengine.processes.SimulatedProcess.suspend(SimulatedProcess.java:93)
at de.uka.ipd.sdq.simulation.abstractsimengine.processes.SimulatedProcess.passivate(SimulatedProcess.java:73)
at de.uka.ipd.sdq.simulation.abstractsimengine.AbstractSimProcessDelegator.passivate(AbstractSimProcessDelegator.java:62)
at de.uka.ipd.sdq.scheduler.resources.active.SimDelayResource.doProcessing(SimDelayResource.java:59)
at de.uka.ipd.sdq.scheduler.resources.active.AbstractActiveResource.process(AbstractActiveResource.java:44)
at de.uka.ipd.sdq.simucomframework.SimuComSimProcess.hold(SimuComSimProcess.java:158)
at de.uka.ipd.sdq.simucomframework.usage.OpenWorkload.waitForNextUser(OpenWorkload.java:99)
at de.uka.ipd.sdq.simucomframework.usage.OpenWorkload.internalLifeCycle(OpenWorkload.java:68)
at de.uka.ipd.sdq.simucomframework.SimuComSimProcess.lifeCycle(SimuComSimProcess.java:177)
at de.uka.ipd.sdq.simulation.abstractsimengine.processes.SimulatedProcess.actions(SimulatedProcess.java:58)
at de.uka.ipd.sdq.simulation.abstractsimengine.processes.ProcessRunnable.run(ProcessRunnable.java:28)
at co.paralleluniverse.strands.SuspendableUtils$VoidSuspendableCallable.run(SuspendableUtils.java:44)
at co.paralleluniverse.strands.SuspendableUtils$VoidSuspendableCallable.run(SuspendableUtils.java:32)
at co.paralleluniverse.fibers.Fiber.run(Fiber.java:1027)
at co.paralleluniverse.fibers.Fiber.run1(Fiber.java:1022)
at co.paralleluniverse.fibers.Fiber.exec(Fiber.java:732)
at co.paralleluniverse.fibers.RunnableFiberTask.doExec(RunnableFiberTask.java:95)
at co.paralleluniverse.fibers.RunnableFiberTask.run(RunnableFiberTask.java:86)
at co.paralleluniverse.common.util.SameThreadExecutor.execute(SameThreadExecutor.java:30)
at co.paralleluniverse.fibers.FiberExecutorScheduler.execute(FiberExecutorScheduler.java:77)
at co.paralleluniverse.fibers.RunnableFiberTask.submit(RunnableFiberTask.java:264)
at co.paralleluniverse.fibers.RunnableFiberTask.unpark(RunnableFiberTask.java:244)
at co.paralleluniverse.fibers.RunnableFiberTask.unpark(RunnableFiberTask.java:204)
at co.paralleluniverse.fibers.Fiber.unpark(Fiber.java:1275)
at co.paralleluniverse.strands.Strand.unpark(Strand.java:685)
at co.paralleluniverse.strands.concurrent.AbstractQueuedSynchronizer.unparkSuccessor(AbstractQueuedSynchronizer.java:666)
at co.paralleluniverse.strands.concurrent.AbstractQueuedSynchronizer.doReleaseShared(AbstractQueuedSynchronizer.java:693)
at co.paralleluniverse.strands.concurrent.AbstractQueuedSynchronizer.releaseShared(AbstractQueuedSynchronizer.java:1373)
at co.paralleluniverse.strands.concurrent.Semaphore.release(Semaphore.java:424)
at de.uka.ipd.sdq.simulation.abstractsimengine.desmoj.processes.SimProcessFiberStrategy.resumeProcess(SimProcessFiberStrategy.java:66)
at de.uka.ipd.sdq.simulation.abstractsimengine.processes.SimulatedProcess.resume(SimulatedProcess.java:108)
at de.uka.ipd.sdq.simulation.abstractsimengine.desmoj.DesmoJSimProcess.access$0(DesmoJSimProcess.java:1)
at de.uka.ipd.sdq.simulation.abstractsimengine.desmoj.DesmoJSimProcess$1.eventRoutine(DesmoJSimProcess.java:62)
at desmoj.core.simulator.Scheduler.processNextEventNote(Scheduler.java:608)
at desmoj.core.simulator.Experiment.doProceed(Experiment.java:1477)
at desmoj.core.simulator.Experiment.access$0(Experiment.java:1469)
at desmoj.core.simulator.Experiment$2.run(Experiment.java:1441)
at co.paralleluniverse.strands.SuspendableUtils$VoidSuspendableCallable.run(SuspendableUtils.java:44)
at co.paralleluniverse.strands.SuspendableUtils$VoidSuspendableCallable.run(SuspendableUtils.java:32)
at co.paralleluniverse.fibers.Fiber.run(Fiber.java:1027)
at co.paralleluniverse.fibers.Fiber.run1(Fiber.java:1022)
at co.paralleluniverse.fibers.Fiber.exec(Fiber.java:732)
at co.paralleluniverse.fibers.RunnableFiberTask.doExec(RunnableFiberTask.java:95)
at co.paralleluniverse.fibers.RunnableFiberTask.run(RunnableFiberTask.java:86)
at co.paralleluniverse.common.util.SameThreadExecutor.execute(SameThreadExecutor.java:30)
at co.paralleluniverse.fibers.FiberExecutorScheduler.execute(FiberExecutorScheduler.java:77)
at co.paralleluniverse.fibers.RunnableFiberTask.submit(RunnableFiberTask.java:264)
at co.paralleluniverse.fibers.Fiber.start(Fiber.java:1058)
at co.paralleluniverse.fibers.Fiber.start(Fiber.java:79)
at desmoj.core.simulator.Experiment.proceed(Experiment.java:1444)
at desmoj.core.simulator.Experiment.start(Experiment.java:2324)
at desmoj.core.simulator.Experiment.start(Experiment.java:2259)
at de.uka.ipd.sdq.simulation.abstractsimengine.desmoj.DesmoJExperiment.startSimulator(DesmoJExperiment.java:49)
at de.uka.ipd.sdq.simulation.abstractsimengine.AbstractExperiment.start(AbstractExperiment.java:61)
at de.uka.ipd.sdq.simucomframework.ExperimentRunner.run(ExperimentRunner.java:46)
at de.uka.ipd.sdq.simucomframework.ExperimentRunner.run(ExperimentRunner.java:61)
at org.palladiosimulator.simulizar.runtimestate.AbstractSimuLizarRuntimeState.runSimulation(AbstractSimuLizarRuntimeState.java:153)
at org.palladiosimulator.simulizar.launcher.jobs.PCMStartInterpretationJob.execute(PCMStartInterpretationJob.java:77)
at de.uka.ipd.sdq.workflow.jobs.SequentialJob.executeWithDelayedCleanUp(SequentialJob.java:111)
at de.uka.ipd.sdq.workflow.jobs.SequentialJob.execute(SequentialJob.java:79)
at de.uka.ipd.sdq.workflow.jobs.SequentialBlackboardInteractingJob.execute(SequentialBlackboardInteractingJob.java:86)
at de.uka.ipd.sdq.workflow.jobs.SequentialJob.executeWithImmediateCleanUp(SequentialJob.java:150)
at de.uka.ipd.sdq.workflow.jobs.SequentialJob.execute(SequentialJob.java:77)
at de.uka.ipd.sdq.workflow.BlackboardBasedWorkflow.execute(BlackboardBasedWorkflow.java:82)
at de.uka.ipd.sdq.workflow.Workflow.run(Workflow.java:90)
at de.uka.ipd.sdq.workflow.launchconfig.AbstractWorkflowBasedLaunchConfigurationDelegate.createAndRunWorkflow(AbstractWorkflowBasedLaunchConfigurationDelegate.java:244)
at de.uka.ipd.sdq.workflow.launchconfig.AbstractWorkflowBasedLaunchConfigurationDelegate.launch(AbstractWorkflowBasedLaunchConfigurationDelegate.java:91)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:885)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:739)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1039)
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1256)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

@circlespainter circlespainter self-assigned this Apr 27, 2016
@circlespainter
Copy link
Member

Hi, I'm not too familiar with OSGI but how does the additional Quasar instrumentor work? There's no message at all from instrumentation verification? If you could share a small program that reproduces the issue that would be optimal.

@ChristianStier
Copy link
Author

Hi, OSGi offers a hook which allows the registration of Pre-Classloading functionality, such as bytecode instrumentation: http://www.eclipse.org/equinox/weaving/
I've shared my current instrumentation code here: https://gist.github.com/ChristianStier/bc9a939c7c4abcf96cb0ebba86430e57 .

I did originally get instrumentation errors for classes I forgot to add to my suspendables and suspendables-super files. So fundamentally, the instrumentation verification is working.

However, now that I have added the classes and interfaces that were missing instrumentation, I am getting this exception.

I'll try to see if I can come up with a way to share a minimal way with which the issue is reproducible - that setup would likely however still include Equinox as its execution environment.

Is there maybe a way with which I can evaluate whether all Quasar framework code was actually instrumented? One guess I had was that the Semaphores or methods called within the Semaphores might not have been instrumented.

@circlespainter
Copy link
Member

Quasar code is AOT-instrumented. You'll find the @Instrumented annotation in all instrumented classes and methods (either on disk or in memory for run-time instrumented code). You can also run the agent with the =vdc suffix which is going to print details of all the instrumentation process (on a QuasarInstrumentor instance you can call the corresponding setVerbose, setDebug and setCheck methods).

The issue is that of a strange exception (w.r.t. the source line it points to), so probably occurring in the added bytecode and probably because the fiber stack cannot be found, which means there's something uninstrumented (likely only a call site) towards the top of the stack frame: that's where I suggest to start looking for uninstrumented methods and/or uninstrumented call sites (they also can be due to unmarked super/interface/abstract methods) with the help of instrumentation debug as above.

What is puzzling is that instrumentation verification doesn't point out the issue and (modulo remaining bugs that haven't been found for several months now, after it has been substantially improved) it really should.

I'll have a closer look at the OSGI-attached instrumentor as well.

@pron
Copy link
Contributor

pron commented Apr 27, 2016

This seems to be a scheduler issue (the fiber appears twice in the trace, and in a not in a FJPool worker thread). What scheduler are you using for the fiber?

@pron
Copy link
Contributor

pron commented Apr 27, 2016

Sorry, it's right there: SameThreadExecutor. May I ask why? (This executor cannot be used to schedule fibers; I'll explain why later).

@circlespainter circlespainter removed their assignment Apr 27, 2016
@ChristianStier
Copy link
Author

Thank you for your quick response. I am using the SameThreadExecutor as it is used by a simulation framework (DESMO-J) which we are using: https://sourceforge.net/p/desmoj/code/HEAD/tree/src.core/desmoj/core/simulator/FiberSimStrandFactory.java

It also was in line with my mental model of Fiber execution which I had put together until then. We do not want to use Fibers to parallelize workload. Rather, we want to use them as a replacement of Thread-based execution of small simulation 'transactions' which one could probably also describe as co-routines. Of the execution threads, only one can actually do meaningful work at any point in time, which is why the SameThreadExecutor seemed like a reasonable fit.

After reading your response and looking at our 'working' small-scale example, it (seemingly) is working as long as you don't start spawning fibers within fibers.

I would be very much interested in your explanation.

Many thanks,
Christian

@ChristianStier
Copy link
Author

The issue still occurs after switching out the executor. The problem seems to be that the constructors are not instrumented ( in the above logs). When I explicitly mark them as Suspendable (e.g. by throwing SuspendExecution), I now get an UnableToInstrumentException:

[quasar] ERROR: while transforming de/uka/ipd/sdq/simulation/abstractsimengine/desmoj/DesmoJSimProcess: Unable to instrument de/uka/ipd/sdq/simulation/abstractsimengine/desmoj/DesmoJSimProcess#(Lde/uka/ipd/sdq/simulation/abstractsimengine/processes/ISimProcessStrategy;Lde/uka/ipd/sdq/simulation/abstractsimengine/AbstractSimProcessDelegator;Lde/uka/ipd/sdq/simulation/abstractsimengine/desmoj/DesmoJModel;Ljava/lang/String;)V because of special method
co.paralleluniverse.fibers.instrument.UnableToInstrumentException: Unable to instrument de/uka/ipd/sdq/simulation/abstractsimengine/desmoj/DesmoJSimProcess#(Lde/uka/ipd/sdq/simulation/abstractsimengine/processes/ISimProcessStrategy;Lde/uka/ipd/sdq/simulation/abstractsimengine/AbstractSimProcessDelegator;Lde/uka/ipd/sdq/simulation/abstractsimengine/desmoj/DesmoJModel;Ljava/lang/String;)V because of special method

Is there a way I can get Quasar to instrument constructors?

@pron
Copy link
Contributor

pron commented Apr 28, 2016

I would be very much interested in your explanation.

Fibers are very much intentionally not continuations. They are (abstract) threads and, like all threads, are continuations plus a scheduler. This is important precisely so that fibers could use constructs like channels etc., to interact with other fibers. Also, in 99% of the cases where people say they want continuations, they really want threads with better control over scheduling, which is what fibers provide, and I believe your case is no different.

In Java 9 we will have a proper API for continuations, but even then we expect fibers to be a better fit for 99% of use cases.

It is perfectly OK to use fibers without parallelization, but in order for fibers to wake-up other fibers, the executor needs to have some sort of an execution queue. Try giving your fibers a single-threaded thread pool (Executor.newSingleThreadExecutor()) or even something like SameThreadExecutor but which adds tasks to a queue on execute(), which you then manually run.

The problem seems to be that the constructors are not instrumented

Yes, constructors are not allowed to block. Blocking constructors are strongly discouraged and considered a code-smell even when plain Java threads are concerned. It's best not to leave a thread (or a fiber) hanging while an object is in an undetermined state (partly constructed). There's always a way around that, which is probably better anyway.

@ChristianStier
Copy link
Author

ChristianStier commented Apr 29, 2016

Hi, having ruled out calls from the constructors and changing the used scheduler, I am still running into the same issue.

I also made the switch to a FiberExecutorScheduler based on the SingleThreadExecutor.
Below you can find the NPE, together with some logging information on Fiber activity prior to the NPE.

Any pointers are greatly appreciated.

[pool-4-thread-1] DEBUG: Initialising random number generator! [Stream ID = 0]
[pool-4-thread-1] DEBUG: Setting fixed seed for random number generator! [Stream ID = 0]
[pool-4-thread-1] DEBUG: Seed 0 = 0
[pool-4-thread-1] DEBUG: Seed 1 = 1
[pool-4-thread-1] DEBUG: Seed 2 = 2
[pool-4-thread-1] DEBUG: Seed 3 = 3
[pool-4-thread-1] DEBUG: Seed 4 = 4
[pool-4-thread-1] DEBUG: Seed 5 = 5
[pool-4-thread-1] DEBUG: Random number generator about to get initialized
[pool-4-thread-1] DEBUG: Seed is 0 1 2 3 4 5
[pool-4-thread-1] DEBUG: Random number stream initialised! [Stream ID = 0]
[pool-4-thread-1] DEBUG: Initialise simucom framework's workload drivers
[pool-4-thread-1] DEBUG: Create workload driver for OpenWorkload: OpenWorkload[TRANSIENT]
[pool-4-thread-1] DEBUG: Create SimuComSimProcess with id 1 [OpenWorkloadUserMaturationChamber_1]
[pool-4-thread-1] DEBUG: Calling super.init in process with id 1 [OpenWorkloadUserMaturationChamber_1]
[pool-4-thread-1] DEBUG: Random number producer started! [Stream ID = 0]
[pool-4-thread-1] DEBUG: Starting sim process [ID: OpenWorkloadUserMaturationChamber_1]
[pool-4-thread-1] INFO : Process set to running OpenWorkloadUserMaturationChamber_1
[pool-4-thread-1] DEBUG: Suspending thread [OpenWorkloadUserMaturationChamber_1]
[pool-4-thread-1] INFO : Process set to suspended OpenWorkloadUserMaturationChamber_1
[pool-4-thread-1] DEBUG: Done with super.init in process with id1 [OpenWorkloadUserMaturationChamber_1]
[pool-4-thread-1] DEBUG: Initializing reconfigurator engines and their rule sets
[pool-4-thread-1] DEBUG: Retrieving Monitor Repository model from blackboard partition
[pool-4-thread-1] DEBUG: Initialize model observers, e.g., to keep simucom framework objects in sync with global PCM model
[pool-4-thread-1] DEBUG: Retrieving Monitor Repository model from blackboard partition
[pool-4-thread-1] DEBUG: Initializing Simulated ResourcesContainer
[pool-4-thread-1] DEBUG: Simulated Resource Container created. ContainerID _xISeMAEpEeS7FKokKTKFow
[pool-4-thread-1] DEBUG: Creating Simulated Active Resource: _EKwpkAEqEeS7FKokKTKFow
[pool-4-thread-1] DEBUG: Simulation Status Updated
[pool-4-thread-1] DEBUG: Creating scheduled resource with strategy PROCESSOR_SHARING and 1 replicas!
[pool-4-thread-1] DEBUG: Starting resource _EKwpkAEqEeS7FKokKTKFow
[pool-4-thread-1] DEBUG: Added ActiveResource. TypeID: _oro4gG3fEdy4YaaT-RYrLQ, Description: , SchedulingStrategy: PROCESSOR_SHARING
[pool-4-thread-1] DEBUG: Added SimulatedResourceContainer: ID: _xISeMAEpEeS7FKokKTKFow de.uka.ipd.sdq.simucomframework.resources.SimulatedResourceContainer@11310ce8
[pool-4-thread-1] DEBUG: Simulated Resource Container created. ContainerID _yaTfsAEpEeS7FKokKTKFow
[pool-4-thread-1] DEBUG: Creating Simulated Active Resource: _GAVEEAEqEeS7FKokKTKFow
[pool-4-thread-1] DEBUG: Simulation Status Updated
[pool-4-thread-1] DEBUG: Creating scheduled resource with strategy PROCESSOR_SHARING and 4 replicas!
[pool-4-thread-1] DEBUG: Starting resource _GAVEEAEqEeS7FKokKTKFow
[pool-4-thread-1] DEBUG: Added ActiveResource. TypeID: _oro4gG3fEdy4YaaT-RYrLQ, Description: , SchedulingStrategy: PROCESSOR_SHARING
[pool-4-thread-1] DEBUG: Creating Simulated Active Resource: _HwZ6kAEqEeS7FKokKTKFow
[pool-4-thread-1] DEBUG: Simulation Status Updated
[pool-4-thread-1] DEBUG: Creating scheduled resource with strategy FCFS and 1 replicas!
[pool-4-thread-1] DEBUG: Starting resource _HwZ6kAEqEeS7FKokKTKFow
[pool-4-thread-1] DEBUG: Added ActiveResource. TypeID: _BIjHoQ3KEdyouMqirZIhzQ, Description: , SchedulingStrategy: FCFS
[pool-4-thread-1] DEBUG: Added SimulatedResourceContainer: ID: _yaTfsAEpEeS7FKokKTKFow de.uka.ipd.sdq.simucomframework.resources.SimulatedResourceContainer@8b27d60
[pool-4-thread-1] DEBUG: Simulated Resource Container created. ContainerID _3uVlIAEpEeS7FKokKTKFow
[pool-4-thread-1] DEBUG: Creating Simulated Active Resource: _JPnqkAEqEeS7FKokKTKFow
[pool-4-thread-1] DEBUG: Simulation Status Updated
[pool-4-thread-1] DEBUG: Creating scheduled resource with strategy PROCESSOR_SHARING and 2 replicas!
[pool-4-thread-1] DEBUG: Starting resource _JPnqkAEqEeS7FKokKTKFow
[pool-4-thread-1] DEBUG: Added ActiveResource. TypeID: _oro4gG3fEdy4YaaT-RYrLQ, Description: , SchedulingStrategy: PROCESSOR_SHARING
[pool-4-thread-1] DEBUG: Creating Simulated Active Resource: _K2xOkAEqEeS7FKokKTKFow
[pool-4-thread-1] DEBUG: Simulation Status Updated
[pool-4-thread-1] DEBUG: Creating scheduled resource with strategy FCFS and 1 replicas!
[pool-4-thread-1] DEBUG: Starting resource _K2xOkAEqEeS7FKokKTKFow
[pool-4-thread-1] DEBUG: Added ActiveResource. TypeID: _BIjHoQ3KEdyouMqirZIhzQ, Description: , SchedulingStrategy: FCFS
[pool-4-thread-1] DEBUG: Added SimulatedResourceContainer: ID: _3uVlIAEpEeS7FKokKTKFow de.uka.ipd.sdq.simucomframework.resources.SimulatedResourceContainer@7a5278f
[pool-4-thread-1] DEBUG: Initialization done
[pool-4-thread-1] DEBUG: Retrieving Usage Evolution model from blackboard partition
[pool-4-thread-1] INFO : No Usage Evolution model found, so evolution will not be simulated.
[pool-4-thread-1] INFO : org.palladiosimulator.simulizar.modelobserver.UsageEvolutionSyncer cannot observer model, as none has been specified
[pool-4-thread-1] DEBUG: Adding Debug and monitoring interpreter listeners
[pool-4-thread-1] DEBUG: Retrieving Monitor Repository model from blackboard partition
[pool-4-thread-1] DEBUG: Retrieving Monitor Repository model from blackboard partition
[pool-4-thread-1] INFO : Created Reconfiguration Time Measuring Point
[pool-4-thread-1] DEBUG: Retrieving Monitor Repository model from blackboard partition
[pool-4-thread-1] DEBUG: Retrieving Monitor Repository model from blackboard partition
[pool-4-thread-1] DEBUG: Retrieving Monitor Repository model from blackboard partition
[pool-4-thread-1] DEBUG: Retrieving Usage Evolution model from blackboard partition
[pool-4-thread-1] INFO : No Usage Evolution model found, so evolution will not be simulated.
[pool-4-thread-1] DEBUG: Starting Simulizar simulation...
[pool-4-thread-1] DEBUG: Setting up experiment runner
[pool-4-thread-1] DEBUG: Enabling simulation stop condition at maximum simulation time of 2000
[pool-4-thread-1] DEBUG: Deactivating maximum measurements count stop condition per user request
[pool-4-thread-1] INFO : Starting simulation...
[pool-4-thread-1] DEBUG: Periodic event PeriodicSimulationEvent occurred at simulation time 0.0
[pool-4-thread-1] DEBUG: Periodic trigger for entity PeriodicallyTriggeredSimulationEntity occurred at simulation time 0.0
[pool-4-thread-1] DEBUG: Periodic event PeriodicSimulationEvent occurred at simulation time 0.0
[pool-4-thread-1] DEBUG: Periodic trigger for entity PeriodicallyTriggeredSimulationEntity occurred at simulation time 0.0
[pool-4-thread-1] DEBUG: Periodic event PeriodicSimulationEvent occurred at simulation time 0.0
[pool-4-thread-1] DEBUG: Periodic trigger for entity PeriodicallyTriggeredSimulationEntity occurred at simulation time 0.0
[pool-4-thread-1] INFO : Resuming thread [OpenWorkloadUserMaturationChamber_1]
[pool-4-thread-1] DEBUG: Starting simulation process OpenWorkloadUserMaturationChamber_1
[pool-4-thread-1] DEBUG: Spawning New User...
[pool-4-thread-1] DEBUG: Create SimuComSimProcess with id 2 [OpenUser_2]
[pool-4-thread-1] DEBUG: Calling super.init in process with id 2 [OpenUser_2]
[pool-4-thread-1] WARN : Simulation caused an exception. Caught it in SimProcess Lifecycle Method
java.lang.NullPointerException
at co.paralleluniverse.strands.Strand.park(Strand.java:493)
at co.paralleluniverse.strands.concurrent.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:838)
at co.paralleluniverse.strands.concurrent.AbstractQueuedSynchronizer.doAcquireShared(AbstractQueuedSynchronizer.java:969)
at co.paralleluniverse.strands.concurrent.AbstractQueuedSynchronizer.acquireShared(AbstractQueuedSynchronizer.java:1302)
at co.paralleluniverse.strands.concurrent.Semaphore.acquireUninterruptibly(Semaphore.java:333)
at de.uka.ipd.sdq.simulation.abstractsimengine.desmoj.processes.SimProcessFiberStrategy.startProcess(SimProcessFiberStrategy.java:55)
at de.uka.ipd.sdq.simulation.abstractsimengine.processes.SimulatedProcess.startProcess(SimulatedProcess.java:48)
at de.uka.ipd.sdq.simulation.abstractsimengine.desmoj.DesmoJSimProcess.createDesmoJSimProcess(DesmoJSimProcess.java:41)
at de.uka.ipd.sdq.simulation.abstractsimengine.desmoj.DesmoJSimEngineFactory.createSimProcess(DesmoJSimEngineFactory.java:56)
at de.uka.ipd.sdq.simulation.abstractsimengine.AbstractSimProcessDelegator.init(AbstractSimProcessDelegator.java:34)
at de.uka.ipd.sdq.simucomframework.SimuComSimProcess.init(SimuComSimProcess.java:83)
at de.uka.ipd.sdq.simucomframework.usage.OpenWorkloadUserFactory.createUser(OpenWorkloadUserFactory.java:35)
at de.uka.ipd.sdq.simucomframework.usage.OpenWorkload.generateUser(OpenWorkload.java:106)
at de.uka.ipd.sdq.simucomframework.usage.OpenWorkload.internalLifeCycle(OpenWorkload.java:65)
at de.uka.ipd.sdq.simucomframework.SimuComSimProcess.lifeCycle(SimuComSimProcess.java:187)
at de.uka.ipd.sdq.simulation.abstractsimengine.processes.SimulatedProcess.actions(SimulatedProcess.java:58)
at de.uka.ipd.sdq.simulation.abstractsimengine.processes.ProcessRunnable.run(ProcessRunnable.java:28)
at co.paralleluniverse.strands.SuspendableUtils$VoidSuspendableCallable.run(SuspendableUtils.java:44)
at co.paralleluniverse.strands.SuspendableUtils$VoidSuspendableCallable.run(SuspendableUtils.java:32)
at co.paralleluniverse.fibers.Fiber.run(Fiber.java:1027)
at co.paralleluniverse.fibers.Fiber.run1(Fiber.java:1022)
at co.paralleluniverse.fibers.Fiber.exec(Fiber.java:732)
at co.paralleluniverse.fibers.RunnableFiberTask.doExec(RunnableFiberTask.java:95)
at co.paralleluniverse.fibers.RunnableFiberTask.run(RunnableFiberTask.java:86)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

@circlespainter
Copy link
Member

This stack looks regular to me so I think the previous considerations and suggestions about instrumentation checking now apply. Have you tried checking manually for instrumentation, with the help of instrumentation debug, the methods and call sites that appear in the trace? Are these classes instrumented by the agent or by the OSGI-based instrumentor?

@ChristianStier
Copy link
Author

I'll evaluate whether the OSGi-based instrumentor actually verifies the instrumentation and then report back on this, thank you.

@fab1an
Copy link

fab1an commented Mar 18, 2017

Is this related? #255

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants