Bug 577398 - Review Request: python-meliae - Python memory usage statistics
Summary: Review Request: python-meliae - Python memory usage statistics
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Thomas Spura
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-03-26 20:56 UTC by Dave Malcolm
Modified: 2010-10-14 06:31 UTC (History)
6 users (show)

Fixed In Version: python-meliae-0.2.0-3.fc13
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-04-22 17:18:59 UTC
tomspur: fedora-review+
kevin: fedora-cvs+


Attachments (Terms of Use)

Description Dave Malcolm 2010-03-26 20:56:31 UTC
Spec URL: http://dmalcolm.fedorapeople.org/python-packaging/python-meliae.spec
SRPM URL: http://dmalcolm.fedorapeople.org/python-packaging/python-meliae-0.2.0-1.fc12.src.rpm
Description:
"meliae" provides a way to dump python memory usage information to a JSON disk
format, which can then be parsed into useful things like graph representations.

The name is simply a fun word (means Ash-wood Nymph).

Comment 1 Dave Malcolm 2010-03-26 21:32:58 UTC
Updated spec: http://dmalcolm.fedorapeople.org/python-packaging/python-meliae.spec
Updated SRPM: http://dmalcolm.fedorapeople.org/python-packaging/python-meliae-0.2.0-2.fc12.src.rpm

(I added a patch which fixes an assertion failure)

rpmlint output is clean:
$ rpmlint RPMS/x86_64/python-meliae-*-2* SRPMS/python-meliae-0.2.0-2.fc12.src.rpm 
3 packages and 0 specfiles checked; 0 errors, 0 warnings.

Comment 2 Dave Malcolm 2010-03-26 22:59:53 UTC
FWIW, some more information (including usage) can be seen at:
http://jam-bazaar.blogspot.com/2009/11/memory-debugging-with-meliae.html
http://jam-bazaar.blogspot.com/2010/01/meliae-020.html

Comment 3 Dennis Gregorovic 2010-03-29 16:21:13 UTC
Does this require a particular version of Python and/or Cython?

$ rpm -q python-devel Cython
python-devel-2.4.3-27.el5.x86_64
Cython-0.12.1-4.el5.x86_64
$ rpmbuild --rebuild python-meliae-0.2.0-2.fc12.src.rpm
[snip]
creating build/temp.linux-x86_64-2.4/meliae
gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC -I/usr/include/python2.4 -c meliae/_scanner.c -o build/temp.linux-x86_64-2.4/meliae/_scanner.o
meliae/_scanner.c: In function '__pyx_f_6meliae_8_scanner__file_io_callback':
meliae/_scanner.c:489: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result
meliae/_scanner.c: In function '__pyx_pf_6meliae_8_scanner_dump_object_info':
meliae/_scanner.c:681: warning: passing argument 1 of '_dump_object_info' from incompatible pointer type
meliae/_scanner.c:693: warning: passing argument 1 of '_dump_object_info' from incompatible pointer type
gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC -I/usr/include/python2.4 -c meliae/_scanner_core.c -o build/temp.linux-x86_64-2.4/meliae/_scanner_core.o
In file included from meliae/_scanner_core.c:20:
meliae/_scanner_core.h:35: error: expected '=', ',', ';', 'asm' or '__attribute__' before '_size_of'
meliae/_scanner_core.c:77: error: expected '=', ',', ';', 'asm' or '__attribute__' before '_basic_object_size'
meliae/_scanner_core.c:89: error: expected '=', ',', ';', 'asm' or '__attribute__' before '_var_object_size'
...

Comment 4 Dave Malcolm 2010-03-29 16:43:46 UTC
It builds OK on Fedora 12 with Cython-0.12.1-4.fc12.x86_64

The three errors appear to all relate to "Py_ssize_t", which doesn't exist yet in the Python 2.4 in RHEL5.

It's probably fixable by patching away those references in EL5 builds to ssize_t.  The relevant info from 2.6's Include/pyport.h:

/* Py_ssize_t is a signed integral type such that sizeof(Py_ssize_t) ==
 * sizeof(size_t).  C99 doesn't define such a thing directly (size_t is an
 * unsigned integral type).  See PEP 353 for details.
 */
#ifdef HAVE_SSIZE_T
typedef ssize_t		Py_ssize_t;
#elif SIZEOF_VOID_P == SIZEOF_SIZE_T
typedef Py_intptr_t	Py_ssize_t;
#else
#   error "Python needs a typedef for Py_ssize_t in pyport.h."
#endif

Comment 5 Dennis Gregorovic 2010-03-29 17:14:37 UTC
Thanks for the quick response.  Changing Py_ssize_t to ssize_t did remove a number of errors, but now I'm blocked on errors related to Sets.  I'm thinking that at this point it's probably not worth trying to backport to Python 2.4.

Comment 6 Thomas Spura 2010-04-16 18:36:43 UTC
Review:

Good:
- sources match upstream: 21846ab82299ae1e30d3123a92a05ac0
- name ok
- %build/%install ok
- %clean there
- license ok - it's GPLv3 and *NOT* GPLv3+
- Group ok
- arch ok
- koji ok:
  http://koji.fedoraproject.org/koji/taskinfo?taskID=2121545


Needswork:
- Could you be a bit more verbose in %files, to detect, if the egg was correctly build?
e.g.
%{python_sitearch}/meliae
%{python_sitearch}/meliae-*-py?.?.egg-info

- %check missing:
%check
./run_tests.py
doesn't work here, but python setup.py build --inplace doesn't either, don't know why.
python setup.py build_ext --inplace worked. Could this be a distutils/cython bug?


- Great patch comment. Is it upstream? No comment about that.

(In reply to comment #5)
> Thanks for the quick response.  Changing Py_ssize_t to ssize_t did remove a
> number of errors, but now I'm blocked on errors related to Sets.  I'm thinking
> that at this point it's probably not worth trying to backport to Python 2.4.    

See TODO.txt:
'''
8) Full cross-platform and version compatibility.

   I'd like to support python2.4+, 32/64-bit, Win/Linux/Mac. I've tested
   a couple variants, but I don't have all of them to make sure it works
   everywhere.
'''

Maybe it will be supported in the future.


###############################################################################

Only shoulds/coulds left (see Needswork).

###############################################################################


APPROVED

Comment 7 Dave Malcolm 2010-04-19 19:09:42 UTC
New Package CVS Request
=======================
Package Name: python-meliae
Short Description: Python memory usage statistics
Owners: dmalcolm
Branches: F-13 F-13
InitialCC:

Comment 8 Dave Malcolm 2010-04-19 19:10:06 UTC
New Package CVS Request
=======================
Package Name: python-meliae
Short Description: Python memory usage statistics
Owners: dmalcolm
Branches: F-12 F-13
InitialCC:

Comment 9 Dave Malcolm 2010-04-19 19:10:47 UTC
(In reply to comment #7)
Typo; meant to type "F-12 F-13" for branches.

Comment 10 Kevin Fenzi 2010-04-21 04:02:51 UTC
CVS done (by process-cvs-requests.py).

Comment 11 Fedora Update System 2010-04-22 15:49:32 UTC
python-meliae-0.2.0-3.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/python-meliae-0.2.0-3.fc13

Comment 12 Fedora Update System 2010-04-22 15:50:25 UTC
python-meliae-0.2.0-3.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/python-meliae-0.2.0-3.fc12

Comment 13 Dave Malcolm 2010-04-22 17:18:59 UTC
Thanks.

Imported and built into F-12, F-13 and devel

Comment 14 Fedora Update System 2010-10-14 06:31:08 UTC
python-meliae-0.2.0-3.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.