View Issue Details

IDProjectCategoryView StatusLast Update
0002650Spring engineLinuxpublic2011-09-13 23:31
ReporterZydox Assigned Toabma  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionunable to reproduce 
Product Version0.82.7+git 
Summary0002650: [spring-headless] <defunct> after terminate
DescriptionWhen I start spring-headless from Pythons subprocess.popen and then .terminate () the porcess, it stays open as "[spring-headless] <defunct>" is ps -ax.
This doesn't happen with 0.82.7 or 0.82.7.1 builds of spring-headless

build: 5426266fedd945716ac1d70769af37494f7165e3
TagsNo tags attached.
Checked infolog.txt for Errors

Activities

abma

2011-09-13 18:16

administrator   ~0007362

can you give a code example please?

Zydox

2011-09-13 18:19

reporter   ~0007363

self.SpringPID = subprocess.Popen([HeadlessBinary]), ScriptURI])
...wait for battle...
self.SpringPID.terminate ()

abma

2011-09-13 23:25

administrator   ~0007365

Last edited: 2011-09-13 23:26

i guess this example is incomplete... please give a full example or we can't help.

you've to call self.SpringPID.wait() and not terminate()

this looks like a zombie process: http://en.wikipedia.org/wiki/Zombie_process

you've to read the return value to make it disappear.

when reading the python docu, terminate() doesn't read the return value...

http://docs.python.org/library/subprocess.html


this works:

import subprocess
import time

proc=subprocess.Popen('/home/abma/local/spring/master/bin/spring-headless')
proc.terminate()
proc.wait()

time.sleep(1000)

Zydox

2011-09-13 23:28

reporter   ~0007366

Last edited: 2011-09-13 23:29

http://github.com/Zydox/SpringAutohost

spring.py

Issue History

Date Modified Username Field Change
2011-09-13 17:47 Zydox New Issue
2011-09-13 18:16 abma Note Added: 0007362
2011-09-13 18:19 Zydox Note Added: 0007363
2011-09-13 23:25 abma Note Added: 0007365
2011-09-13 23:26 abma Status new => feedback
2011-09-13 23:26 abma Note Edited: 0007365
2011-09-13 23:28 Zydox Note Added: 0007366
2011-09-13 23:29 Zydox Note Edited: 0007366
2011-09-13 23:31 abma Status feedback => resolved
2011-09-13 23:31 abma Resolution open => unable to reproduce
2011-09-13 23:31 abma Assigned To => abma