Bug 843199

Summary: Ruby bindings segfault in event callbacks when the Ruby GC is invoked.
Product: Red Hat Enterprise Linux 6 Reporter: Richard W.M. Jones <rjones>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED CANTFIX QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.4CC: dyasny, leiwang, mbooth, moli, qguan
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 843188 Environment:
Last Closed: 2012-09-28 13:03:20 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:
Bug Depends On: 843188    
Bug Blocks:    

Description Richard W.M. Jones 2012-07-25 21:35:34 UTC
+++ This bug was initially created as a clone of Bug #843188 +++

Description of problem:

Initial report is here, with a partial stack trace:
https://issues.jboss.org/browse/BGBUILD-371

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

libguestfs 1.16.28

How reproducible:

100%

Steps to Reproduce:
1. unknown at present

--- Additional comment from rjones on 2012-07-25 17:34:14 EDT ---

Created attachment 600404 [details]
bz843188.rb

This small script reproduces the bug.

Save it to a file, chmod +x the script and run it.  It will
cause a segfault.

If you comment out the line that calls g.set_event_callback
then it won't segfault, proving that the problem is with
events.

Comment 3 Richard W.M. Jones 2012-09-28 13:03:20 UTC
We got to the bottom of this bug (see:
https://bugzilla.redhat.com/show_bug.cgi?id=843188#c6)
and essentially the problem is that the Ruby 1.8 garbage
collector is broken by design.

This problem is unfixable, except by moving to Ruby 1.9
or not using Ruby.