[freeside] Re: Connection refused [SignupClient.pm] line 189

ivan ivan at 420.am
Thu Jul 6 21:19:25 PDT 2000


Thanks!

I think that for now I'll remove the $SIG{CHLD} at the top of
fs_signup_server (and fs_password_server) and see how that works for
folks.

The original reason I sets a CHLD signal handler was that spawned
processes were becoming zombie processes - if you spawn a process which
terminates normally, but don't pick up it's exit status, it'll stay around
taking up memory and space in the process table.  wait() picks up that
status and frees the space.

Processes run as CGIs free any child zombies when they exit, and
processes run under mod_perl are part of the Apache processes model
and will also terminate and free child zombies eventually, but
fs_signup_server and fs_passwd_server are typically started at boot time
(or manually) and never terminated.

Please pass along to Mark that I'd be interested in figuring out exactly
what's different that breaks that code on your machines but not mine, if
he has the time.

On Thu, Jul 06, 2000 at 05:20:18PM -0700, Kristian Hoffmann wrote:
> We had the exact same problem while doing signups.  It has to do with
> signal handler weirdness.  Explaination; at the top of fs_signup_server,
> the signal handler for SIG_CHILD is set to do a wait().  The problems is
> that when ssh process finishes, it generates a SIG_CHILD and, I dunno.
> Things break.  I can't explain it better than that.  Mark's the one who
> fixed this.
> 
> Anyway, here's our patch for svc_acct.pm,
> 
> ...Before...
> #one way
> ssh("root\@$shellmachine",
>     "useradd -d $dir -m -s $shell -u $uid $username"
> );
> #another way
> 
> ...After...
> #one way
> my $temp = $SIG{CHLD};
> undef $SIG{CHLD};
> ssh("root\@$shellmachine",
>     "useradd -d $dir -m -s $shell -u $uid $username"
> );
> $SIG{CHLD} = $temp;
> #another way
> 
> 
> You'll be able to find that in sub insert in svc_acct.pm.
> I'm sure Ivan will want to clean that up, but it works.
> 
> -Kristian
> <khoff at pc-intouch.com>
> 
> 
> On Thu, 6 Jul 2000, ivan wrote:
> 
> > On Sat, Jul 08, 2000 at 08:59:40AM +1000, Johannes Strydom wrote:
> > > ivan wrote:
> > > 
> > > > On Wed, Jul 05, 2000 at 06:03:55PM +1000, Johannes Strydom wrote:
> > > > >
> > > > > Hi Ivan,
> > > > > I've added a couple of warn statements into fs_signup_server and
> > > > > cust_main.pm and here is the result (it does'nt make much sense to me)
> > > >
> > > > If it doesn't make sense to you, then it certainly isn't going to make
> > > > sense to me.
> > > >
> > > > As I said previously, since I'm unable to duplicate your problem, you'll
> > > > need to find it yourself.  I suggest using the Perl debugger to step
> > > > through the code until you find more specifically where it is hanging.
> > > >
> > > > Emailing the debugging output of your local verson to the list is not
> > > > likely to help you or anyone else, sorry.
> > > >
> > > > Good luck!
> > > >
> > > > --
> > > > meow
> > > > _ivan
> > > 
> > > Ivan,
> > > I've traced the program to where it stops. It stops in SSH.pm at  line 85
> > > ...system(@cmd)
> > > The user gets created in the shell machine and it seems that it waits for
> > > the (child) process to complete.
> > > 
> > > Any Ideas??
> > 
> > Why doesn't the child process on the remote machine complete?
> > 
> > When you add an account using the regular web interface, does it hang on 
> > waiting for the same process?
> > 
> > -- 
> > meow
> > _ivan
> > 
> 

-- 
meow
_ivan



More information about the freeside-users mailing list