Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

antigravity leaks subprocess.Popen object #62321

Closed
tiran opened this issue Jun 2, 2013 · 4 comments
Closed

antigravity leaks subprocess.Popen object #62321

tiran opened this issue Jun 2, 2013 · 4 comments
Labels
performance Performance or resource usage stdlib Python modules in the Lib dir

Comments

@tiran
Copy link
Member

tiran commented Jun 2, 2013

BPO 18121
Nosy @pitrou, @tiran, @bitdancer

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2013-08-15.22:15:53.634>
created_at = <Date 2013-06-02.18:18:54.293>
labels = ['library', 'performance']
title = 'antigravity leaks subprocess.Popen object'
updated_at = <Date 2013-08-15.22:15:53.633>
user = 'https://github.com/tiran'

bugs.python.org fields:

activity = <Date 2013-08-15.22:15:53.633>
actor = 'pitrou'
assignee = 'none'
closed = True
closed_date = <Date 2013-08-15.22:15:53.634>
closer = 'pitrou'
components = ['Library (Lib)']
creation = <Date 2013-06-02.18:18:54.293>
creator = 'christian.heimes'
dependencies = []
files = []
hgrepos = []
issue_num = 18121
keywords = []
message_count = 4.0
messages = ['190494', '190507', '190508', '195295']
nosy_count = 4.0
nosy_names = ['pitrou', 'christian.heimes', 'r.david.murray', 'sbt']
pr_nums = []
priority = 'low'
resolution = 'out of date'
stage = None
status = 'closed'
superseder = None
type = 'resource usage'
url = 'https://bugs.python.org/issue18121'
versions = ['Python 3.4']

@tiran
Copy link
Member Author

tiran commented Jun 2, 2013

$ ./python
Python 3.4.0a0 (default:801567d6302c+, May 23 2013, 14:22:00) 
[GCC 4.7.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import gc
>>> gc.set_debug(gc.DEBUG_UNCOLLECTABLE)
>>> import antigravity
>>> Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 9: reading configurations from ~/.fonts.conf is deprecated.

>>> 
gc: uncollectable <Popen 0x7faa2e37bd58>
gc: uncollectable <dict 0x7faa2f535f38>
gc: uncollectable <type 0x26e3198>
gc: uncollectable <list 0x7faa2e36c138>
gc: uncollectable <dict 0x7faa2e366f38>
gc: uncollectable <tuple 0x7faa2e3699f8>
gc: uncollectable <function 0x7faa2e36ee00>
gc: uncollectable <function 0x7faa2e382a68>
gc: uncollectable <function 0x7faa2e382280>
gc: uncollectable <function 0x7faa2e3821c8>
gc: uncollectable <function 0x7faa2e382618>
gc: uncollectable <getset_descriptor 0x7faa2e37d1c0>
gc: uncollectable <function 0x7faa2e36eeb8>
gc: uncollectable <function 0x7faa2e382840>
gc: uncollectable <function 0x7faa2e382bd8>
gc: uncollectable <getset_descriptor 0x7faa2e37d2b0>
gc: uncollectable <function 0x7faa2e36ed48>
gc: uncollectable <function 0x7faa2e382b20>
gc: uncollectable <function 0x7faa2e382c90>
gc: uncollectable <function 0x7faa2e3823f0>
gc: uncollectable <function 0x7faa2e382110>
gc: uncollectable <function 0x7faa2e3824a8>
gc: uncollectable <function 0x7faa2e3826d0>
gc: uncollectable <function 0x7faa2e36ef70>
gc: uncollectable <function 0x7faa2e382058>
gc: uncollectable <function 0x7faa2e382788>
gc: uncollectable <function 0x7faa2e3829b0>
gc: uncollectable <function 0x7faa2e382e00>
gc: uncollectable <function 0x7faa2e3828f8>
gc: uncollectable <function 0x7faa2e382d48>
gc: uncollectable <function 0x7faa2e382560>
gc: uncollectable <function 0x7faa2e382338>
gc: uncollectable <dict 0x7faa2e35bf38>
gc: uncollectable <tuple 0x7faa2e37fed8>
gc: uncollectable <tuple 0x7faa2e369b48>
gc: uncollectable <tuple 0x7faa2e37fe58>
gc: uncollectable <list 0x7faa2e366138>
gc:0: ResourceWarning: gc: 1 uncollectable objects at shutdown
      [<subprocess.Popen object at 0x7faa2e37bd58>]

platform: Ubuntu 12.10 AMD64
browser: Firefox 20.0

@tiran tiran added stdlib Python modules in the Lib dir performance Performance or resource usage labels Jun 2, 2013
@sbt
Copy link
Mannequin

sbt mannequin commented Jun 2, 2013

Presumably this is caused by the fact that Popen.__del__() ressurects self by appending self to _active if the process is still alive.

On Windows this is unnecessary. On Unix it would be more sensible to just append the *pid* to _active.

@bitdancer
Copy link
Member

See also bpo-5993.

@pitrou
Copy link
Member

pitrou commented Aug 15, 2013

Outdated by PEP-442.

@pitrou pitrou closed this as completed Aug 15, 2013
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Performance or resource usage stdlib Python modules in the Lib dir
Projects
None yet
Development

No branches or pull requests

3 participants