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

Groovy parser error kills web UI #3270

Closed
devinrsmith opened this issue Jan 6, 2023 · 10 comments · Fixed by #3379
Closed

Groovy parser error kills web UI #3270

devinrsmith opened this issue Jan 6, 2023 · 10 comments · Fixed by #3379
Assignees
Labels
autocomplete bug Something isn't working triage
Milestone

Comments

@devinrsmith
Copy link
Member

2023-01-06T00:05:22.908Z | orinmemory://model/1 |  WARN | i.d.l.parse.PendingParse  | Parser for inmemory://model/1: Encountered parse exception io.deephaven.lang.generated.TokenMgrException: Lexical error at line 1, column 2.  Encountered: "\u00a0" (160), after : ""                                                                                                   
        at io.deephaven.lang.generated.ChunkerTokenManager.getNextToken(ChunkerTokenManager.java:2377)                                                                                                                                                                                                                                                                        
        at io.deephaven.lang.generated.Chunker.jj_ntk_f(Chunker.java:4370)                                                                                                                                                                                                                                                                                                    
        at io.deephaven.lang.generated.Chunker.Expression(Chunker.java:2794)                                                                                                                                                                                                                                                                                                  
        at io.deephaven.lang.generated.Chunker.Values(Chunker.java:1659)                                                                                                                                                                                                                                                                                                      
        at io.deephaven.lang.generated.Chunker.Statement(Chunker.java:302)                 
        at io.deephaven.lang.generated.Chunker.EatStatements(Chunker.java:221)             
        at io.deephaven.lang.generated.Chunker.Document(Chunker.java:158)                  
        at io.deephaven.lang.parse.PendingParse$ParseJob.parse(PendingParse.java:72)       
        at io.deephaven.lang.parse.PendingParse.parse(PendingParse.java:162)               
        at java.lang.Thread.run(Thread.java:829)                                           
 while parsing xᅠ=ᅠbaseTable.snapshotWhen(triggerTable)

This error seems to kill the websocket connection, and then causes an issues w/ gRPC websocket mulitplex:

2023-01-06T00:05:22.918Z | qtp1485485458-51     | ERROR | i.d.e.b.util.GrpcUtil     | Unanticipated gRPC Error: io.grpc.StatusRuntimeException: UNKNOWN                                                                                                                                                                                                                           
        at io.grpc.Status.asRuntimeException(Status.java:530)                                                                                                                                                                                                                                                                                                                     
        at io.grpc.servlet.web.websocket.MultiplexedWebsocketStreamImpl$Sink.writeMetadataToStream(MultiplexedWebsocketStreamImpl.java:79)                                                                                                                                                                                                                                        
        at io.grpc.servlet.web.websocket.MultiplexedWebsocketStreamImpl$Sink.writeTrailers(MultiplexedWebsocketStreamImpl.java:128)                                                                                                                                                                                                                                               
        at io.grpc.internal.AbstractServerStream.close(AbstractServerStream.java:133)                                                                                                                                                                                                                                                                                             
        at io.grpc.internal.ServerCallImpl.closeInternal(ServerCallImpl.java:228)                                                                                                                                                                                                                                                                                                 
        at io.grpc.internal.ServerCallImpl.close(ServerCallImpl.java:212)                                                                                                                                                                                                                                                                                                         
        at io.grpc.PartialForwardingServerCall.close(PartialForwardingServerCall.java:48)                                                                                                                                                                                                                                                                                         
        at io.grpc.ForwardingServerCall.close(ForwardingServerCall.java:22)                                                                                                                                                                                                                                                                                                       
        at io.grpc.ForwardingServerCall$SimpleForwardingServerCall.close(ForwardingServerCall.java:39)                                                                                                                                                                                                                                                                            
        at io.deephaven.server.session.SessionServiceGrpcImpl$InterceptedCall.close(SessionServiceGrpcImpl.java:257)                                                                                                                                                                                                                                                              
        at io.grpc.stub.ServerCalls$ServerCallStreamObserverImpl.onCompleted(ServerCalls.java:395)                                                                                                                                                                                                                                                                                
        at io.deephaven.extensions.barrage.util.GrpcUtil.safelyExecuteLocked(GrpcUtil.java:154)                                                                                                                                                                                                                                                                                   
        at io.deephaven.server.session.SessionCloseableObserver.close(SessionCloseableObserver.java:39)                                                                                                                                                                                                                                                                           
        at io.grpc.stub.ServerCalls$StreamingServerCallHandler$StreamingServerCallListener.onCancel(ServerCalls.java:279)                                                                                                                                                                                                                                                         
        at io.grpc.PartialForwardingServerCallListener.onCancel(PartialForwardingServerCallListener.java:40)                                                                                                                                                                                                                                                                      
        at io.grpc.ForwardingServerCallListener.onCancel(ForwardingServerCallListener.java:23)                                                                                                                                                                                                                                                                                    
        at io.grpc.ForwardingServerCallListener$SimpleForwardingServerCallListener.onCancel(ForwardingServerCallListener.java:40)                                                                                                                                                                                                                                                 
        at io.grpc.Contexts$ContextualizedServerCallListener.onCancel(Contexts.java:96)                                                                                                                                                                                                                                                                                           
        at io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.closedInternal(ServerCallImpl.java:378)                                                                                                                                                                                                                                                                       
        at io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.closed(ServerCallImpl.java:365)                                                                                                                                                                                                                                                                               
        at io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1Closed.runInContext(ServerImpl.java:923)                                                                                                                                                                                                                                                      
        at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)                                                                                                                                                                                                                                                                                                          
        at io.grpc.internal.SerializeReentrantCallsDirectExecutor.execute(SerializeReentrantCallsDirectExecutor.java:49)                                                                                                                                                                                                                                                          
        at io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener.closedInternal(ServerImpl.java:930)                                                                                                                                                                                                                                                            
        at io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener.closed(ServerImpl.java:888)                                                                                                                                                                                                                                                                    
        at io.grpc.internal.AbstractServerStream$TransportState.closeListener(AbstractServerStream.java:339)                                                                                                                                                                                                                                                                      
        at io.grpc.internal.AbstractServerStream$TransportState.access$100(AbstractServerStream.java:184)                                                                                                                                                                                                                                                                         
        at io.grpc.internal.AbstractServerStream$TransportState$1.run(AbstractServerStream.java:289)                                                                                                                                                                                                                                                                              
        at io.grpc.internal.AbstractServerStream$TransportState.deframerClosed(AbstractServerStream.java:241)                                                                                                                                                                                                                                                                     
        at io.grpc.servlet.web.websocket.AbstractWebsocketStreamImpl$WebsocketTransportState.deframerClosed(AbstractWebsocketStreamImpl.java:25)                                                                                                                                                                                                                                  
        at io.grpc.internal.MessageDeframer.close(MessageDeframer.java:234)                                                                                                                                                                                                                                                                                                       
        at io.grpc.internal.AbstractStream$TransportState.closeDeframer(AbstractStream.java:198)                                                                                                                                                                                                                                                                                  
        at io.grpc.internal.AbstractServerStream$TransportState.transportReportStatus(AbstractServerStream.java:293)                                                                                                                                                                                                                                                              
        at io.grpc.servlet.web.websocket.AbstractWebsocketStreamImpl.transportReportStatus(AbstractWebsocketStreamImpl.java:103)                                                                                                                                                                                                                                                  
        at io.grpc.servlet.web.websocket.MultiplexedWebSocketServerStream.onError(MultiplexedWebSocketServerStream.java:224)                                                                                                                                                                                                                                                      
        at io.grpc.servlet.web.websocket.GrpcWebsocket.onError(GrpcWebsocket.java:48)                                                                                                                                                                                                                                                                                             
        at org.eclipse.jetty.websocket.jakarta.common.JakartaWebSocketFrameHandler.onError(JakartaWebSocketFrameHandler.java:312)                                                                                                                                                                                                                                                 
        at org.eclipse.jetty.websocket.core.internal.WebSocketCoreSession.lambda$closeConnection$2(WebSocketCoreSession.java:284)                                                                                                                                                                                                                                                 
        at org.eclipse.jetty.server.handler.ContextHandler.handle(ContextHandler.java:1465)                                                                                                                                                                                                                                                                                       
        at org.eclipse.jetty.server.handler.ContextHandler.handle(ContextHandler.java:1484)                                                                                                                                                                                                                                                                                       
        at org.eclipse.jetty.websocket.core.server.internal.AbstractHandshaker$1.handle(AbstractHandshaker.java:212)                                                                                                                                                                                                                                                              
        at org.eclipse.jetty.websocket.core.internal.WebSocketCoreSession.closeConnection(WebSocketCoreSession.java:284)                                                                 
        at org.eclipse.jetty.websocket.core.internal.WebSocketCoreSession.onEof(WebSocketCoreSession.java:254)                                                                           
        at org.eclipse.jetty.websocket.core.internal.WebSocketConnection.fillAndParse(WebSocketConnection.java:482)                                                                      
        at org.eclipse.jetty.websocket.core.internal.WebSocketConnection.onFillable(WebSocketConnection.java:340)                                                                        
        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:314)                                                                                   
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:100)                
        at org.eclipse.jetty.io.SelectableChannelEndPoint$1.run(SelectableChannelEndPoint.java:53)                                                                                       
        at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.runTask(AdaptiveExecutionStrategy.java:416)                                                                  
        at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:385)                                                              
        at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:272)                                                               
        at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.lambda$new$0(AdaptiveExecutionStrategy.java:140)                                                             
        at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:411)                                                                      
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:934)                                                                                              
        at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1078)                                                                                         
        at java.lang.Thread.run(Thread.java:829)                                 
        caused by:                                                                                  
java.io.IOException: java.nio.channels.ClosedChannelException                               
        at org.eclipse.jetty.util.FutureCallback.block(FutureCallback.java:163)             
        at org.eclipse.jetty.util.FutureCallback.block(FutureCallback.java:139)             
        at org.eclipse.jetty.websocket.jakarta.common.JakartaWebSocketBasicRemote.sendBinary(JakartaWebSocketBasicRemote.java:66)                                                        
        at io.grpc.servlet.web.websocket.MultiplexedWebsocketStreamImpl$Sink.writeMetadataToStream(MultiplexedWebsocketStreamImpl.java:77)                                               
        at io.grpc.servlet.web.websocket.MultiplexedWebsocketStreamImpl$Sink.writeTrailers(MultiplexedWebsocketStreamImpl.java:128)                                                      
        at io.grpc.internal.AbstractServerStream.close(AbstractServerStream.java:133)       
        at io.grpc.internal.ServerCallImpl.closeInternal(ServerCallImpl.java:228)           
        at io.grpc.internal.ServerCallImpl.close(ServerCallImpl.java:212)                   
        at io.grpc.PartialForwardingServerCall.close(PartialForwardingServerCall.java:48)                                                                                                
        at io.grpc.ForwardingServerCall.close(ForwardingServerCall.java:22)                 
        at io.grpc.ForwardingServerCall$SimpleForwardingServerCall.close(ForwardingServerCall.java:39)                                                                                   
        at io.deephaven.server.session.SessionServiceGrpcImpl$InterceptedCall.close(SessionServiceGrpcImpl.java:257)                                                                     
        at io.grpc.stub.ServerCalls$ServerCallStreamObserverImpl.onCompleted(ServerCalls.java:395)                                                                                       
        at io.deephaven.extensions.barrage.util.GrpcUtil.safelyExecuteLocked(GrpcUtil.java:154)                                                                                          
        at io.deephaven.server.session.SessionCloseableObserver.close(SessionCloseableObserver.java:39)                                                                                  
        at io.grpc.stub.ServerCalls$StreamingServerCallHandler$StreamingServerCallListener.onCancel(ServerCalls.java:279)                                                                
        at io.grpc.PartialForwardingServerCallListener.onCancel(PartialForwardingServerCallListener.java:40)                                                                             
        at io.grpc.ForwardingServerCallListener.onCancel(ForwardingServerCallListener.java:23)                                                                                           
        at io.grpc.ForwardingServerCallListener$SimpleForwardingServerCallListener.onCancel(ForwardingServerCallListener.java:40)                                                        
        at io.grpc.Contexts$ContextualizedServerCallListener.onCancel(Contexts.java:96)     
        at io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.closedInternal(ServerCallImpl.java:378)                                                                              
        at io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.closed(ServerCallImpl.java:365)                                                                                      
        at io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1Closed.runInContext(ServerImpl.java:923)                                                             
        at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)                    
        at io.grpc.internal.SerializeReentrantCallsDirectExecutor.execute(SerializeReentrantCallsDirectExecutor.java:49)                                                                 
        at io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener.closedInternal(ServerImpl.java:930)                                                                   
        at io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener.closed(ServerImpl.java:888)                                                                           
        at io.grpc.internal.AbstractServerStream$TransportState.closeListener(AbstractServerStream.java:339)                                                                             
        at io.grpc.internal.AbstractServerStream$TransportState.access$100(AbstractServerStream.java:184)                                                                                
        at io.grpc.internal.AbstractServerStream$TransportState$1.run(AbstractServerStream.java:289)                                                                                     
        at io.grpc.internal.AbstractServerStream$TransportState.deframerClosed(AbstractServerStream.java:241)                                                                            
        at io.grpc.servlet.web.websocket.AbstractWebsocketStreamImpl$WebsocketTransportState.deframerClosed(AbstractWebsocketStreamImpl.java:25)                                         
        at io.grpc.internal.MessageDeframer.close(MessageDeframer.java:234)                 
        at io.grpc.internal.AbstractStream$TransportState.closeDeframer(AbstractStream.java:198)                                                                                         
        at io.grpc.internal.AbstractServerStream$TransportState.transportReportStatus(AbstractServerStream.java:293)                                                                     
        at io.grpc.servlet.web.websocket.AbstractWebsocketStreamImpl.transportReportStatus(AbstractWebsocketStreamImpl.java:103)                                                         
        at io.grpc.servlet.web.websocket.MultiplexedWebSocketServerStream.onError(MultiplexedWebSocketServerStream.java:224)                                                             
        at io.grpc.servlet.web.websocket.GrpcWebsocket.onError(GrpcWebsocket.java:48)       
        at org.eclipse.jetty.websocket.jakarta.common.JakartaWebSocketFrameHandler.onError(JakartaWebSocketFrameHandler.java:312)                                                        
        at org.eclipse.jetty.websocket.core.internal.WebSocketCoreSession.lambda$closeConnection$2(WebSocketCoreSession.java:284)                                                        
        at org.eclipse.jetty.server.handler.ContextHandler.handle(ContextHandler.java:1465)                                                                                              
        at org.eclipse.jetty.server.handler.ContextHandler.handle(ContextHandler.java:1484)                                                                                              
        at org.eclipse.jetty.websocket.core.server.internal.AbstractHandshaker$1.handle(AbstractHandshaker.java:212)                                                                     
        at org.eclipse.jetty.websocket.core.internal.WebSocketCoreSession.closeConnection(WebSocketCoreSession.java:284)                                                                 
        at org.eclipse.jetty.websocket.core.internal.WebSocketCoreSession.onEof(WebSocketCoreSession.java:254)                                                                           
        at org.eclipse.jetty.websocket.core.internal.WebSocketConnection.fillAndParse(WebSocketConnection.java:482)                                                                      
        at org.eclipse.jetty.websocket.core.internal.WebSocketConnection.onFillable(WebSocketConnection.java:340)                                                                        
        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:314)                                                                                   
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:100)                
        at org.eclipse.jetty.io.SelectableChannelEndPoint$1.run(SelectableChannelEndPoint.java:53)                                                                                       
        at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.runTask(AdaptiveExecutionStrategy.java:416)                                                                  
        at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:385)                                                              
        at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:272)                                                               
        at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.lambda$new$0(AdaptiveExecutionStrategy.java:140)                                                             
        at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:411)                                                                      
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:934)                                                                                              
        at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1078)                                                                                         
        at java.lang.Thread.run(Thread.java:829)                                            
caused by:                                                                                  
java.nio.channels.ClosedChannelException: null                                              
        at org.eclipse.jetty.websocket.core.internal.WebSocketSessionState.onOutgoingFrame(WebSocketSessionState.java:184)                                                               
        at org.eclipse.jetty.websocket.core.internal.WebSocketCoreSession.sendFrame(WebSocketCoreSession.java:514)                                                                       
        at org.eclipse.jetty.websocket.jakarta.common.JakartaWebSocketRemoteEndpoint.sendFrame(JakartaWebSocketRemoteEndpoint.java:140)                                                  
        at org.eclipse.jetty.websocket.jakarta.common.JakartaWebSocketBasicRemote.sendBinary(JakartaWebSocketBasicRemote.java:65)                                                        
        at io.grpc.servlet.web.websocket.MultiplexedWebsocketStreamImpl$Sink.writeMetadataToStream(MultiplexedWebsocketStreamImpl.java:77)                                               
        at io.grpc.servlet.web.websocket.MultiplexedWebsocketStreamImpl$Sink.writeTrailers(MultiplexedWebsocketStreamImpl.java:128)                                                      
        at io.grpc.internal.AbstractServerStream.close(AbstractServerStream.java:133)       
        at io.grpc.internal.ServerCallImpl.closeInternal(ServerCallImpl.java:228)           
        at io.grpc.internal.ServerCallImpl.close(ServerCallImpl.java:212)                   
        at io.grpc.PartialForwardingServerCall.close(PartialForwardingServerCall.java:48)                                                                                                
        at io.grpc.ForwardingServerCall.close(ForwardingServerCall.java:22)                 
        at io.grpc.ForwardingServerCall$SimpleForwardingServerCall.close(ForwardingServerCall.java:39)                                                                                   
        at io.deephaven.server.session.SessionServiceGrpcImpl$InterceptedCall.close(SessionServiceGrpcImpl.java:257)                                                                     
        at io.grpc.stub.ServerCalls$ServerCallStreamObserverImpl.onCompleted(ServerCalls.java:395)                                                                                       
        at io.deephaven.extensions.barrage.util.GrpcUtil.safelyExecuteLocked(GrpcUtil.java:154)                                                                                          
        at io.deephaven.server.session.SessionCloseableObserver.close(SessionCloseableObserver.java:39)                                                                                  
        at io.grpc.stub.ServerCalls$StreamingServerCallHandler$StreamingServerCallListener.onCancel(ServerCalls.java:279)                                                                
        at io.grpc.PartialForwardingServerCallListener.onCancel(PartialForwardingServerCallListener.java:40)                                                                             
        at io.grpc.ForwardingServerCallListener.onCancel(ForwardingServerCallListener.java:23)                                                                                           
        at io.grpc.ForwardingServerCallListener$SimpleForwardingServerCallListener.onCancel(ForwardingServerCallListener.java:40)                                                        
        at io.grpc.Contexts$ContextualizedServerCallListener.onCancel(Contexts.java:96)                                                                                                  
        at io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.closedInternal(ServerCallImpl.java:378)                                                                              
        at io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.closed(ServerCallImpl.java:365)                                                                                      
        at io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1Closed.runInContext(ServerImpl.java:923)                                                             
        at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)                    
        at io.grpc.internal.SerializeReentrantCallsDirectExecutor.execute(SerializeReentrantCallsDirectExecutor.java:49)                                                                 
        at io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener.closedInternal(ServerImpl.java:930)                                                                   
        at io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener.closed(ServerImpl.java:888)                                                                           
        at io.grpc.internal.AbstractServerStream$TransportState.closeListener(AbstractServerStream.java:339)                                                                             
        at io.grpc.internal.AbstractServerStream$TransportState.access$100(AbstractServerStream.java:184)                                                                                
        at io.grpc.internal.AbstractServerStream$TransportState$1.run(AbstractServerStream.java:289)                                                                                     
        at io.grpc.internal.AbstractServerStream$TransportState.deframerClosed(AbstractServerStream.java:241)                                                                            
        at io.grpc.servlet.web.websocket.AbstractWebsocketStreamImpl$WebsocketTransportState.deframerClosed(AbstractWebsocketStreamImpl.java:25)                                         
        at io.grpc.internal.MessageDeframer.close(MessageDeframer.java:234)                 
        at io.grpc.internal.AbstractStream$TransportState.closeDeframer(AbstractStream.java:198)                                                                                         
        at io.grpc.internal.AbstractServerStream$TransportState.transportReportStatus(AbstractServerStream.java:293)                                                                     
        at io.grpc.servlet.web.websocket.AbstractWebsocketStreamImpl.transportReportStatus(AbstractWebsocketStreamImpl.java:103)                                                         
        at io.grpc.servlet.web.websocket.MultiplexedWebSocketServerStream.onError(MultiplexedWebSocketServerStream.java:224)                                                             
        at io.grpc.servlet.web.websocket.GrpcWebsocket.onError(GrpcWebsocket.java:48)       
        at org.eclipse.jetty.websocket.jakarta.common.JakartaWebSocketFrameHandler.onError(JakartaWebSocketFrameHandler.java:312)                                                        
        at org.eclipse.jetty.websocket.core.internal.WebSocketCoreSession.lambda$closeConnection$2(WebSocketCoreSession.java:284)                                                        
        at org.eclipse.jetty.server.handler.ContextHandler.handle(ContextHandler.java:1465)                                                                                              
        at org.eclipse.jetty.server.handler.ContextHandler.handle(ContextHandler.java:1484)                                                                                              
        at org.eclipse.jetty.websocket.core.server.internal.AbstractHandshaker$1.handle(AbstractHandshaker.java:212)                                                                     
        at org.eclipse.jetty.websocket.core.internal.WebSocketCoreSession.closeConnection(WebSocketCoreSession.java:284)                                                                 
        at org.eclipse.jetty.websocket.core.internal.WebSocketCoreSession.onEof(WebSocketCoreSession.java:254)                                                                           
        at org.eclipse.jetty.websocket.core.internal.WebSocketConnection.fillAndParse(WebSocketConnection.java:482)                                                                      
        at org.eclipse.jetty.websocket.core.internal.WebSocketConnection.onFillable(WebSocketConnection.java:340)                                                                        
        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:314)                                                                                   
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:100)                
        at org.eclipse.jetty.io.SelectableChannelEndPoint$1.run(SelectableChannelEndPoint.java:53)                                                                                       
        at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.runTask(AdaptiveExecutionStrategy.java:416)                                                                  
        at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:385)                                                              
        at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:272)                                                               
        at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.lambda$new$0(AdaptiveExecutionStrategy.java:140)                                                             
        at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:411)                                                                      
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:934)                                                                                              
        at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1078)                                                                                         
        at java.lang.Thread.run(Thread.java:829)                                            
@devinrsmith devinrsmith added bug Something isn't working triage labels Jan 6, 2023
@devinrsmith devinrsmith added this to the Backlog milestone Jan 6, 2023
@mattrunyon
Copy link
Contributor

Just to clarify, this kills the web UI server, right? Refreshing the page does not fix it? Want to make sure it's not a UI issue

@mofojed
Copy link
Member

mofojed commented Jan 6, 2023

@mattrunyon This kills the connection which kills the web UI, but refresh does fix the issue.

@devinrsmith It's complaining about the char "\u00a0", which is a non-breaking space. The issue is easy to reproduce:
Steps to Reproduce:

  1. Copy a non-breaking space from the input field in the browser test
  2. Paste the text with the non-breaking space into the console input.

Expected Results
2) Text should paste. Non-breaking spaces should be stripped

Actual Results
2) Web UI immediately crashes. Non-breaking space is not stripped, and the autocomplete parser on the server chokes.

I think there's two separate issues here that should be addressed:

  1. Web UI should be stripping that non-breaking space when pasting.
  2. Autocomplete parser shouldn't be choking on a non-breaking space.

I'll leave this ticket open for the autocomplete parser

@mattrunyon
Copy link
Contributor

deephaven/web-client-ui#955

This should be fixed on the web side, it was just fixed after the latest core release.

@mofojed
Copy link
Member

mofojed commented Jan 6, 2023

Investigated from the Web UI side, and it is indeed replacing the non-breaking spaces with regular spaces, but that happens after the text has already been sent for autocomplete (it replaces spaces using an applyEdit operation after a paste: https://github.dev/deephaven/web-client-ui/blob/c65f268e3b426948dc3569d1c393eb18c3b14cf4/packages/console/src/monaco/MonacoUtils.ts#L319). So even with the Web UI fix the error persists.

So there's just one issue - the autocomplete parser on the server when there's a non-breaking space dies.

@devinrsmith Where is the text you're copying from? Annoying that it has non-breaking spaces.

@devinrsmith
Copy link
Member Author

devinrsmith commented Jan 6, 2023

@mofojed I was coping from the web UI itself; so somehow the non-breaking space got into there, b/c I wrote this code completely within the web UI.

Or maybe I didn't even copy it - it might have been from the web UI command history. I forget exactly.

@devinrsmith
Copy link
Member Author

Note: this was triggered on a recent branch off of main. web UI version: 0.24.0.

@niloc132
Copy link
Member

Note that the ClosedChannelException spam will be fixed by #3278, and signifies nothing beyond "the client disconnected while the server was preparing to send a message".

@devinrsmith
Copy link
Member Author

I'm noticing that this kills the web UI if the first character is NBSP; but not later characters, afaict.

@niloc132
Copy link
Member

Several bugs happening here.

Autocomplete parser tries to parse the string, and fails. Sometime after the last "should I stop?" check but before the error message is finished being sent, the parser thread gets a "nevermind, new characters incoming" with an interrupt from the grpc stream that asked for autocomplete to begin with.

Resolution for this is probably to change the grpc impl of LogBufferRecordListener to enqueue log messages and send them to the client in a different thread. Probably just one queue, to all currently connected clients?


Next, as a result of the interrupt, an interrupt exception was caught in the websocket implementation of io.grpc.internal.AbstractServerStream.Sink#writeFrame. It attempted to respond to that first by canceling the server side of the call via io.grpc.internal.AbstractServerStream.TransportState#transportReportStatus (before it actually canceled the remote end) which propagated to SessionCloseableObserver's close() call, via the onCancel registration it made in its constructor:

((ServerCallStreamObserver<T>) responseObserver).setOnCancelHandler(this::close)

The transport-specific cancel management code for the websocket impl is based on the grpc-servlet project, so we might have a bug to fix there too, and should confirm the behavior of the reference implementation.


Lastly, so far anyway, the typescript grpc-web client we're using seems to not detect headers for server-streaming responses. This only applies to websockets, the fetch and xhr implementations are correct here. Failure to detect and report those headers means that when the stream cleanly closes from the server's perspective, the client's internals believe that something went wrong due to the lack of any headers by the time the trailers arrive, and respond with an error.

This will be hard to uniformly fix without forking or otherwise replacing the library, as they no longer seem to be making releases, but we might be able to allow this specific error and treat it as success instead.

devinrsmith added a commit to devinrsmith/deephaven-core that referenced this issue Jan 26, 2023
devinrsmith added a commit to devinrsmith/deephaven-core that referenced this issue Jan 30, 2023
@devinrsmith
Copy link
Member Author

I believe @niloc132 will be linking some other issues / PRs from this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autocomplete bug Something isn't working triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants