-
Notifications
You must be signed in to change notification settings - Fork 8
Description
Hi Marc,
I am trying to run cfconcurrent on Lucee (Version 4.5.1.008, Express on Jetty) and am having some issues. I am using Java 1.8.0_25 (Oracle Corporation) 64bit on OS X 10.10.3.
I saw the references to Java 7 so I was wondering if there is any compatibility issue when using Java 8. I had a quick look at the javadocs and did not find anything problematic at first sight.
Basically the framework runs just fine, but I am seeing errors in the console and the requesttimeout.log.
It seems that the threads could not be properly stopped - and am unsure why this is even required at all.
I catch and log all errors within my code (big try/catch within the executor's run method), but there is no error catched.
Sidenote:
I had tried out the same configuration but using tomcat instead of jetty. Then the situation gets worse as I was not able to properly shutdown the whole application server. But that's a different case right now. However could be related to the same root cause.
The issue "should" be the same on Railo as Lucee 4.5.1 is a fork and I guess nothing changed in particular this place.
Console:
Exception in thread "Thread-22" java.lang.UnsupportedOperationException
at java.lang.Thread.stop(Thread.java:869)
at lucee.commons.io.StopThread.run(SystemUtil.java:1058)
The "Thread-22" is variable and can contain any number. The rest is always the same.
Looking at the source of the Lucee/Railo Class I can see that lucee calls the thread.stop method and passes in a Throwable argument. According to the java 7 and 8 javadocs the stop method is deprecated as it's unsafe in certain conditions.
So the issue "may" be a Lucee/Railo one.
However I was wondering why lucee is trying to stop a thread at all?!?
requesttimeout.log
"ERROR","Thread-16","04/13/2015","10:34:42","controler","stop thread (4) because run into a timeout (fail to retrieve path:java.lang.NullPointerException:null).;java.lang.Throwable;java.lang.Throwable
at sun.misc.Unsafe.park(Native Method)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1088)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
"
It looks to me as if my code might throw an exception within a thread (timeout).
Is there any default timeout? Or is this related to the default request timeout of ColdFusion/Railo/Lucee?
And do you know whether the "max concurrent threads" setting in the CF/Railo/Lucee admin has an effect on this one? Is this only related to cfthread instances? Or are plain java threads that are created by cfconcurrent also counted against that setting value?
Is a java thread created by JCF/cfconcurrent considered to be a coldfusion request which is kind of strange?
I think cfconcurrent is really a neat framework and I would like to continue working with it. If I can't find out what goes on here, I think I may use plain JCF instead - to get to the root of the problem. But that would be only the second-best solution of course... ;-)
Right now I am really unsure what the source of the errors is:
- my own code
- Railo/Lucy
- Java Version
- cfconcurrent
Any one else having the same issue?
Help is really much appreciated.
Greetings from Germany,
Jan