[New-bugs-announce] [issue2901] "error: can't allocate region" from mmap() when receiving big chunk of data

Håkan Waara report at bugs.python.org
Sun May 18 02:16:56 CEST 2008


New submission from Håkan Waara <hwaara at users.sourceforge.net>:

I'm using the standard lib SimpleXMLRPCServer to receive a file from a
client. The file is sent using an instance of the xmlrpclib.Binary class. 

Whenever the file is bigger than a few MB, the server reports spews out
an internal error to stderr:

Python(13950) malloc: *** mmap(size=9916416) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug

This *only* happens if the client and server are not the same machine;
i.e., connecting and sending to "localhost" always works.

Attached testcase:

* test_server.py opens a server on port 8001 waiting to receive a blob
of data over HTTP.

* Modify test_client.py to point at a big file, and then connect to the
server machine, and you will ses the error.


I'm running OS X-bundled Python 2.5.1 on OS X 10.5.2

----------
messages: 67018
nosy: hwaara
severity: normal
status: open
title: "error: can't allocate region" from mmap() when receiving big chunk of data
versions: Python 2.5

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2901>
__________________________________


More information about the New-bugs-announce mailing list