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

Graphite: NPE on shutdown #3352

Closed
KrauseStefan opened this issue Sep 13, 2017 · 5 comments
Closed

Graphite: NPE on shutdown #3352

KrauseStefan opened this issue Sep 13, 2017 · 5 comments

Comments

@KrauseStefan
Copy link

I'm now experiencing this issue as well.

Setup:

Win 8.1
Gatling 2.2.5
Async websockets checks are used, together with http
Test target is on the same machine
As you can see in the screenshot below this happens after the simulation is completed.
The last thing the test does is

exec(
  exec(ws("End Async Check", socketName).reconciliate),
  exec(ws("Close WebSocket", socketName).close)
)

It does not reproduce every time though, but pretty often.

image

I managed to put a breakpoint on the line that throws this error, I don't know the issue though.
Below is a screenshot with variable values, let me know if there is anything I can try, I will upgrade my gatling version soon but as I see the changelog this is not fixed

image

This is a duplicate of #3052 but it is closed and it seems no one is looking at it :)

@slandelle
Copy link
Member

Have a look at the stacktrace: this crash happens in the Graphite DataWriter when Gatling shuts down. It has nothing to do with HTTP nor WebSockets. I suspect you use something like maxDuration that forcefully closes Gatling, and can cause some race conditions on shut down.

The HTML reports are still being generated, so this is more an inconvenience than a critical issue and I don't think me or the other Gatling Corp people will invest time on this.

Then, we'd love a contribution!

@slandelle slandelle changed the title Nullpointer exception just before test is done with async websocket checkes Graphite: NPE on shutdown Sep 13, 2017
@slandelle
Copy link
Member

I suspect one should just try to catch the exception in the TcpSender and ignore it. Gatling is being shutdown and there's nothing to do to try to recover.

@KrauseStefan
Copy link
Author

Yes I have the graphite connection enabled, (however influxDB is not started).
And you are right the test seems to work correctly without any issues, except for this log message.

Thank you for your hint, I'll see if I can find time to try and create a pull request.

@slandelle
Copy link
Member

Closing due to lack of activity. Moreover, such issue wasn't reported since then, so it's possible it was fixed in Akka (who knows).

@owlmylove
Copy link

owlmylove commented Sep 29, 2022

Not fixed yet, its so confusing, as the test runs ok, but there is an error

`Simulation XXXXXXXXX completed in 1 seconds
[ERROR] [09/29/2022 17:49:58.541] [GatlingSystem-akka.actor.default-dispatcher-4] [akka.actor.ActorSystemImpl(GatlingSystem)] exception while executing timer task
java.lang.NullPointerException: Cannot invoke "akka.actor.ActorContext.system()" because the return value of "io.gatling.core.akka.BaseActor.context()" is null
at io.gatling.core.akka.BaseActor.system(BaseActor.scala:27)
at io.gatling.graphite.sender.TcpSender.askForConnection(TcpSender.scala:103)
at io.gatling.graphite.sender.TcpSender$$anonfun$1.$anonfun$applyOrElse$1(TcpSender.scala:58)
at akka.actor.Scheduler$$anon$4.run(Scheduler.scala:202)
at akka.actor.LightArrayRevolverScheduler$TaskHolder.run(LightArrayRevolverScheduler.scala:343)
at akka.actor.LightArrayRevolverScheduler.$anonfun$close$1(LightArrayRevolverScheduler.scala:145)
at akka.actor.LightArrayRevolverScheduler.$anonfun$close$1$adapted(LightArrayRevolverScheduler.scala:144)
at scala.collection.Iterator.foreach(Iterator.scala:941)
at scala.collection.Iterator.foreach$(Iterator.scala:941)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1429)
at scala.collection.IterableLike.foreach(IterableLike.scala:74)
at scala.collection.IterableLike.foreach$(IterableLike.scala:73)
at scala.collection.AbstractIterable.foreach(Iterable.scala:56)
at akka.actor.LightArrayRevolverScheduler.close(LightArrayRevolverScheduler.scala:144)
at akka.actor.ActorSystemImpl.stopScheduler(ActorSystem.scala:980)
at akka.actor.ActorSystemImpl.$anonfun$_start$1(ActorSystem.scala:910)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
at akka.actor.ActorSystemImpl$$anon$2.run(ActorSystem.scala:931)
at akka.actor.ActorSystemImpl$TerminationCallbacks$$anonfun$addRec$1$1.applyOrElse(ActorSystem.scala:1118)
at akka.actor.ActorSystemImpl$TerminationCallbacks$$anonfun$addRec$1$1.applyOrElse(ActorSystem.scala:1118)
at scala.concurrent.Future.$anonfun$andThen$1(Future.scala:536)
at scala.concurrent.impl.Promise.liftedTree1$1(Promise.scala:33)
at scala.concurrent.impl.Promise.$anonfun$transform$1(Promise.scala:33)
at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64)
at akka.dispatch.BatchingExecutor$AbstractBatch.processBatch(BatchingExecutor.scala:55)
at akka.dispatch.BatchingExecutor$BlockableBatch.$anonfun$run$1(BatchingExecutor.scala:92)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:85)
at akka.dispatch.BatchingExecutor$BlockableBatch.run(BatchingExecutor.scala:92)
at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:41)
at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(ForkJoinExecutorConfigurator.scala:49)
at akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
at akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
at akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
at akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)

Parsing log file(s)...
Parsing log file(s) done
Generating reports...

`

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

No branches or pull requests

3 participants