|Think about Loose Coupling|
[Ceph::RADOS] Help Debugging Inline Cby three18ti (Scribe)
|on Nov 07, 2013 at 00:44 UTC||Need Help??|
three18ti has asked for the
wisdom of the Perl Monks concerning the following question:
I'm using Ceph for storage in my virtualization cluster and I would like to be able to control it programmatically from a Perl script. I looked at using SWIG or h2xs to generate a wrapper, but it seems I require more intimate knowledge of the source library than I currently posess to make effective use of those tools.
This module seems to work great except for the list_pools function which causes a segfault.
The relevant code from the module is here:
We can observe this behavior when running a stacktrace on the testrados2.pl script that comes with the attachment 2 (I added a print "Testing list_pools\n" before the actual call to $c->list_pools to make debugging easier):
Running this code through gdb I get possibly a little more helpful error: ( gdb ; set args testrados2.pl ; run )
But googling that error has not provided my any assistance.
I think this error is coming from the c function "list_pools_c" because Perl doesn't (that I've encountered) emit stack traces under "normal" circumstances.
I was hoping someone could help me debug the error as I'm not really sure where to go from here. I've asked a similar question on the ceph-users mailing list, but I've only gotten crickets.
Also, any words of wisdom on extending c libraries would be greatly appreciated. I've read perlxstut and related documentation. My C is a bit rusty and I'm attempting to extend someone else's library, I get the feeling that this project may take a bit of work.
Edits: to fix links to Ceph mailing list and Ceph::RADOS package