Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 703907 Details for
Bug 916562
'createrepo -v' deadlocks on large repositories
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Threaded version of patch
createrepo-deadlock.patch (text/plain), 3.43 KB, created by
Anders Blomdell
on 2013-02-28 14:15:05 UTC
(
hide
)
Description:
Threaded version of patch
Filename:
MIME Type:
Creator:
Anders Blomdell
Created:
2013-02-28 14:15:05 UTC
Size:
3.43 KB
patch
obsolete
>--- /usr/lib/python2.7/site-packages/createrepo/__init__.py~ 2012-02-16 21:43:32.000000000 +0100 >+++ /usr/lib/python2.7/site-packages/createrepo/__init__.py 2013-02-28 15:11:58.507433763 +0100 >@@ -26,6 +26,8 @@ > import stat > import fcntl > import subprocess >+import threading >+import Queue > > from yum import misc, Errors > from yum.repoMDObject import RepoMD, RepoData >@@ -650,6 +652,7 @@ > > > >+ queue = Queue.Queue() > for (num, cmdline) in worker_cmd_dict.items(): > if not self.conf.quiet: > self.callback.log("Spawning worker %s with %s pkgs" % (num, >@@ -657,19 +660,31 @@ > job = subprocess.Popen(cmdline, stdout=subprocess.PIPE, > stderr=subprocess.PIPE) > worker_jobs[num] = job >+ def spawn_reader(queue, callback, num, source): >+ def reader(queue, callback, num, source): >+ while True: >+ line = source.readline() >+ if not line: >+ break >+ queue.put((callback, num, line)) >+ print "Reader done", num, callback >+ t = threading.Thread(target=reader, >+ args=(queue, callback, num, source)) >+ t.daemon = True >+ t.start() >+ spawn_reader(queue, self.callback.log, num, job.stdout) >+ spawn_reader(queue, self.callback.errorlog, num, job.stderr) > > gimmebreak = 0 > while gimmebreak != len(worker_jobs.keys()): > gimmebreak = 0 >- for (num,job) in worker_jobs.items(): >- if job.poll() is not None: >- gimmebreak+=1 >- line = job.stdout.readline() >- if line: >- self.callback.log('Worker %s: %s' % (num, line.rstrip())) >- line = job.stderr.readline() >- if line: >- self.callback.errorlog('Worker %s: %s' % (num, line.rstrip())) >+ try: >+ callback,num,line = queue.get(timeout=1) >+ callback('Worker %s: %s' % (num, line.rstrip())) >+ except Queue.Empty: >+ for (num,job) in worker_jobs.items(): >+ if job.poll() is not None: >+ gimmebreak+=1 > > for (num, job) in worker_jobs.items(): > if job.returncode != 0: >--- /usr/share/createrepo/genpkgmetadata.py~ 2012-02-16 21:43:32.000000000 +0100 >+++ /usr/share/createrepo/genpkgmetadata.py 2013-02-28 14:54:51.501227844 +0100 >@@ -225,6 +225,7 @@ > def log(self, thing): > """log output""" > print thing >+ sys.stdout.flush() > > def progress(self, item, current, total): > """progress bar""" >--- /usr/share/createrepo/worker.py~ 2012-02-16 21:43:32.000000000 +0100 >+++ /usr/share/createrepo/worker.py 2013-02-28 15:09:05.402388492 +0100 >@@ -87,6 +87,7 @@ > try: > if not opts.quiet and opts.verbose: > print "reading %s" % (pkgfile) >+ sys.stdout.flush() > > pkg = createrepo.yumbased.CreateRepoPackage(ts, package=pkgpath, > sumtype=globalopts.get('sumtype', None),
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 916562
:
703876
|
703907
|
703910
|
703925
|
704161
|
704222