Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 258490 Details for
Bug 350139
sys-apps/portage-2.1.9.26 emerge freezes w. pure-ftpd binhost
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
add timeout when closing binhost connection
binhost_timeout.patch (text/plain), 1.57 KB, created by
Zac Medico
on 2010-12-31 08:55:53 UTC
(
hide
)
Description:
add timeout when closing binhost connection
Filename:
MIME Type:
Creator:
Zac Medico
Created:
2010-12-31 08:55:53 UTC
Size:
1.57 KB
patch
obsolete
>From 514bcc3aeea4d6086c270ad97599bd539b9e6ad0 Mon Sep 17 00:00:00 2001 >From: Zac Medico <zmedico@gentoo.org> >Date: Fri, 31 Dec 2010 00:51:24 -0800 >Subject: [PATCH] bintree: add timeout for closing binhost conn > >Hopefully this solves bug #350139. >--- > pym/portage/dbapi/bintree.py | 15 +++++++++++++-- > 1 files changed, 13 insertions(+), 2 deletions(-) > >diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py >index d1c1e2a..68d6845 100644 >--- a/pym/portage/dbapi/bintree.py >+++ b/pym/portage/dbapi/bintree.py >@@ -23,7 +23,7 @@ from portage.cache.mappings import slot_dict_class > from portage.const import CACHE_PATH > from portage.dbapi.virtual import fakedbapi > from portage.dep import Atom, use_reduce, paren_enclose >-from portage.exception import InvalidPackageName, \ >+from portage.exception import AlarmSignal, InvalidPackageName, \ > PermissionDenied, PortageException > from portage.localization import _ > from portage import _movefile >@@ -806,7 +806,18 @@ class binarytree(object): > rmt_idx.readBody(f_dec) > pkgindex = rmt_idx > finally: >- f.close() >+ # Timeout after 5 seconds, in case close() blocks >+ # indefinitely (see bug #350139). >+ try: >+ try: >+ AlarmSignal.register(5) >+ f.close() >+ finally: >+ AlarmSignal.unregister() >+ except AlarmSignal: >+ writemsg("\n\n!!! %s\n" % \ >+ _("Timed out while closing connection to binhost"), >+ noiselevel=-1) > except EnvironmentError as e: > writemsg(_("\n\n!!! Error fetching binhost package" \ > " info from '%s'\n") % base_url) >-- >1.7.3.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 350139
:
258487
| 258490 |
258492
|
258493
|
258496
|
258497
|
258504