You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by ra...@apache.org on 2018/02/15 12:21:14 UTC
[incubator-openwhisk] branch master updated: Fix
NullPointerException in ActivationFinisher. (#3278)
This is an automated email from the ASF dual-hosted git repository.
rabbah pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk.git
The following commit(s) were added to refs/heads/master by this push:
new 2d1a827 Fix NullPointerException in ActivationFinisher. (#3278)
2d1a827 is described below
commit 2d1a827ec6164c04ef860677de5feb289fb1ac19
Author: Markus Thömmes <ma...@me.com>
AuthorDate: Thu Feb 15 13:21:11 2018 +0100
Fix NullPointerException in ActivationFinisher. (#3278)
The ActivationFinisher's code is racy. If shutdown and postStop are called concurrently a NullPointerException is possible.
* Context is guaranteed to be still alive in postStop
---
.../scala/whisk/core/controller/actions/PrimitiveActions.scala | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/core/controller/src/main/scala/whisk/core/controller/actions/PrimitiveActions.scala b/core/controller/src/main/scala/whisk/core/controller/actions/PrimitiveActions.scala
index 2e9d6b0..2d23b86 100644
--- a/core/controller/src/main/scala/whisk/core/controller/actions/PrimitiveActions.scala
+++ b/core/controller/src/main/scala/whisk/core/controller/actions/PrimitiveActions.scala
@@ -270,12 +270,7 @@ protected[actions] object ActivationFinisher {
}
}
- def shutdown(): Unit = {
- preemptiveMsgs.foreach(_.cancel())
- preemptiveMsgs = Vector.empty
- context.stop(poller)
- context.stop(self)
- }
+ def shutdown(): Unit = Option(context).foreach(_.stop(self))
override def postStop() = {
logging.debug(this, "finisher shutdown")
--
To stop receiving notification emails like this one, please contact
rabbah@apache.org.