Bug 620465 - [PATCH] Traceback if you hit Ctrl+C twice during fedpkg build
Summary: [PATCH] Traceback if you hit Ctrl+C twice during fedpkg build
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: fedora-packager
Version: 13
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: David Cantrell
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 620641 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-08-02 15:35 UTC by Miroslav Suchý
Modified: 2013-01-10 06:06 UTC (History)
3 users (show)

Fixed In Version: fedora-packager-0.5.1.4-1.el5
Clone Of:
Environment:
Last Closed: 2010-08-24 21:06:21 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Proposed patch agains current HEAD (2.85 KB, patch)
2010-08-02 15:38 UTC, Miroslav Suchý
no flags Details | Diff

Description Miroslav Suchý 2010-08-02 15:35:53 UTC
Description of problem:
If you run:
 fedpkg build
and you got this output:
 Created task: 2373918
 Task info: http://koji.fedoraproject.org/koji/taskinfo?taskID=2373918
 Watching tasks (this may be safely interrupted)...
and you hit Ctrl+C ... nothing happend. You hit Ctrl+C again and voilà - traceback is here.

This is due that in handler of KeyboardInterrupt, fedpkg try to write list of current task, which itself can be time consuming operation (especially over slow line).

Version-Release number of selected component (if applicable):
fedora-packager-0.5.1.0-1.el6.noarch

How reproducible:
always on slow line

Steps to Reproduce:
1. fedpkg build
2. hit twice Ctrl+C 
  
Actual results:
tracebac

Expected results:
no traceback

Additional info:

raceback (most recent call last):                                                                                   
  File "/usr/bin/fedpkg", line 959, in <module>                                                                          
    args.command(args)                                                                                                   
  File "/usr/bin/fedpkg", line 326, in build                                                                             
    return _watch_koji_tasks(mymodule.kojisession, [task_id], quiet=args.q)                                              
  File "/usr/bin/fedpkg", line 229, in _watch_koji_tasks                                                                 
    for t in tasks.values() if not t.is_done()]))                                                                        
  File "/usr/bin/fedpkg", line 119, in display_state                                                                     
    host = self.session.getHost(info['host_id'])                                                                         
  File "/usr/lib/python2.6/site-packages/koji/__init__.py", line 1468, in __call__                                       
    return self.__func(self.__name,args,opts)                                                                            
  File "/usr/lib/python2.6/site-packages/koji/__init__.py", line 1698, in _callMethod                                    
    return proxy.__getattr__(name)(*args)                                                                                
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1199, in __call__                                                       
    return self.__send(self.__name, args)                                                                                
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1489, in __request                                                      
    verbose=self.__verbose                                                                                               
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1235, in request                                                        
    self.send_content(h, request_body)                                                                                   
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1349, in send_content                                                   
    connection.endheaders()                                                                                              
  File "/usr/lib64/python2.6/httplib.py", line 904, in endheaders                                                        
    self._send_output()                                                                                                  
  File "/usr/lib64/python2.6/httplib.py", line 776, in _send_output                                                      
    self.send(msg)                                                                                                       
  File "/usr/lib64/python2.6/httplib.py", line 755, in send                                                              
    self.sock.sendall(str)                                                                                               
  File "/usr/lib/python2.6/site-packages/koji/ssl/SSLConnection.py", line 118, in sendall                                
    time.sleep(0.2)
KeyboardInterrupt

Comment 1 Miroslav Suchý 2010-08-02 15:38:31 UTC
Created attachment 436053 [details]
Proposed patch agains current HEAD

Comment 2 Jesse Keating 2010-08-02 16:07:34 UTC
I have to re-work the command here to use the real tty if possible, which may make this bug go away.

Comment 3 Jesse Keating 2010-08-12 06:46:05 UTC
Please let me know if this problem still happens in the next version of fedora-packager/fedpkg.

Comment 4 Fedora Update System 2010-08-12 19:53:11 UTC
python-kitchen-0.2-0.1.a2.el5,fedora-packager-0.5.1.2-1.el5 has been submitted as an update for Fedora EPEL 5.
http://admin.fedoraproject.org/updates/python-kitchen-0.2-0.1.a2.el5,fedora-packager-0.5.1.2-1.el5

Comment 5 Fedora Update System 2010-08-12 19:56:48 UTC
fedora-packager-0.5.1.2-1.fc14 has been submitted as an update for Fedora 14.
http://admin.fedoraproject.org/updates/fedora-packager-0.5.1.2-1.fc14

Comment 6 Fedora Update System 2010-08-12 20:01:17 UTC
fedora-packager-0.5.1.2-1.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/fedora-packager-0.5.1.2-1.fc13

Comment 7 Fedora Update System 2010-08-12 20:07:11 UTC
fedora-packager-0.5.1.2-1.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/fedora-packager-0.5.1.2-1.fc12

Comment 8 Miroslav Suchý 2010-08-13 07:22:34 UTC
I just installed it and yes...still happen, nothing changed. And I see nothing in code which could changed behaviour.
If I hit Ctrl+C it take 3 seconds to terminate the script. If I hit Ctrl+C again during this timeframe I got traceback.
Moving back to ASSIGNED

Comment 9 Fedora Update System 2010-08-13 21:06:09 UTC
fedora-packager-0.5.1.2-2.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update fedora-packager'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/fedora-packager-0.5.1.2-2.fc13

Comment 10 Fedora Update System 2010-08-13 22:38:46 UTC
fedora-packager-0.5.1.2-2.el5, python-kitchen-0.2-0.1.a2.el5 has been pushed to the Fedora EPEL 5 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update fedora-packager python-kitchen'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/python-kitchen-0.2-0.1.a2.el5,fedora-packager-0.5.1.2-2.el5

Comment 11 Miroslav Suchý 2010-08-16 06:51:03 UTC
Dear Fedora Update System, you did not read my comment #8, isn't it? :)
Moving back to ASSIGNED

Comment 12 Fedora Update System 2010-08-17 05:35:37 UTC
fedora-packager-0.5.1.2-2.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 13 Miroslav Suchý 2010-08-17 08:13:40 UTC
Fedora Update System, you did not neither read #8 nor #11 :). Leave this bug open.

Comment 14 Jesse Keating 2010-08-17 17:33:44 UTC
(In reply to comment #13)
> Fedora Update System, you did not neither read #8 nor #11 :). Leave this bug
> open.

You're talking to a bot, that cannot listen.

I haven't been able to duplicate this because when I ^c things immediately terminate.  The koji library catches the ^c and prints out some information about being able to watch the build.  This happens so fast here that I don't have a chance to hit ^c again.

I'll put in a except for KeyboardInterrupt, but you'll have to test it for me.

Comment 15 Jesse Keating 2010-08-17 23:38:32 UTC
Alright, took some more code from /usr/bin/koji and this should be fixed up now.

Comment 16 Miroslav Suchý 2010-08-18 07:36:36 UTC
Yes. That is because you are so close to koji, that the comunication is nearly instant. You will experience it if you use some machine in Europe (and probably Asia and other). Or you can simulate it, if you use slow proxy (let say some public anonymizer). But anyway, I'm always happy to test it... Yes commit cc15ec128745cd663b93fbc12c114999a220c53d fixed this problem.

Comment 17 Jesse Keating 2010-08-24 06:24:03 UTC
*** Bug 620641 has been marked as a duplicate of this bug. ***

Comment 18 Fedora Update System 2010-08-24 06:33:58 UTC
fedora-packager-0.5.1.3-1.fc14 has been submitted as an update for Fedora 14.
http://admin.fedoraproject.org/updates/fedora-packager-0.5.1.3-1.fc14

Comment 19 Fedora Update System 2010-08-24 06:36:20 UTC
fedora-packager-0.5.1.3-1.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/fedora-packager-0.5.1.3-1.fc13

Comment 20 Fedora Update System 2010-08-24 06:38:01 UTC
fedora-packager-0.5.1.3-1.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/fedora-packager-0.5.1.3-1.fc12

Comment 21 Fedora Update System 2010-08-24 06:40:01 UTC
fedora-packager-0.5.1.3-1.el5 has been submitted as an update for Fedora EPEL 5.
http://admin.fedoraproject.org/updates/fedora-packager-0.5.1.3-1.el5

Comment 22 Fedora Update System 2010-08-24 21:06:01 UTC
fedora-packager-0.5.1.3-1.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 23 Fedora Update System 2010-08-24 21:08:54 UTC
fedora-packager-0.5.1.2-2.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 24 Fedora Update System 2010-08-24 23:03:22 UTC
fedora-packager-0.5.1.2-2.el5, python-kitchen-0.2-0.1.a2.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 25 Fedora Update System 2010-08-25 01:19:08 UTC
fedora-packager-0.5.1.2-2.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 26 Fedora Update System 2010-09-02 03:58:31 UTC
fedora-packager-0.5.1.4-1.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 27 Fedora Update System 2010-09-02 20:33:39 UTC
fedora-packager-0.5.1.4-1.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 28 Fedora Update System 2010-09-08 16:28:30 UTC
fedora-packager-0.5.1.4-1.el5 has been pushed to the Fedora EPEL 5 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.