Bug 825634

Summary: libvirt close connection to python client when client setgroups after start a event loop
Product: [Community] Virtualization Tools Reporter: Royce Lv <lvroyce>
Component: libvirtAssignee: Jiri Denemark <jdenemar>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: crobinso, rbalakri
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-03-23 22:06:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
script to reproduce the bug none

Description Royce Lv 2012-05-28 05:52:37 UTC
Description of problem:
This problem is found when debugging vdsm.
If a libvirtd client register its event handleImp to libvirt, then connect to libvirtd, then call os.setgroups, libvirtd connection will be closed in 30 secs after os.setgroups called, seems a connection keepalive scheme problem, but connection is available in this 30 secs.   
 

Version-Release number of selected component (if applicable):
libvirt-0.9.11-1.fc16.x86_64

How reproducible:
see demo script in attachment(using sudo)
(1)start a event loop and register the handleImp to libvirt
(2)open a connection to libvirt
(3)call os.setgroups([])
(4)call libvirt fuction
(5)sleep 40 secs
(6)call libvirt function
  
Actual results:
after step (3) we got SIGCHILD which interrupt poll
step (4) will gain right result
step (6) will result in broken pipe:
libvirtError: Cannot write data: Broken pipe

libvirtd error log:
2012-05-23 12:17:42.612+0000: 2773: warning : virKeepAliveTimer:182 : No response from client 0x132d500 after 5 keepalive messages in 30 seconds
2012-05-23 12:17:42.612+0000: 2773: debug : virConnectClose:1496 : conn=0x7fea6c0089e0
2012-05-23 12:17:42.613+0000: 2773: debug : qemuDriverCloseCallbackRunAll:661 : conn=0x7fea6c0089e0

Expected results:
connection should not be closed, keepalive scheme should active normaly after os.setgroups()

Additional info:

Comment 1 Royce Lv 2012-05-28 05:53:46 UTC
Created attachment 587152 [details]
script to reproduce the bug

Comment 2 Royce Lv 2012-05-28 09:00:45 UTC
*** Bug 825628 has been marked as a duplicate of this bug. ***

Comment 3 Cole Robinson 2016-03-23 22:06:26 UTC
Sorry this bug never received a response, however on Fedora 23 that script doesn't throw any error (with the vdsm import commented out), so it appears this is fixed