Bug 925 - Forking and crontabs do not work with ssh on NCR MP-RAS builds
Summary: Forking and crontabs do not work with ssh on NCR MP-RAS builds
Status: CLOSED WORKSFORME
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: ssh (show other bugs)
Version: -current
Hardware: Other Other
: P2 minor
Assignee: OpenSSH Bugzilla mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-04 03:32 AEST by Steve Randlett
Modified: 2016-08-02 10:41 AEST (History)
1 user (show)

See Also:


Attachments
Output in verbose mode when the error occurrs (6.54 KB, text/plain)
2004-09-04 03:34 AEST, Steve Randlett
no flags Details
sshd -ddd output (12.64 KB, text/plain)
2004-09-08 02:22 AEST, Steve Randlett
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Randlett 2004-09-04 03:32:56 AEST
Hello.  When I attempt to run ssh with the -f (fork in background) flag or from 
a cron job I get the error: "select: No such device or address."  It appears to 
be a problem with ssh communicating with the TTY.  The OS is NCR MP-RAS SVR4 
version 3.2.  Nothing fancy in the compile (./configure / make).   I was able 
to reproduce the problem in both 3.8p1 and the current release. I will attach 
the output with the error to the bug report.  The test program I used was a 
simple shell with the command "ssh system_name ls -l" that was scheduled as a 
cron job.
Comment 1 Steve Randlett 2004-09-04 03:34:17 AEST
Created attachment 708 [details]
Output in verbose mode when the error occurrs
Comment 2 Ben Lindstrom 2004-09-04 13:37:49 AEST
Would be nice to see a "sshd -ddd" from remote side..  Also is the remote server a MP-RAS?  Redhat? 
what is it?

- Ben
Comment 3 Steve Randlett 2004-09-08 02:22:23 AEST
Created attachment 711 [details]
sshd -ddd output
Comment 4 Steve Randlett 2004-09-08 02:31:41 AEST
I've had the problem occur on MP-RAS and Redhat remote servers.  As a side note 
it always returns the message "select: No such device or address" but will 
sometimes complete the remote command. The majority of the time however the 
remote command doesn't appear to run.

-Steve 
Comment 5 Darren Tucker 2004-09-08 20:39:19 AEST
Does ssh it give that select error when run from an interactive shell?
If you redirect ssh's stdin/stdout in the cron job, does it work?  eg
ssh -f yourserver command </dev/null >/dev/null 2>/dev/null
Comment 6 Steve Randlett 2004-09-08 23:25:35 AEST
Running from an interactive shell (without the -f option) works fine.  It only 
errors when running from a crontab or using the -f option interactivly.  
Redirecting stdin/stdout/stderr  still will generate the "select" error.  I ran 
the following which redirected everything and still got the error:

ssh -f myserver "ls </dev/null >/dev/null 2>/dev/null" >/tmp/test.out 2>&1 
</dev/null

In the test.out file I had the "select" error.

I also ran variations of the above command. All of them returned the select 
error.

Comment 7 Darren Tucker 2004-09-09 10:33:02 AEST
Does redirecting the output to /dev/null in the interactive shell cause the
select errors?

Also, does "lsof" work on that platform?  If so, comparing the output from lsof
for an interactive login and the cron job may prove enlightening...
Comment 8 Steve Randlett 2004-09-09 23:12:47 AEST
I do not have the lsof program on this platform. 

Running the command in an interactive shell and redirecting to >/dev/null DOES 
cause the select error to happen.   The command:
ssh myserver ls >/dev/null
will generate a select error.
Comment 9 Darren Tucker 2004-09-11 23:44:56 AEST
Also try the patch in bug #830, and if that's it please close this bug as a
duplicate of #830.
Comment 10 Steve Randlett 2004-09-14 02:45:43 AEST
I applied the patch from 830 and it partially fixed the problem.  

Interactively the -f option now works, as long as you don't redirect the ssh 
output to /dev/null (prior to the patch -f failed every time).  

I still get the select() error when I redirect stdout to /dev/null without the -
f option.   If the output is redirected to a file I don't get a select() 
error.  It only happens when redirected to /dev/null.

I did find that if the remote command that is executed doesn't return any 
output the select() error will not occur.

Comment 11 Damien Miller 2011-06-03 12:54:02 AEST
Could you please try with a recent version of OpenSSH? There have been quite a number of channels bugs fixed since this bug was last updated.
Comment 12 Damien Miller 2012-11-09 10:25:17 AEDT
I'll close this bug for inactivity. If you are able to reproduce it with a more recent version then feel free to reopen it.
Comment 13 Damien Miller 2016-08-02 10:41:41 AEST
Close all resolved bugs after 7.3p1 release