This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: parser error : out of memory error
Type: Stage:
Components: Interpreter Core Versions: Python 2.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: nnorwitz, paulbeard
Priority: normal Keywords:

Created on 2007-06-16 01:24 by paulbeard, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
build.log paulbeard, 2007-06-16 01:24
build.log paulbeard, 2007-06-17 18:28 output from build file-roller
pythonmem.png paulbeard, 2007-06-17 18:38 screen grab of how much resource is used here
Messages (7)
msg32335 - (view) Author: paul beard (paulbeard) Date: 2007-06-16 01:24
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
		                  	                ^
msg32336 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2007-06-16 01:55
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.
msg32337 - (view) Author: paul beard (paulbeard) Date: 2007-06-16 02:00
I don't know how to devise a test case but let me see if I can get some help on this. 
msg32338 - (view) Author: paul beard (paulbeard) Date: 2007-06-17 18:28
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
msg32339 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2007-06-17 18:34
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.
msg32340 - (view) Author: paul beard (paulbeard) Date: 2007-06-17 18:38
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
msg32341 - (view) Author: paul beard (paulbeard) Date: 2007-06-17 23:59
This seems to be resolved by ripping out and rebuilding/re-installing all the dependencies that make up gnome-doc-utils (which is where the xml2po script lives). 

So it looks like I bothered you all for nothing. 
History
Date User Action Args
2022-04-11 14:56:24adminsetgithub: 45098
2007-06-16 01:24:54paulbeardcreate