[issue12760] Add create mode to open()

2011-10-29 Thread Charles-François Natali
Changes by Charles-François Natali : -- resolution: -> duplicate status: open -> closed superseder: -> io.FileIO and io.open should support openat ___ Python tracker <http://bugs.python.or

[issue12498] asyncore.dispatcher_with_send, disconnection problem + miss-conception

2011-10-30 Thread Charles-François Natali
Charles-François Natali added the comment: > This does not seem to work. Yes, the proposed fix is buggy: the solution is to drain the output buffer, guarding against recursive calls between send() and handle_close() (patch attached). > Note that after the first 'handle_close'

[issue5875] test_distutils failing on OpenSUSE 10.3, Py3k

2011-10-30 Thread Charles-François Natali
Charles-François Natali added the comment: Here's the error message: """ error: File not found: /tmp/tmpsga9lh/foo/build/bdist.linux-i686/rpm/BUILDROOT/foo-0.1-1.i386/usr/local/lib/python3.3/site-packages/foo.pyc error: File not found: /tmp/tmpsga9lh/foo/build/bdist.linu

[issue12801] C realpath not used by os.path.realpath

2011-10-30 Thread Charles-François Natali
Charles-François Natali added the comment: Another problem with the POSIX realpath(3): it can fail with ENOENT if the target path doesn't exist, whereas the current Python implementation "succeeds" even if a component in the path doesn't exist. Note the quotes around &qu

[issue12498] asyncore.dispatcher_with_send, disconnection problem + miss-conception

2011-10-30 Thread Charles-François Natali
Charles-François Natali added the comment: > The attached patch uses another name In that case, you should use a name starting with an underscore ("private" namespace). > and drains the output buffer only on a close event, not on error conditions. Hmmm... I don't think

[issue12498] asyncore.dispatcher_with_send, disconnection problem + miss-conception

2011-10-30 Thread Charles-François Natali
Charles-François Natali added the comment: > While writing the test case, I found out that the test case does not > fail before the patch. It seems that draining the output buffer > already works: > > The attached script 'asyncore_shutdown.py' drains the output buff

[issue2979] use_datetime in SimpleXMLRPCServer

2011-10-31 Thread Charles-François Natali
Charles-François Natali added the comment: 2096158376e5 broke test_xmlrpc: """ == ERROR: test_datetime_before_1900 (test.test_xmlrpc

[issue13303] Sporadic importlib failures: FileNotFoundError on os.rename()

2011-10-31 Thread Charles-François Natali
Charles-François Natali added the comment: There's a race in _write_atomic(): """ # On POSIX-like platforms, renaming is atomic path_tmp = path + '.tmp' try: fd = _os.open(path_tmp, _os.O_EXCL | _os.O_CREAT | _os.O_WRONLY)

[issue13303] Sporadic importlib failures: FileNotFoundError on os.rename()

2011-10-31 Thread Charles-François Natali
Charles-François Natali added the comment: Patch attached. -- keywords: +patch Added file: http://bugs.python.org/file23568/import_atomic_race.diff ___ Python tracker <http://bugs.python.org/issue13

[issue13303] Sporadic importlib failures: FileNotFoundError on os.rename()

2011-10-31 Thread Charles-François Natali
Charles-François Natali added the comment: Then we won't write the bytecode any more. But it will be consistent. The solution would be to create a random temporary file (with e.g. mkstemp()): in case of crash, we'll let dangling temporary files, but we'll be able to update th

[issue13303] Sporadic importlib failures: FileNotFoundError on os.rename()

2011-10-31 Thread Charles-François Natali
Charles-François Natali added the comment: Here's a patch using pseudo-random filenames. I used id(path) to generate a random name: it's faster than getpid(), and doesn't pollute strace's output (I'm one of strace's biggest fan :-). -- Added file: ht

[issue11812] transient socket failure to connect to 'localhost'

2011-10-31 Thread Charles-François Natali
Charles-François Natali added the comment: > Is anybody activelly working on this?. I don't think so. > Should I get involved? Sure, if you have access to a machine on which you can reliably reproduce the problem, it'll be much easier. I would bet on a deficient name res

[issue13303] Sporadic importlib failures: FileNotFoundError on os.rename()

2011-10-31 Thread Charles-François Natali
Charles-François Natali added the comment: > (it does sound a bit overkill to me :-)) Well, it depends on what we want: - if having a stale bytecode file indefinitely is acceptable, then the '.tmp' suffix approach is OK - if not, then we should use pseudo-random files > If

[issue13303] Sporadic importlib failures: FileNotFoundError on os.rename()

2011-10-31 Thread Charles-François Natali
Charles-François Natali added the comment: Here's a patch for Python/import.c using mkstemp(3). AFAICT, mkstemp should always be available (on Unix of course). -- Added file: http://bugs.python.org/file23572/import_atomic_race-2.diff ___ P

[issue12797] io.FileIO and io.open should support openat

2011-10-31 Thread Charles-François Natali
Charles-François Natali added the comment: > Is "an open file descriptor" correct in English? I'd have written "an > opened file descriptor" instead (in 5 places). "open" is correct. For example, you say "the store is open", not "the st

[issue12105] open() does not able to set flags, such as O_CLOEXEC

2011-11-01 Thread Charles-François Natali
Charles-François Natali added the comment: > Why it is closed as duplicate? nothing said about CLOEXEC in issue12797 See http://bugs.python.org/issue12760#msg146686 -- ___ Python tracker <http://bugs.python.org/issu

[issue13308] fix test_httpservers failures when run as root

2011-11-01 Thread Charles-François Natali
New submission from Charles-François Natali : Here's a patch fixing test_httpservers failures when run as root (a couple buildbots are consistently failing on this, e.g. http://python.org/dev/buildbot/all/builders/x86 FreeBSD 7.2 3.x/builds/2282/steps/test/logs/stdio). The test is failin

[issue12578] Erratic socket.gaierror: [Errno 11004] when using smtplib

2011-11-01 Thread Charles-François Natali
Charles-François Natali added the comment: Please provide more information, because this looks really strange... -- nosy: +neologix stage: -> test needed status: open -> pending ___ Python tracker <http://bugs.python.org/i

[issue13303] Sporadic importlib failures: FileNotFoundError on os.rename()

2011-11-01 Thread Charles-François Natali
Changes by Charles-François Natali : -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue9897] multiprocessing problems

2011-11-01 Thread Charles-François Natali
Charles-François Natali added the comment: The first problem is a duplicate of issue #6056. As for the second problem, no, it doesn't limit the number of concurrent connections. Server.serve_forever() creates a new thread for each new incoming connection. Closing as dupl

[issue7777] Support needed for AF_RDS family

2011-11-01 Thread Charles-François Natali
Charles-François Natali added the comment: Here's a patch adding support for RDS sockets (with test and documentation update). -- keywords: +needs review, patch nosy: +haypo, neologix, pitrou stage: needs patch -> patch review versions: +Python 3.3 -Python 2.7, Python 3.2 Ad

[issue13310] asyncore handling of out-of-band data fails

2011-11-01 Thread Charles-François Natali
Charles-François Natali added the comment: Hello Xavier, > select (an poll) returns a read event and an exceptional condition > for the socket, but there is no normal data to read, only out-of-band > data. That's against POSIX: """ POLLIN Data other than h

[issue7777] Support needed for AF_RDS family

2011-11-01 Thread Charles-François Natali
Charles-François Natali added the comment: > - the tests are skipped with "unable to bind RDS socket" here (even > under root). Is it expected? Oops. I did a quick test to force the socket family (because RDS sockets really use sockaddr_in), and apparently I overwrote m

[issue13310] asyncore handling of out-of-band data fails

2011-11-02 Thread Charles-François Natali
Charles-François Natali added the comment: > It is not clear why recv() can return EAGAIN because we're trying to > _send_ a packet ;-) Well, I was refering to a problem with the current implementation, not limited to this specific example. >> Closing as invalid > &g

[issue13303] Sporadic importlib failures: FileNotFoundError on os.rename()

2011-11-02 Thread Charles-François Natali
Charles-François Natali added the comment: mkstemp() creates the file with mode 0600, which can be surprising. I'm note sure about the best way to handle this: 1) change the file mode after creating it with fchmod(), using the source file mode. But we must also take into account the umas

[issue12498] asyncore.dispatcher_with_send, disconnection problem + miss-conception

2011-11-02 Thread Charles-François Natali
Charles-François Natali added the comment: I've done a review of your patch (looks like Rietveld doesn't send emails). -- stage: needs patch -> patch review ___ Python tracker <http://bugs.pytho

[issue13324] fcntl module doesn't support F_NOCACHE (OS X specific) results in high 'inactive' memory performance issues

2011-11-02 Thread Charles-François Natali
Charles-François Natali added the comment: > With this patch in place the inactive memory on my system stays (low) > and flat, without it it rises until it maxes out all available memory > and then starts paging. It's often a desired behaviour: paging out unused memory makes room

[issue13324] fcntl module doesn't support F_NOCACHE (OS X specific) results in high 'inactive' memory performance issues

2011-11-02 Thread Charles-François Natali
Changes by Charles-François Natali : -- type: behavior -> feature request ___ Python tracker <http://bugs.python.org/issue13324> ___ ___ Python-bugs-list mai

[issue13285] signal module ignores external signal changes

2011-11-02 Thread Charles-François Natali
Charles-François Natali added the comment: >> Could it return an opaque wrapper object, rather than just the raw >> address? Something like: > > Are you suggesting that it would return either a Python function object or a > wrapper object? I think it would be an ugly klu

[issue13303] Sporadic importlib failures: FileNotFoundError on os.rename()

2011-11-02 Thread Charles-François Natali
Charles-François Natali added the comment: > So Python starts by removing the .tmp file, but it fails if another > process is already writing into the .tmp file. In this case, we do > nothing, which is not a problem: the other process will create the > file. unlink() does not f

[issue13308] fix test_httpservers failures when run as root

2011-11-03 Thread Charles-François Natali
Charles-François Natali added the comment: > You should change "issue #" with the real issue number now that > there's an issue for this :) Done :-) -- resolution: -> fixed stage: patch review -> committed/reje

[issue13311] asyncore handle_read should call recv

2011-11-03 Thread Charles-François Natali
Charles-François Natali added the comment: > The attached patch adds a call to recv in handle_read, updates the > documentation and adds a test case. In this kind of situation, it is perfectly legitimate for the client to perform a half-duplex close (shutdown(SHUT_WR)), since it do

[issue12498] asyncore.dispatcher_with_send, disconnection problem + miss-conception

2011-11-03 Thread Charles-François Natali
Charles-François Natali added the comment: > The reason is that when TestHandler closes the connection after > writing the output buffer, the client receives a POLLHUP which > prevents it to receive the data since POLLHUP is triggering a call to > handle_close. Yes, that'

[issue13303] Sporadic importlib failures: FileNotFoundError on os.rename()

2011-11-03 Thread Charles-François Natali
Charles-François Natali added the comment: Here's a patch using the '.tmp' suffix. I also updated test_import. Note that the current test_import.test_execute_bit_not_copied is a no-op: """ fname = TESTFN + os.extsep + "py"

[issue11812] transient socket failure to connect to 'localhost'

2011-11-03 Thread Charles-François Natali
Charles-François Natali added the comment: > I explain a reliable method to reproduce this issue on Linux It's a way to reproduce the symptom (i.e. connection refused because you're trying to connect to 127.0.0.2 while the server is listening on 127.0.0.1), but not the cause:

[issue13322] buffered read() and write() does not raise BlockingIOError

2011-11-04 Thread Charles-François Natali
Charles-François Natali added the comment: > This is a hairy issue Indeed. Performing partial read/write may sound imperfect, but using buffered I/O around non-blockind FD is definitely not a good idea. Also, the advantage of the current approach is that at least, no data is ever lost (

[issue13322] buffered read() and write() does not raise BlockingIOError

2011-11-04 Thread Charles-François Natali
Charles-François Natali added the comment: > Apparently, they are specified to, even for blocking streams (which > I find a bit weird, and the language in the docs seems deliberately > vague). """ As an additional convenience, it attempts to read as many bytes as

[issue13311] asyncore handle_read should call recv

2011-11-04 Thread Charles-François Natali
Charles-François Natali added the comment: > Since this patch may break existing valid code, I think it should be > closed as invalid. Yes. Since the benefit is not clear and it may break existing code, it's probably wiser. -- resolution: -> rejected stage: patch revie

[issue13322] buffered read() and write() does not raise BlockingIOError

2011-11-04 Thread Charles-François Natali
Charles-François Natali added the comment: > But then what's the point of using buffered I/O at all? If it can't > offer anything more than raw I/O, I'd rather do something like raise > a RuntimeError("buffered I/O doesn't work with non-blocking streams&qu

[issue13342] input() builtin always uses "strict" error handler

2011-11-04 Thread Charles-François Natali
Charles-François Natali added the comment: > The bugfix itself is quite pedestrian, but the test is more interesting. Indeed. Looks good to me. -- ___ Python tracker <http://bugs.python.org/issu

[issue4489] shutil.rmtree is vulnerable to a symlink attack

2011-11-04 Thread Charles-François Natali
Charles-François Natali added the comment: There's a race: """ --- Lib/shutil.py 2011-11-05 00:11:05.745221315 +0100 +++ Lib/shutil.py.new 2011-11-05 00:11:01.445220324 +0100 @@ -307,6 +307,7 @@ try: mode = os.fstatat(dirfd, name, os.AT_SYMLI

[issue13322] buffered read() and write() does not raise BlockingIOError

2011-11-05 Thread Charles-François Natali
Charles-François Natali added the comment: > write() is a bit simpler, since BlockingIOError has > a "characters_written" attribute which is meant to inform you of the > partial success: we can just reuse that. That said, BlockingIOError > could grow a "partial_rea

[issue7777] Support needed for AF_RDS family

2011-11-05 Thread Charles-François Natali
Charles-François Natali added the comment: So, what do you think of the new patch? -- ___ Python tracker <http://bugs.python.org/issue> ___ ___ Python-bug

[issue12856] tempfile PRNG reuse between parent and child process

2011-11-05 Thread Charles-François Natali
Charles-François Natali added the comment: The patch looks good to me. Note that the whole kill(pid, SIGKILL) looks overkill to me... -- nosy: +neologix ___ Python tracker <http://bugs.python.org/issue12

[issue4489] shutil.rmtree is vulnerable to a symlink attack

2011-11-05 Thread Charles-François Natali
Charles-François Natali added the comment: > FYI, I have a pathlib experiment in > http://hg.python.org/features/pathlib/, with an optional openat-based > accessor. Interesting: I used to think that the current API for dealing with paths was a little too basic and terse. Concer

[issue7777] Support needed for AF_RDS family

2011-11-06 Thread Charles-François Natali
Charles-François Natali added the comment: Here's an updated patch: - address returned by recvfrom() - recv flags (MSG_PEEK) - congestion behavior I've also added a bunch of constants: - all the typical SO_ constants - CMSG flags - RDMA-related options (RDMA is probably one of the m

[issue11812] transient socket failure to connect to 'localhost'

2011-11-08 Thread Charles-François Natali
Charles-François Natali added the comment: > The server thread only waits for 3 seconds for the connection. If a > connection is not created before 3 seconds, the server suicides and when the > connection is tried, it will fail. This probably explain why the problem is > sporad

[issue13303] Sporadic importlib failures: FileNotFoundError on os.rename()

2011-11-10 Thread Charles-François Natali
Changes by Charles-François Natali : -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue13303> ___ ___ Pyth

[issue7777] Support needed for AF_RDS family

2011-11-10 Thread Charles-François Natali
Changes by Charles-François Natali : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.o

[issue13390] Hunt memory allocations in addition to reference leaks

2011-11-15 Thread Charles-François Natali
Charles-François Natali added the comment: > Together with -R, it can help chase those memory leaks which aren't > reference leaks (see c6dafa2e2594). Valgrind does a much better job at this: it will also show you where the leaked blocks were allocated. OTOH, Valgrind is Linux-on

[issue13407] tarfile.getnames misses members again

2011-11-15 Thread Charles-François Natali
Charles-François Natali added the comment: Isn't this a duplicate of issue #1625? -- nosy: +neologix ___ Python tracker <http://bugs.python.org/is

[issue13215] multiprocessing Manager.connect() aggressively retries refused connections

2011-11-15 Thread Charles-François Natali
Charles-François Natali added the comment: Here's a patch removing the automatic retry on ECONNREFUSED: I tested it on Linux and other Unices, and it seems to work just fine without this hammering. Note that there's a similar mechanism for Windows (ERROR_PIPE_BUSY), but it s

[issue13411] Hashable memoryviews

2011-11-17 Thread Charles-François Natali
Charles-François Natali added the comment: I'm not sure that the "register" storage class specifier is still relevant with modern compilers: I'm pretty sure gcc ignores it unless -O0, and I think I've read somewhere Microsoft's compiler ignores it to

[issue13422] Subprocess: children hang due to open pipes

2011-11-17 Thread Charles-François Natali
Charles-François Natali added the comment: > subprocess.Popen.communicate() hangs for daemonized subprocesses that > leave a pipe open. [...] which leaves stderr pipe open. Of course: the daemon process (spawned by the second fork()) inherits the subprocess's stderr (since file

[issue13215] multiprocessing Manager.connect() aggressively retries refused connections

2011-11-17 Thread Charles-François Natali
Charles-François Natali added the comment: > Apparently you forgot to upload the patch... Told you I couldn't think straight :-) -- Added file: http://bugs.python.org/file23720/connection_retry.diff ___ Python tracker <http://bugs

[issue12156] test_multiprocessing.test_notify_all() timeout (1 hour) on FreeBSD 7.2

2011-11-19 Thread Charles-François Natali
Charles-François Natali added the comment: Alright, I got tired of seeing the FreeBSD buildbots consistently choke on test_multiprocessing, so here's a simple patch that skips the test if the OS doesn't support a reasonable number (30) of semaphores. -- keywords: +patch

[issue13215] multiprocessing Manager.connect() aggressively retries refused connections

2011-11-19 Thread Charles-François Natali
Charles-François Natali added the comment: Benjamin, thanks for the report. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue12156] test_multiprocessing.test_notify_all() timeout (1 hour) on FreeBSD 7.2

2011-11-19 Thread Charles-François Natali
Charles-François Natali added the comment: > Testing os.sysconf("SC_SEM_NSEMS_MAX") value is maybe better than > creating 30 semaphores. Yeah, I thought about that, but the problem is that it doesn't take into account the number of semaphores already allocated: so, for

[issue8270] Should socket.PF_PACKET be removed, in favor of socket.AF_PACKET?

2011-11-21 Thread Charles-François Natali
Charles-François Natali added the comment: There are now more protocol families defined (PF_RDS, PF_CAN), etc. Since both AF_ and PF_ are valid (see http://en.wikipedia.org/wiki/Berkeley_sockets#Protocol_and_address_families for more information), and there is so much code out there in the

[issue13156] _PyGILState_Reinit assumes auto thread state will always exist which is not true.

2011-11-22 Thread Charles-François Natali
Charles-François Natali added the comment: Alright, should be fixed now. Graham, thanks for the report! -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue12156] test_multiprocessing.test_notify_all() timeout (1 hour) on FreeBSD 7.2

2011-11-23 Thread Charles-François Natali
Charles-François Natali added the comment: Alright, the test is now skipped when the system doesn't support enough POSIX semaphores. I'm closing, we can still reopen in case another similar problem pops up (on other OS of course). -- resolution: -> fixed stage:

[issue13415] del os.environ[key] ignores errors

2011-11-23 Thread Charles-François Natali
Charles-François Natali added the comment: > Oh, it looks like unsetenv() has no return value on Mac OS X Tiger And neither does FreeBSD < 7: http://python.org/dev/buildbot/all/builders/x86%20FreeBSD%206.4%203.x/builds/2015/steps/compile/logs/stdio Note that ignoring unsetenv() return

[issue12578] Erratic socket.gaierror: [Errno 11004] when using smtplib

2011-11-23 Thread Charles-François Natali
Changes by Charles-François Natali : -- resolution: -> invalid stage: test needed -> committed/rejected status: pending -> closed ___ Python tracker <http://bugs.python.or

[issue13415] del os.environ

2011-11-23 Thread Charles-François Natali
Changes by Charles-François Natali : -- keywords: +needs review stage: -> patch review Added file: http://bugs.python.org/file23764/broken_unsetenv.diff ___ Python tracker <http://bugs.python.org/issu

[issue13422] Subprocess: children hang due to open pipes

2011-11-24 Thread Charles-François Natali
Charles-François Natali added the comment: > The problem I have with the solution that is currently implemented is that > subprocess is waiting for the spawned child although the child is not running > anymore. > In my case this issue occured when invoking samba or the small s

[issue11849] glibc allocator doesn't release all free()ed memory

2011-11-25 Thread Charles-François Natali
Charles-François Natali added the comment: > For the record, this seems to make large allocations slower: > > -> with patch: > $ ./python -m timeit "b'x'*20" > 1 loops, best of 3: 27.2 usec per loop > > -> without patch: > $ ./python

[issue11849] glibc allocator doesn't release all free()ed memory

2011-11-25 Thread Charles-François Natali
Charles-François Natali added the comment: > However, there's still another strange regression: > > $ ./python -m timeit \ > -s "n=30; f=open('10MB.bin', 'rb', buffering=0); b=bytearray(n)" \ > "f.seek(0);f.readinto(b)" >

[issue11849] glibc allocator doesn't release all free()ed memory

2011-11-25 Thread Charles-François Natali
Charles-François Natali added the comment: > Hmm, quite slow indeed, are you sure you're not running in debug mode? > Well, yes, but it's no faster with a non-debug build: my laptop is really crawling :-) > If the performance regression is limited to read(), I don'

[issue13481] Use an accurate clock in timeit

2011-11-26 Thread Charles-François Natali
Charles-François Natali added the comment: _clocks = ['CLOCK_PROCESS_CPUTIME_ID', 'CLOCK_MONOTONIC_RAW', 'CLOCK_MONOTONIC', 'CLOCK_REALTIME'] Beware, we're mixing CPU time and wall-clock time: $ ./python -c "from time import *;

[issue13481] Use an accurate clock in timeit

2011-11-26 Thread Charles-François Natali
Charles-François Natali added the comment: > Indeed. I thought CPU time would be more useful (and that's the point > of the patch) Ah, OK. Then you should probably rename the issue "make timeit measure CPU time", or something like that, because I really thought this is

[issue7111] abort when stderr is closed

2011-11-27 Thread Charles-François Natali
Charles-François Natali added the comment: (No Rietveld link): +is_valid_fd(int fd) [...] +dummy_fd = dup(fd); +if (dummy_fd < 0) +return 0; +close(dummy_fd); Why not use fstat() instead (does Windows have fstat()? And dup()?). +@unittest.skipIf(os.name == 'nt

[issue7111] abort when stderr is closed

2011-11-28 Thread Charles-François Natali
Charles-François Natali added the comment: > Updated patch. > LGTM. -- ___ Python tracker <http://bugs.python.org/issue7111> ___ ___ Python-bugs-list

[issue13093] Redundant code in PyUnicode_EncodeDecimal()

2011-11-28 Thread Charles-François Natali
Charles-François Natali added the comment: A 2.7 OS X buildbot segfaults in test_unicode since 0cd197f13400 : http://www.python.org/dev/buildbot/all/builders/AMD64 Snow Leopard 2 2.7/builds/409/steps/test/logs/stdio """ test_unicode make: *** [buildbottest] Segmentatio

[issue13481] Use an accurate clock in timeit

2011-11-29 Thread Charles-François Natali
Charles-François Natali added the comment: > Are CLOCK_MONOTONIC_RAW, CLOCK_MONOTONIC and CLOCK_REALTIME more accurate > than gettimeofday (time.time)? Actually, on Linux gettimeofday() returns CLOCK_REALTIME. As for CLOCK_MONOTONIC{_RAW}, they're guaranteed not to go backward (N

[issue13502] Documentation for Event.wait return value is either wrong or incomplete

2011-11-29 Thread Charles-François Natali
Charles-François Natali added the comment: > So I'm changing my mind and saying it seems desireable to return True if the > wait succeeded before the timeout's end, even though the flag may have been > reset in the meantime. Agreed. What matters is that the event has been

[issue12612] Valgrind suppressions

2011-12-01 Thread Charles-François Natali
Charles-François Natali added the comment: Could you please provide a diff ? Also, they should probably be commented by default (as other obmalloc-related calls). -- nosy: +neologix ___ Python tracker <http://bugs.python.org/issue12

[issue13390] Hunt memory allocations in addition to reference leaks

2011-12-01 Thread Charles-François Natali
Charles-François Natali added the comment: > If someone finds a way to sanitize Valgrind output, Did you use the valgrind suppression file (Misc/valgrind-python.supp)? If yes, then one could simply use --gen-suppressions=yes to add those spurious warning to the suppression file. > a

[issue13517] readdir() in os.listdir not threadsafe on OSX 10.6.8

2011-12-01 Thread Charles-François Natali
Charles-François Natali added the comment: > Is there any reason to believe that the problem is confined to OS X? It's a bit of a grey area. Here's what POSIX says: http://pubs.opengroup.org/onlinepubs/009695399/functions/readdir.html """ The pointer returned

[issue13517] readdir() in os.listdir not threadsafe on OSX 10.6.8

2011-12-01 Thread Charles-François Natali
Charles-François Natali added the comment: And here's a post by Ulrich Drepper: http://udrepper.livejournal.com/18555.html """ readdir_r is only needed if multiple threads are using the same directory stream. I have yet to see a program where this really is the case. In t

[issue12612] Valgrind suppressions

2011-12-03 Thread Charles-François Natali
Charles-François Natali added the comment: Committed, thanks for the patch! -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue11051] system calls per import

2011-12-05 Thread Charles-François Natali
Charles-François Natali added the comment: Here's a trivial patch reducing the number of calls to open. before: """ $ strace -c -e open ./python -c "" % time seconds usecs/call callserrors syscall -- --- --- - ---

[issue13542] Memory leak in multiprocessing.pool

2011-12-07 Thread Charles-François Natali
Charles-François Natali added the comment: It's a duplicate of #12157. -- nosy: +neologix resolution: -> duplicate stage: needs patch -> committed/rejected status: open -> closed superseder: -> join method of multiprocessing Pool object hangs if iterable argume

[issue11051] system calls per import

2011-12-07 Thread Charles-François Natali
Charles-François Natali added the comment: > I would have appreciated had you considered my review before pushing > that change. Sorry, I didn't receive an email notification for your review, so I didn't know you had done one. I&

[issue13502] Documentation for Event.wait return value is either wrong or incomplete

2011-12-07 Thread Charles-François Natali
Charles-François Natali added the comment: Here's a patch. -- keywords: +patch Added file: http://bugs.python.org/file23866/event_wait_cleared.diff ___ Python tracker <http://bugs.python.org/issue13502>

[issue13453] Tests and network timeouts

2011-12-07 Thread Charles-François Natali
Charles-François Natali added the comment: > URLError: resolution> For this one, we should probably add EAI_FAIL to support.transient_internet. -- keywords: +patch nosy: +neologix Added file: http://bugs.python.org/file23867/transien

[issue11870] test_3_join_in_forked_from_thread() of test_threading hangs 1 hour on "x86 Ubuntu Shared 3.x"

2011-12-07 Thread Charles-François Natali
Charles-François Natali added the comment: To debug this, we should probably make use of faulthandler (but not dump_tracebacks_later, since it creates a new thread). The way to go could be to make the parent process send a fatal signal to the child process if the latter takes too long to

[issue13502] Documentation for Event.wait return value is either wrong or incomplete

2011-12-07 Thread Charles-François Natali
Charles-François Natali added the comment: > This seems to imply that if the current thread previously set the event, > the wait will return False, which is contradicted by the 'so' statement > (which appears to be correct). You're probably referring to the &q

[issue13555] cPickle MemoryError when loading large file (while pickle works)

2011-12-08 Thread Charles-François Natali
Charles-François Natali added the comment: > my computer has 122GB free RAM 122, or 1.22? > Well, replace cPickle by pickle and it works. cPickle makes some direct call to malloc()/realloc()/free(), contrarily to pickle which uses pymalloc. This could lead to heap fragmentation. Wha

[issue13453] Tests and network timeouts

2011-12-10 Thread Charles-François Natali
Changes by Charles-François Natali : -- nosy: +pitrou ___ Python tracker <http://bugs.python.org/issue13453> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10408] Denser dicts and linear probing

2011-12-10 Thread Charles-François Natali
Charles-François Natali added the comment: This paper might be of interest: http://www.siam.org/meetings/alenex05/papers/13gheileman.pdf Basically, it concludes that most of the time, there's no speedup to be gained from the increased cached locality incurred by linear probing when the

[issue11870] test_3_join_in_forked_from_thread() of test_threading hangs 1 hour on "x86 Ubuntu Shared 3.x"

2011-12-10 Thread Charles-François Natali
Charles-François Natali added the comment: Here's a patch to help nail this down. -- Added file: http://bugs.python.org/file23896/debug_stuck.diff ___ Python tracker <http://bugs.python.org/is

[issue13502] Documentation for Event.wait return value is either wrong or incomplete

2011-12-10 Thread Charles-François Natali
Charles-François Natali added the comment: Thanks, here's a patch updated accordingly. -- Added file: http://bugs.python.org/file23897/event_wait_cleared-1.diff ___ Python tracker <http://bugs.python.org/is

[issue13453] Tests and network timeouts

2011-12-10 Thread Charles-François Natali
Charles-François Natali added the comment: The test_poplib failures are likely due to this obvious race: """ def setUp(self): [...] threading.Thread(target=self.server, args=(self.evt,self.sock)).start() time.sleep(.1) [...] def server(

[issue13453] Tests and network timeouts

2011-12-10 Thread Charles-François Natali
Charles-François Natali added the comment: And I assume that the test_telnetlib failure on the OpenIndiana buildbot is due to a broken name resolution service, as in issue #11812. Here's a patch bumping the timeout to 60s, which should be enough to resolve "localhost"... --

[issue13405] Add DTrace probes

2011-12-12 Thread Charles-François Natali
Charles-François Natali added the comment: > Alan, I would open a new issue tracking this one and posting a patch there, > if I were you. > > Previous DTRACE attempts failed because trying to make everybody happy. I > don't want to repeat the mistake. > Sorry, b

[issue13555] cPickle MemoryError when loading large file (while pickle works)

2011-12-12 Thread Charles-François Natali
Charles-François Natali added the comment: @Antoine Couldn't this be linked to #11564 (pickle not 64-bit ready)? AFAICT this wasn't fixed in 2.7. Basically, an integer overflow, and malloc() would bail out when asked a ridiculous size. @Philipp I'd be curious to see th

[issue13555] cPickle MemoryError when loading large file (while pickle works)

2011-12-12 Thread Charles-François Natali
Charles-François Natali added the comment: @Antoine Couldn't this be linked to #11564 (pickle not 64-bit ready)? Basically, an integer overflow, and malloc() would bail out when asked a ridiculous size. AFAICT this wasn't fixed in 2.7. @Philipp I'd be curious to see th

[issue13555] cPickle MemoryError when loading large file (while pickle works)

2011-12-12 Thread Charles-François Natali
Changes by Charles-François Natali : -- Removed message: http://bugs.python.org/msg149321 ___ Python tracker <http://bugs.python.org/issue13555> ___ ___ Python-bug

[issue4028] Problem compiling the multiprocessing module on sunos5

2011-12-14 Thread Charles-François Natali
Charles-François Natali added the comment: Thanks Craig. -- resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: -Python 3.1 ___ Python tracker <http://bugs.python.o

[issue11886] test_time.test_tzset() fails on "x86 FreeBSD 7.2 3.x": AEST timezone called "EST"

2011-12-14 Thread Charles-François Natali
Charles-François Natali added the comment: Another failure on a 2.7 FreeBSD buildbot: """ test test_time failed -- Traceback (most recent call last): File "/usr/home/db3l/buildarea/2.7.bolen-freebsd7/build/Lib/test/test_time.py", line 193, in test_tzset self

<    1   2   3   4   5   6   7   8   9   10   >