Archived

This forum has been archived. Please start a new discussion on GitHub.

[3.4.2] AssertionError in ConnectionI.invokeException() (Java)

Hi guys,

Following an Ice.MemoryLimitException, I'm seeing a few AssertionErrors that ultimately result in the server's Communicator becoming unresponsive (even calling .stop() blocks forever in .waitForShutdown()).
-! 6/28/13 08:52:30:680 warning: Ice.ThreadPool.Server-0: dispatch exception:
   identity: WellProduct/{4046DBFD-0597-48E1-8337-C713AC059BCB}2934
   facet: 
   operation: getLogValues
   remote host: 127.0.0.1 remote port: 58719
   Ice.MemoryLimitException
       reason = "requested 14499774 bytes, maximum allowed is 1048576 bytes (see Ice.MessageSizeMax)"
   	at IceInternal.Ex.throwMemoryLimitException(Ex.java:23)
   	at IceInternal.BasicStream.expand(BasicStream.java:2049)
   	at IceInternal.BasicStream.writeFloatSeq(BasicStream.java:1033)
   	at com.dugeo.experimental.remote.InsightRemote.FloatArrayHelper.write(FloatArrayHelper.java:28)
   	at com.dugeo.experimental.remote.InsightRemote.WellValues.__write(WellValues.java:148)
   	at com.dugeo.experimental.remote.InsightRemote._AMD_WellProduct_getLogValues.ice_response(_AMD_WellProduct_getLogValues.java:39)
   	at com.dugeo.experimental.remote.kingdom.KingdomWellProduct.getLogValues_async(KingdomWellProduct.java:105)
   	at com.dugeo.experimental.remote.InsightRemote._WellProductDisp.___getLogValues(_WellProductDisp.java:233)
   	at com.dugeo.experimental.remote.InsightRemote._WellProductDisp.__dispatch(_WellProductDisp.java:293)
   	at IceInternal.Incoming.invoke(Incoming.java:159)
   	at Ice.ConnectionI.invokeAll(ConnectionI.java:2357)
   	at Ice.ConnectionI.dispatch(ConnectionI.java:1208)
   	at Ice.ConnectionI.message(ConnectionI.java:1163)
   	at IceInternal.ThreadPool.run(ThreadPool.java:302)
   	at IceInternal.ThreadPool.access$300(ThreadPool.java:12)
   	at IceInternal.ThreadPool$EventHandlerThread.run(ThreadPool.java:643)
   	at java.lang.Thread.run(Thread.java:722)
!! 6/28/13 08:52:30:688 error: Ice.ThreadPool.Server-0: java.lang.AssertionError
   	at IceInternal.IncomingAsync.__response(IncomingAsync.java:113)
   	at com.dugeo.experimental.remote.InsightRemote._AMD_WellProduct_getLogValues.ice_response(_AMD_WellProduct_getLogValues.java:45)
   	at com.dugeo.experimental.remote.kingdom.KingdomWellProduct.getLogValues_async(KingdomWellProduct.java:105)
   	at com.dugeo.experimental.remote.InsightRemote._WellProductDisp.___getLogValues(_WellProductDisp.java:233)
   	at com.dugeo.experimental.remote.InsightRemote._WellProductDisp.__dispatch(_WellProductDisp.java:293)
   	at IceInternal.Incoming.invoke(Incoming.java:159)
   	at Ice.ConnectionI.invokeAll(ConnectionI.java:2357)
   	at Ice.ConnectionI.dispatch(ConnectionI.java:1208)
   	at Ice.ConnectionI.message(ConnectionI.java:1163)
   	at IceInternal.ThreadPool.run(ThreadPool.java:302)
   	at IceInternal.ThreadPool.access$300(ThreadPool.java:12)
   	at IceInternal.ThreadPool$EventHandlerThread.run(ThreadPool.java:643)
   	at java.lang.Thread.run(Thread.java:722)


The last error isn't caught by ICE, it ends up in our UncaughtExceptionHandler. I presume this is why the communicater blocks; the EventHandlerThread is dead:
java.lang.AssertionError
	at Ice.ConnectionI.invokeException(ConnectionI.java:1447)
	at Ice.ConnectionI.invokeAll(ConnectionI.java:2384)
	at Ice.ConnectionI.dispatch(ConnectionI.java:1208)
	at Ice.ConnectionI.message(ConnectionI.java:1163)
	at IceInternal.ThreadPool.run(ThreadPool.java:302)
	at IceInternal.ThreadPool.access$300(ThreadPool.java:12)
	at IceInternal.ThreadPool$EventHandlerThread.run(ThreadPool.java:643)
	at java.lang.Thread.run(Thread.java:722)

As luck would have it, invokeException() is throwing an AssertionError within invokeAll()'s AssertionError catch block ;)


EDIT: obviously I need to fix my large message, but I wouldn't expect this to prevent future requests.

Cheers,
-Rowan

Comments

  • benoit
    benoit Rennes, France
    Hi Rowan,

    Thanks for the bug report!

    It's indeed a bug which seems to affect both Ice for Java and C#, I don't think Ice for C++ doesn't have this problem. This problem occurs only if marshaling of the response fails which is typically caused by a memory limit exception like in your case. We will fix this for Ice 3.5.1.

    Cheers,
    Benoit.
  • Cool, thanks.

    Guess I'm bumping MessageSizeMax through the roof in the meantime :)

    -Rowan