Bug 33189

GemBuilder for Java

2.1.2, 2.1.1, 2.1, 2.0

All

2.2

GbjBroker problem behavior during/after gslist -v

When a "gslist -v" command is performed while a GbjBroker is running,
a disconnected socket is left behind in the broker.  This will result
in error messages in the GbjBroker log about the disconnected socket,
and the left-over socket will tie up memory and socket resources on
the system.  In addition, on HPUX the disconnected socket will cause
the GbjBroker process to run "hot", consuming CPU cycles as the
GbjBroker attempts to poll the socket.

Workaround

To avoid these problems, file-in and commit the following code
as SystemUser:


category: 'Servicing'
method: GsbServerSocket
establishService: aGsbClientSocket
  "Establish a service for aGsbClientSocket."
  | fw |
  fw := self framework.
  aGsbClientSocket isConnected ifFalse: [
    " The new socket disconnected, probably from a gslist -v query.
      Just clean it up using a low-level close. "
    (fw configuration at: #verbose) ifTrue: [
      fw log: #GsbClientSocketDisconnected
         arguments: #[aGsbClientSocket]].
    aGsbClientSocket _zeroArgPrim: 2.
    ^ self ].
  aGsbClientSocket linger: true length: 10.
  (fw configuration at: #verbose) ifTrue: [
    fw log: #GsbClientSocketConnectionEstablished
       arguments: #[aGsbClientSocket, GsbFramework dateTimeNow]].
  self serviceBlock value: aGsbClientSocket
%


Last updated: 10/16/06