WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] libxl -> libxenstore dependency

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] libxl -> libxenstore dependency
From: Josef Liška <jl@xxxxxx>
Date: Wed, 10 Nov 2010 10:13:09 +0100
Delivery-date: Wed, 10 Nov 2010 01:14:25 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <201011100848.11286.hahn@xxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Organization: CHL
References: <821680.59629.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxx> <4CDA455B.2000506@xxxxxx> <201011100848.11286.hahn@xxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.15) Gecko/20101027 Thunderbird/3.0.10
Hi,
that was usefull comment, thank you! I'll share results later.

Best regards
Josef Liška

CHL | system care

Telefon: +420.272048055
Fax: +420.272048064
Mobil: +420.776026526 denně 9:00 - 17:30
Jabber: jl@xxxxxx
https://www.chl.cz/


Dne 10.11.2010 08:48, Philipp Hahn napsal(a):
Hello,

Am Mittwoch 10 November 2010 08:10:19 schrieb Josef Liška:
  
I have done regression testing using git bisect and found following commit:
    
...
  
commit 8b490610757b1c81131c1876a54fd0bfec301c52
    
...
  
diff -Naur a/xenstore/xs.h b/xenstore/xs.h
--- a/xenstore/xs.h 2010-11-10 00:59:57.000000000 +0100
+++ b/xenstore/xs.h 2010-11-10 01:02:42.000000000 +0100
@@ -48,6 +48,9 @@
/* Close the connection to the xs daemon. */
void xs_daemon_close(struct xs_handle *);

+/* Throw away the connection to the xs daemon, for use after fork(). */
+void xs_daemon_destroy_postfork(struct xs_handle *);
    
Perhaps not directly relevant to your bug, but I found a similar problem with 
our custom-build Debian package for xen-4.0.1:
libxl doesn't link to libxenstore itself, but if you want to use libxl with 
any program, you have to link libxenstore as well, as libxl uses the function 
from libxenstore. This confuses dpkg-shlibdeps, which resolves the 
shared-library-dependencies on a per-symbol basis:
* xs_daemon_destroy_postfork() is only available from >= 4.0.0~rc4.
* libxl uses it, but isn't directly linked to libxenstore, so dpkg-shlibdeps 
isn't able to determin, that libxenstore from >= 4.0.0~rc4 is needed during 
runtime. Instead it just declares a dependency on libxenstore.
* Any program (currently only xl) using libxl might crash during runtime as 
soon as xs_daemon_destroy_postfork() while an old libxenstore is installed.

Something like the following pseudo-patch solved the problem by already 
linking libxl to libxenstore:

@ xen-4.0.1/tools/libxl/Makefile:62
 libxenlight.so.$(MAJOR).$(MINOR): $(LIBXL_OBJS)
-        $(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenlight.so.
$(MAJOR) $(SHLIB_CFLAGS) -o $@ $^
+        $(CC) $(CFLAGS) $(LDFLAGS) $(LDFLAGS_libxenstore) -Wl,
$(SONAME_LDFLAG) -Wl,libxenlight.so.$(MAJOR) $(SHLIB_CFLAGS) -o $@ $^

Alternatively incrementing the minior version of libxenstore would have been a 
good idea, since a new function was added.

Sincerely
Philipp Hahn
  
_______________________________________________ Xen-users mailing list Xen-users@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-users !DSPAM:2,4cda4ebd114768778217422!

Attachment: jl.vcf
Description: Vcard

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
<Prev in Thread] Current Thread [Next in Thread>