[issue46061] GCState *gcstate = get_gc_state() gives fatal error in Python 3.10.2

2022-03-03 Thread Eric V. Smith


Eric V. Smith  added the comment:

I understand. Then I'm going to close this issue, since there's nothing we can 
do.

--
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46061] GCState *gcstate = get_gc_state() gives fatal error in Python 3.10.2

2022-03-03 Thread Ajaya Sutar


Ajaya Sutar  added the comment:

Actually we can not share code due to certain term and conditions. 

Thanks.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46061] GCState *gcstate = get_gc_state() gives fatal error in Python 3.10.2

2022-03-03 Thread Eric V. Smith


Eric V. Smith  added the comment:

> I was running one python script

Again: you need to show us the script that's causing this problem. I (and 
millions of others) run scripts all the time which do not fail in the way you 
describe. Unless you show us a script that causes the problem, we cannot help 
you.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46061] GCState *gcstate = get_gc_state() gives fatal error in Python 3.10.2

2022-03-03 Thread Ajaya Sutar


Ajaya Sutar  added the comment:

I was running one python script. At the time of python exit while calling 
Py_XDECREF(weakRefObject), it is calling giving exception in python 3.10.2. 

While debugging found  

In python 3.8.12, it is working fine with _PyRuntime.

void
PyObject_GC_Del(void *op)
{
PyGC_Head *g = AS_GC(op);
if (_PyObject_GC_IS_TRACKED(op)) {
gc_list_remove(g);
}
struct _gc_runtime_state *state = &_PyRuntime.gc;
if (state->generations[0].count > 0) {
state->generations[0].count--;
}
PyObject_FREE(g);
}

But in Python 3.10.2 it is not working with get_gc_state() giving exception. It 
seems it is memory issues. 

void
PyObject_GC_Del(void *op)
{
PyGC_Head *g = AS_GC(op);
if (_PyObject_GC_IS_TRACKED(op)) {
gc_list_remove(g);
}
GCState *gcstate = get_gc_state();
if (gcstate->generations[0].count > 0) {
gcstate->generations[0].count--;
}
PyObject_Free(g);
}

Could you please check this issue.
Is there any fix or any workaround for it. Because so many python script are 
failing at the exit of python interpreter.

Thanks in advance

--
status: pending -> open
title: Journal execution gives fatal error in Python 3.10.1 -> GCState *gcstate 
= get_gc_state() gives fatal error in Python 3.10.2

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com