Bug 825634 - libvirt close connection to python client when client setgroups after start a event loop
libvirt close connection to python client when client setgroups after start a...
Product: Virtualization Tools
Classification: Community
Component: libvirt (Show other bugs)
x86_64 Linux
unspecified Severity medium
: ---
: ---
Assigned To: Jiri Denemark
: 825628 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2012-05-28 01:52 EDT by Royce Lv
Modified: 2016-04-26 12:14 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-03-23 18:06:26 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
script to reproduce the bug (18.08 KB, text/plain)
2012-05-28 01:53 EDT, Royce Lv
no flags Details

  None (edit)
Description Royce Lv 2012-05-28 01:52:37 EDT
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):

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 01:53:46 EDT
Created attachment 587152 [details]
script to reproduce the bug
Comment 2 Royce Lv 2012-05-28 05:00:45 EDT
*** Bug 825628 has been marked as a duplicate of this bug. ***
Comment 3 Cole Robinson 2016-03-23 18:06:26 EDT
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

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