[ python-Bugs-1738193 ] parser error : out of memory error

SourceForge.net noreply at sourceforge.net
Sun Jun 17 20:38:52 CEST 2007


Bugs item #1738193, was opened at 2007-06-15 18:24
Message generated for change (Comment added) made by paulbeard
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1738193&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Parser/Compiler
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: paul beard (paulbeard)
Assigned to: Nobody/Anonymous (nobody)
Summary: parser error : out of memory error

Initial Comment:
Having some trouble parsing some xml files for GNOME on OS X 10.4.9 in Python 2.4.4. 

make[3]: Nothing to be done for `all'.
if ! test -d es/; then mkdir es/; fi
if [ -f "C/gdm.xml" ]; then d="../"; else d="/opt/local/var/db/dports/build/_opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_dports_gnome_gdm/work/gdm-2.18.2/docs/"; fi; \
(cd es/ && \
  `which xml2po` -e -p \
    "${d}es/es.po" \
    "${d}C/gdm.xml" > gdm.xml.tmp && \
    cp gdm.xml.tmp gdm.xml && rm -f gdm.xml.tmp)
Python(451) malloc: *** vm_allocate(size=1069056) failed (error code=3)
Python(451) malloc: *** error: can't allocate region
Python(451) malloc: *** set a breakpoint in szone_error to debug
Python(451) malloc: *** vm_allocate(size=1069056) failed (error code=3)
Python(451) malloc: *** error: can't allocate region
Python(451) malloc: *** set a breakpoint in szone_error to debug
Python(451) malloc: *** vm_allocate(size=1069056) failed (error code=3)
Python(451) malloc: *** error: can't allocate region
Python(451) malloc: *** set a breakpoint in szone_error to debug
Python(451) malloc: *** vm_allocate(size=1069056) failed (error code=3)
Python(451) malloc: *** error: can't allocate region
Python(451) malloc: *** set a breakpoint in szone_error to debug
(null)(null)Python(451) malloc: *** vm_allocate(size=1069056) failed (error code=3)
Python(451) malloc: *** error: can't allocate region
Python(451) malloc: *** set a breakpoint in szone_error to debug
Entity: line 1: parser error : out of memory error
 %para.char.mix; 
                ^
Entity: line 2: 
		|footnoteref|xref 	|abbrev|acronym|citation|citerefentry|citetitle|emphasis
		                  	                ^


----------------------------------------------------------------------

>Comment By: paul beard (paulbeard)
Date: 2007-06-17 11:38

Message:
Logged In: YES 
user_id=201298
Originator: YES

I am also attaching a screen grab of what this looks like, memory and
CPU-wide: Python is using 70+ % of CPU (and churns away for several
minutes) and memory is 100% used with more than 1 Gb swap in use. 
File Added: pythonmem.png

----------------------------------------------------------------------

Comment By: Neal Norwitz (nnorwitz)
Date: 2007-06-17 11:34

Message:
Logged In: YES 
user_id=33168
Originator: NO

Run ulimit -a on both the OS X machine and FreeBSD machine.  My guess is
that the heap size (possibly called virtual memory) is lower on the OS X
box and not enough to allow Python to do the work.

----------------------------------------------------------------------

Comment By: paul beard (paulbeard)
Date: 2007-06-17 11:28

Message:
Logged In: YES 
user_id=201298
Originator: YES

Still trying to find a way to verify what this problem is. Since it's a
python script file[1] that generates the error, and python itself that
keeps requesting more memory as a result[2], what other information can I
provide? It seems like that in itself is a python code test, since nothing
else is involved by python code (excluding the xml files it's choking on).
This is OS-specific, as it works fine in FreeBSD 6.2. Repro-ing it would
require someone to run OS X and install the MacPorts infrastructure. 





1. /opt/local/bin/xml2po: a /opt/local/bin/python script text executable
2. Python(24212) malloc: *** vm_allocate(size=1069056) failed (error
code=3)
Python(24212) malloc: *** error: can't allocate region
Python(24212) malloc: *** set a breakpoint in szone_error to debug
Python(24212) malloc: *** vm_allocate(size=1069056) failed (error code=3)
Python(24212) malloc: *** error: can't allocate region
Python(24212) malloc: *** set a breakpoint in szone_error to debug
(null)Python(24212) malloc: *** vm_allocate(size=1069056) failed (error
code=3)
Python(24212) malloc: *** error: can't allocate region

File Added: build.log

----------------------------------------------------------------------

Comment By: paul beard (paulbeard)
Date: 2007-06-15 19:00

Message:
Logged In: YES 
user_id=201298
Originator: YES

I don't know how to devise a test case but let me see if I can get some
help on this. 

----------------------------------------------------------------------

Comment By: Neal Norwitz (nnorwitz)
Date: 2007-06-15 18:55

Message:
Logged In: YES 
user_id=33168
Originator: NO

This isn't clearly a python problem.  Can you provide a self-contained
test case that includes just python code that demonstrates this problem? 
(ie, something that we can reproduce)  It looks like a ulimit might be set
too low.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1738193&group_id=5470


More information about the Python-bugs-list mailing list