473,322 Members | 1,287 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,322 software developers and data experts.

Valgrind and Python

Running Python 2.5.1 under Valgrind is interesting; just starting it and
then pressing Ctrl-D produces this:

==27082== ERROR SUMMARY: 713 errors from 56 contexts (suppressed: 10 from 1)
==27082== malloc/free: in use at exit: 1,243,153 bytes in 508 blocks.
==27082== malloc/free: 3,002 allocs, 2,494 frees, 2,748,487 bytes allocated.
==27082== For counts of detected errors, rerun with: -v
==27082== searching for pointers to 508 not-freed blocks.
==27082== checked 1,399,984 bytes.
==27082==
==27082== LEAK SUMMARY:
==27082== definitely lost: 0 bytes in 0 blocks.
==27082== possibly lost: 17,072 bytes in 58 blocks.
==27082== still reachable: 1,226,081 bytes in 450 blocks.
==27082== suppressed: 0 bytes in 0 blocks.
==27082== Reachable blocks (those to which a pointer was found) are not shown.
==27082== To see them, rerun with: --show-reachable=yes

A lot of those 713 errors occur in the various deallocation functions.

--
Esa Peuha
student of mathematics at the University of Helsinki
http://www.helsinki.fi/~peuha/
Nov 10 '07 #1
3 2749
on 11/10/2007 08:38 AM Esa A E Peuha wrote :
Running Python 2.5.1 under Valgrind is interesting; just starting it and
then pressing Ctrl-D produces this:

==27082== ERROR SUMMARY: 713 errors from 56 contexts (suppressed: 10 from 1)
==27082== malloc/free: in use at exit: 1,243,153 bytes in 508 blocks.
==27082== malloc/free: 3,002 allocs, 2,494 frees, 2,748,487 bytes allocated.
==27082== For counts of detected errors, rerun with: -v
==27082== searching for pointers to 508 not-freed blocks.
==27082== checked 1,399,984 bytes.
==27082==
==27082== LEAK SUMMARY:
==27082== definitely lost: 0 bytes in 0 blocks.
==27082== possibly lost: 17,072 bytes in 58 blocks.
==27082== still reachable: 1,226,081 bytes in 450 blocks.
==27082== suppressed: 0 bytes in 0 blocks.
==27082== Reachable blocks (those to which a pointer was found) are not shown.
==27082== To see them, rerun with: --show-reachable=yes

A lot of those 713 errors occur in the various deallocation functions.
really wired!!! i tried valgrind --leak-check=yes python on Python 2.4.3

it showed me even 839 errors,

==4375== ERROR SUMMARY: 839 errors from 108 contexts (suppressed: 38 from 1)
==4375== malloc/free: in use at exit: 710,604 bytes in 242 blocks.
==4375== malloc/free: 1,971 allocs, 1,729 frees, 1,541,112 bytes allocated.
==4375== For counts of detected errors, rerun with: -v
==4375== searching for pointers to 242 not-freed blocks.
==4375== checked 626,920 bytes.
I didn't get any error when using valgrind with perl or php!!!!

does that mean that python's interpretor is a memory beast?

Nov 10 '07 #2
|
| does that mean that python's interpretor is a memory beast?

No. The developers have occasionally run Valgrind on Python (or seen the
results of so doing). I believe they have determined that it gives
spurious messages due to some particular features of its coding style or
standards. See JPC's message.

Nov 10 '07 #3

"Esa A E Peuha" <es*******@helsinki.fiwrote in message
news:86*************@ruuvi.it.helsinki.fi...
| Running Python 2.5.1 under Valgrind is interesting;

What platform and compiler and compiler settings?

Nov 10 '07 #4

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

Similar topics

1
by: Jerald | last post by:
Running python 2.3.4 on valgrind (a tool like purify which checks the use of uninitialized memory, etc), gives a lot of errors. See below. jfj@cluster:~/> python -V Python 2.3.4...
1
by: seberino | last post by:
I have Python C extensions that are giving me seg faults that I'd like to run valgrind on. Can I use valgrind on these through python?? HOW??? Is it easy or must I do some work like...
2
by: Andreas Andersen | last post by:
Hi I have been using valgrind to debug a program I have written in C++ and it has been very helpful in eliminating memory errors/leaks. However, I just recently discovered a bug and from what I...
2
by: hvaisane | last post by:
Valgrind says ==11604== Invalid read of size 4 ==11604== at 0x8048ABB: main (foo.cc:36) ==11604== Address 0x1B92415C is 4 bytes inside a block of size 8 free'd ==11604== at 0x1B90514F:...
5
by: Roman Mashak | last post by:
Hello, All! I already posted my question and received valuable feedbacks, I changed my code as was proposed here but still receive the same error of valgrind. SO, the code is: #define...
1
by: Nathan Bates | last post by:
Are the Python developers running Python under Valgrind? If not, FYI, Valgrind is a excellent memory-checker for Linux. Valgrind is reporting a ton of memory problems. Worrisome are "Conditional...
1
by: mfried | last post by:
Hi all, I'm testing an application using valgrind 3.2.0 unter Linux kernel 2.4. When the test are finished and the app terminates valgrind gives the error: --15631:0:aspacem Valgrind: FATAL:...
0
by: Salvatore Iovene | last post by:
Hi, I'm using the pexpect module to spawn some processes in a testing environment. pexpect uses, internally, os.execv. What I need to do is valgrind python and get memory leaks from the spawned...
2
by: tvnaidu | last post by:
valgrind error - "failed to start tool 'memcheck' for platform x86-linux" no such file or dir copied all lib and bin files which are generated after I compiled valgrind package, when I run my exe...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.