Re: [zones-discuss] zlogin invoked by cron hangs after a few minutes

2007-10-24 Thread James Carlson
Damien Carbery writes:
> If someone inside Sun would like to poke around the machine (it's in Dublin), 
> I can provide the login details.

This is a zlogin bug (actually, several bugs).  I'm writing up the CR
now.

-- 
James Carlson, Solaris Networking  <[EMAIL PROTECTED]>
Sun Microsystems / 35 Network Drive71.232W   Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757   42.496N   Fax +1 781 442 1677
___
zones-discuss mailing list
zones-discuss@opensolaris.org


Re: [zones-discuss] zlogin invoked by cron hangs after a few minutes

2007-10-24 Thread Casper . Dik

>Sadly we don't have a 'zlogin -n' because I haven't had time to do
>one.  Let us know if this helps.

But inside cron, stdin is /dev/null (or an empty file); cron does
allow you to specify one or more lines of input in a crontab entry,
but in general the application is not supplied with any input.

Casper
___
zones-discuss mailing list
zones-discuss@opensolaris.org


Re: [zones-discuss] zlogin invoked by cron hangs after a few minutes

2007-10-24 Thread Enda O'Connor ( Sun Micro Systems Ireland)
Damien Carbery wrote:
>> are you piping /dev/null to STDIn in the commands, I
>> can see you did 
>> that on the commands line, but not clear if you did
>> it in the script or not.
> For every command in the script?
> The script is:
> http://cvs.opensolaris.org/source/xref/jds/spec-files/trunk/cron-script.sh
> 
> I would like to get my single command experiment working first, 
> proof-of-concept if you will.
> 
> Where does the redirection go? Inside the quoted command or for zlogin?
> zlogin -l gbuild big-zone "the_command  zlogin -l gbuild big-zone "the_command"   
>  
> This message posted from opensolaris.org
> ___
> zones-discuss mailing list
> zones-discuss@opensolaris.org

___
zones-discuss mailing list
zones-discuss@opensolaris.org


Re: [zones-discuss] zlogin invoked by cron hangs after a few minutes

2007-10-24 Thread Damien Carbery
> > Where does the redirection go? Inside the quoted
> command or for zlogin?
> > zlogin -l gbuild big-zone "the_command  > zlogin -l gbuild big-zone "the_command"  
> The second one.
My command is now:
zlogin -l gbuild big-zone ". /jds/cbe/bin/env.sh; cd /jds/spec-files; pkgtool 
uninstall-pkgs *.spec" 

Re: [zones-discuss] zlogin invoked by cron hangs after a few minutes

2007-10-24 Thread Dan Price
On Wed 24 Oct 2007 at 12:07AM, Damien Carbery wrote:
> > are you piping /dev/null to STDIn in the commands, I
> > can see you did 
> > that on the commands line, but not clear if you did
> > it in the script or not.
> For every command in the script?
> The script is:
> http://cvs.opensolaris.org/source/xref/jds/spec-files/trunk/cron-script.sh
> 
> I would like to get my single command experiment working first, 
> proof-of-concept if you will.
> 
> Where does the redirection go? Inside the quoted command or for zlogin?
> zlogin -l gbuild big-zone "the_command  zlogin -l gbuild big-zone "the_command" 

Re: [zones-discuss] zlogin invoked by cron hangs after a few minutes

2007-10-24 Thread Damien Carbery
> It looks like Perl is stuck.  What does truss say
> it's doing?

This morning:
# ps -ef | grep zlogin
root 24109 24108   0 08:03:01 ?   0:00 zlogin -l gbuild big-zone . 
/jds/cbe/bin/env.sh; cd /jds/spec-files; pkgtool un
root 24108   397   0 08:03:00 ?   0:00 sh -c zlogin -l gbuild 
big-zone ". /jds/cbe/bin/env.sh; cd /jds/spec-files; pkg

$ pstack 24108
24108:  sh -c zlogin -l gbuild big-zone ". /jds/cbe/bin/env.sh; cd /jds/spec-f
 ff2c6104 waitid   (0, 5e2d, ffbffb78, 83)
 0001f120 waitjob  (39ca0, ffbffc5c, 0, 39170, 80, 4c) + 4c
 00019ad0 execute  (400, 39170, 0, 39000, 399c0, 0) + 74c
 00021904 exfile   (0, 1, 0, , 394d0, 36800) + 258
 00021694 main (39000, ffbffe44, ffbffed2, 39400, 394d0, ) + 6dc
 00013a78 _start   (0, 0, 0, 0, 0, 0) + 108

$ pstack 24109
24109:  zlogin -l gbuild big-zone . /jds/cbe/bin/env.sh; cd /jds/spec-files; p
 ff24612c write(4, ffbfca00, 0)
 00013794 doio (4, 5, 6, 8, 1, c3) + 16c
 00014bd4 noninteractive_login (ffbffedd, 13000, 1, 128c98, 12a110, 3) + 394
 00015384 main (5, 16400, 16400, 1, 0, 16400) + 6a8
 00012354 _start   (0, 0, 0, 0, 0, 0) + 108

$ truss -p 24109
write(4, 0xFFBFCA00, 0) (sleeping...)
 
 
This message posted from opensolaris.org
___
zones-discuss mailing list
zones-discuss@opensolaris.org


Re: [zones-discuss] zlogin invoked by cron hangs after a few minutes

2007-10-24 Thread Damien Carbery
> are you piping /dev/null to STDIn in the commands, I
> can see you did 
> that on the commands line, but not clear if you did
> it in the script or not.
For every command in the script?
The script is:
http://cvs.opensolaris.org/source/xref/jds/spec-files/trunk/cron-script.sh

I would like to get my single command experiment working first, 
proof-of-concept if you will.

Where does the redirection go? Inside the quoted command or for zlogin?
zlogin -l gbuild big-zone "the_command 

Re: [zones-discuss] zlogin invoked by cron hangs after a few minutes

2007-10-23 Thread Enda O'Connor
Damien Carbery wrote:
> Using snv_73 sparc. Trying to build JDS inside a whole root zone (because we 
> install packages under /usr, /etc during the build).
>
> I have a cron script that uninstalls the current build, does a svn update, 
> does a full build and then sends report mails. I noticed that it was hanging 
> very early on, during the uninstall section.
> pkgtool mentioned below is from the JDS CBE.
>
> I trimmed by zlogin command down to just one command:
> zlogin -l gbuild big-zone ". /jds/cbe/bin/env.sh; cd /jds/spec-files; pkgtool 
> uninstall-pkgs closed/*.spec *.spec 
> This command processes 143 .spec files. When I specify lesser numbers it 
> works.
> 90 files is okay but 109 files caused it to hang.
> If I run that command from the terminal it works without issue.
>
> $ ps -ef | grep zlogin
> root 20133   397   0 17:21:00 ?   0:00 sh -c zlogin -l gbuild big-zone ". 
> /jds/cbe/bin/env.sh; cd /jds/spec-files; pkg
> root 20134 20133   0 17:21:00 ?   0:00 zlogin -l gbuild big-zone 
> . /jds/cbe/bin/env.sh; cd /jds/spec-files; pkgtool un
>
> The ptree output is:
> $ ptree 20134
> 397   /usr/sbin/cron
>   20133 sh -c zlogin -l gbuild big-zone ". /jds/cbe/bin/env.sh; cd 
> /jds/spec-fi
> 20134 zlogin -l gbuild big-zone . /jds/cbe/bin/env.sh; cd 
> /jds/spec-files; 
>   20135 bash -c . /jds/cbe/bin/env.sh; cd /jds/spec-files; pkgtool 
> uninstal
> 20147 /usr/bin/perl -I /jds/cbe/lib/pkgbuild-1.2.0 
> /jds/cbe/lib/pkgbuil
>
> Any thoughts? Suggestions? Is there a bug here?
> We currently use a chroot environment to build JDS but a zones setup would be 
> preferred as it is a supported feature.
>  
>  
> This message posted from opensolaris.org
> ___
> zones-discuss mailing list
> zones-discuss@opensolaris.org
>   
are you piping /dev/null to STDIn in the commands, I can see you did 
that on the commands line, but not clear if you did it in the script or not.

Enda
___
zones-discuss mailing list
zones-discuss@opensolaris.org


Re: [zones-discuss] zlogin invoked by cron hangs after a few minutes

2007-10-23 Thread James Carlson
Damien Carbery writes:
> $ ptree 20134
> 397   /usr/sbin/cron
>   20133 sh -c zlogin -l gbuild big-zone ". /jds/cbe/bin/env.sh; cd 
> /jds/spec-fi
> 20134 zlogin -l gbuild big-zone . /jds/cbe/bin/env.sh; cd 
> /jds/spec-files; 
>   20135 bash -c . /jds/cbe/bin/env.sh; cd /jds/spec-files; pkgtool 
> uninstal
> 20147 /usr/bin/perl -I /jds/cbe/lib/pkgbuild-1.2.0 
> /jds/cbe/lib/pkgbuil

It looks like Perl is stuck.  What does truss say it's doing?

-- 
James Carlson, Solaris Networking  <[EMAIL PROTECTED]>
Sun Microsystems / 35 Network Drive71.232W   Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757   42.496N   Fax +1 781 442 1677
___
zones-discuss mailing list
zones-discuss@opensolaris.org


Re: [zones-discuss] zlogin invoked by cron hangs after a few minutes

2007-10-23 Thread Jerry Jelinek
Damien Carbery wrote:
> Using snv_73 sparc. Trying to build JDS inside a whole root zone (because we 
> install packages under /usr, /etc during the build).
> 
> I have a cron script that uninstalls the current build, does a svn update, 
> does a full build and then sends report mails. I noticed that it was hanging 
> very early on, during the uninstall section.
> pkgtool mentioned below is from the JDS CBE.
> 
> I trimmed by zlogin command down to just one command:
> zlogin -l gbuild big-zone ". /jds/cbe/bin/env.sh; cd /jds/spec-files; pkgtool 
> uninstall-pkgs closed/*.spec *.spec  
> This command processes 143 .spec files. When I specify lesser numbers it 
> works.
> 90 files is okay but 109 files caused it to hang.
> If I run that command from the terminal it works without issue.
> 
> $ ps -ef | grep zlogin
> root 20133   397   0 17:21:00 ?   0:00 sh -c zlogin -l gbuild big-zone ". 
> /jds/cbe/bin/env.sh; cd /jds/spec-files; pkg
> root 20134 20133   0 17:21:00 ?   0:00 zlogin -l gbuild big-zone 
> . /jds/cbe/bin/env.sh; cd /jds/spec-files; pkgtool un
> 
> The ptree output is:
> $ ptree 20134
> 397   /usr/sbin/cron
>   20133 sh -c zlogin -l gbuild big-zone ". /jds/cbe/bin/env.sh; cd 
> /jds/spec-fi
> 20134 zlogin -l gbuild big-zone . /jds/cbe/bin/env.sh; cd 
> /jds/spec-files; 
>   20135 bash -c . /jds/cbe/bin/env.sh; cd /jds/spec-files; pkgtool 
> uninstal
> 20147 /usr/bin/perl -I /jds/cbe/lib/pkgbuild-1.2.0 
> /jds/cbe/lib/pkgbuil
> 
> Any thoughts? Suggestions? Is there a bug here?
> We currently use a chroot environment to build JDS but a zones setup would be 
> preferred as it is a supported feature.

You should redirect /dev/null to stdin for the zlogin so it
doesn't get stuck trying to read.

Jerry
___
zones-discuss mailing list
zones-discuss@opensolaris.org


Re: [zones-discuss] zlogin invoked by cron hangs after a few minutes

2007-10-23 Thread Mike Gerdts
On 10/23/07, Damien Carbery <[EMAIL PROTECTED]> wrote:
> Any thoughts? Suggestions? Is there a bug here?
> We currently use a chroot environment to build JDS but a zones setup would be 
> preferred as it is a supported feature.

When I was first implementing Solaris 10 (before the first S10 kernel
patch was released), I found similar behavior when running JASS via
zlogin.  When I caused JASS to dramatically reduce its output (to
almost nothing) the problem went away.  I don't know if this is
related or not - lots has changed in the code since then.

-- 
Mike Gerdts
http://mgerdts.blogspot.com/
___
zones-discuss mailing list
zones-discuss@opensolaris.org