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

cell object cleared too early? #66360

Closed
pitrou opened this issue Aug 7, 2014 · 2 comments
Closed

cell object cleared too early? #66360

pitrou opened this issue Aug 7, 2014 · 2 comments

Comments

@pitrou
Copy link
Member

pitrou commented Aug 7, 2014

BPO 22164
Nosy @tim-one, @pitrou

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 = None
created_at = <Date 2014-08-07.14:32:39.785>
labels = []
title = 'cell object cleared too early?'
updated_at = <Date 2014-08-07.14:32:39.785>
user = 'https://github.com/pitrou'

bugs.python.org fields:

activity = <Date 2014-08-07.14:32:39.785>
actor = 'pitrou'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = []
creation = <Date 2014-08-07.14:32:39.785>
creator = 'pitrou'
dependencies = []
files = []
hgrepos = []
issue_num = 22164
keywords = []
message_count = 1.0
messages = ['225012']
nosy_count = 2.0
nosy_names = ['tim.peters', 'pitrou']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = None
url = 'https://bugs.python.org/issue22164'
versions = ['Python 3.4', 'Python 3.5']

@pitrou
Copy link
Member Author

pitrou commented Aug 7, 2014

This is a tricky issue I'm sometimes seeing when running Numba's test suite, and I can't seem to write a reproducer. Somtimes I'm seeing the following messages:

Exception ignored in: <function _OverloadedBase._make_finalizer.<locals>.finalizer at 0x7f1466487c80>
Traceback (most recent call last):
  File "/home/antoine/numba/numba/dispatcher.py", line 59, in finalizer
    if shutting_down():
NameError: free variable 'shutting_down' referenced before assignment in enclosing scope

So what does it correspond to? The code is here:
https://github.com/numba/numba/blob/master/numba/dispatcher.py#L47

Basically, there's no way 'shutting_down' can be referenced before assignment... except if it has been cleared. And the only thing which can clear it here is the GC (namely, cell objects' tp_clear() method).

I'm not sure what the exact trigger for reproduction is. It does have to feature a reference cycle involving the closure; perhaps the trashcan mechanism comes into play as well. Also, the closure must be invoked on collection of something in the cycle, so a weakref callback could be nice.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
@kumaraditya303
Copy link
Contributor

kumaraditya303 commented Sep 4, 2022

The issue is 8 years old, has no reproducer and the linked repo does not has dispatcher.py now hence closing. This can be reopened if a reproducer is found or a new issue can be created.

@kumaraditya303 kumaraditya303 closed this as not planned Won't fix, can't repro, duplicate, stale Sep 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants