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

Gracefully handle ProcessCancelledException #171

Open
sagenschneider opened this issue Nov 15, 2018 · 2 comments
Open

Gracefully handle ProcessCancelledException #171

sagenschneider opened this issue Nov 15, 2018 · 2 comments
Labels
enhancement Requested enhancement On Hold Other items are higher priority

Comments

@sagenschneider
Copy link
Collaborator

sagenschneider commented Nov 15, 2018

SEVERE: Unhandle escalation
officefloor: net.officefloor.frame.api.manage.ProcessCancelledException
officefloor: 	at net.officefloor.frame.impl.execute.function.ManagedFunctionContainerImpl.execute(ManagedFunctionContainerImpl.java:407)
officefloor: 	at net.officefloor.frame.impl.execute.thread.ThreadStateImpl$ActiveThreadState.executeFunction(ThreadStateImpl.java:983)
officefloor: 	at net.officefloor.frame.impl.execute.job.FunctionLoopImpl.executeThreadStateFunctionLoop(FunctionLoopImpl.java:180)
officefloor: 	at net.officefloor.frame.impl.execute.job.FunctionLoopImpl.access$100(FunctionLoopImpl.java:46)
officefloor: 	at net.officefloor.frame.impl.execute.job.FunctionLoopImpl$UnsafeLoop.doThreadStateFunctionLoop(FunctionLoopImpl.java:248)
officefloor: 	at net.officefloor.frame.impl.execute.job.FunctionLoopImpl$SafeLoop.doThreadStateFunctionLoop(FunctionLoopImpl.java:357)
officefloor: 	at net.officefloor.frame.impl.execute.job.FunctionLoopImpl$UnsafeLoop.run(FunctionLoopImpl.java:314)
officefloor: 	at net.officefloor.frame.impl.spi.team.PassiveTeamSource$PassiveTeam.assignJob(PassiveTeamSource.java:73)
officefloor: 	at net.officefloor.frame.impl.execute.job.FunctionLoopImpl.delegateFunction(FunctionLoopImpl.java:123)
officefloor: 	at net.officefloor.frame.impl.execute.process.ProcessStateImpl$3.execute(ProcessStateImpl.java:277)
officefloor: 	at net.officefloor.frame.impl.execute.thread.ThreadStateImpl$ActiveThreadState.executeFunction(ThreadStateImpl.java:983)
officefloor: 	at net.officefloor.frame.impl.execute.job.FunctionLoopImpl.executeThreadStateFunctionLoop(FunctionLoopImpl.java:180)
officefloor: 	at net.officefloor.frame.impl.execute.job.FunctionLoopImpl.access$100(FunctionLoopImpl.java:46)
officefloor: 	at net.officefloor.frame.impl.execute.job.FunctionLoopImpl$UnsafeLoop.doThreadStateFunctionLoop(FunctionLoopImpl.java:248)
officefloor: 	at net.officefloor.frame.impl.execute.job.FunctionLoopImpl$SafeLoop.doThreadStateFunctionLoop(FunctionLoopImpl.java:357)
officefloor: 	at net.officefloor.frame.impl.execute.job.FunctionLoopImpl$UnsafeLoop.run(FunctionLoopImpl.java:314)
officefloor: 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)
officefloor: 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
officefloor: 	at net.officefloor.frame.impl.execute.execution.ThreadFactoryManufacturer$OfficeFloorThreadFactory.lambda$newThread$0(ThreadFactoryManufacturer.java:117)
officefloor: 	at net.officefloor.frame.impl.execute.execution.ManagedExecutionFactoryImpl$ManagedExecutionImpl.execute(ManagedExecutionFactoryImpl.java:144)
officefloor: 	at net.officefloor.frame.api.executive.Executive.manageExecution(Executive.java:52)
officefloor: 	at net.officefloor.frame.impl.execute.execution.ManagedExecutionFactoryImpl$ManagedExecutionImpl.managedExecute(ManagedExecutionFactoryImpl.java:122)
officefloor: 	at net.officefloor.frame.impl.execute.execution.ThreadFactoryManufacturer$OfficeFloorThreadFactory.lambda$newThread$1(ThreadFactoryManufacturer.java:123)
officefloor: 	at java.base/java.lang.Thread.run(Thread.java:844)

Note that cancelled processes may still attempt to read data, causing the following (or worse corrupting another connection):

SEVERE: Unhandle escalation
officefloor: java.lang.IndexOutOfBoundsException
officefloor: 	at java.base/java.nio.Buffer.checkIndex(Buffer.java:669)
officefloor: 	at java.base/java.nio.DirectByteBuffer.get(DirectByteBuffer.java:265)
officefloor: 	at net.officefloor.server.buffer.StreamBufferByteSequence.byteAt(StreamBufferByteSequence.java:752)
officefloor: 	at net.officefloor.server.buffer.StreamBufferByteSequence.charAt(StreamBufferByteSequence.java:766)
officefloor: 	at net.officefloor.server.http.impl.MaterialisingHttpRequestHeaders.httpEqualsIgnoreCase(MaterialisingHttpRequestHeaders.java:86)
officefloor: 	at net.officefloor.server.http.impl.MaterialisingHttpRequestHeaders$2$1.hasNext(MaterialisingHttpRequestHeaders.java:254)
officefloor: 	at net.officefloor.web.accept.AcceptNegotiatorImpl.parseAccept(AcceptNegotiatorImpl.java:221)
officefloor: 	at net.officefloor.web.accept.AcceptNegotiatorImpl.getHandler(AcceptNegotiatorImpl.java:178)
officefloor: 	at net.officefloor.web.response.ObjectResponseManagedObjectSource.handle(ObjectResponseManagedObjectSource.java:233)
officefloor: 	at net.officefloor.server.http.impl.ProcessAwareHttpResponse.unsafeFlushResponseToHttpResponseWriter(ProcessAwareHttpResponse.java:275)
officefloor: 	at net.officefloor.server.http.impl.ProcessAwareHttpResponse.lambda$flushResponseToHttpResponseWriter$0(ProcessAwareHttpResponse.java:189)
officefloor: 	at net.officefloor.frame.impl.execute.thread.ThreadStateImpl.runProcessSafeOperation(ThreadStateImpl.java:465)
officefloor: 	at net.officefloor.frame.impl.execute.managedobject.ManagedObjectContainerImpl$ProcessAwareContextImpl.run(ManagedObjectContainerImpl.java:832)
officefloor: 	at net.officefloor.server.http.impl.ProcessAwareHttpResponse.safe(ProcessAwareHttpResponse.java:443)
officefloor: 	at net.officefloor.server.http.impl.ProcessAwareHttpResponse.flushResponseToHttpResponseWriter(ProcessAwareHttpResponse.java:188)
officefloor: 	at net.officefloor.server.http.impl.ProcessAwareServerHttpConnectionManagedObject.run(ProcessAwareServerHttpConnectionManagedObject.java:277)
officefloor: 	at net.officefloor.frame.impl.execute.thread.ThreadStateImpl$ProcessFlowCompletion$CompleteFunctionState.execute(ThreadStateImpl.java:823)
officefloor: 	at net.officefloor.frame.impl.execute.thread.ThreadStateImpl$ActiveThreadState.executeFunction(ThreadStateImpl.java:983)
officefloor: 	at net.officefloor.frame.impl.execute.job.FunctionLoopImpl.executeThreadStateFunctionLoop(FunctionLoopImpl.java:180)
officefloor: 	at net.officefloor.frame.impl.execute.job.FunctionLoopImpl.access$100(FunctionLoopImpl.java:46)
officefloor: 	at net.officefloor.frame.impl.execute.job.FunctionLoopImpl$UnsafeLoop.doThreadStateFunctionLoop(FunctionLoopImpl.java:248)
officefloor: 	at net.officefloor.frame.impl.execute.job.FunctionLoopImpl$SafeLoop.doThreadStateFunctionLoop(FunctionLoopImpl.java:357)
officefloor: 	at net.officefloor.frame.impl.execute.job.FunctionLoopImpl$UnsafeLoop.run(FunctionLoopImpl.java:314)
officefloor: 	at net.officefloor.frame.impl.spi.team.PassiveTeamSource$PassiveTeam.assignJob(PassiveTeamSource.java:73)
officefloor: 	at net.officefloor.frame.impl.execute.job.FunctionLoopImpl.delegateFunction(FunctionLoopImpl.java:123)
officefloor: 	at net.officefloor.frame.impl.execute.process.ProcessStateImpl$3.execute(ProcessStateImpl.java:277)
officefloor: 	at net.officefloor.frame.impl.execute.thread.ThreadStateImpl$ActiveThreadState.executeFunction(ThreadStateImpl.java:983)
officefloor: 	at net.officefloor.frame.impl.execute.job.FunctionLoopImpl.executeThreadStateFunctionLoop(FunctionLoopImpl.java:180)
officefloor: 	at net.officefloor.frame.impl.execute.job.FunctionLoopImpl.access$100(FunctionLoopImpl.java:46)
officefloor: 	at net.officefloor.frame.impl.execute.job.FunctionLoopImpl$UnsafeLoop.doThreadStateFunctionLoop(FunctionLoopImpl.java:248)
officefloor: 	at net.officefloor.frame.impl.execute.job.FunctionLoopImpl$SafeLoop.doThreadStateFunctionLoop(FunctionLoopImpl.java:357)
officefloor: 	at net.officefloor.frame.impl.execute.job.FunctionLoopImpl$UnsafeLoop.run(FunctionLoopImpl.java:314)
officefloor: 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)
officefloor: 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
officefloor: 	at net.officefloor.frame.impl.execute.execution.ThreadFactoryManufacturer$OfficeFloorThreadFactory.lambda$newThread$0(ThreadFactoryManufacturer.java:117)
officefloor: 	at net.officefloor.frame.impl.execute.execution.ManagedExecutionFactoryImpl$ManagedExecutionImpl.execute(ManagedExecutionFactoryImpl.java:144)
officefloor: 	at net.officefloor.frame.api.executive.Executive.manageExecution(Executive.java:52)
officefloor: 	at net.officefloor.frame.impl.execute.execution.ManagedExecutionFactoryImpl$ManagedExecutionImpl.managedExecute(ManagedExecutionFactoryImpl.java:122)
officefloor: 	at net.officefloor.frame.impl.execute.execution.ThreadFactoryManufacturer$OfficeFloorThreadFactory.lambda$newThread$1(ThreadFactoryManufacturer.java:123)
officefloor: 	at java.base/java.lang.Thread.run(Thread.java:844)
@sagenschneider
Copy link
Collaborator Author

Will look to fix up on tidy up of next TechEmpower submission

@sagenschneider
Copy link
Collaborator Author

Improvements to servicing means this happens a lot less. Furthermore, focus is on cloud compatibility that will use it's own HTTP server implementation (leaving OfficeFloor default server mostly for testing).

@sagenschneider sagenschneider added enhancement Requested enhancement On Hold Other items are higher priority labels Feb 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Requested enhancement On Hold Other items are higher priority
Projects
None yet
Development

No branches or pull requests

1 participant