From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:2.1.9 commit in: pym/_emerge/
Date: Mon, 14 Mar 2011 16:24:44 +0000 (UTC) [thread overview]
Message-ID: <157382fae7b4b4c74a6f7ce319c602c269cc7e96.zmedico@gentoo> (raw)
commit: 157382fae7b4b4c74a6f7ce319c602c269cc7e96
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 10 05:46:17 2011 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Mar 14 16:23:10 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=157382fa
AbstractPollTask: log exceptional events
Previously, when AbstractPollTask receives a POLLERR or POLLNVAL event,
it would silently cancel the task. Now it will generate a message like
this:
!!! SpawnProcess received strange poll event: 8
The message is displayed via a new _log_poll_exception method, which
is overridden by AbstractEbuildProcess to log the message via elog.
This might help diagnose reported cases of SIGTERM signals killing
ebuild processes for no apparent reason:
http://code.google.com/p/chromium-os/issues/detail?id=12968
---
pym/_emerge/AbstractEbuildProcess.py | 5 +++++
pym/_emerge/AbstractPollTask.py | 11 ++++++++++-
2 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/pym/_emerge/AbstractEbuildProcess.py b/pym/_emerge/AbstractEbuildProcess.py
index 601aafe..d7f31be 100644
--- a/pym/_emerge/AbstractEbuildProcess.py
+++ b/pym/_emerge/AbstractEbuildProcess.py
@@ -228,6 +228,11 @@ class AbstractEbuildProcess(SpawnProcess):
self.scheduler.output(msg,
log_path=self.settings.get("PORTAGE_LOG_FILE"))
+ def _log_poll_exception(self, event):
+ self._elog("eerror",
+ ["%s received strange poll event: %s\n" % \
+ (self.__class__.__name__, event,)])
+
def _set_returncode(self, wait_retval):
SpawnProcess._set_returncode(self, wait_retval)
diff --git a/pym/_emerge/AbstractPollTask.py b/pym/_emerge/AbstractPollTask.py
index 833ee3b..6cbf984 100644
--- a/pym/_emerge/AbstractPollTask.py
+++ b/pym/_emerge/AbstractPollTask.py
@@ -1,8 +1,10 @@
-# Copyright 1999-2010 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
import array
+import logging
+from portage.util import writemsg_level
from _emerge.AsynchronousTask import AsynchronousTask
from _emerge.PollConstants import PollConstants
class AbstractPollTask(AsynchronousTask):
@@ -39,9 +41,16 @@ class AbstractPollTask(AsynchronousTask):
def _unregister(self):
raise NotImplementedError(self)
+ def _log_poll_exception(self, event):
+ writemsg_level(
+ "!!! %s received strange poll event: %s\n" % \
+ (self.__class__.__name__, event,),
+ level=logging.ERROR, noiselevel=-1)
+
def _unregister_if_appropriate(self, event):
if self._registered:
if event & self._exceptional_events:
+ self._log_poll_exception(event)
self._unregister()
self.cancel()
elif event & PollConstants.POLLHUP:
next reply other threads:[~2011-03-14 16:25 UTC|newest]
Thread overview: 136+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-14 16:24 Zac Medico [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-05-27 3:36 [gentoo-commits] proj/portage:2.1.9 commit in: pym/_emerge/ Zac Medico
2011-05-27 1:26 Zac Medico
2011-05-27 0:40 Zac Medico
2011-05-26 22:34 Zac Medico
2011-05-26 21:37 Zac Medico
2011-05-26 13:04 Zac Medico
2011-05-26 12:52 Zac Medico
2011-05-26 12:26 Zac Medico
2011-05-26 12:05 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-12 5:24 Zac Medico
2011-05-12 5:24 Zac Medico
2011-05-12 5:24 Zac Medico
2011-05-12 5:24 Zac Medico
2011-05-12 5:24 Zac Medico
2011-05-12 5:24 Zac Medico
2011-05-12 5:24 Zac Medico
2011-05-12 5:24 Zac Medico
2011-05-08 20:50 Zac Medico
2011-05-08 20:50 Zac Medico
2011-05-08 20:50 Zac Medico
2011-05-08 20:50 Zac Medico
2011-05-08 20:50 Zac Medico
2011-05-05 18:12 Zac Medico
2011-05-05 16:01 Zac Medico
2011-05-04 20:03 Zac Medico
2011-05-04 20:03 Zac Medico
2011-05-04 20:03 Zac Medico
2011-05-04 20:03 Zac Medico
2011-05-04 20:03 Zac Medico
2011-05-04 20:03 Zac Medico
2011-05-04 20:03 Zac Medico
2011-05-04 20:03 Zac Medico
2011-05-04 20:03 Zac Medico
2011-05-04 20:03 Zac Medico
2011-05-04 20:03 Zac Medico
2011-05-04 20:03 Zac Medico
2011-05-04 20:03 Zac Medico
2011-05-04 20:03 Zac Medico
2011-04-13 7:52 Zac Medico
2011-04-13 7:52 Zac Medico
2011-04-13 7:52 Zac Medico
2011-04-13 7:52 Zac Medico
2011-03-26 19:31 Zac Medico
2011-03-26 19:31 Zac Medico
2011-03-26 19:31 Zac Medico
2011-03-26 19:31 Zac Medico
2011-03-26 19:31 Zac Medico
2011-03-26 19:31 Zac Medico
2011-03-26 19:31 Zac Medico
2011-03-26 19:31 Zac Medico
2011-03-26 19:31 Zac Medico
2011-03-26 19:31 Zac Medico
2011-03-26 19:31 Zac Medico
2011-03-18 21:12 Zac Medico
2011-03-18 21:12 Zac Medico
2011-03-18 21:12 Zac Medico
2011-03-18 21:12 Zac Medico
2011-03-18 21:12 Zac Medico
2011-03-18 21:12 Zac Medico
2011-03-18 21:12 Zac Medico
2011-03-18 21:12 Zac Medico
2011-03-18 21:12 Zac Medico
2011-03-18 21:12 Zac Medico
2011-03-14 16:24 Zac Medico
2011-03-14 16:24 Zac Medico
2011-03-14 16:24 Zac Medico
2011-03-14 16:24 Zac Medico
2011-03-14 16:24 Zac Medico
2011-03-14 16:24 Zac Medico
2011-03-14 16:24 Zac Medico
2011-03-01 21:54 Zac Medico
2011-03-01 20:55 Zac Medico
2011-03-01 20:55 Zac Medico
2011-03-01 20:55 Zac Medico
2011-02-22 17:41 Zac Medico
2011-02-22 3:16 Zac Medico
2011-02-22 3:14 Zac Medico
2011-02-22 3:14 Zac Medico
2011-02-22 3:14 Zac Medico
2011-02-22 3:14 Zac Medico
2011-02-22 3:14 Zac Medico
2011-02-22 3:14 Zac Medico
2011-02-20 0:04 Zac Medico
2011-02-20 0:04 Zac Medico
2011-02-20 0:04 Zac Medico
2011-02-20 0:04 Zac Medico
2011-02-20 0:04 Zac Medico
2011-02-20 0:04 Zac Medico
2011-02-14 17:02 Zac Medico
2011-02-14 16:45 Zac Medico
2011-02-14 16:35 Zac Medico
2011-02-14 16:04 Zac Medico
2011-02-14 7:49 Zac Medico
2011-02-14 7:49 Zac Medico
2011-02-14 7:49 Zac Medico
2011-02-14 7:49 Zac Medico
2011-02-14 7:49 Zac Medico
2011-02-14 5:04 Zac Medico
2011-02-14 4:31 Zac Medico
2011-02-14 4:31 Zac Medico
2011-02-14 4:31 Zac Medico
2011-02-14 4:31 Zac Medico
2011-02-14 4:31 Zac Medico
2011-02-08 20:48 Zac Medico
2011-02-05 3:37 Zac Medico
2011-02-04 17:47 zmedico
2011-02-04 15:57 zmedico
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=157382fae7b4b4c74a6f7ce319c602c269cc7e96.zmedico@gentoo \
--to=zmedico@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox