Roland Mainz
2013-07-06 22:37:50 UTC
Hi!
----
Below is an old issue which occured with rsh+AST applications (e.g.
anything which uses |I_PEEK|) on Solaris.
Someone from Sun^H^H^HOracle confirmed that the issue has been fixed
in Solaris 11.1 (in sockfs ; Oracle Bug ID 15767822 -
"SUNBT7132075-SOLARIS_11U1 STREAMS fallback doesn't handle EOF/EPIPE")
...
... Glenn/David: Do you have a testcase which doesn't require using
"rsh" or other privileged stuff so that we can test this at build time
and disable the matching workaround (e.g. this code in
src/lib/libast/sfio/sfpkrd.c:
-- snip --
75 #ifdef __sun
76 /*
77 * I_PEEK on stdin can hang rsh+ksh on solaris
78 * this kludge will have to do until
sun^H^H^Horacle fixes I_PEEK/rsh
79 */
80 static int stream_peek;
81 if (stream_peek == 0) /* this will be
done just once */
82 { char *e;
83 stream_peek = (
84 getenv("LOGNAME") == 0 &&
85 getenv("MAIL") == 0 &&
86 ((e = getenv("LANG"))
== 0 || strcmp(e, "C") == 0) &&
87 ((e = getenv("PATH"))
== 0 || strncmp(e, "/usr/bin:", 9) == 0)
88 ) ? -1 : 1;
89 }
90 if(stream_peek < 0)
91 t &= ~STREAM_PEEK;
92 else
93 #endif
-- snip --
)
----
Bye,
Roland
Forwarded conversation
Subject: [ksh93-integration-discuss] ksh93 hang with rsh on Solaris 11
------------------------
From: Ervin Yan <Ervin_Yan at symantec.com>
Date: Wed, Dec 28, 2011 at 2:55 AM
To: "ksh93-integration-discuss at opensolaris.org"
<ksh93-integration-discuss at opensolaris.org>
Cc: Ervin Yan <Ervin_Yan at symantec.com>
Hi,
Recently, we are working to support Solaris 11 GA for our own products, and
met one issue that rsh could not work well together with the new default
shell ?ksh93? on Solaris 11.
According to
http://blogs.oracle.com/OTNGarage/entry/new_shell_in_oracle_solaris, Korn
Shell 93 (/usr/bin/ksh/ or usr/bin/ksh93) replaced both the Bourne Shell
(/usr/bin/sh or /sbin/sh) and Korn Shell 88 (/usr/bin/ksh) on Solaris 11.
In our shell scripts, we need use ?2>&1? to re-direct command results, but
?2>&1? only work for bash/ksh/sh, and not work for csh/tcsh. So we have
to run the command with ?echo ?$cmd 2>&1? | rsh <remote_sys> /bin/sh? format
when the user defined his default shell as csh/tcsh on <remote_sys> in
?/etc/passwd? file, or when we can not determine the default shell in
initiation stage.
But this command ?echo ?$cmd 2>&1? | rsh <remote_sys> /bin/sh? hang on
Solaris 11, while this command works well on all other platforms, like
Linux, AIX, HPUX, and Solaris 9/10.
ssh , or rsh with /usr/bin/bash, or rsh with /usr/sunos/bin/sh are working
well.
For example,
1). ?echo uname | rsh <remote_sys> /bin/sh? hang on Solaris 11.
2). ?echo uname | rsh <remote_sys> /usr/sunos/bin/sh? works well on Solaris
11.
3). ?echo uname | rsh <remote_sys> /usr/bin/bash? works well on Solaris 11.
4). ?echo uname | ssh <remote_sys> /bin/sh? works well on Solaris 11.
So could you help to confirm whether it is a bug for ksh93?
Thanks,
Ervin.
_______________________________________________
ksh93-integration-discuss mailing list
ksh93-integration-discuss at opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/ksh93-integration-discuss
----------
From: Don Cragun <dcragun at sonic.net>
Date: Wed, Dec 28, 2011 at 5:52 PM
To: Ervin_Yan at symantec.com
Cc: Korn Shell 93 integration/migration project discussion
<ksh93-integration-discuss at opensolaris.org>
On Dec 28, 2011, at 4:00 AM,
Bourne or Korn rsh (restricted shell)? Have you tried using an absolute
path the the rsh you want or using remsh (a link to the BSD rsh) instead
of using rsh?
It would be nice if the Oracle Solaris 11 rsh and ksh man pages mentioned
this issue explicitly.
- Don
ksh93-integration-discuss mailing list
ksh93-integration-discuss at opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/ksh93-integration-discuss
----------
From: Ervin Yan <Ervin_Yan at symantec.com>
Date: Thu, Dec 29, 2011 at 4:21 AM
To: Don Cragun <dcragun at sonic.net>
Cc: Korn Shell 93 integration/migration project discussion
<ksh93-integration-discuss at opensolaris.org>, Ervin Yan
<Ervin_Yan at symantec.com>
Hi, Don:
Thanks for your replies.
I tried the following commands, they all hang on Solaris 11.
# echo uname | /usr/bin/rsh <remote_sys> /bin/sh
# echo uname | /usr/bin/remsh <remote_sys> /bin/sh
# echo uname | /usr/bin/rsh <remote_sys> /usr/bin/ksh
# echo uname | /usr/bin/remsh <remote_sys> /usr/bin/ksh
# echo uname | /usr/bin/rsh <remote_sys> /usr/bin/ksh93
# echo uname | /usr/bin/remsh <remote_sys> /usr/bin/ksh93
While the former 4 commands are working well on Solaris 10.
Thanks,
Ervin.
----------
From: Ervin Yan <Ervin_Yan at symantec.com>
Date: Fri, Jan 6, 2012 at 8:39 AM
To: Ervin Yan <Ervin_Yan at symantec.com>, Don Cragun <dcragun at sonic.net>
Cc: Korn Shell 93 integration/migration project discussion
<ksh93-integration-discuss at opensolaris.org>, "Venkatesha M.G."
<Venkatesha_Mg at symantec.com>, Steve Sundstrom <steve_sundstrom at symantec.com>
Hi, Don and Ksh team:
Do you have any updates for this issue?
Will you fix it in Solaris 11 U1?
Thanks,
Ervin.
_______________________________________________
ksh93-integration-discuss mailing list
ksh93-integration-discuss at opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/ksh93-integration-discuss
----------
From: Don Cragun <dcragun at sonic.net>
Date: Fri, Jan 6, 2012 at 9:10 AM
To: Ervin Yan <Ervin_Yan at symantec.com>
Cc: Korn Shell 93 integration/migration project discussion
<ksh93-integration-discuss at opensolaris.org>, "Venkatesha M.G."
<Venkatesha_Mg at symantec.com>, Steve Sundstrom <steve_sundstrom at symantec.com>
Hi Ervin,
I used to work on utilities, libraries, and standards conformance on
Solaris systems before Sun was bought out by Oracle. The problem you
described sounded like something that I had seen before when a customer
got a restricted shell when they had intended to invoke a remote shell.
If that isn't your problem, I can't help. I don't work for Oracle and
can't guess any better than you as to when or if your problem will be
diagnosed and fixed in a future Solaris release.
Sorry,
Don
----------
From: David Korn <dgk at research.att.com>
Date: Fri, Jan 6, 2012 at 2:33 PM
To: ksh93-integration-discuss at opensolaris.org, steve_sundstrom at symantec.com,
Venkatesha_Mg at symantec.com
cc: Venkatesha_Mg at symantec.com steve_sundstrom at symantec.com
Subject: Re: Re: [ksh93-integration-discuss] ksh93 hang with rsh on Solaris
11
--------
I am trying to get an account on solaris 11 so that I can try to reproduce
this problem.
Hopefully, I will have an account by Monday, and can look at it next
week.
David Korn
dgk at research.att.com
----------
From: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Fri, Jan 6, 2012 at 4:51 PM
To: Korn Shell 93 integration/migration project discussion
<ksh93-integration-discuss at opensolaris.org>
Cc: Ervin Yan <Ervin_Yan at symantec.com>, Steve Sundstrom
<steve_sundstrom at symantec.com>, "Venkatesha M.G."
<Venkatesha_Mg at symantec.com>, Don Cragun <dcragun at sonic.net>
active, nor contributing to Solaris 11 update & sustaining releases - only
a few of the projects you'll find on opensolaris.org are still "live",
though
many of the rest of the mailing lists still exist for questions and
discussion,
or communication with outside/upstream teams like the ksh93 upstream folks
here.
If the upstream ksh team does indeed find there's a bug, we may pull in a
fix
when it's available, but to get a bug fix into Solaris 11 updates, you
really
should contact either ISV Relations or Technical Support to get the bug
filed
and worked on.
--
-Alan Coopersmith- alan.coopersmith at oracle.com
Oracle Solaris Platform Engineering: X Window System
----------
From: Ervin Yan <Ervin_Yan at symantec.com>
Date: Fri, Jan 6, 2012 at 4:54 PM
To: Don Cragun <dcragun at sonic.net>
Cc: Korn Shell 93 integration/migration project discussion
<ksh93-integration-discuss at opensolaris.org>, Ervin Yan
<Ervin_Yan at symantec.com>, "Venkatesha M.G." <Venkatesha_Mg at symantec.com>,
Steve Sundstrom <steve_sundstrom at symantec.com>
Hi, Don:
Thanks very much for your informations.
do you know who from Oracle I can contact so that they can help to fix this
ksh93 issue?
Thanks,
Ervin.
-----Original Message-----
From: Don Cragun [mailto:dcragun at sonic.net]
Sent: 2012?1?6? 16:10
To: Ervin Yan
----------
From: Ervin Yan <Ervin_Yan at symantec.com>
Date: Fri, Jan 6, 2012 at 5:03 PM
To: Alan Coopersmith <alan.coopersmith at oracle.com>, Korn Shell 93
integration/migration project discussion
<ksh93-integration-discuss at opensolaris.org>
Cc: Ervin Yan <Ervin_Yan at symantec.com>, Steve Sundstrom
<steve_sundstrom at symantec.com>, "Venkatesha M.G."
<Venkatesha_Mg at symantec.com>, Don Cragun <dcragun at sonic.net>
Thanks Alan. I got it. Will contact Oracle ISV support team to report the
issue.
Best Regards,
Ervin.
-----Original Message-----
From: Alan Coopersmith [mailto:alan.coopersmith at oracle.com]
Sent: 2012?1?6? 23:52
To: Korn Shell 93 integration/migration project discussion
Cc: Ervin Yan; Don Cragun; Venkatesha M.G.; Steve Sundstrom
Subject: Re: [ksh93-integration-discuss] ksh93 hang with rsh on Solaris 11
--
__ . . __
(o.\ \/ /.o) roland.mainz at nrubsig.org
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 3992797
(;O/ \/ \O;)
----
Below is an old issue which occured with rsh+AST applications (e.g.
anything which uses |I_PEEK|) on Solaris.
Someone from Sun^H^H^HOracle confirmed that the issue has been fixed
in Solaris 11.1 (in sockfs ; Oracle Bug ID 15767822 -
"SUNBT7132075-SOLARIS_11U1 STREAMS fallback doesn't handle EOF/EPIPE")
...
... Glenn/David: Do you have a testcase which doesn't require using
"rsh" or other privileged stuff so that we can test this at build time
and disable the matching workaround (e.g. this code in
src/lib/libast/sfio/sfpkrd.c:
-- snip --
75 #ifdef __sun
76 /*
77 * I_PEEK on stdin can hang rsh+ksh on solaris
78 * this kludge will have to do until
sun^H^H^Horacle fixes I_PEEK/rsh
79 */
80 static int stream_peek;
81 if (stream_peek == 0) /* this will be
done just once */
82 { char *e;
83 stream_peek = (
84 getenv("LOGNAME") == 0 &&
85 getenv("MAIL") == 0 &&
86 ((e = getenv("LANG"))
== 0 || strcmp(e, "C") == 0) &&
87 ((e = getenv("PATH"))
== 0 || strncmp(e, "/usr/bin:", 9) == 0)
88 ) ? -1 : 1;
89 }
90 if(stream_peek < 0)
91 t &= ~STREAM_PEEK;
92 else
93 #endif
-- snip --
)
----
Bye,
Roland
Forwarded conversation
Subject: [ksh93-integration-discuss] ksh93 hang with rsh on Solaris 11
------------------------
From: Ervin Yan <Ervin_Yan at symantec.com>
Date: Wed, Dec 28, 2011 at 2:55 AM
To: "ksh93-integration-discuss at opensolaris.org"
<ksh93-integration-discuss at opensolaris.org>
Cc: Ervin Yan <Ervin_Yan at symantec.com>
Hi,
Recently, we are working to support Solaris 11 GA for our own products, and
met one issue that rsh could not work well together with the new default
shell ?ksh93? on Solaris 11.
According to
http://blogs.oracle.com/OTNGarage/entry/new_shell_in_oracle_solaris, Korn
Shell 93 (/usr/bin/ksh/ or usr/bin/ksh93) replaced both the Bourne Shell
(/usr/bin/sh or /sbin/sh) and Korn Shell 88 (/usr/bin/ksh) on Solaris 11.
In our shell scripts, we need use ?2>&1? to re-direct command results, but
?2>&1? only work for bash/ksh/sh, and not work for csh/tcsh. So we have
to run the command with ?echo ?$cmd 2>&1? | rsh <remote_sys> /bin/sh? format
when the user defined his default shell as csh/tcsh on <remote_sys> in
?/etc/passwd? file, or when we can not determine the default shell in
initiation stage.
But this command ?echo ?$cmd 2>&1? | rsh <remote_sys> /bin/sh? hang on
Solaris 11, while this command works well on all other platforms, like
Linux, AIX, HPUX, and Solaris 9/10.
ssh , or rsh with /usr/bin/bash, or rsh with /usr/sunos/bin/sh are working
well.
For example,
1). ?echo uname | rsh <remote_sys> /bin/sh? hang on Solaris 11.
2). ?echo uname | rsh <remote_sys> /usr/sunos/bin/sh? works well on Solaris
11.
3). ?echo uname | rsh <remote_sys> /usr/bin/bash? works well on Solaris 11.
4). ?echo uname | ssh <remote_sys> /bin/sh? works well on Solaris 11.
So could you help to confirm whether it is a bug for ksh93?
Thanks,
Ervin.
_______________________________________________
ksh93-integration-discuss mailing list
ksh93-integration-discuss at opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/ksh93-integration-discuss
----------
From: Don Cragun <dcragun at sonic.net>
Date: Wed, Dec 28, 2011 at 5:52 PM
To: Ervin_Yan at symantec.com
Cc: Korn Shell 93 integration/migration project discussion
<ksh93-integration-discuss at opensolaris.org>
On Dec 28, 2011, at 4:00 AM,
Date: Tue, 27 Dec 2011 17:55:47 -0800
From: Ervin Yan <Ervin_Yan at symantec.com>
To: "ksh93-integration-discuss at opensolaris.org"
<ksh93-integration-discuss at opensolaris.org>
Cc: Ervin Yan <Ervin_Yan at symantec.com>
Subject: [ksh93-integration-discuss] ksh93 hang with rsh on Solaris 11
Is $PATH set up so that rsh invokes the BSD rsh (remote shell), or theFrom: Ervin Yan <Ervin_Yan at symantec.com>
To: "ksh93-integration-discuss at opensolaris.org"
<ksh93-integration-discuss at opensolaris.org>
Cc: Ervin Yan <Ervin_Yan at symantec.com>
Subject: [ksh93-integration-discuss] ksh93 hang with rsh on Solaris 11
Bourne or Korn rsh (restricted shell)? Have you tried using an absolute
path the the rsh you want or using remsh (a link to the BSD rsh) instead
of using rsh?
It would be nice if the Oracle Solaris 11 rsh and ksh man pages mentioned
this issue explicitly.
- Don
Thanks,
Ervin.
_______________________________________________Ervin.
ksh93-integration-discuss mailing list
ksh93-integration-discuss at opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/ksh93-integration-discuss
----------
From: Ervin Yan <Ervin_Yan at symantec.com>
Date: Thu, Dec 29, 2011 at 4:21 AM
To: Don Cragun <dcragun at sonic.net>
Cc: Korn Shell 93 integration/migration project discussion
<ksh93-integration-discuss at opensolaris.org>, Ervin Yan
<Ervin_Yan at symantec.com>
Hi, Don:
Thanks for your replies.
I tried the following commands, they all hang on Solaris 11.
# echo uname | /usr/bin/rsh <remote_sys> /bin/sh
# echo uname | /usr/bin/remsh <remote_sys> /bin/sh
# echo uname | /usr/bin/rsh <remote_sys> /usr/bin/ksh
# echo uname | /usr/bin/remsh <remote_sys> /usr/bin/ksh
# echo uname | /usr/bin/rsh <remote_sys> /usr/bin/ksh93
# echo uname | /usr/bin/remsh <remote_sys> /usr/bin/ksh93
While the former 4 commands are working well on Solaris 10.
Thanks,
Ervin.
----------
From: Ervin Yan <Ervin_Yan at symantec.com>
Date: Fri, Jan 6, 2012 at 8:39 AM
To: Ervin Yan <Ervin_Yan at symantec.com>, Don Cragun <dcragun at sonic.net>
Cc: Korn Shell 93 integration/migration project discussion
<ksh93-integration-discuss at opensolaris.org>, "Venkatesha M.G."
<Venkatesha_Mg at symantec.com>, Steve Sundstrom <steve_sundstrom at symantec.com>
Hi, Don and Ksh team:
Do you have any updates for this issue?
Will you fix it in Solaris 11 U1?
Thanks,
Ervin.
_______________________________________________
ksh93-integration-discuss mailing list
ksh93-integration-discuss at opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/ksh93-integration-discuss
----------
From: Don Cragun <dcragun at sonic.net>
Date: Fri, Jan 6, 2012 at 9:10 AM
To: Ervin Yan <Ervin_Yan at symantec.com>
Cc: Korn Shell 93 integration/migration project discussion
<ksh93-integration-discuss at opensolaris.org>, "Venkatesha M.G."
<Venkatesha_Mg at symantec.com>, Steve Sundstrom <steve_sundstrom at symantec.com>
Hi Ervin,
I used to work on utilities, libraries, and standards conformance on
Solaris systems before Sun was bought out by Oracle. The problem you
described sounded like something that I had seen before when a customer
got a restricted shell when they had intended to invoke a remote shell.
If that isn't your problem, I can't help. I don't work for Oracle and
can't guess any better than you as to when or if your problem will be
diagnosed and fixed in a future Solaris release.
Sorry,
Don
----------
From: David Korn <dgk at research.att.com>
Date: Fri, Jan 6, 2012 at 2:33 PM
To: ksh93-integration-discuss at opensolaris.org, steve_sundstrom at symantec.com,
Venkatesha_Mg at symantec.com
cc: Venkatesha_Mg at symantec.com steve_sundstrom at symantec.com
Subject: Re: Re: [ksh93-integration-discuss] ksh93 hang with rsh on Solaris
11
--------
I am trying to get an account on solaris 11 so that I can try to reproduce
this problem.
Hopefully, I will have an account by Monday, and can look at it next
week.
David Korn
dgk at research.att.com
----------
From: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Fri, Jan 6, 2012 at 4:51 PM
To: Korn Shell 93 integration/migration project discussion
<ksh93-integration-discuss at opensolaris.org>
Cc: Ervin Yan <Ervin_Yan at symantec.com>, Steve Sundstrom
<steve_sundstrom at symantec.com>, "Venkatesha M.G."
<Venkatesha_Mg at symantec.com>, Don Cragun <dcragun at sonic.net>
Do you have any updates for this issue?
Will you fix it in Solaris 11 U1?
Like most of the opensolaris.org projects, this project is no longer reallyWill you fix it in Solaris 11 U1?
active, nor contributing to Solaris 11 update & sustaining releases - only
a few of the projects you'll find on opensolaris.org are still "live",
though
many of the rest of the mailing lists still exist for questions and
discussion,
or communication with outside/upstream teams like the ksh93 upstream folks
here.
If the upstream ksh team does indeed find there's a bug, we may pull in a
fix
when it's available, but to get a bug fix into Solaris 11 updates, you
really
should contact either ISV Relations or Technical Support to get the bug
filed
and worked on.
--
-Alan Coopersmith- alan.coopersmith at oracle.com
Oracle Solaris Platform Engineering: X Window System
----------
From: Ervin Yan <Ervin_Yan at symantec.com>
Date: Fri, Jan 6, 2012 at 4:54 PM
To: Don Cragun <dcragun at sonic.net>
Cc: Korn Shell 93 integration/migration project discussion
<ksh93-integration-discuss at opensolaris.org>, Ervin Yan
<Ervin_Yan at symantec.com>, "Venkatesha M.G." <Venkatesha_Mg at symantec.com>,
Steve Sundstrom <steve_sundstrom at symantec.com>
Hi, Don:
Thanks very much for your informations.
do you know who from Oracle I can contact so that they can help to fix this
ksh93 issue?
Thanks,
Ervin.
-----Original Message-----
From: Don Cragun [mailto:dcragun at sonic.net]
Sent: 2012?1?6? 16:10
To: Ervin Yan
----------
From: Ervin Yan <Ervin_Yan at symantec.com>
Date: Fri, Jan 6, 2012 at 5:03 PM
To: Alan Coopersmith <alan.coopersmith at oracle.com>, Korn Shell 93
integration/migration project discussion
<ksh93-integration-discuss at opensolaris.org>
Cc: Ervin Yan <Ervin_Yan at symantec.com>, Steve Sundstrom
<steve_sundstrom at symantec.com>, "Venkatesha M.G."
<Venkatesha_Mg at symantec.com>, Don Cragun <dcragun at sonic.net>
Thanks Alan. I got it. Will contact Oracle ISV support team to report the
issue.
Best Regards,
Ervin.
-----Original Message-----
From: Alan Coopersmith [mailto:alan.coopersmith at oracle.com]
Sent: 2012?1?6? 23:52
To: Korn Shell 93 integration/migration project discussion
Cc: Ervin Yan; Don Cragun; Venkatesha M.G.; Steve Sundstrom
Subject: Re: [ksh93-integration-discuss] ksh93 hang with rsh on Solaris 11
--
__ . . __
(o.\ \/ /.o) roland.mainz at nrubsig.org
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 3992797
(;O/ \/ \O;)