| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
KeyError observed from WeakValueDictionary.pop() with PyPy 1.8,
despite None given as default. Note that PyPy 1.8 has the same
WeakValueDictionary code as CPython 2.7, so it may be possible for
CPython to raise KeyError here as well.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
These cases should have been included with commit
6a94a074aa0475173a51f3f726377d4c407e986b.
|
|
|
|
|
| |
These checks should be irrelevant, since the cancel() method is never
called on anything that hasn't been started already.
|
|
|
|
|
|
| |
IO event handlers may be re-entrant, in case something like
AbstractPollTask._wait_loop(), needs to be called inside a handler for
some reason.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If we close all open file descriptors after a fork, with PyPy 1.8 it
triggers "[Errno 9] Bad file descriptor" later in the subprocess.
Apparently it is holding references to file descriptors and closing
them after they've already been closed and re-opened for other
purposes. As a workaround, we don't close the file descriptors, so
that they won't be re-used and therefore we won't be vulnerable to this
kind of interference.
The obvious caveat of not closing the fds is that the subprocess can
hold locks that belonged to the parent process, even after the parent
process has released the locks. Hopefully this won't be a major problem
though, since the subprocess has to exit at release the lock
eventually, when the EbuildFetcher or _MergeProcess task is complete.
|
|
|
|
|
|
|
| |
Silently handle EINTR, which is normal when we have received a signal
such as SIGINT. Also, raise StopIteration in order to break out of our
current iteration and respond appropriately to the signal as soon as
possible.
|
|
|
|
|
|
| |
Synchronous waiting for status is not supported, since it would be
vulnerable to hitting the recursion limit when a large number of tasks
need to be terminated simultaneously, like in bug #402335.
|
|
|
|
|
|
|
| |
This fixes infinite loops triggered by Ctrl-C, where timeout calls
would exhaust the poll event queue because _poll was not re-entrant.
Now, re-entrance is only prohibited for individual callback functions,
in order to protect against infinite recursion.
|
|
|
|
| |
See https://bugs.pypy.org/issue833 for details.
|
|
|
|
|
|
| |
The corresponding hashlib issues are fixed in PyPy 1.8:
https://bugs.pypy.org/issue957
|
|
|
|
|
|
|
|
|
| |
This fixes a regression in termination signal handling since commit
8c1fcf5a9ba9fa4d406a4d0cc284fe73a84f5a63, which cause termination
signals to be ignored until a running job had exited. This regression
is not really noticeable for Ctrl-C handling, since in that case the
SIGINT propagets to subprocesses, causing them to exit and trigger a
_schedule() call whichtriggers a termination check.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Regenerate metadata for given cpv in each repository.
|
| |
|
| |
|
|
|
|
| |
The _keep_scheduling() template method is used instead.
|
|
|
|
|
|
|
|
| |
Raising StopIteration doesn't work with GlibEventLoop, since it catches
all exceptions and logs them. So, just use a boolean expression to
terminate the while loop. This depends on commit
dcb9fab8463996542d06d29bc383f5933bf0d677 so that IpcDaemonTestCase
timeouts work correctly with both EventLoop and GlibEventLoop.
|
|
|
|
|
|
|
|
|
| |
This fixes EventLoop.iteration() so that it doesn't poll too long when
there are timeouts registered, since it's not nice to spend a long time
polling for an IO event that might never arrive even though a timeout
may have changed some state that would terminate a timeout loop like
in QueueScheduler.run() or AbstractPollTask._wait_loop(). This makes
EventLoop.iteration() behave more like GlibEventLoop.iteration().
|
|
|
|
|
| |
This has been broken since commit
93b654199a32fc3df1299b030317720b9294b0c3.
|
|
|
|
|
|
| |
As suggested here:
http://archives.gentoo.org/gentoo-dev/msg_06a47ad55977f4d16bfe18769c6c38b8.xml
|
| |
|
| |
|
|
|
|
|
| |
The way we don't leave an leak a reference to the Scheduler instance
in the global EventLoop instance.
|
|
|
|
|
|
|
|
| |
This is needed since commit 7a6c34cc6bd6eb20a97e05347f87a0157f4ae58a in
order to ensure that the build dir is unlocked before exit listeners
are called. It fixes failures in catalyst stage 1 builds where two
instances of the same package, built sequentially for separate roots,
interfere with eachother's build dir lock.
|
| |
|
|
|
|
|
|
| |
It's conceivable the constants could be implementation dependent, so
use glib's generic IO_* names rather than the POLL* names which are
associated specifically with python's select.poll object.
|
| |
|
|
|
|
|
|
| |
This causes all PollScheduler instances within a given process to share
a singleton EventLoop instance, and also makes it possible to swap in
glib's main loop for all portage event loops in the main process.
|
|
|
|
|
|
| |
This should fix a Scheduler hang which is triggered when that merge
queue, a SequentialTaskQueue, doesn't decrement its merge count until
after other exit listeners have already run.
|
|
|
|
|
| |
Use a StopIteration exception to jump out of EventLoop.iterate()
before the poll loop.
|
|
|
|
| |
This caused emerge to consume 100% cpu.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
We can use iteration() instead, and _poll_loop's exit behavior doesn't
seem practical to emulate with glib.MainLoop.
|