2025-07-18 22:34 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0002650Spring engineLinuxpublic2011-09-13 23:31
ReporterZydox 
Assigned Toabma 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionunable to reproduce 
Product Version0.82.7+git 
Target VersionFixed in Version 
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
Attached Files

-Relationships
+Relationships

-Notes

~0007362

abma (administrator)

can you give a code example please?

~0007363

Zydox (reporter)

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

~0007365

abma (administrator)

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)

~0007366

Zydox (reporter)

Last edited: 2011-09-13 23:29

http://github.com/Zydox/SpringAutohost

spring.py

+Notes

-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
+Issue History