[Glass] VM temporary object memory is full (again)
Dale Henrichs via Glass
glass at lists.gemtalksystems.com
Thu Oct 1 15:59:43 PDT 2015
Bruno,
Richard and I looked at this stack quite a bit and we weren't able to
figure out how the system got into this state ... granted were looking
at source code for a pretty recent version of Zinc from about 4 months ago:
|ZincHTTPComponents| f8a268c [gs_master]
filetree:///opt/git/zinc/repository
commit f8a268ce34ff15b90b28e83ce2225abf717dff41
Merge: dfe52b3 c2e3bf8
Author: Dale Henrichs <dale.henrichs at gemtalksystems.com>
Date: Mon Jun 8 15:50:03 2015 -0700
Merge branch 'dev' into gs_master
The following chunk of stack is odd, because we can't tell how the
instance of ZnManagingMultiThreadedServer had any state to cause an
error from#stop:
ZnManagingMultiThreadedServer (ZnServer) >> stop @2 line 5
ZnManagingMultiThreadedServer (ZnSingleThreadedServer) >> start @2 line 5
WAGsZincAdaptor (ZnZincServerAdaptor) >> basicStart @3 line 2
Also, we don't know what code was being executed to launch this frame:
WAGsZincAdaptor class (WAServerAdaptor class) >> startOn: @10 line 10
.. but as I said earlier we don't know the exact code that is being
executed in any of the methods other than you are probably using a
version of Zinc from between 10 months and 1.5 years ago:)
Fortunately, we did find the patch for the bug that I suspect to be the
root cause of your troubles, where the server will go into an infinite
loop when attempting to listen on a port that is in use by another
process. The fact that using a different port avoids the problem is
diagnostic...
So before going further, let's see if this patch for
ZnNetworkingUtils>>serverSocketOn: fixes your problem:
serverSocketOn: port
| socket |
socket := SocketStreamSocket newTCPSocket.
self setServerSocketOptions: socket.
(socket listenOn: port backlogSize: self listenBacklogSize)
ifNil: [ self error: 'Error listening on socket: ' , socket
lastErrorString ].
socket isValid
ifFalse: [ self error: 'Cannot create socket on port ' , port
printString ].
^ socket
The problem was that in the older version, the #listenOn:backlogSize:
could silently fail because of a missing nil test:
serverSocketOn: port
| socket |
socket := SocketStreamSocket newTCPSocket.
self setServerSocketOptions: socket.
+ (socket listenOn: port backlogSize: self listenBacklogSize)
+ ifNil: [ self error: 'Error listening on socket: ' , socket
lastErrorString ].
- socket listenOn: port backlogSize: self listenBacklogSize.
socket isValid
ifFalse: [ self error: 'Cannot create socket on port ' , port
printString ].
^ socket
An error being signalled will still cause your topaz session to exit,
but at least you should have a decent error message....
Dale
On 10/01/2015 12:53 PM, BrunoBB via Glass wrote:
> Hi,
>
> Is in a interactive session with Jade client. After installing the
> AlmostOutOfMemory handler i was able to catch the stack, which is the
> following:
> It seems a closed socket is causing the problem (SocketStreamSocket
> underlyingSocket is nil)
>
> UserDefinedError (AbstractException) >> _signalWith: @5 line 25
> UserDefinedError (AbstractException) >> signal @2 line 47
> AlmostOutOfMemory (Object) >> error: @6 line 7
> [] in Executed Code @3 line 10
> AlmostOutOfMemory (AbstractException) >> _executeHandler: @3 line 8
> AlmostOutOfMemory (AbstractException) >> _signalWith: @1 line 1
> [] in ExecBlock0 (AbstractException) >> _signalAsync @2 line 19
> ExecBlock0 (ExecBlock) >> ensure: @2 line 12
> AlmostOutOfMemory (AbstractException) >> _signalAsync @6 line 21
> GsNMethod >> isMethodForBlock @1 line 1
> GsNMethod >> _descrForStackPadTo:rcvr: @4 line 5
> GsProcess class >> stackReportToLevel: @32 line 26
> [] in ExecBlock1 (ZnManagingMultiThreadedServer) >> closeConnections @4
> line 14
> MessageNotUnderstood (AbstractException) >> _executeHandler: @3 line 8
> MessageNotUnderstood (AbstractException) >> _signalWith: @1 line 1
> MessageNotUnderstood (AbstractException) >> signal @2 line 47
> UndefinedObject (Object) >> doesNotUnderstand: @9 line 10
> UndefinedObject (Object) >> _doesNotUnderstand:args:envId:reason: @7 line 12
> SocketStreamSocket (SpSocket) >> close @3 line 5
> SocketStream >> close @3 line 6
> [] in ExecBlock0 (ZnManagingMultiThreadedServer) >> closeConnections @2
> line 9
> ExecBlock0 (ExecBlock) >> on:do: @3 line 42
> [] in ExecBlock1 (ZnManagingMultiThreadedServer) >> closeConnections @4
> line 10
> OrderedCollection (Collection) >> do: @5 line 10
> [] in ExecBlock0 (ZnManagingMultiThreadedServer) >> closeConnections @3
> line 7
> ExecBlock0 (ExecBlock) >> ensure: @2 line 12
> TransientMutex (TransientSemaphore) >> critical: @4 line 7
> ZnManagingMultiThreadedServer >> closeConnections @7 line 5
> ZnManagingMultiThreadedServer >> stop: @3 line 3
> ZnManagingMultiThreadedServer (ZnServer) >> stop @2 line 5
> ZnManagingMultiThreadedServer (ZnSingleThreadedServer) >> start @2 line 5
> WAGsZincAdaptor (ZnZincServerAdaptor) >> basicStart @3 line 2
> [] in ExecBlock0 (WAServerManager) >> start: @2 line 3
> [] in ExecBlock0 (ExecBlock) >> ifCurtailed: @2 line 6
> ExecBlock0 (ExecBlock) >> ensure: @2 line 12
> ExecBlock0 (ExecBlock) >> ifCurtailed: @3 line 8
> WAServerManager >> start: @4 line 4
> WAGsZincAdaptor (WAServerAdaptor) >> start @3 line 2
> WAGsZincAdaptor >> start @2 line 3
> WAGsZincAdaptor class (WAServerAdaptor class) >> startOn: @10 line 10
> [] in Executed Code @2 line 8
> ExecBlock0 (ExecBlock) >> on:do: @3 line 42
> Executed Code @9 line 9
> UndefinedObject (GsNMethod class) >> _gsReturnToC @1 line 1
>
>
>
>
> --
> View this message in context: http://forum.world.st/VM-temporary-object-memory-is-full-again-tp4852049p4853085.html
> Sent from the GLASS mailing list archive at Nabble.com.
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com
> http://lists.gemtalksystems.com/mailman/listinfo/glass
More information about the Glass
mailing list