Welcome, Guest. Please login or register.

Author Topic: Discovery is leaving hundreds of defunct SSH processes  (Read 3409 times)

tristanbob

  • Full Member
  • ***
  • Posts: 159
    • View Profile
Discovery is leaving hundreds of defunct SSH processes
« on: December 16, 2011, 10:25:25 PM »
I just ran 1.0.7 on our network for the first time, and I noticed that there are now over 600 defunct SSH processes!  Any idea what caused this? 

wwwrun   31626 22793  0 21:16 ?        00:00:00 [ssh] <defunct>
wwwrun   31638 22793  0 21:16 ?        00:00:00 [ssh] <defunct>
wwwrun   31648 22793  0 21:16 ?        00:00:00 [ssh] <defunct>
wwwrun   31656 22793  0 21:16 ?        00:00:00 [ssh] <defunct>

NeDiVA:/var/nedi # ps -ef | grep defunct | wc -l
    680

Thanks,

Tristan
Please visit "Other"->"Invoices" on your NeDi installation to make an annual contribution and support Nedi!

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2780
    • View Profile
    • NeDi
Re: Discovery is leaving hundreds of defunct SSH processes
« Reply #1 on: December 17, 2011, 12:18:18 PM »
The io::pty approach doesn't seem to close them properly and I haven't found out how to fix this. I'll look into it over the holidays (Steffen brought up some ideas), but if anybody else has an idea feel free to reply to this thread...
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2780
    • View Profile
    • NeDi
Re: Discovery is leaving hundreds of defunct SSH processes
« Reply #2 on: June 07, 2012, 06:53:51 PM »
Was lange währt, wird endlich gut or good things will come to those who wait! Thanks to some hints from the US based developer Glenn and ultimately my old friend Matthias, we got this fixed! Thanks to raider82 for testing it in his little 100k node network  ;)

For those who don't want to wait for 1.0.8, have a look at the end of libcli-iopty and insert the bold line:


sub Spawn{

   my $pty = new IO::Pty or die $!;

   &misc::Prt("PTY :Forking $_[0]\n");
   $SIG{CHLD} = 'IGNORE';
« Last Edit: June 08, 2012, 05:52:37 PM by rickli »
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

pc_sg

  • Guest
Re: Discovery is leaving hundreds of defunct SSH processes
« Reply #3 on: June 08, 2012, 01:14:03 PM »
I suppose the bold line shoul be

$SIG{CHLD} = 'IGNORE';

and not

&misc::Prt("PTY :Forking $_[0]\n");

that is already present.

Paolo

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2780
    • View Profile
    • NeDi
Re: Discovery is leaving hundreds of defunct SSH processes
« Reply #4 on: June 08, 2012, 05:52:01 PM »
Err bummer, of course...corrected!
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

pc_sg

  • Guest
Re: Discovery is leaving hundreds of defunct SSH processes
« Reply #5 on: June 11, 2012, 07:53:47 AM »
 ;)