mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Russ Tennant (JIRA)" <j...@apache.org>
Subject [jira] Commented: (SSHD-19) NullPointerException during SSHD data write
Date Sun, 10 Oct 2010 03:46:30 GMT

    [ https://issues.apache.org/jira/browse/SSHD-19?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12919562#action_12919562
] 

Russ Tennant commented on SSHD-19:
----------------------------------

I have experienced a similar / same issue while testing the software. Notice that there are
no SubsystemFactories set.

Ran code similar to :

               SshServer sshd = SshServer.setUpDefaultServer();
                sshd.setPort(2222);
                List<NamedFactory<Command>> subsystemFactories = Arrays.<NamedFactory<Command>>asList(
                        new SftpSubsystem.Factory()
                        ); 
                sshd.setCompressionFactories(compressionFactories);
                //sshd.setSubsystemFactories(subsystemFactories);
                sshd.setKeyPairProvider(new SimpleGeneratorHostKeyProvider("/tmp/java-sshd-hostkey.ser"));
                sshd.setPasswordAuthenticator(new PasswordAuthenticator() {....});
                sshd.setShellFactory(new ProcessShellFactory(new String[] { "/bin/bash", "-i",
"-l" },
                        EnumSet.of(ProcessShellFactory.TtyOptions.ONlCr)));
                sshd.setCommandFactory(new ScpCommandFactory());
                sshd.start();


and then I attempted an SFTP connection to see what would happen. The following exception
was logged.

java.lang.NullPointerException
	at org.apache.sshd.server.channel.ChannelSession.doWriteData(ChannelSession.java:207)
	at org.apache.sshd.common.channel.AbstractChannel.handleData(AbstractChannel.java:129)
	at org.apache.sshd.common.session.AbstractSession.channelData(AbstractSession.java:930)
	at org.apache.sshd.server.session.ServerSession.handleMessage(ServerSession.java:213)
	at org.apache.sshd.common.session.AbstractSession.decode(AbstractSession.java:522)
	at org.apache.sshd.common.session.AbstractSession.messageReceived(AbstractSession.java:225)
	at org.apache.sshd.common.AbstractSessionIoHandler.messageReceived(AbstractSessionIoHandler.java:58)
	at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:716)
	at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
	at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
	at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:796)
	at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:119)
	at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
	at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:426)
	at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:715)
	at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:668)
	at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:657)
	at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$500(AbstractPollingIoProcessor.java:64)
	at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:1117)
	at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:619)



> NullPointerException during SSHD data write
> -------------------------------------------
>
>                 Key: SSHD-19
>                 URL: https://issues.apache.org/jira/browse/SSHD-19
>             Project: MINA SSHD
>          Issue Type: Bug
>            Reporter: Shawn Pearce
>             Fix For: 0.2.0
>
>
> I'm seeing occasional NullPointerException stack traces in my server logs.  The following
trace is from SVN trunk@755651.  I haven't been able to reproduce it myself, nor can I figure
out under what condition doWriteData is being invoked with shellIn uninitialized.
> java.lang.NullPointerException
> at org.apache.sshd.server.channel.ChannelSession.doWriteData(ChannelSession.java:155)
> at org.apache.sshd.common.channel.AbstractChannel.handleData(AbstractChannel.java:117)
> at org.apache.sshd.common.session.AbstractSession.channelData(AbstractSession.java:867)
> at org.apache.sshd.server.session.ServerSession.handleMessage(ServerSession.java:198)
> at org.apache.sshd.common.session.AbstractSession.decode(AbstractSession.java:494)
> at org.apache.sshd.common.session.AbstractSession.messageReceived(AbstractSession.java:218)
> at org.apache.sshd.common.AbstractSessionIoHandler.messageReceived(AbstractSessionIoHandler.java:59)
> at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:722)
> at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
> at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:48)
> at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:802)
> at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:120)
> at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
> at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:426)
> at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:586)
> at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:547)
> at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:539)
> at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$400(AbstractPollingIoProcessor.java:57)
> at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:867)
> at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:65)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:619) 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message