Bug 3034 - payload error in v1.2.2 that wasn't occurring in v1.2.1
Summary: payload error in v1.2.2 that wasn't occurring in v1.2.1
Status: RESOLVED FIXED
Alias: None
Product: jCIFS
Classification: Unclassified
Component: core (show other bugs)
Version: 1.2
Hardware: x86 Windows 2000
: P3 normal
Target Milestone: ---
Assignee: Michael B. Allen
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-24 06:51 UTC by Erik Bongers
Modified: 2005-08-25 14:12 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Erik Bongers 2005-08-24 06:51:20 UTC
Hi,

Thanks for fixing the bind problem I reported.
However, I get a new error that seems to be specific to v1.2.2.
(see error dump below).
I switched back and forth between the 1.2.1 and 1.2.2 jars and I only get the 
error in 1.2.2.
Note that the 1.2.1 jar is still the version with my own fix for the bind 
problem where I used SocketException instead of ConnectException.
(but I think this new problem may be unrelated to the bind problem anyway)

I also need to mention that on our network the connection often fails with 
a 'time-out'. But during my tests this afternoon this did not occur, so I think 
this is no factor either.

Perhaps the error has to do with the other bugfixes of 1.2.2 ?

Thanks in advance for looking at it.

Erik Bongers
ebongers@gcobe.jnj.com

error dump :

jcifs.smb.SmbException: 
jcifs.util.transport.TransportException: Connection in error
jcifs.util.transport.TransportException
java.io.IOException: Invalid payload size: 1
	at jcifs.smb.SmbTransport.negotiate(SmbTransport.java:254)
	at jcifs.smb.SmbTransport.doConnect(SmbTransport.java:274)
	at jcifs.util.transport.Transport.run(Transport.java:204)
	at java.lang.Thread.run(Thread.java:479)

	at jcifs.util.transport.Transport.run(Transport.java:220)
	at java.lang.Thread.run(Thread.java:479)

	at jcifs.util.transport.Transport.connect(Transport.java:144)
	at jcifs.smb.SmbTransport.connect(SmbTransport.java:262)
	at jcifs.smb.SmbSession.getChallenge(SmbSession.java:138)
	at jcifs.smb.SmbSession.getChallenge(SmbSession.java:132)
	at jcifs.http.NtlmHttpFilter.negotiate(NtlmHttpFilter.java:157)
	at jcifs.http.NtlmHttpFilter.doFilter(NtlmHttpFilter.java:114)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:213)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:256)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:643)
	at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:191)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:643)
	at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at org.apache.catalina.core.StandardContext.invoke
(StandardContext.java:2422)
	at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:180)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:643)
	at org.apache.catalina.valves.ErrorDispatcherValve.invoke
(ErrorDispatcherValve.java:171)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:641)
	at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:163)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:641)
	at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:174)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:643)
	at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at org.apache.coyote.tomcat4.CoyoteAdapter.service
(CoyoteAdapter.java:199)
	at org.apache.coyote.http11.Http11Processor.process
(Http11Processor.java:828)
	at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnectio
n(Http11Protocol.java:700)
	at org.apache.tomcat.util.net.TcpWorkerThread.runIt
(PoolTcpEndpoint.java:584)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
(ThreadPool.java:683)
	at java.lang.Thread.run(Thread.java:479)

	at jcifs.smb.SmbTransport.connect(SmbTransport.java:264)
	at jcifs.smb.SmbSession.getChallenge(SmbSession.java:138)
	at jcifs.smb.SmbSession.getChallenge(SmbSession.java:132)
	at jcifs.http.NtlmHttpFilter.negotiate(NtlmHttpFilter.java:157)
	at jcifs.http.NtlmHttpFilter.doFilter(NtlmHttpFilter.java:114)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:213)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:256)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:643)
	at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:191)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:643)
	at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at org.apache.catalina.core.StandardContext.invoke
(StandardContext.java:2422)
	at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:180)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:643)
	at org.apache.catalina.valves.ErrorDispatcherValve.invoke
(ErrorDispatcherValve.java:171)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:641)
	at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:163)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:641)
	at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:174)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:643)
	at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at org.apache.coyote.tomcat4.CoyoteAdapter.service
(CoyoteAdapter.java:199)
	at org.apache.coyote.http11.Http11Processor.process
(Http11Processor.java:828)
	at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnectio
n(Http11Protocol.java:700)
	at org.apache.tomcat.util.net.TcpWorkerThread.runIt
(PoolTcpEndpoint.java:584)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
(ThreadPool.java:683)
	at java.lang.Thread.run(Thread.java:479
Comment 1 Erik Bongers 2005-08-24 07:26:39 UTC
In the mean time, the 'time-out' that I mentioned has been identified as an 
overseas connection problem that also occurs when using LDAP over our network.
So it is unrelated to jCIFS.
With this knowledge, I retested using a local domain controller and no longer 
get time-outs, but the 'pay-load' problem persists, as described above.
Comment 2 Michael B. Allen 2005-08-24 10:28:41 UTC
This was a mistake in the 1.2.2 release. I will be doing an emergency release ASAP.

The fix is to make SmbTransport.java:~229 look like the following:

    229   if (port == 139) {
    230     ssn139();
    231   } else {
    232     if (localAddr == null) {
    233       socket = new Socket( address.getHostAddress(), port );
    234     } else {
    235       socket = new Socket( address.getHostAddress(), port, localAddr,
localPort );
    236     }

Meaning replace '139' on 233 and 235 with 'port'.

Mike
Comment 3 Michael B. Allen 2005-08-25 14:12:24 UTC
Fixed in 1.2.3.