Richard Oudkerk added the comment:
> Good for me. This is a very nice addition!
Thanks.
I do see a couple of failed assertions on Windows which presumably happen in a
child process because they do not cause a failure:
Assertion failed: !collecting, file ..\Modules\gcmodule.c, line 1
Richard Oudkerk added the comment:
Do you mean you want to use a pure python implementation on Unix?
Then you would have to deal with AF_UNIX (which is the default family for
socketpair() currently). A pure python implementation which deals with AF_UNIX
would have to temporarily create a
Richard Oudkerk added the comment:
> I could submit the part that makes it possible to customize the picklers
> of multiprocessing.pool.Pool instance to the standard library if people
> are interested.
2.7 and 3.3 are in bugfix mode now, so they will not change.
In 3.3 you can do
Richard Oudkerk added the comment:
Adding the line
features[0][0]
to the end of main() produces a segfault for me on Linux.
The FAQ for sqlite3 says that
Under Unix, you should not carry an open SQLite database across a
fork() system call into the child process. Problems will
Richard Oudkerk added the comment:
On 21/08/2013 3:46pm, Charles-François Natali wrote:
> Another, probably cleaner way would be to finally add the atfork()
> module (issue #16500), and register this reseed hook (which could then
> be implemented in ssl.py).
Wouldn't that still s
Changes by Richard Oudkerk :
--
resolution: -> duplicate
stage: -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Richard Oudkerk added the comment:
Hopefully this is fixed now.
--
resolution: -> fixed
stage: -> committed/rejected
status: open -> closed
type: -> behavior
___
Python tracker
<http://bugs.python
Richard Oudkerk added the comment:
Yes I will remove it. I was planning on doing so when PEP 446 was implemented.
--
___
Python tracker
<http://bugs.python.org/issue18
Richard Oudkerk added the comment:
The PPC64 buildbot is still failing intermittently.
--
resolution: invalid ->
status: closed -> open
___
Python tracker
<http://bugs.python.org/i
Changes by Richard Oudkerk :
--
resolution: -> fixed
stage: -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Richard Oudkerk added the comment:
It looks like the main process keeps getting killed by SIGUSR1. Don't know why.
--
___
Python tracker
<http://bugs.python.org/is
Richard Oudkerk added the comment:
> If the _killer process takes too long to start, it won't send SIGUSR1
> before the p process returns...
Thanks!
--
___
Python tracker
<http://bugs.python.
Richard Oudkerk added the comment:
It should be fixed now so I will close.
--
resolution: -> fixed
stage: -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Richard Oudkerk added the comment:
Try using Popen(..., bufsize=0).
--
nosy: +sbt
___
Python tracker
<http://bugs.python.org/issue18868>
___
___
Python-bugs-list m
Richard Oudkerk added the comment:
> I've seen test_multiprocessing_forkserver giving warnings too, while
> running the whole test suite, but can't reproduce them while running it
> alone. The warnings seems quite similar though, so a single fix might
> resolve the prob
Richard Oudkerk added the comment:
On 05/09/2013 9:28am, Charles-François Natali wrote:
> As a side note, in the general case, there's more than a performance
> optimization: the problem with unregister() + register() vs a real
> modify (e.g. EPOLL_CTL_MOD) is that it'
Richard Oudkerk added the comment:
LGTM.
But I would move "import selectors" in multiprocessing.connection to just
before the definition of wait() for Unix. It is not needed on Windows and
unnecessary imports slow down start up of new
Richard Oudkerk added the comment:
I remember wondering at one time why EPOLLNVAL did not exist, and realizing
that closed fds are just silently unregistered by epoll().
I guess the issue is that some of the selectors indicate a bad fd on
registration, and others do it when polled
Richard Oudkerk added the comment:
With the current patch __repr__() will fail if the untransformed key is
unhashable:
>>> d = collections.transformdict(id)
>>> L = [1,2,3]
>>> d[L] = None
>>> d.keys()
Traceback (most recent call last):
File "&quo
Richard Oudkerk added the comment:
With your patch, I think if you call get_start_method() without later calling
set_start_method() then the helper process(es) will never be started.
With the current code, popen.Popen() automatically starts the helper processes
if they have not already been
Richard Oudkerk added the comment:
> In my patched version, the private popen.get_start_method gets a kwarg
> set_if_needed=True. popen.Popen calls that as before, so its behavior
> should not change, while the public get_start_method sets the kwarg to
> False.
Richard Oudkerk added the comment:
By "context" I did not really mean a context manager. I just meant an object
(possibly a singleton or module) which implements the same interface as
multiprocessing.
(However, it may be a good idea to also make it a context manager whose
__enter_
Richard Oudkerk added the comment:
> I don't think _DummyThread can override __stop(), because of the name
> mangling of __private methods. However, the hasattr() approach would
> probably work.
Wouldn't a _DummyThread._Thread__stop() method override Thread.__stop()? Like
Richard Oudkerk added the comment:
Shouldn't test___closure__() also test what happens when the closure is
replaced with None, or a tuple which is too long or too short or contains
non-cell objects?
All of these things seem to be checked when you create a new function
Richard Oudkerk added the comment:
The patch causes crashes. If I define
def cell(o):
def f(): o
return f.__closure__[0]
def f():
a = 1
b = 2
def g():
return a + b
return g
g = f()
then I find
g.__closure__ = None; g
Richard Oudkerk added the comment:
This patch adds a ResourceSharer.stop() method. This is called from
tearDownClass() in the unittest.
--
keywords: +patch
Added file: http://bugs.python.org/file25357/mp_resource_sharer_stop.patch
___
Python
Richard Oudkerk added the comment:
New version of patch which does
signal.pthread_sigmask(signal.SIG_BLOCK, range(1, signal.NSIG))
in the thread (is that right?).
It also uses a timeout when trying to join the thread.
--
Added file: http://bugs.python.org/file25361
Richard Oudkerk added the comment:
Warning added to patch.
--
Added file: http://bugs.python.org/file25362/mp_resource_sharer_stop.patch
___
Python tracker
<http://bugs.python.org/issue14
Richard Oudkerk added the comment:
Version of patch which checks invariants in the setter and adds tests.
--
Added file:
http://bugs.python.org/file25363/writable_closure_with_checking.patch
___
Python tracker
<http://bugs.python.org/issue14
Richard Oudkerk added the comment:
> the errno codes (EAGAIN etc) are provided only as a compatibility for
> posix apps that test "errno". On windows, we use the WSA return values
> from the api functions and WsaGetLastError().
> ...
> So, the proposed patch is n
Richard Oudkerk added the comment:
New patch which adds timeout to ResourceSharer.stop() which defaults to 0.
When stop() fails it now uses the logger.
pthread_sigmask() only stops this background thread from receiving signals.
Signals will still be delivered to other threads, so it should
Richard Oudkerk added the comment:
> This doesn't change that, and as far as I know, this has worked and
> continues to work. "errno" is supported.
Using your patch, does the following throw an AssertionError?
>>> import os, errno
>>> try:
...
Richard Oudkerk added the comment:
I can't work out what is wrong here.
The code does not to account for a partial read of the message from the socket.
The attached patch fixes that, but it does not address the cause of this
failure.
--
keywords: +patch
Added file:
Richard Oudkerk added the comment:
The problems with error numbers seem to be caused by the addition of a new
section in errno.h:
/* POSIX SUPPLEMENT */
#define EADDRINUSE 100
#define EADDRNOTAVAIL 101
...
#define ETXTBSY 139
#define EWOULDBLOCK 140
Of these the only ones
Richard Oudkerk added the comment:
According to http://msdn.microsoft.com/en-us/library/5814770t.aspx the
"supported" errno values in VS2010 are
E2BIG EACCES EAGAIN EBADF ECHILD EDEADLOCK EDOM EEXIST EILSEQ
EINVAL EMFILE ENOENT ENOEXEC ENOMEM ENOSPC ERANGE EXDEV STRUNCATE
Richard Oudkerk added the comment:
There are plenty of other "bad" exception classes apart from
CalledProcessError, including TimeoutExpired in the same file. In fact I
suspect this is true of the majority of the exception classes in the stdlib
which override __init__. So I am no
Richard Oudkerk added the comment:
I have backported the fix for issue #9244 to 2.7. This should fix the hang and
produce a traceback containing a representation of the original error.
--
___
Python tracker
<http://bugs.python.org/issue9
Richard Oudkerk added the comment:
bba131e48852 causes crashes on Windows.
The attached patch fixes the crash and makes test_os pass for me.
However, using "PyErr_ExceptionMatches(PyExc_RuntimeError)" to check whether to
try again using narrow strings is ug
Richard Oudkerk added the comment:
> TBH I don't understand why it should crash, and therefore how your patch
> helps. Trying again using narrow strings should always work; indeed, the
> code did that before I touched it. Can you describe how it crashes?
The important part o
Richard Oudkerk added the comment:
Without the check for RuntimeError
os.utime("foo", times=(5,5), ns=(5,5))
raises
TypeError("TypeError: 'str' does not support the buffer interface")
because we have fallen through to the narrow path. The correct err
Richard Oudkerk added the comment:
> Let me recap, just to make sure I have it straight. There are two errors
> on Windows:
That's right. The patch looks good and passes for me on Windows.
--
___
Python tracker
<http://b
Richard Oudkerk added the comment:
There is another problem causing a fatal error in test_posix on Unix.
The attached patch fixes it: *ua->path should be decrefed not ua->path.
--
Added file: http://bugs.python.org/file25452/utime_read_time_arguments
Richard Oudkerk added the comment:
> Looks good to me. You're a core contributor, yes? If not let me know and
> I'll commit it.
I will commit.
> Though I must admit I'm baffled how I haven't seen that crash. I've run
> the unit tests a zillion t
Richard Oudkerk added the comment:
> I'm developing on Linux (64-bit) in case that helps.
I tested it on 32 bit Linux.
I have committed it, but I forgot to put the issue number in the commit message.
--
___
Python tracker
<http://bugs
Richard Oudkerk added the comment:
The documentation page for ConnectNamedPipe
(http://msdn.microsoft.com/en-us/library/windows/desktop/aa365146(v=vs.85).aspx)
has a "community addition" which says that ConnectNamedPipe will appear to
fail with ERROR_NO_DATA (232) if a client has
New submission from Richard Oudkerk :
In version 3.2 and earlier, Process.join() and Connection.poll() treat negative
timeouts as zero timeouts. (Thread.join() does the same.)
In the current 3.3 version, they treat negative timeouts as infinite timeouts.
Also multiprocessing.connection.wait
Richard Oudkerk added the comment:
> I've recently started seeing this failure repeatably on Linux (Ubuntu
> Jaunty):
The test is newly enabled. Does "repeatably" mean you always get the failure?
I have not seen any failures o
Changes by Richard Oudkerk :
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue14725>
___
___
Python-bugs-list
Richard Oudkerk added the comment:
I found a race where a connection attempt could happen before the listening
socket's listen() method was called.
Vinay, could you update and try again please.
--
___
Python tracker
<http://bugs.py
Changes by Richard Oudkerk :
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Richard Oudkerk added the comment:
> - the function generating the flags should be exported (with a private
> name), so that it can be reused by Lib/test/[test_]support.py. Duplicate
> code is error-prone, especially when enumerating command-line flags,
> attribute names...
Fail
Richard Oudkerk added the comment:
> > Failure to build _multiprocessing will mean that multiprocessing cannot
> > be imported. So if the function goes somewhere in multiprocessing then
> > it makes running the test suite with multiple processes dependent on th
Richard Oudkerk added the comment:
PCbuild/build.bat and Modules/_decimal/tests/runall.bat still use vcbuild
instead of msbuild.
It also seems that if an external dependency is unavailable then msbuild can
fail to build targets which do not depend on it. For instance if I rename
openssl
Richard Oudkerk added the comment:
I think the note for communicate() just means that you might get MemoryError
(or some other exception) if the output is too big. But I agree it is
ambiguous.
communicate() uses select() on Unix and threads on Windows, so deadlocks should
not be possible
Changes by Richard Oudkerk :
--
nosy: +sbt
___
Python tracker
<http://bugs.python.org/issue14881>
___
___
Python-bugs-list mailing list
Unsubscribe:
Richard Oudkerk added the comment:
Comments on Josiah's patch:
* It uses pywin32 for PeekNamedPipe -- this is now available from _winapi.
* I don't think send(), recv() and recv_exact() will work correctly if
buffering is used -- an error should be raised in this case.
* I
Richard Oudkerk added the comment:
Personally, I would factor out the code for Popen.communicate() in to a
Communicator class which wraps a Popen object and has a method
communicate(input, timeout=None) -> (bytes_written, output, error)
On Windows this would use threads, and on U
Richard Oudkerk added the comment:
> (1) Good catch. I suspect that this could be mitigated even if we cared
> about LinuxThreads. I haven't looked, but there's got to be a way to
> determine if we are a thread or a fork child.
Using a generation count would probably work
Richard Oudkerk added the comment:
> How would this differ from the normal communicate()?
It would block until one of the following occurs:
* some data has been written to stdin,
* some data has been read from stdout or stderr, or
* timeout passes (if timeout is not None).
The nor
Changes by Richard Oudkerk :
--
resolution: -> fixed
stage: -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Changes by Richard Oudkerk :
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.o
Richard Oudkerk added the comment:
Without more information I will close this.
--
resolution: -> invalid
stage: -> committed/rejected
status: open -> pending
___
Python tracker
<http://bugs.python.or
Richard Oudkerk added the comment:
I'll, remember that in future;-)
Closing.
--
resolution: -> fixed
stage: -> committed/rejected
status: open -> closed
type: crash -> behavior
___
Python tracker
<http://bugs.p
Changes by Richard Oudkerk :
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Changes by Richard Oudkerk :
--
resolution: -> fixed
stage: commit review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Richard Oudkerk added the comment:
The patch was applied to 3.x branch in 0aa8af79359d and partially backported to
2.7 in 26bbff4562a7 - see #9400.
I will close.
--
nosy: +sbt
resolution: -> fixed
stage: -> committed/rejected
status: open -&g
Richard Oudkerk added the comment:
This is a duplicate of #9244 and #9400 which have been fixed by wrapping
unpicklable exceptions in picklable exceptions.
The larger issue of many exception classes being unpicklable, is dealt with in
#1692335.
--
resolution: -> duplicate
st
Changes by Richard Oudkerk :
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue13751>
___
___
Python-bugs-list mailing list
Unsubscri
Richard Oudkerk added the comment:
_eintr_retry was removed by 99ef4501205b.
--
resolution: -> out of date
stage: -> committed/rejected
status: open -> closed
type: -> behavior
___
Python tracker
<http://bugs.python
Richard Oudkerk added the comment:
> RawValue uses ctypes, right? That's problematic for platforms which don't
> support ctypes.
Are there many posix systems (we care about) where ctypes doesn't work?
It would be fairly easy to use memoryview instead of ctypes. (In
Changes by Richard Oudkerk :
--
nosy: +sbt
___
Python tracker
<http://bugs.python.org/issue13797>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Richard Oudkerk :
The attached patch makes memoryview objects weakrefable.
The reason I would like them to be weakrefable is so that I can manage the
finalization and pickling of memoryview objects which wrap shared mmap segments.
(It would be even better if memoryview
Richard Oudkerk added the comment:
New patch.
--
Added file: http://bugs.python.org/file25742/memoryview-weakref.patch
___
Python tracker
<http://bugs.python.org/issue14
Richard Oudkerk added the comment:
> In the test, you should call gc.collect() so that it works on non-
> reference counted implementations.
I did think about using gc.collect(), but I was not sure whether it was
guaranteed to collect everything possible if you only call it only onc
Richard Oudkerk added the comment:
Updated patch.
--
Added file: http://bugs.python.org/file25744/memoryview-weakref.patch
___
Python tracker
<http://bugs.python.org/issue14
Changes by Richard Oudkerk :
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Richard Oudkerk added the comment:
It seems the real issue here is that buffer objects are picklable (depending on
protocol) but the resulting string is not unpicklable.
There are probably lots of other examples where this happens: for instance
Exception subclasses which do not set self.args
New submission from Richard Oudkerk :
The attached patch enables creation of shared objects allocated from shared
memory using memoryview objects instead of ctypes.
This enables the use of shared memory on systems where ctypes is unavailable.
The new functions/classes RawArray, RawValue
Richard Oudkerk added the comment:
> > Is there any particular reason not to merge Charles-François's
> > reinit_locks.diff?
> >
> > Reinitialising all locks to unlocked after a fork seems the only sane
> > option.
>
> I agree with this.
> I haven
Richard Oudkerk added the comment:
Attached is an updated version of Charles-François's reinit_locks.diff.
Changes:
* Handles RLock by assuming that if self->count != 0 when we acquire
the lock, then the lock must have been reinitialized by
PyThread_ReInitLocks().
* Applies exist
Richard Oudkerk added the comment:
> a) fork() is called with the DB lock held by thread1.
> b) Some time passes before the child gets to exec().
> c) In that time, the child's thread2 gets to doWork().
> d) Simultaneously, the parent's doWork is still running and holdi
Richard Oudkerk added the comment:
> conn = MySQLConn()
> start_thread1(conn)
> start_thread2(conn):
> while True:
>if os.fork() == 0: # child
> raise Exception('doom') # triggers destructor
There is no guarantee here that the lock will be held at the
Richard Oudkerk added the comment:
I don't think there is anything special about PriorityQueue.
There is a similar concerning the use of the Python implementation of RLock in
signal handlers -- see http://bugs.python.org/issue13697.
Maybe the signal handler should temporarily mask or i
Richard Oudkerk added the comment:
Lesha, the problems about "magical" __del__ methods you are worried about
actually have nothing to do with threading and locks. Even in a single
threaded program using fork, exactly the same issues of potential corruption
would be present b
Richard Oudkerk added the comment:
The Windows buildbots were failing compilation.
I've added Object/namespaceobject.c and Include/namespaceobject.h to
PCbuild/pythoncore.vcxproj in changeset ee7cd7d51ed6.
--
nosy: +sbt
___
Python tracker
Richard Oudkerk added the comment:
The attached patch uses memoryview instead of ctypes.
If the patch for Issue #14953 (reimplementing RawArray/RawValue in terms of
memoryview) is applied, then it could be simplified a bit.
--
Added file: http://bugs.python.org/file25835
Richard Oudkerk added the comment:
The warning no longer appears for the 3.x branch. I think it was changeset
e54adf13e7a6 which only modified the test suite.
I don't think it is worth backporting to 3.2.
--
nosy: +sbt
resolution: -> fixed
stage: needs patch -> committ
Changes by Richard Oudkerk :
--
nosy: +sbt
___
Python tracker
<http://bugs.python.org/issue13854>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Richard Oudkerk :
--
nosy: +sbt
___
Python tracker
<http://bugs.python.org/issue12157>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Richard Oudkerk :
--
nosy: +sbt
___
Python tracker
<http://bugs.python.org/issue10037>
___
___
Python-bugs-list mailing list
Unsubscribe:
Richard Oudkerk added the comment:
It is not clear to me how to reproduce the bug.
When you say "letting the workers terminate themselves" do mean calling
sys.exit() or os._exit() in the submitted task? Are you trying to get the
result of a task which caused the worker to exit
Richard Oudkerk added the comment:
> I think this issue can be closed, the worker handler is simply borked and
> we could open up a new issue deciding how to fix it (merging billiard.Pool
> or someting else).
OK. I am not sure which option under "Resolution" should
Richard Oudkerk added the comment:
> Ah, a working 'fork server' would be just as good.
Only problem is that it depends on fd passing which is apparently broken on
MacOSX.
> Btw, Billiard now supports running Pool without threads, using
> epoll/kqueue/select instead.
Changes by Richard Oudkerk :
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Changes by Richard Oudkerk :
--
resolution: -> fixed
stage: -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Richard Oudkerk added the comment:
If you want lazy operation then you should use imap(f, it[, chunksize]) rather
than using map_async(f, it).
This will return an iterator rather than a list. Also, the iterator's next()
method has a timeout argument. (chunksize is the number of items
Changes by Richard Oudkerk :
--
resolution: -> out of date
stage: -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.o
Richard Oudkerk added the comment:
As long as you don't pass the arguments on to Process.__init__() when you call
it there should be no problem.
The following program works, but will fail with RuntimeError if you uncomment
the comment line:
from multiprocessing import Process
Richard Oudkerk added the comment:
One issue with sys.exit() is that it only makes the current thread exit.
Even when called in the main thread, the program will wait for non-daemon
threads to finish. A closer equivalent to terminate() would be
os.kill(os.getpid(), signal.SIGTERM).
The
Changes by Richard Oudkerk :
--
nosy: +sbt
___
Python tracker
<http://bugs.python.org/issue10133>
___
___
Python-bugs-list mailing list
Unsubscribe:
101 - 200 of 737 matches
Mail list logo