473,394 Members | 1,806 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Re: Python GC does not work as it should be

On Mon, 16 Jun 2008 18:11:24 +0700, Jaimy Azle <ja***@nospam.log.web.idwrote:
>Jean-Paul Calderone wrote:
>>
A system exception? What's that? C doesn't have exceptions.

How could I determine it? I dont know GCC implementation, and others, but C
on MSVC does have it. My application were not written in C, an exception
raised was something like "access violation at address xxxx on module
python25.dll", and MSVC debugger shows collecting state were not reset (1),
that is why GC would never happen.
Ah, one of those. Thanks for the clarification. That basically means your
program was supposed to crash. Instead, since you had visual studio around
it handled the violation by popping up a dialog and giving you the choice to
continue execution, which I guess you did.

There's plenty of things other than that one static variable that can get
messed up in this scenario. The access violation could easily come along
with random memory corruption. Fixing just the GC to handle this doesn't
mean your program will be able to keep running correctly. It's difficult
or impossible to know what else has been put into an inconsistent state.

The real fix is probably to track down what is causing the access violation.
Once you fix that, the GC shouldn't need to be changed to account for this
possibility, and you'll stop getting dialogs popping up from your app. :)

Jean-Paul
Jun 27 '08 #1
2 1440
Jean-Paul Calderone wrote:
>
There's plenty of things other than that one static variable that can get
messed up in this scenario. The access violation could easily come along
with random memory corruption. Fixing just the GC to handle this doesn't
mean your program will be able to keep running correctly. It's difficult
or impossible to know what else has been put into an inconsistent state.

The real fix is probably to track down what is causing the access
violation.
Once you fix that, the GC shouldn't need to be changed to account for this
possibility, and you'll stop getting dialogs popping up from your app. :)
Yes I did my job, i had mention it before. but an application would not
consist mine only, it could be incorporate your c extension module(s), and
others, means problem could be from my side, yours, or others. Though
forcing to reset the state would not mean fixing the real problem, but
making sure the GC would always try to do its job is important as python
itself used as an integrator engine no matter whether it succeed or not.

Salam,

- Jaimy.
Jun 27 '08 #2
Yes I did my job, i had mention it before. but an application would not
consist mine only, it could be incorporate your c extension module(s), and
others, means problem could be from my side, yours, or others. Though
forcing to reset the state would not mean fixing the real problem, but
making sure the GC would always try to do its job is important as python
itself used as an integrator engine no matter whether it succeed or not.
Python does not support the Microsoft structured exceptions at all, and
there is nothing that can be done about it. There are many many many
places in the that would work incorrectly if a structured exception
occurred, including many which lead to significant memory leaks or
completely block the interpreter (as it won't return the GIL. That it
can also happen in GC is just a tiny detail of the problem.

If you think you absolutely need to have that work, just change the
code and use a modified Python DLL.

Regards,
Martin
Jun 27 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

49
by: Ville Vainio | last post by:
I don't know if you have seen this before, but here goes: http://text.userlinux.com/white_paper.html There is a jab at Python, though, mentioning that Ruby is more "refined". -- Ville...
0
by: Peter Otten | last post by:
QOTW: "Software doesn't work, and hardware is unreliable. If you wait for a guarantee that nothing will go wrong, you'll end up being my age in a just a few dozen short decades, but without the...
68
by: Lad | last post by:
Is anyone capable of providing Python advantages over PHP if there are any? Cheers, L.
3
by: fdsl ysnh | last post by:
--- python-list-request@python.orgдµÀ: > Send Python-list mailing list submissions to > python-list@python.org > > To subscribe or unsubscribe via the World Wide Web, > visit >...
0
by: Kurt B. Kaiser | last post by:
Patch / Bug Summary ___________________ Patches : 378 open ( +3) / 3298 closed (+34) / 3676 total (+37) Bugs : 886 open (-24) / 5926 closed (+75) / 6812 total (+51) RFE : 224 open...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.