Mailing List Archive

Zombie login session
At 10:28 PM 7/25/2002, Joe Lin wrote:
>You can only restart the mgd with the shell I believe.

correct

>I don't have a very scientific method. It always worked for me killing
>the mgd and cli numbers next to each other.
>
>If I did a
>
>Ps -awwux |grep admin (admin's the user I use)
>
>admin 15107 0.0 0.3 19200 2124 p1 Ss+ 4:35PM 0:00.37 -cli (cli)
>root 15108 0.0 0.8 9336 6268 ?? Is 4:35PM 0:01.99 mgd: (mgd)
>(admin)/dev/ttyp1 (mgd)
>
>then kill both processes, it seem to clean it up..

this should do it. per definition if you have a zombie process
then you *must* have a parent since this is the one which got
not notified of the exit() of his child.Without seeing the complete
process list I can't tell. A restart of the parent mgd ( the one which
ends with -N in the process list ) doesn't restart the mgd's for each users
as they are all forked. So try to get all cli and corresponding mgd's
off the list and then it should work.

thanks
Josef



>-----Original Message-----
>From: Sonny I Franslay [mailto:sonnyfranslay@pacific.net.sg]
>Sent: Thursday, July 25, 2002 9:52 AM
>To: Josef Buchsteiner
>Cc: juniper-nsp@puck.nether.net
>Subject: Re: [j-nsp] Zombie login session
>
>Hi Josef,
>
>I actually tried to use the "request system logout ..." which failed
>before
>resorting to killing the pid via shell.
>I could not find any mgd process associated to the zombie login session
>from
>the process list. Is there any way to restart the the parent mgd process
>via
>cli? Or do i have to use the shell again?
>
>thx,
>sonny
>----- Original Message -----
>From: "Josef Buchsteiner" <josefb@juniper.net>
>To: "Sonny Franslay" <sonnyfranslay@pacific.net.sg>
>Cc: <juniper-nsp@puck.nether.net>
>Sent: Thursday, July 25, 2002 7:56 PM
>Subject: Re: [j-nsp] Zombie login session
>
>
> > At 11:03 AM 7/25/2002, Sonny Franslay wrote:
> > >Hi Josef,
> > >
> > >We are running 5.0R5.1
> >
> >
> > Sonny,
> > You may have not killed the correct pid. If you do
> > it in the shell you need to kill the mgd daemon related
> > to this user. So we have a master mgd and slaves for
> > each user and each mgd is communicating to the cli daemon
> > which is basically the user-interface/shell. mgd is the
> > process which touches the configuration database.
> >
> > In general you should use the following command from the
> > CLI.
> >
> > josefb@test> request system logout ?
> > Possible completions:
> > <[Enter]> Execute this command
> > pid Management (MGD) process id for user
> > terminal Terminal user is on
> > user User to logout
> > | Pipe through a command
> >
> >
> > thanks
> > Josef
> >
Zombie login session [ In reply to ]
Hi,

I;ve tried killing the mgd -N process. It respawned automatically but
apprently the stalled login session is still reported whenever I go into
the edit mode.

Anyway, just want to clarify that the problem actually happens when I
actually kill the mgd of the user login session and not the sshd process.

For e.g:
root@juniper1% ps awux | grep user2
root 8252 0.0 0.2 2372 1528 ?? Ss 5:15PM 0:01.30 sshd:
user2@ttyp0 (sshd)
root 8254 0.0 0.5 6052 3632 ?? Is 5:15PM 0:00.02 mgd: (mgd)
(user2)/dev/ttyp0 (mgd)

Then i do "kill 8254". The session user2 will still be perceived online
from the cli.

The only way I manage to clear the zombie session is by rebooting the box.

Sonny I. Franslay
--------------------
Pacific Internet Ltd
DID: 6771-0874
Fax: 6872-6674

On Fri, 26 Jul 2002, Josef Buchsteiner wrote:

> Date: Fri, 26 Jul 2002 11:12:51 +0200
> From: Josef Buchsteiner <josefb@juniper.net>
> To: Joe Lin <jlin@doradosoftware.com>,
> 'Sonny I Franslay' <sonnyfranslay@pacific.net.sg>
> Cc: juniper-nsp@puck.nether.net
> Subject: RE: [j-nsp] Zombie login session
>
> At 10:28 PM 7/25/2002, Joe Lin wrote:
> >You can only restart the mgd with the shell I believe.
>
> correct
>
> >I don't have a very scientific method. It always worked for me killing
> >the mgd and cli numbers next to each other.
> >
> >If I did a
> >
> >Ps -awwux |grep admin (admin's the user I use)
> >
> >admin 15107 0.0 0.3 19200 2124 p1 Ss+ 4:35PM 0:00.37 -cli (cli)
> >root 15108 0.0 0.8 9336 6268 ?? Is 4:35PM 0:01.99 mgd: (mgd)
> >(admin)/dev/ttyp1 (mgd)
> >
> >then kill both processes, it seem to clean it up..
>
> this should do it. per definition if you have a zombie process
> then you *must* have a parent since this is the one which got
> not notified of the exit() of his child.Without seeing the complete
> process list I can't tell. A restart of the parent mgd ( the one which
> ends with -N in the process list ) doesn't restart the mgd's for each users
> as they are all forked. So try to get all cli and corresponding mgd's
> off the list and then it should work.
>
> thanks
> Josef
>
>
>
> >-----Original Message-----
> >From: Sonny I Franslay [mailto:sonnyfranslay@pacific.net.sg]
> >Sent: Thursday, July 25, 2002 9:52 AM
> >To: Josef Buchsteiner
> >Cc: juniper-nsp@puck.nether.net
> >Subject: Re: [j-nsp] Zombie login session
> >
> >Hi Josef,
> >
> >I actually tried to use the "request system logout ..." which failed
> >before
> >resorting to killing the pid via shell.
> >I could not find any mgd process associated to the zombie login session
> >from
> >the process list. Is there any way to restart the the parent mgd process
> >via
> >cli? Or do i have to use the shell again?
> >
> >thx,
> >sonny
> >----- Original Message -----
> >From: "Josef Buchsteiner" <josefb@juniper.net>
> >To: "Sonny Franslay" <sonnyfranslay@pacific.net.sg>
> >Cc: <juniper-nsp@puck.nether.net>
> >Sent: Thursday, July 25, 2002 7:56 PM
> >Subject: Re: [j-nsp] Zombie login session
> >
> >
> > > At 11:03 AM 7/25/2002, Sonny Franslay wrote:
> > > >Hi Josef,
> > > >
> > > >We are running 5.0R5.1
> > >
> > >
> > > Sonny,
> > > You may have not killed the correct pid. If you do
> > > it in the shell you need to kill the mgd daemon related
> > > to this user. So we have a master mgd and slaves for
> > > each user and each mgd is communicating to the cli daemon
> > > which is basically the user-interface/shell. mgd is the
> > > process which touches the configuration database.
> > >
> > > In general you should use the following command from the
> > > CLI.
> > >
> > > josefb@test> request system logout ?
> > > Possible completions:
> > > <[Enter]> Execute this command
> > > pid Management (MGD) process id for user
> > > terminal Terminal user is on
> > > user User to logout
> > > | Pipe through a command
> > >
> > >
> > > thanks
> > > Josef
> > >
>
Zombie login session [ In reply to ]
At 11:31 AM 7/26/2002, Sonny Franslay wrote:
>Hi,
>
>I;ve tried killing the mgd -N process. It respawned automatically but
>apprently the stalled login session is still reported whenever I go into
>the edit mode.

which I expected


>Anyway, just want to clarify that the problem actually happens when I
>actually kill the mgd of the user login session and not the sshd process.
>
>For e.g:
>root@juniper1% ps awux | grep user2
>root 8252 0.0 0.2 2372 1528 ?? Ss 5:15PM 0:01.30 sshd:
>user2@ttyp0 (sshd)
>root 8254 0.0 0.5 6052 3632 ?? Is 5:15PM 0:00.02 mgd: (mgd)
>(user2)/dev/ttyp0 (mgd)
>
>Then i do "kill 8254". The session user2 will still be perceived online
>from the cli.

I see.. this way you never had a zombie process from the PID point of view
only the configuration database still had the information that user x
does configure the database. So any action you do on the process table
won't be of any use.


>The only way I manage to clear the zombie session is by rebooting the box.

another way to do ;-)


I've verified your behavior now and do see the same symptom as you once
I killed the mgd in the shell.The simple way to recover from this is that
you execute
the following command from the CLI

request system logout user <name of the user>
(even the user is not logged on the router)

When you then log in back the configuration database has removed
the stamp of this user and you don't get this message anymore.

thanks
Josef




>Sonny I. Franslay
>--------------------
>Pacific Internet Ltd
>DID: 6771-0874
>Fax: 6872-6674
>
>On Fri, 26 Jul 2002, Josef Buchsteiner wrote:
>
> > Date: Fri, 26 Jul 2002 11:12:51 +0200
> > From: Josef Buchsteiner <josefb@juniper.net>
> > To: Joe Lin <jlin@doradosoftware.com>,
> > 'Sonny I Franslay' <sonnyfranslay@pacific.net.sg>
> > Cc: juniper-nsp@puck.nether.net
> > Subject: RE: [j-nsp] Zombie login session
> >
> > At 10:28 PM 7/25/2002, Joe Lin wrote:
> > >You can only restart the mgd with the shell I believe.
> >
> > correct
> >
> > >I don't have a very scientific method. It always worked for me killing
> > >the mgd and cli numbers next to each other.
> > >
> > >If I did a
> > >
> > >Ps -awwux |grep admin (admin's the user I use)
> > >
> > >admin 15107 0.0 0.3 19200 2124 p1 Ss+ 4:35PM 0:00.37 -cli (cli)
> > >root 15108 0.0 0.8 9336 6268 ?? Is 4:35PM 0:01.99 mgd: (mgd)
> > >(admin)/dev/ttyp1 (mgd)
> > >
> > >then kill both processes, it seem to clean it up..
> >
> > this should do it. per definition if you have a zombie process
> > then you *must* have a parent since this is the one which got
> > not notified of the exit() of his child.Without seeing the complete
> > process list I can't tell. A restart of the parent mgd ( the one which
> > ends with -N in the process list ) doesn't restart the mgd's for each users
> > as they are all forked. So try to get all cli and corresponding mgd's
> > off the list and then it should work.
> >
> > thanks
> > Josef
> >
> >
> >
> > >-----Original Message-----
> > >From: Sonny I Franslay [mailto:sonnyfranslay@pacific.net.sg]
> > >Sent: Thursday, July 25, 2002 9:52 AM
> > >To: Josef Buchsteiner
> > >Cc: juniper-nsp@puck.nether.net
> > >Subject: Re: [j-nsp] Zombie login session
> > >
> > >Hi Josef,
> > >
> > >I actually tried to use the "request system logout ..." which failed
> > >before
> > >resorting to killing the pid via shell.
> > >I could not find any mgd process associated to the zombie login session
> > >from
> > >the process list. Is there any way to restart the the parent mgd process
> > >via
> > >cli? Or do i have to use the shell again?
> > >
> > >thx,
> > >sonny
> > >----- Original Message -----
> > >From: "Josef Buchsteiner" <josefb@juniper.net>
> > >To: "Sonny Franslay" <sonnyfranslay@pacific.net.sg>
> > >Cc: <juniper-nsp@puck.nether.net>
> > >Sent: Thursday, July 25, 2002 7:56 PM
> > >Subject: Re: [j-nsp] Zombie login session
> > >
> > >
> > > > At 11:03 AM 7/25/2002, Sonny Franslay wrote:
> > > > >Hi Josef,
> > > > >
> > > > >We are running 5.0R5.1
> > > >
> > > >
> > > > Sonny,
> > > > You may have not killed the correct pid. If you do
> > > > it in the shell you need to kill the mgd daemon related
> > > > to this user. So we have a master mgd and slaves for
> > > > each user and each mgd is communicating to the cli daemon
> > > > which is basically the user-interface/shell. mgd is the
> > > > process which touches the configuration database.
> > > >
> > > > In general you should use the following command from the
> > > > CLI.
> > > >
> > > > josefb@test> request system logout ?
> > > > Possible completions:
> > > > <[Enter]> Execute this command
> > > > pid Management (MGD) process id for user
> > > > terminal Terminal user is on
> > > > user User to logout
> > > > | Pipe through a command
> > > >
> > > >
> > > > thanks
> > > > Josef
> > > >
> >
Zombie login session [ In reply to ]
Hi Josef,

It worked. Thanks for the help

regards,

Sonny I. Franslay
--------------------
Pacific Internet Ltd
DID: 6771-0874
Fax: 6872-6674

On Fri, 26 Jul 2002, Josef Buchsteiner wrote:

> Date: Fri, 26 Jul 2002 13:01:04 +0200
> From: Josef Buchsteiner <josefb@juniper.net>
> To: Sonny Franslay <sonnyfranslay@pacific.net.sg>
> Cc: Joe Lin <jlin@doradosoftware.com>, juniper-nsp@puck.nether.net
> Subject: RE: [j-nsp] Zombie login session
>
> At 11:31 AM 7/26/2002, Sonny Franslay wrote:
> >Hi,
> >
> >I;ve tried killing the mgd -N process. It respawned automatically but
> >apprently the stalled login session is still reported whenever I go into
> >the edit mode.
>
> which I expected
>
>
> >Anyway, just want to clarify that the problem actually happens when I
> >actually kill the mgd of the user login session and not the sshd process.
> >
> >For e.g:
> >root@juniper1% ps awux | grep user2
> >root 8252 0.0 0.2 2372 1528 ?? Ss 5:15PM 0:01.30 sshd:
> >user2@ttyp0 (sshd)
> >root 8254 0.0 0.5 6052 3632 ?? Is 5:15PM 0:00.02 mgd: (mgd)
> >(user2)/dev/ttyp0 (mgd)
> >
> >Then i do "kill 8254". The session user2 will still be perceived online
> >from the cli.
>
> I see.. this way you never had a zombie process from the PID point of view
> only the configuration database still had the information that user x
> does configure the database. So any action you do on the process table
> won't be of any use.
>
>
> >The only way I manage to clear the zombie session is by rebooting the box.
>
> another way to do ;-)
>
>
> I've verified your behavior now and do see the same symptom as you once
> I killed the mgd in the shell.The simple way to recover from this is that
> you execute
> the following command from the CLI
>
> request system logout user <name of the user>
> (even the user is not logged on the router)
>
> When you then log in back the configuration database has removed
> the stamp of this user and you don't get this message anymore.
>
> thanks
> Josef
>
>
>
>
> >Sonny I. Franslay
> >--------------------
> >Pacific Internet Ltd
> >DID: 6771-0874
> >Fax: 6872-6674
> >
> >On Fri, 26 Jul 2002, Josef Buchsteiner wrote:
> >
> > > Date: Fri, 26 Jul 2002 11:12:51 +0200
> > > From: Josef Buchsteiner <josefb@juniper.net>
> > > To: Joe Lin <jlin@doradosoftware.com>,
> > > 'Sonny I Franslay' <sonnyfranslay@pacific.net.sg>
> > > Cc: juniper-nsp@puck.nether.net
> > > Subject: RE: [j-nsp] Zombie login session
> > >
> > > At 10:28 PM 7/25/2002, Joe Lin wrote:
> > > >You can only restart the mgd with the shell I believe.
> > >
> > > correct
> > >
> > > >I don't have a very scientific method. It always worked for me killing
> > > >the mgd and cli numbers next to each other.
> > > >
> > > >If I did a
> > > >
> > > >Ps -awwux |grep admin (admin's the user I use)
> > > >
> > > >admin 15107 0.0 0.3 19200 2124 p1 Ss+ 4:35PM 0:00.37 -cli (cli)
> > > >root 15108 0.0 0.8 9336 6268 ?? Is 4:35PM 0:01.99 mgd: (mgd)
> > > >(admin)/dev/ttyp1 (mgd)
> > > >
> > > >then kill both processes, it seem to clean it up..
> > >
> > > this should do it. per definition if you have a zombie process
> > > then you *must* have a parent since this is the one which got
> > > not notified of the exit() of his child.Without seeing the complete
> > > process list I can't tell. A restart of the parent mgd ( the one which
> > > ends with -N in the process list ) doesn't restart the mgd's for each users
> > > as they are all forked. So try to get all cli and corresponding mgd's
> > > off the list and then it should work.
> > >
> > > thanks
> > > Josef
> > >
> > >
> > >
> > > >-----Original Message-----
> > > >From: Sonny I Franslay [mailto:sonnyfranslay@pacific.net.sg]
> > > >Sent: Thursday, July 25, 2002 9:52 AM
> > > >To: Josef Buchsteiner
> > > >Cc: juniper-nsp@puck.nether.net
> > > >Subject: Re: [j-nsp] Zombie login session
> > > >
> > > >Hi Josef,
> > > >
> > > >I actually tried to use the "request system logout ..." which failed
> > > >before
> > > >resorting to killing the pid via shell.
> > > >I could not find any mgd process associated to the zombie login session
> > > >from
> > > >the process list. Is there any way to restart the the parent mgd process
> > > >via
> > > >cli? Or do i have to use the shell again?
> > > >
> > > >thx,
> > > >sonny
> > > >----- Original Message -----
> > > >From: "Josef Buchsteiner" <josefb@juniper.net>
> > > >To: "Sonny Franslay" <sonnyfranslay@pacific.net.sg>
> > > >Cc: <juniper-nsp@puck.nether.net>
> > > >Sent: Thursday, July 25, 2002 7:56 PM
> > > >Subject: Re: [j-nsp] Zombie login session
> > > >
> > > >
> > > > > At 11:03 AM 7/25/2002, Sonny Franslay wrote:
> > > > > >Hi Josef,
> > > > > >
> > > > > >We are running 5.0R5.1
> > > > >
> > > > >
> > > > > Sonny,
> > > > > You may have not killed the correct pid. If you do
> > > > > it in the shell you need to kill the mgd daemon related
> > > > > to this user. So we have a master mgd and slaves for
> > > > > each user and each mgd is communicating to the cli daemon
> > > > > which is basically the user-interface/shell. mgd is the
> > > > > process which touches the configuration database.
> > > > >
> > > > > In general you should use the following command from the
> > > > > CLI.
> > > > >
> > > > > josefb@test> request system logout ?
> > > > > Possible completions:
> > > > > <[Enter]> Execute this command
> > > > > pid Management (MGD) process id for user
> > > > > terminal Terminal user is on
> > > > > user User to logout
> > > > > | Pipe through a command
> > > > >
> > > > >
> > > > > thanks
> > > > > Josef
> > > > >
> > >
>