------- Comment From [email protected] 2016-08-25 04:52 EDT-------
Following problem was discovered using JSCH to access Ubuntu guests on system z
remotely. Using "exec" based channel with JSCH, every once in a while we get
back an empty string as output to a command that should return output.
For example "which mkdir".
The results are random and this can happen on any command.
i was not able to reproduce without JSCH.
i conducted a simple test, running the "echo offer" command 400 times.
in average it will return an empty string 4 times out of the 400 tries.
The usage of JSCH, which is required is the blocking problem of major
test scenarios of a product.
this is how the JSCH channel looks like:
Channel channel = session.openChannel("exec");
((ChannelExec) channel).setPty(true);
((ChannelExec) channel).setPtyType("dumb");
((ChannelExec) channel).setCommand(command);
connOut = channel.getOutputStream();
connIn = channel.getInputStream();
connErr = ((ChannelExec) channel).getErrStream();
channel.connect();
JSCH version used is jsch-0.1.53.
yet this does not seem to be a JSCH problem.
=============================================================
== Comment: #0 - Aziz Rozyev <[email protected]> - 2016-04-20 11:19:50 ==
---Problem Description---
operf failure, 'strace operf' shows that it tries to get 'cpu_type' from
/proc/cpuinfo, whereas there is no such field in cpuinfo.
Contact Information = Aziz Rozyev/[email protected]
---uname output---
Linux s35lp26 4.4.0-15-generic #31-Ubuntu SMP Fri Mar 18 19:07:12 UTC 2016
s390x s390x s390x GNU/Linux
Machine Type = z13 lpar type: 2964 model: 703 N96
---Debugger---
A debugger is not configured
---Steps to Reproduce---
run 'operf'
Userspace tool common name: operf
The userspace tool has the following bit modes: tested on 64bit
Userspace tool obtained from project website: na
*Additional Instructions for Aziz Rozyev/[email protected]:
-Attach ltrace and strace of userspace application.
== Comment: #4 - Andreas Arnez <[email protected]> - 2016-05-12 04:52:40 ==
So far oprofile didn't support z13. A patch for adding z13 support has now
been posted upstream:
http://marc.info/?l=oprofile-list&m=146298177508640&w=2
Following problem was discovered using JSCH to access Ubuntu guests on system z
remotely. Using "exec" based sessions with JSCH, every once in a while we get
back an empty string as output to a command that should return output.
i was able to reproduce with and without JSCH.
With JSCH:
simply running the "echo offer" command 400 times.
without JSCH:
running the command:
ssh name@ip_address 'bash -c echo offer'
this will always return an empty string...
running the same command with date works fine:
ssh name@ip_address 'bash -c date'
It seems to be the same problem but not 100% sure.
The usage of JSH, which is required is the blocking problem of major test
scenarios of a product.
------- Comment From [email protected] 2016-08-25 04:52 EDT-------
Addl. Comment from OFER:
i was also able to confirm that the problem does not happen if i suffix the
command with sleep 10 ms.
that is:
"echo offer; sleep 0.01"
i guess that this solves some kind of race condition somewhere...
i hope this information helps
------- Comment From [email protected] 2016-08-25 04:53 EDT-------
Even though https://launchpad.net/ubuntu/+source/jsch is available on ubuntu,
we do not provide programming support for people who use jsch. Have you worked
out the problem with jsch coding? The only relevant pieces of information i
could find online is that one should explicitly loop/poll and wait for exec
channel to self-close to correctly retrieve output of commands. E.g.
http://stackoverflow.com/questions/36380274/running-command-using-exec-channel-with-jsch-does-not-return-any-output
The code snippets you show appear to be incomplete. Does it poll until
isClosed()? Is that open source software shipped by ubuntu? Please file
bug to that respective upstream, or seek help on jsch mailing lists.
------- Comment From [email protected] 2016-08-25 04:56 EDT-------
*** Bug 141548 has been marked as a duplicate of this bug. ***
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1616801
Title:
remote JSCH commands returns empty string
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-z-systems/+bug/1616801/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs