Zlib inflation exception

While testing out Flash Player native ZLIB compression in XIFF, which by its documentation is supposed to be exactly whar the RCF 1950 specifies, came across again this similar exception in Mina that was there two…three years ago.

Could it be possible to enable Openfire to respond to such failure with a stream error stanza?

Currently the client sees nothing.

Below is the related log.


After negotiation of compression, restarting the stream

<?xml version="1.0" encoding="UTF-8"?>

Which in HEX is

78da558e4de82301085afd2ccdea9d544b1a1b0f347a808213a88129692786e38bd68dab97bc7cef a76ed779522f4a3944766070f8ab88f8fc08383fbedbaaba06dea2c89fc6c8ba82dc2d9c1d3771d2 5db4f8158a0b83fc4c128b258ad49464a2b1614631a741322889dbdee580e654a1c1e3f9db6027ff 192686ff53cd1b137037ee

Results in no responce from Openfire 3.7.2 alpha, build in 28 Jul 2012, 7:16:23 AM

http://bamboo.igniterealtime.org/browse/OPENFIRE-NIGHTLYDEB-572/artifact

2012.07.28 23:45:35 org.jivesoftware.openfire.nio.ConnectionHandler - ConnectionHandler reports IOException for session: (SOCKET, R: /192.168.1.77:8154, L: /192.168.1.37:5444, S: /192.168.1.37:5444)

java.io.IOException: Unknown error. Error code : 1

at org.apache.mina.filter.support.Zlib.inflate(Zlib.java:136)

at org.apache.mina.filter.CompressionFilter.messageReceived(CompressionFilter.java :159)

at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:299)

at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:53)

at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:648)

at org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java :239)

at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(Execut orFilter.java:283)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51)

at java.lang.Thread.run(Thread.java:679)

I know this doesn’t answer the specific question (about Openfire error responses), but hope it is helpful in any case. We have also been seeing these errors in 3.7.2-Alpha with compression enabled. After a bit of looking around, it seems that the original fix proposed for the Mina zstream synchronization problem (see JM-1115 for details) may have only been applied to the “deflate” method in the Zlib class, but not for the “inflate” method as noted in the stack trace above.

It appears the issue has been fixed in the most recent Mina release 2.0.x (per this issue ), while Openfire currently ships with a customized older Mina build (1.1.8-SNAPHSOT per the mina-filter-compression.jar manifest). We are planning to add synchronization to the Zlib class (using Mina 1.1.7) as a workaround in our deployment. See the attached patch file for details.

We may also evaluate integrating the latest Mina release, but at first glance it appears the API have changed somewhat from 1.x to 2.x. It is not immediately obvious what impact this might have on the Openfire build.
mina-1.1.7-Zlib.patch.zip (659 Bytes)

1 Like

Hi Tom,

Thanks for this. We are desperate for more openfire svn comitters/developers, is this something you’d be interested in?

daryl

btw, filed this as OF-567

Hi Daryl,

Sure, happy to help as/where I can. Feel free to follow up (via email) with additional details and next steps.

Thanks,

Tom

It seems that the issue was resolved in 3.8.0 as per https://igniterealtime.org/issues/browse/OF-567

However, as reported in Getting IOException from MINA Zlib.inflate when smack clients using compression disconnect. , issue still remains in 3.10.2…

Any suggestions?