Opened 11 years ago

Closed 10 years ago

#253 closed defect (fixed)

UMUI on puma accumulates zombies

Reported by: iwi Owned by: jeff
Component: UMUI Keywords:
Cc: Platform:
UM Version:

Description

I see that when you use the submit button on puma, it leaves a number of zombie processes (ssh and scp). This is because it never does a wait for these processes. At a quick look, the relevant code is in function run_spawn in ssh_comm.tcl

I've never really used expect properly, but here's a little test script that demonstrates what I think should be a fix for this:


#!/usr/bin/env expect

set pid [spawn echo foo]
puts "launched proc $pid"

set out ""
expect {
  full_buffer {
      set out "${out}$expect_out(buffer)"
      exp_continue
  } 
  eof {
     set out "${out}$expect_out(buffer)"
  }
}

puts "Output is $out"

puts "Before wait:"
catch { system "ps -p $pid" }
puts "----"

wait $pid

puts "After wait:"
catch { system "ps -p $pid" }
puts "----"

gives:

spawn echo foo
launched proc 31628
foo
Output is foo

Before wait:
  PID TTY          TIME CMD
31628 ?        00:00:00 echo <defunct>
----
After wait:
  PID TTY          TIME CMD
----

Change History (3)

comment:1 Changed 11 years ago by jeff

  • Owner changed from um_support to jeff
  • Status changed from new to assigned

Hi Alan

Thanks for the information, I'll look into it.

Jeff.

comment:2 Changed 11 years ago by jeff

Hi Alan

I've now put some wait commands in all versions of ssh_comm.tcl so hopefully it will stop creating zombies.

Jeff.

comment:3 Changed 10 years ago by lois

  • Resolution set to fixed
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.