Bug 965919 - Progressbar signal handler for SIGWINCH causes system calls to be interrupted
Summary: Progressbar signal handler for SIGWINCH causes system calls to be interrupted
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: python-progressbar
Version: el6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Christof Damian
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-22 03:34 UTC by Matt Spaulding
Modified: 2013-06-10 17:07 UTC (History)
1 user (show)

Fixed In Version: python-progressbar-2.3-2.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-06-03 03:09:50 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Patch to fix the issue in python-progressbar (503 bytes, patch)
2013-05-22 03:34 UTC, Matt Spaulding
no flags Details | Diff
Patch based off 2.3 tarball (good) (562 bytes, patch)
2013-05-25 14:37 UTC, Matt Spaulding
no flags Details | Diff

Description Matt Spaulding 2013-05-22 03:34:10 UTC
Created attachment 751475 [details]
Patch to fix the issue in python-progressbar

Description of problem:
The python-progressbar signal handler for SIGWINCH causes system calls to be interrupted instead of restarting them. I've attached a patch that solves the issue.

Version-Release number of selected component (if applicable):
2.3-1

How reproducible:
Every time if you use any euca2ools 3.0.0 alpha build [1] with requestbuilder 0.1.0-alpha10 or older.

Steps to Reproduce:
1. Install the latest version of euca2ools 3.0.0 alpha and requestbuilder 0.1.0-alpha10 or older.
2. Use the euca-bundle-vol tool (which uses progressbar).
3. Attempt to resize the terminal window during tarball bundling.

Actual results:
An IOError exception was thrown because a system call was interrupted. Output is below:

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done 

tune2fs 1.42.3 (14-May-2012)
  done
Syncing volume contents...  done
euca-bundle-vol: error: Interrupted system call                                 Exception in thread Thread-2:                     | 718.55 MB  35.40 MB/s ETA:  Traceback (most recent call last):
  File "/usr/lib64/python2.7/threading.py", line 551, in __bootstrap_inner
    self.run()
  File "/usr/lib64/python2.7/threading.py", line 504, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib/python2.7/site-packages/euca2ools-3.0.0_alpha6-py2.7.egg/euca2ools/commands/bundle/bundle.py", line 187, in _add_fileobj_to_tarball
    tarball.close()
  File "/usr/lib64/python2.7/tarfile.py", line 1776, in close
    self.fileobj.write(NUL * (BLOCKSIZE * 2))
  File "/usr/lib64/python2.7/tarfile.py", line 471, in write
    self.__write(s)
  File "/usr/lib64/python2.7/tarfile.py", line 479, in __write
    self.fileobj.write(self.buf[:self.bufsize])
IOError: [Errno 32] Broken pipe

Exception IOError: (32, 'Broken pipe') in <bound method _Stream.__del__ of <tarfile._Stream instance at 0x29673f8>> ignored
Bundling image 100% |======================|  10.00 GB 503.30 MB/s Time: 0:00:21
euca-bundle-vol: error: 
[root@i euca2ools]# 

Expected results:
The window resize should have been handled correctly and the progress bar resized.

Additional Information:
This is solved for the time being. I've committed a temporary fix to requestbuilder [2] until this fix is in EPEL. I have also filed an issue upstream [3].

[1] http://repos.fedorapeople.org/repos/gholms/cloud/
[2] https://github.com/boto/requestbuilder/commit/245823633370bd10043034810a6588186b827933
[3] https://code.google.com/p/python-progressbar/issues/detail?id=30

Comment 1 Christof Damian 2013-05-25 11:02:53 UTC
The patch is for 2.2, does the problem still exist in 2.3?

Comment 2 Matt Spaulding 2013-05-25 14:37:01 UTC
Created attachment 753095 [details]
Patch based off 2.3 tarball (good)

This patch should resolve the issue. I must have attached the patch for the upstream repository instead of one against the 2.3 tarball. Yes, I'm experiencing the issue on version 2.3.

Comment 3 Christof Damian 2013-05-25 15:16:37 UTC
(In reply to Matt Spaulding from comment #2)
> Created attachment 753095 [details]
> Patch based off 2.3 tarball (good)
> 
> This patch should resolve the issue. I must have attached the patch for the
> upstream repository instead of one against the 2.3 tarball. Yes, I'm
> experiencing the issue on version 2.3.

Thanks. 

I have rebuild it and will update the packages next. You can check out the el6 version here: http://koji.fedoraproject.org/koji/taskinfo?taskID=5423639

Comment 4 Fedora Update System 2013-05-25 15:18:18 UTC
python-progressbar-2.3-2.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/python-progressbar-2.3-2.el6

Comment 5 Fedora Update System 2013-05-25 15:35:34 UTC
python-progressbar-2.3-2.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/python-progressbar-2.3-2.fc18

Comment 6 Fedora Update System 2013-05-25 15:36:14 UTC
python-progressbar-2.3-2.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/python-progressbar-2.3-2.fc19

Comment 7 Fedora Update System 2013-05-25 17:41:09 UTC
Package python-progressbar-2.3-2.el6:
* should fix your issue,
* was pushed to the Fedora EPEL 6 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing python-progressbar-2.3-2.el6'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2013-5938/python-progressbar-2.3-2.el6
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2013-06-03 03:09:50 UTC
python-progressbar-2.3-2.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2013-06-03 03:45:32 UTC
python-progressbar-2.3-2.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2013-06-10 17:07:15 UTC
python-progressbar-2.3-2.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.