[issue13817] deadlock in subprocess while running several threads using Popen

2012-01-28 Thread Charles-François Natali
Charles-François Natali added the comment: And here's the test. To sum up: - reinit_tls.diff makes sure to call PyThread_ReInitTLS() at the beginning of PyOS_AfterFork(), so that the TLS API is usable within PyOS_AfterFork() (e.g. in _after_fork()). It would be applied to 3.2 and de

[issue13872] socket.detach doesn't mark socket._closed

2012-01-29 Thread Charles-François Natali
Changes by Charles-François Natali : -- nosy: +pitrou ___ Python tracker <http://bugs.python.org/issue13872> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue6774] socket.shutdown documentation: on some platforms, closing one half closes the other half

2012-01-29 Thread Charles-François Natali
Charles-François Natali added the comment: I've reverted the commit. -- resolution: -> rejected stage: -> committed/rejected status: open -> closed versions: +Python 3.3 ___ Python tracker <http://bugs.pyt

[issue13734] Add a generic directory walker method to avoid symlink attacks

2012-01-31 Thread Charles-François Natali
Charles-François Natali added the comment: > Given that, flistdir() and fwalk() seem like the most consistent choices of > name for APIs that aren't directly > matching an underlying POSIX function name. Well, that seems OK for me. I guess the only reason fdlistdir() is nam

[issue13734] Add a generic directory walker method to avoid symlink attacks

2012-01-31 Thread Charles-François Natali
Charles-François Natali added the comment: It's to mimic os.walk()'s behavior: http://hg.python.org/cpython/file/bf31815548c9/Lib/os.py#l268 -- ___ Python tracker <http://bugs.python.o

[issue13817] deadlock in subprocess while running several threads using Popen

2012-01-31 Thread Charles-François Natali
Changes by Charles-François Natali : -- stage: patch review -> commit review ___ Python tracker <http://bugs.python.org/issue13817> ___ ___ Python-bugs-list mai

[issue13734] Add a generic directory walker method to avoid symlink attacks

2012-01-31 Thread Charles-François Natali
Charles-François Natali added the comment: Here are two new versions, both addressing Antoine's and Nick's comments: - fwalk-3.diff is just an updated version - fwalk-single_fd.diff doesn't use more than 2 FDs to walk a directory tree, instead of the depth of directory tree. It&

[issue13734] Add a generic directory walker method to avoid symlink attacks

2012-02-01 Thread Charles-François Natali
Charles-François Natali added the comment: > I think the O(depth) version is fine. The O(1) version is quite more > complicated, difficult to follow, and it seems less robust (it doesn't > use try/finally and therefore might leak fds if the generator isn't > exhausted

[issue13817] deadlock in subprocess while running several threads using Popen

2012-02-01 Thread Charles-François Natali
Charles-François Natali added the comment: I thought about this a bit more, and I realized that a slight variation of this bug also affects 2.7, and also older versions (i.e. before _PyGILState_Reinit() was introduced), because any code that gets called from PyOS_AfterFork() and uses the TLS

[issue13817] deadlock in subprocess while running several threads using Popen

2012-02-02 Thread Charles-François Natali
Charles-François Natali added the comment: Committed. Christoph, thanks for the report. -- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue13937] multiprocessing.ThreadPool.join() blocks indefinitely.

2012-02-04 Thread Charles-François Natali
Charles-François Natali added the comment: It's a duplicate of issue #12157. -- nosy: +neologix resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> join method of multiprocessing Pool object hangs if iterable argument of

[issue8184] multiprocessing.managers will not fail if listening ocket already in use

2012-02-04 Thread Charles-François Natali
Charles-François Natali added the comment: > Well it would probably be closed when the connection object is > destroyed, but the patch looks ok anyway. Let's be nice with those non refcount-based implementations out there :-) What do you think of the patch attached (connection_mult

[issue13806] Audioop decompression frames size check fix

2012-02-04 Thread Charles-François Natali
Charles-François Natali added the comment: This broke a sparc buildbot: """ == FAIL: test_alaw2lin (test.test_audioop.TestAudioop) -- Traceba

[issue13878] test_sched failures on Windows buildbot

2012-02-04 Thread Charles-François Natali
Charles-François Natali added the comment: """ for x in [0.05, 0.04, 0.03, 0.02, 0.01]: z = scheduler.enter(x, 1, fun, (x,)) """ Since the test uses relative times, if the process is preempted more than 0.01s between two calls to enter (or if the clock goes

[issue13734] Add a generic directory walker method to avoid symlink attacks

2012-02-05 Thread Charles-François Natali
Charles-François Natali added the comment: Committed, thanks for the comments. Note to myself (and others that might be interested in the O(1)) version): we can't simply call openat(dirfd, "..", O_RDONLY) to re-open the current directory's file descriptor after having walk

[issue12410] Create a new helper function that enable to test that an operation don't hang more than a given timeout.

2012-02-05 Thread Charles-François Natali
Charles-François Natali added the comment: Closing, since it's hard to write correctly, and apparently not that useful. -- resolution: -> rejected stage: -> committed/rejected status: open -> closed ___ Python tracker <http:

[issue1975] signals not always delivered to main thread, since other threads have the signal unmasked

2012-02-05 Thread Charles-François Natali
Charles-François Natali added the comment: Closing (see http://bugs.python.org/msg149904 and http://bugs.python.org/msg149909). -- assignee: docs@python -> resolution: -> rejected stage: patch review -> committed/rejected status: open -> closed versions: -Python 2.7

[issue8184] multiprocessing.managers will not fail if listening ocket already in use

2012-02-05 Thread Charles-François Natali
Charles-François Natali added the comment: > However, let me point out the following sentence: > “Ports without SO_EXCLUSIVEADDRUSE set may be reused as soon as the socket on > which bind was previously called is closed.” > > ...which seems to suggest we shouldn't us

[issue8184] multiprocessing.managers will not fail if listening ocket already in use

2012-02-05 Thread Charles-François Natali
Charles-François Natali added the comment: > I think you read it wrong. Duh, I managed to misread both the comment and the code :-) What my subconscious refused to admit is the fact that on Windows, SO_REUSEADDR allows you to bind to any port - even though the other application didn&#x

[issue13878] test_sched failures on Windows buildbot

2012-02-06 Thread Charles-François Natali
Charles-François Natali added the comment: Here's another failure due to the same type of race: """ == FAIL: test_queue (test

[issue13841] multiprocessing should use sys.exit() where possible

2012-02-08 Thread Charles-François Natali
Charles-François Natali added the comment: Here's a trivial patch. I run the testsuite on one of the Windows buildbots, and there was one failure, in test_concurrent_futures: """ == FAIL: test_

[issue8184] multiprocessing.managers will not fail if listening ocket already in use

2012-02-09 Thread Charles-François Natali
Charles-François Natali added the comment: Committed to default. I won't backport it to other branches, since it's more of a feature request than a bug fix. -- resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Pyt

[issue13961] Have importlib use os.replace()

2012-02-09 Thread Charles-François Natali
Changes by Charles-François Natali : -- keywords: +needs review, patch stage: -> patch review Added file: http://bugs.python.org/file24468/importlib_replace.diff ___ Python tracker <http://bugs.python.org/issu

[issue13961] Have importlib use os.replace()

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

[issue13978] OSError exception in multiprocessing module when using os.remove() on NFS

2012-02-10 Thread Charles-François Natali
Charles-François Natali added the comment: """ OSError: [Errno 16] Device or resource busy: '/nfs/tmp/pymp-f7R9S6/.nfse039692f0236' """ That's because the temporary directory is removed while a file inside is still open. And tha

[issue13992] Segfault in PyTrash_destroy_chain

2012-02-11 Thread Charles-François Natali
Charles-François Natali added the comment: The crash occurs in an oject's destructor. Are you using any third-party module (lsof/pmap can help)? Also, it'd help if you tried reproducing the crash with a debug build (./configure --with-pydebug && make).

[issue13992] Segfault in PyTrash_destroy_chain

2012-02-12 Thread Charles-François Natali
Charles-François Natali added the comment: > Possibly a double free? > (gdb) p *op > $5 = {_ob_next = 0x0, _ob_prev = 0x0, ob_refcnt = 0, ob_type = 0x3c6d9f0} > It indeed looks like a double free (see the previous and next pointers have already been set to NULL). Could you chec

[issue13992] Segfault in PyTrash_destroy_chain

2012-02-13 Thread Charles-François Natali
Charles-François Natali added the comment: (I'm adding Antoine to the noisy list). You could maybe try building with '--without-pymalloc', and run under valgrind (--suppressions=Misc/valgrind-python.supp), see http://hg.python.org/cpython/file/6653328a02d0/Misc/

[issue13992] Segfault in PyTrash_destroy_chain

2012-02-13 Thread Charles-François Natali
Charles-François Natali added the comment: > Unfortunately, my application is running so slow under valgrind that > behavior is changing, namely the sockets are all timing out. Did you see any invalid read/write? By the way, a google search returned me this: https://github.com/pa

[issue14001] Python v2.7.2 / v3.2.2 (SimpleXMLRPCServer): DoS (excessive CPU usage) by processing malformed XMLRPC / HTTP POST request

2012-02-13 Thread Charles-François Natali
Charles-François Natali added the comment: SimpleXMLRPCRequestHandler.do_POST() is simply looping on EOF. The patch attached fixes this (the server doesn't seem to generate an error in response to this partial request though). -- keywords: +patch nosy: +neologix Added file:

[issue13992] Segfault in PyTrash_destroy_chain

2012-02-14 Thread Charles-François Natali
Charles-François Natali added the comment: I'm running out of ideas to debug this, maybe Antoine or Amaury can help :-) One last idea (not sure it will work though): If Channel's finalizer gets called twice, inside Channel.__del__, you could save a string representation of t

[issue14001] CVE-2012-0845 Python v2.7.2 / v3.2.2 (SimpleXMLRPCServer): DoS (excessive CPU usage) by processing malformed XMLRPC / HTTP POST request

2012-02-14 Thread Charles-François Natali
Charles-François Natali added the comment: With test. test_xmlrpc has a timeout detection code which is simply broken (and it's actually documented): I just removed it, so if the server loops, the test will block. I think it's acceptable since other tests behave in the same way,

[issue13878] test_sched failures on Windows buildbot

2012-02-14 Thread Charles-François Natali
Charles-François Natali added the comment: Well, it's not really needed, as long as scheduler deals correctly with expired deadlines. -- ___ Python tracker <http://bugs.python.org/is

[issue14001] CVE-2012-0845 Python v2.7.2 / v3.2.2 (SimpleXMLRPCServer): DoS (excessive CPU usage) by processing malformed XMLRPC / HTTP POST request

2012-02-15 Thread Charles-François Natali
Charles-François Natali added the comment: The test fails on 2.6 and 2.7, because of a EPIPE, which is normal in this case (well, at least expected): """ test_partial_post (test.test_xmlrpc.SimpleServerTestCase) ... Exception happened du

[issue13961] Have importlib use os.replace()

2012-02-16 Thread Charles-François Natali
Changes by Charles-François Natali : -- stage: patch review -> commit review ___ Python tracker <http://bugs.python.org/issue13961> ___ ___ Python-bugs-list mai

[issue13878] test_sched failures on Windows buildbot

2012-02-16 Thread Charles-François Natali
Charles-François Natali added the comment: Should be fixed now, thanks. -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue13978] OSError exception in multiprocessing module when using os.remove() on NFS

2012-02-18 Thread Charles-François Natali
Charles-François Natali added the comment: I'm closing, since the manager should be shutdown (and TMPDIR on NFS isn't a good idea). -- resolution: -> invalid stage: -> committed/rejected status: open -> closed type: crash -> behavior

[issue11051] system calls per import

2012-02-18 Thread Charles-François Natali
Charles-François Natali added the comment: As noted by Antoine somewhere else (don't remember if it was on the bug tracker or mailing list), most of the startup time is due to site import: """ cf@neobox:~/python/cpython$ time ./python -c '' [44249 refs] real

[issue14001] CVE-2012-0845 Python v2.7.2 / v3.2.2 (SimpleXMLRPCServer): DoS (excessive CPU usage) by processing malformed XMLRPC / HTTP POST request

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

[issue13090] test_multiprocessing: memory leaks

2012-02-19 Thread Charles-François Natali
Charles-François Natali added the comment: > Two others seem to be the internal "bootstate" structure used to > run thread objects (daemon threads?). Even for daemon threads, since the boostate structure is freed when the thread's run() method returns, this shouldn'

[issue14059] Implement multiprocessing.Barrier

2012-02-20 Thread Charles-François Natali
Charles-François Natali added the comment: > Here is an initial implementation. Wouldn't it be simpler with a mp.Condition? Otherwise, this should be added to Lib/multiprocesing.synchronize.py, and the tests to test_multiprocessing. -- nosy: +

[issue14077] sporadic test_multiprocessing failure

2012-02-21 Thread Charles-François Natali
Charles-François Natali added the comment: > I am proposing the following patch to have a better unique > filename: It's unneeded, O_EXCL ensures the file won't be corrupted. It's actually a regression introduced by de6703671386. My bad. Here's a patch. -- k

[issue14077] sporadic test_multiprocessing failure

2012-02-21 Thread Charles-François Natali
Charles-François Natali added the comment: > But is there still a reason to use id(path) then? IIRC, the reason is to avoid having a stale pyc file indefinitely in case of crash: if we always used, let's say, path + '.tmp', if the process crashes before the rename, then all s

[issue14077] sporadic test_multiprocessing failure

2012-02-21 Thread Charles-François Natali
Charles-François Natali added the comment: > But that will also fail if id(path) happens to be fairly > deterministic Well, if you always get the same id(path), then yes, but I really doubt it, especially with CPython where it's the object's address (I guess there's the

[issue14077] sporadic test_multiprocessing failure

2012-02-22 Thread Charles-François Natali
Charles-François Natali added the comment: I've committed the fix. As for improving the randomness of the temporary file name, I'm not against it (I'm just not convinced it's necessary). -- resolution: -> fixed stage: commit review -> committed/rejec

[issue13873] SIGBUS in test_big_buffer() of test_zlib on Debian bigmem buildbot

2012-02-23 Thread Charles-François Natali
Charles-François Natali added the comment: """ File "/var/tmpfs/martin.vonloewis/3.x.loewis-parallel2/build/Lib/test/test_zlib.py", line 96 in test_big_buffer """ The SIGBUS could be due to the buildbot running o

[issue13873] SIGBUS in test_big_buffer() of test_zlib on Debian bigmem buildbot

2012-02-23 Thread Charles-François Natali
Charles-François Natali added the comment: > but maybe it's due to something specific about the configuration of the > buildbot > machine? Maybe you didn't try with a large enough file. Here's a trial on my box: """ $ df -h /tmp/ Filesystem

[issue14087] multiprocessing.Condition.wait_for missing

2012-02-23 Thread Charles-François Natali
Charles-François Natali added the comment: In test/test_multiprocessing.py: """ def test_waitfor(self): [...] with cond: result = cond.wait_for(lambda : state.value==0) self.assertTrue(result) self.assertEqual(state.value, 0)

[issue14082] shutil doesn't copy extended attributes

2012-02-25 Thread Charles-François Natali
Charles-François Natali added the comment: I'm also in favor of adding extended attributes to copy2: """ Similar to shutil.copy(), but metadata is copied as well """ extended attributes are metadata. And there a

[issue6085] Logging in BaseHTTPServer.BaseHTTPRequestHandler causes lag

2012-02-25 Thread Charles-François Natali
Charles-François Natali added the comment: > +1 to Antoine’s proposal of removal. Agreed. Here's a patch. Do note, however, that it's a behavior change: the address_string() method is documented to return a resolved hostname (when possible). -- keywords: +needs revie

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

2012-02-25 Thread Charles-François Natali
Charles-François Natali added the comment: > - os.realpath() uses canonicalize_file_name() if available, or use > realpath() with a buffer of MAXPATHLEN bytes MAXPATHLEN is not necessarily defined (e.g. on the Hurd): if it's not defined, it is set either to MAX_PATH (if it&#

[issue14107] Debian bigmem buildbot hanging in test_bigmem

2012-02-26 Thread Charles-François Natali
Charles-François Natali added the comment: """ Thread 0x2ba588709700: File "/var/tmpfs/martin.vonloewis/3.x.loewis-parallel2/build/Lib/test/support.py", line 1168 in consumer File "/var/tmpfs/martin.vonloewis/3.x.loewis-parallel2/build/Lib/threadin

[issue14107] Debian bigmem buildbot hanging in test_bigmem

2012-02-26 Thread Charles-François Natali
Charles-François Natali added the comment: > 1. IIUC, the goal of the watchdog thread is to collect memory > consumption in a timely manner: that's now the case, but since the > information is printed in a standard thread, it doesn't bring any improvement > (because

[issue14107] Debian bigmem buildbot hanging in test_bigmem

2012-02-26 Thread Charles-François Natali
Charles-François Natali added the comment: > I think my original plan was to put it in non-blocking mode, but I > must have forgotten in the end. Here's a patch. > I can't think of any drawback off the top of my head, so that sounds > reasonable. I'll try to wr

[issue14138] Ctrl-C does not terminate GTK3 Gtk.main() loop when program run from command line

2012-02-26 Thread Charles-François Natali
Charles-François Natali added the comment: > The behaviour under Gtk.main() should be changed to respond to the > KeyboardInterrupt. Well, you should report that to (Py)GTK folks then :-) Either they set up a SIGINT handler, or they catch the KeyboardInterrupt exception, but that&#

[issue14137] GTK3 Segmentation fault from Warning: g_object_notify: assertion `G_IS_OBJECT (object)' failed

2012-02-26 Thread Charles-François Natali
Charles-François Natali added the comment: @Narnie This is the Python bug tracker, not the PyGTK one. You should report your problems on the PyGTK/GTK bug tracker. Thanks. -- nosy: +neologix resolution: -> invalid stage: -> committed/rejected status: open -&g

[issue14107] Debian bigmem buildbot hanging in test_bigmem

2012-02-27 Thread Charles-François Natali
Charles-François Natali added the comment: test_bigmem now passes on the buildbot: http://python.org/dev/buildbot/all/builders/AMD64%20debian%20bigmem%203.x/builds/149/steps/test/logs/stdio -- ___ Python tracker <http://bugs.python.org/issue14

[issue14107] Debian bigmem buildbot hanging in test_bigmem

2012-02-27 Thread Charles-François Natali
Changes by Charles-François Natali : -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue14131] test_threading failure on WIndows 7 3.x buildbot

2012-02-27 Thread Charles-François Natali
Charles-François Natali added the comment: Does Windows still have its once per day/week/whatever time synchronization, or does it use a proper NTP client? Because this offset is way too large for a broken RTC lock, so it might simply be some process adjusting the clock behind our back

[issue12905] multiple errors in test_socket on OpenBSD

2012-02-27 Thread Charles-François Natali
Charles-François Natali added the comment: > I think we could close this bug because it's du to the pthread library > on OpenBSD and not Python. Indeed. -- resolution: -> invalid stage: -> committed/rejected type: -> behavior __

[issue12903] test_io.test_interrupte[r]d* blocks on OpenBSD

2012-02-27 Thread Charles-François Natali
Changes by Charles-François Natali : -- resolution: -> invalid stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue12905] multiple errors in test_socket on OpenBSD

2012-02-28 Thread Charles-François Natali
Changes by Charles-François Natali : -- status: open -> closed ___ Python tracker <http://bugs.python.org/issue12905> ___ ___ Python-bugs-list mailing list Un

[issue14154] reimplement the bigmem test memory watchdog as a subprocess

2012-02-28 Thread Charles-François Natali
New submission from Charles-François Natali : As suggested in http://bugs.python.org/msg154330, here's a rewrite of the test memory watchdog using subprocess instead of thread + faulthandler. -- components: Tests files: mem_watchdog_subprocess.diff keywords: needs review,

[issue14154] reimplement the bigmem test memory watchdog as a subprocess

2012-02-29 Thread Charles-François Natali
Charles-François Natali added the comment: > + f = open(self.procfile, 'r') > > 'rb' mode is enough here, no need of Unicode ;-) Why? At least to me, 'r' stands for text I/O, whereas 'rb' stands for binary I/O: here, I want to read /proc//statm

[issue14222] Using time.time() in Queue.get breaks when system time is changed

2012-03-14 Thread Charles-François Natali
Charles-François Natali added the comment: Random thoughts: - as noted by Antoine, it probably affects a lot of code throughout the standard library - sem_timedwait() (used by lock.acquire() on POSIX) is affected (the implementation using a condition variable could use pthread_condattr_setclock

[issue14296] Compilation error on CentOS 5.8

2012-03-19 Thread Charles-François Natali
Changes by Charles-François Natali : -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue14228] It is impossible to catch sigint on startup in python code

2012-03-19 Thread Charles-François Natali
Charles-François Natali added the comment: I must be missing something, but I fail to see the problem here. Basically, when SIGINT is received before the user code is run, it's caught by the default handler which prints a traceback and exits. What's wrong with that? Not catching SI

[issue14154] reimplement the bigmem test memory watchdog as a subprocess

2012-03-19 Thread Charles-François Natali
Charles-François Natali added the comment: Here's a new version, with a dedicated script for the watchdog process. -- Added file: http://bugs.python.org/file24950/mem_watchdog_1.diff ___ Python tracker <http://bugs.python.org/is

[issue14370] list.extend() called on an iterator of the list itself leads to an infinite loop

2012-03-20 Thread Charles-François Natali
Charles-François Natali added the comment: I think you're simply running OOM, and Linux is thrashing to death. If you wait long enough, the process should get nuked by the OOM killer (well, in theory). What happens if you disable swap altogether ('swapoff -a')? You can also c

[issue14228] It is impossible to catch sigint on startup in python code

2012-03-20 Thread Charles-François Natali
Charles-François Natali added the comment: > for everybody who is not *programming* python (imagine there is a *real* > user) the tracebacks are useless. Even worse, because the error messages are > *changing*, because of different library parts not catching the exception. Well, I

[issue14228] It is impossible to catch sigint on startup in python code

2012-03-20 Thread Charles-François Natali
Charles-François Natali added the comment: > Or we could change Py_InitializeEx() to setup the signal handlers > after having imported the site module: Note that I don't really like this solution, because it's better to setup handlers for fatal signals (SIGPIPE, SIGXF...)

[issue14154] reimplement the bigmem test memory watchdog as a subprocess

2012-03-20 Thread Charles-François Natali
Charles-François Natali added the comment: Here's a patch flushing stdout explicitely (should not be necessay unless the watchdog crashes, but...). Also, redirect stderr to /dev/null. -- Added file: http://bugs.python.org/file24974/mem_watchdog_2

[issue14229] On KeyboardInterrupt, the exit code should mirror the signal number

2012-03-20 Thread Charles-François Natali
Charles-François Natali added the comment: I agree with Martin: we really do handle the signal, and as such, the only way to convey the relevant information to the parent as to which signal caused the exit would be to re-raise it, which is really ugly and probably not a good idea. Processes

[issue14229] On KeyboardInterrupt, the exit code should mirror the signal number

2012-03-20 Thread Charles-François Natali
Charles-François Natali added the comment: >> I agree with Martin: we really do handle the signal, and as such, the >> only way to convey the relevant information to the parent as to which >> signal caused the exit would be to re-raise it, which is really ugly >> and

[issue14228] It is impossible to catch sigint on startup in python code

2012-03-23 Thread Charles-François Natali
Charles-François Natali added the comment: > In any case, I'd appreciate, if cpython would be changed to something more > sane/less verbose by default. By default, certainly not. -- ___ Python tracker <http://bugs.python.

[issue13902] Sporadic test_threading failure on FreeBSD 6.4 buildbot

2012-03-24 Thread Charles-François Natali
Charles-François Natali added the comment: And here's the full message: """ == FAIL: test_6_daemon_threads (test.test_threading.

[issue14154] reimplement the bigmem test memory watchdog as a subprocess

2012-03-24 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.or

[issue10050] urllib.request still has old 2.x urllib primitives

2012-03-25 Thread Charles-François Natali
Charles-François Natali added the comment: Since eab274c7d456, all the buildbots are randomly failing, e.g. """ == FAIL: test_method_deprecations (test.test_urllib2.Open

[issue13902] Sporadic test_threading failure on FreeBSD 6.4 buildbot

2012-03-25 Thread Charles-François Natali
Charles-François Natali added the comment: Should be fixed now. -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue14396] Popen wait() doesn't handle spurious wakeups

2012-03-25 Thread Charles-François Natali
Charles-François Natali added the comment: > I'm working on figuring out the exact conditions under which it > happens and creating a harness. I'll post it when I've got it. Please do so, because I'm quite skeptical about waitpid() returning 0 without WNOHANG. If y

[issue14404] multiprocessing with maxtasksperchild: bug in control logic?

2012-03-26 Thread Charles-François Natali
Charles-François Natali added the comment: > Sorry if I missed something, didn't RTFM etc. You didn't: it's a duplicate of #10332 (which has already been fixed). -- nosy: +neologix resolution: -> duplicate stage: -> committed/rejected status: o

[issue14087] multiprocessing.Condition.wait_for missing

2012-03-26 Thread Charles-François Natali
Changes by Charles-François Natali : -- nosy: +pitrou stage: -> commit review ___ Python tracker <http://bugs.python.org/issue14087> ___ ___ Python-bugs-lis

[issue14428] Implementation of the PEP 418

2012-03-28 Thread Charles-François Natali
Charles-François Natali added the comment: Tiny review. Two more details: - since it's relatively straightforward to cache the last value returned using a static variable, it might be interesting to use this to make sure that the values returned are indeed monotonic - I'm no

[issue14433] Python 3 interpreter crash with memoryview and os.fdopen

2012-03-28 Thread Charles-François Natali
Charles-François Natali added the comment: Hello, This has actually nothing to do with memoryview: """ >>> import os [67212 refs] >>> stdin = os.fdopen(0) [67234 refs] >>> del stdin __main__:1: ResourceWarning: unclosed file <_io.TextIOWrapper n

[issue8799] Hang in lib/test/test_threading.py

2012-04-10 Thread Charles-François Natali
Charles-François Natali added the comment: >> The Condition variables are canonically prone to "spurious wakeups" >> and "stolen wakeups". > > No, they aren't. Just because POSIX says they are doesn't mean *our* > condition variables are the

[issue8799] Hang in lib/test/test_threading.py

2012-04-10 Thread Charles-François Natali
Charles-François Natali added the comment: > I'm proposing the following changes to the threading docs. Most of them are > cleanups and small improvements, but I also rewrote the offending paragraph, > and made the wait_for example more proeminent. Lo

[issue14532] multiprocessing module performs a time-dependent hmac comparison

2012-04-10 Thread Charles-François Natali
Charles-François Natali added the comment: > Therefore the expected digest changes each time. Exactly. Timing attacks (which aren't really new :-) depend on a constant digest to successively determine the characters composing the digest. Here, that won't work, because the d

[issue14540] Crash in Modules/_ctypes/libffi/src/dlmalloc.c on ia64-hp-hpux11.31

2012-04-10 Thread Charles-François Natali
Charles-François Natali added the comment: This stack trace is strange. Is it really the python binary? Anyway, if it's segfaulting inside dlmalloc, there's probably not much we can do. Actually, I wonder why we still ship it... -- nosy: +neolog

[issue14532] multiprocessing module performs a time-dependent hmac comparison

2012-04-11 Thread Charles-François Natali
Changes by Charles-François Natali : -- nosy: +haypo status: open -> ___ Python tracker <http://bugs.python.org/issue14532> ___ ___ Python-bugs-list mai

[issue14532] multiprocessing module performs a time-dependent hmac comparison

2012-04-11 Thread Charles-François Natali
Changes by Charles-François Natali : -- status: -> open ___ Python tracker <http://bugs.python.org/issue14532> ___ ___ Python-bugs-list mailing list Unsubscri

[issue14532] multiprocessing module performs a time-dependent hmac comparison

2012-04-11 Thread Charles-François Natali
Charles-François Natali added the comment: > if response == digest: > can be replaced by: >    if sum(x^y for x, y in itertools.zip_longest(response, digest, > fillvalue=256)) == 0: Yeah, sure, but is it useful at all? The digest changes at every connection attempt, so this s

[issue8799] Hang in lib/test/test_threading.py

2012-04-11 Thread Charles-François Natali
Charles-François Natali added the comment: [...] > Disagreed. Unit tests should definitely protect against the introduction > of bugs (willingly or not). And unpredictable behaviour is usually > considered a bug. > > If you think the condition variable specification should be cha

[issue14532] multiprocessing module performs a time-dependent hmac comparison

2012-04-11 Thread Charles-François Natali
Charles-François Natali added the comment: I don't see the point of obfuscating the code to avoid a vulnerability to which the code is not even vulnerable, just so that it can be used as example... There are *thousands* of ways to introduce security flaws, and the Python code base if

[issue14532] multiprocessing module performs a time-dependent hmac comparison

2012-04-11 Thread Charles-François Natali
Charles-François Natali added the comment: > You call it obfuscating, I call it security correctness and developer > education. Tomayto, tomahto. ;-) Well, I'd be prompt to changing to a more robust digest check algorithm if the current one had a flaw, but AFAICT, it's not t

[issue14532] multiprocessing module performs a time-dependent hmac comparison

2012-04-11 Thread Charles-François Natali
Charles-François Natali added the comment: > Given that this issue has affected a lot of security-sensitive third-party > code (keyczar, openid providers, almost every python web service that > implements "secure cookies" [1] or other HMAC-based REST API signatures), I &g

[issue8799] Hang in lib/test/test_threading.py

2012-04-11 Thread Charles-François Natali
Charles-François Natali added the comment: > Ok, doc improved in 9d4109af8f3b. LGTM. Kristján, how about updating your patch to only fix the original problem you spotted (notify() called before wait()), then we can see the remaining pa

[issue14540] Crash in Modules/_ctypes/libffi/src/dlmalloc.c on ia64-hp-hpux11.31

2012-04-11 Thread Charles-François Natali
Charles-François Natali added the comment: > I think it's bundled with our copy of libffi. i'm not familiar - at all - with libffi. But does it really need a bundled malloc() implementation? > I'd be more than happy to use my own installation of libffi instead, but i

[issue14548] garbage collection just after multiprocessing's fork causes exceptions

2012-04-11 Thread Charles-François Natali
Charles-François Natali added the comment: Hmm... I don't really like disabling GC, because it has a process-wide side effect, and hence isn't thread-safe: if another thread forks() or creates a subprocess right at the wrong time, it could end up with the GC disable

[issue14548] garbage collection just after multiprocessing's fork causes exceptions

2012-04-12 Thread Charles-François Natali
Charles-François Natali added the comment: >> That's a problem indeed. Perhaps we need a global "fork lock" shared >> between subprocess and multiprocessing? > > I did an atfork patch which included a (recursive) fork lock.  See > >    http://bugs.py

[issue14557] HP-UX libraries not included

2012-04-12 Thread Charles-François Natali
Charles-François Natali added the comment: Hello Adi, Thanks for your patch. Just a detail: """ if platform == 'hp-ux11': lib_dirs += ['/usr/lib/hpux64', '/usr/lib/hpux32'] """ Wouldn't

<    3   4   5   6   7   8   9   10   11   12   >