Bug 733297

Summary: ruby event handlers fail with "exception in callback: wrong argument type Proc (expected Data)"
Product: [Community] Virtualization Tools Reporter: Richard W.M. Jones <rjones>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED UPSTREAM QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: mbooth, mgoldman, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-08-26 10:09:44 UTC Type: ---
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
test.rb none

Description Richard W.M. Jones 2011-08-25 11:53:59 UTC
Created attachment 519823 [details]
test.rb

Description of problem:

See attached program.  Note the bug was found by Marek Goldmann
in Boxgrinder.

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

libguestfs 1.10 through 1.13.7.

How reproducible:

100%

Steps to Reproduce:
1. Run the attached program.
2.
3.
  
Actual results:

At the end of the program the even handler gets into a funny
state where it gives lots of errors like this:

libguestfs: exception in callback: wrong argument type Proc (expected Data)libguestfs: exception in callback: wrong argument type Proc (expected Data)libguestfs: exception in callback: wrong argument type Proc (expected Data)libguestfs: exception in callback: wrong argument type Proc (expected Data)libguestfs: exception in callback: wrong argument type Proc (expected Data)...

Expected results:

Should not do that.

Additional info:

Comment 1 Richard W.M. Jones 2011-08-25 13:06:43 UTC
I won't pretend I really understand what's going on here,
but I have posted this workaround:

https://www.redhat.com/archives/libguestfs/2011-August/msg00148.html

BTW the error messages look scary but are completely
benign -- just some unwanted output to stderr.  It doesn't
crash the Ruby interpreter or libguestfs.