Package: pdsh Version: 2.18-7 Tags: patch Severity: important
---------- Forwarded message ---------- From: Mark A. Grondona <[email protected]> Date: Tue, Sep 28, 2010 at 12:05 PM Subject: Re: p...@cluster5: Error loading self: file not found] To: Ronald Kasl <[email protected]> Cc: [email protected] This appears to be a debian bug. You will need to have the libgenders0-dev package installed to have an operational genders module with pdsh-2.18-7. (Actually this is kind of an upstream bug too). Currently the upstream pdsh does a dlopen of self to query for the 'genders_query' symbol, and does a fallback to genders_getnodes() if this symbol does not exist. Unfortunately, the debian version of pdsh for some reason always fails when calling lt_dlopen (NULL) so I suggested that they instead dlopen the libgenders.so library directly. Unfortunately, libgenders.so is not installed on your system (it is actually a soft link), unless you have libgenders0-dev installed, thus you get the "error opening self" error message (the error wasn't updated with the new debian fix) I think that the version of genders in debian does have the genders_query() function, so the runtime test for it is not necessary. I would actually suggest that the use of dlopen/dlsym in genders.c should just go away in the debian version. I'll do the same upstream, as all modern versions of libgenders have this symbol, so we'll just deprecate backwards compatibility. something like this: diff --git a/src/modules/genders.c b/src/modules/genders.c index 59f40e2..4c1d45b 100644 --- a/src/modules/genders.c +++ b/src/modules/genders.c @@ -37,7 +37,6 @@ #include "src/common/err.h" #include "src/common/xmalloc.h" #include "src/common/split.h" -#include "src/pdsh/ltdl.h" #include "src/pdsh/mod.h" #include "src/pdsh/rcmd.h" @@ -76,10 +75,6 @@ static char *gfile = NULL; static List attrlist = NULL; static List excllist = NULL; -static lt_dlhandle dlh = NULL; -static lt_ptr g_query_addr = NULL; -typedef int (*g_query)(genders_t, char **, int, char *); - /* * Export pdsh module operations structure */ @@ -197,11 +192,6 @@ genders_process_opt(opt_t *pdsh_opts, int opt, char *arg) static int genders_init(void) { - if (!(dlh = lt_dlopen("libgenders.so"))) - errx("%p: Error loading self: %s\n", lt_dlerror()); - - g_query_addr = lt_dlsym(dlh, "genders_query"); - return 0; } @@ -217,7 +207,6 @@ genders_fini(void) if ((gh != NULL) && (genders_handle_destroy(gh) < 0)) errx("%p: Error destroying genders handle: %s\n", genders_errormsg(gh)); - lt_dlclose(dlh); return 0; } @@ -408,29 +397,6 @@ static genders_t _handle_create() return gh; } -/* - * Search attr argument for an '=' char indicating an - * attr=value pair. If found, nullify '=' and return - * pointer to value part. - * - * Returns NULL if no '=' found. - */ -static char * -_get_val(char *attr) -{ - char *val = NULL; - - if (attr == NULL) - return (NULL); - - if ((val = strchr(attr, '='))) { - *val = '\0'; - val++; - } - - return (val); -} - static hostlist_t _read_genders_attr(char *query) { @@ -441,21 +407,9 @@ _read_genders_attr(char *query) if ((len = genders_nodelist_create(gh, &nodes)) < 0) errx("%p: genders: nodelist_create: %s\n", genders_errormsg(gh)); - if (g_query_addr) { - if ((nnodes = ((g_query)g_query_addr)(gh, nodes, len, query)) < 0) { - errx("%p: Error querying genders for query \"%s\": %s\n", - query ?: "(all)", genders_errormsg(gh)); - } - } - else { - /* query defaults to just an attribute or attribute=value pair */ - char *val; - val = _get_val(query); - if ((nnodes = genders_getnodes(gh, nodes, len, query, val)) < 0) { - errx("%p: Error querying genders for attr \"%s\": %s\n", - query ?: "(all)", genders_errormsg(gh)); - } - } + if ((nnodes = genders_query(gh, nodes, len, query)) < 0) + errx("%p: Error querying genders for query \"%s\": %s\n", + query ?: "(all)", genders_errormsg(gh)); hl = _genders_to_hostlist(gh, nodes, nnodes); On Tue, 28 Sep 2010 09:18:30 -0700, Ronald Kasl <[email protected]> wrote: > r...@cluster5:~/perceus_install# pdsh -V > p...@cluster5: Error loading self: file not found > > .. there is some pdsh wrapper that is not on the caos/perceus clusters > > # which pdsh > /usr/bin/pdsh > > # cat /usr/bin/pdsh > #! /bin/bash > > # If PDSH_RCMD_TYPE is set don't check default > if test $PDSH_RCMD_TYPE; then > exec -a pdsh /usr/bin/pdsh.bin "$@" > fi > > # If a default is set run with it. > if test -f /etc/pdsh/rcmd_default; then > PDSH_RCMD_TYPE=`cat /etc/pdsh/rcmd_default` > PDSH_RCMD_TYPE=$PDSH_RCMD_TYPE exec -a pdsh /usr/bin/pdsh.bin "$@" > else > exec -a pdsh /usr/bin/pdsh.bin "$@" > fi > > > --- I found "workaround" (I just get pdsh from the perceus people ), > but if you are interested we can try to figure this out > #aptitude purge pdsh > #wget > http://BLOCKEDaltruistic.infiscale.org/rhel/5/RPMS/x86_64/pdsh-2.17-1.redhat.x86_64.rpm > #wget > http://BLOCKEDaltruistic.infiscale.org/rhel/5/RPMS/x86_64/pdsh-dshbak-2.17-1.redhat.x86_64.rpm > #alien -i pdsh-2.17-1.redhat.x86_64.rpm > #alien -i pdsh-dshbak-2.17-1.redhat.x86_64.rpm > > -- > there is not much bugs reporting on debian > http://BLOCKEDbugs.debian.org/cgi-bin/pkgreport.cgi?pkg=pdsh;dist=unstable > there was some problem on ubuntu > https://BLOCKEDbugs.launchpad.net/ubuntu/+source/pdsh/+bug/476382 > > > thanks!!!! > > > Subject: Re: p...@cluster5: Error loading self: file not found > > Date: Mon, 27 Sep 2010 20:42:46 -0700 > > From: Mark A. Grondona<[email protected]> > > To: rk<[email protected]> > > References: <[email protected]> > > <[email protected]> <[email protected]> > > > > > > > > Can you capture all the output into a file and attach it > > and send it to me? I have an idea of where the problem > > is and the LD_DEBUG may help verify the issue. > > > > Actually,do you get the error with 'pdsh -V' ? > > > > mark > > > > On Mon, 27 Sep 2010 16:21:45 -0700, rk<[email protected]> wrote: > > > >> after this: > >> # LD_DEBUG=all pdsh -V > >> I've got several screens of this : > >> > >> ormal symbol `__cxa_finalize' [GLIBC_2.2.5] > >> 7589: > >> 7589: calling fini: /usr/lib/libgenders.so.0 [0] > >> > >> 7589:http://BLOCKEDwww.BLOCKEDgnu.org/software/freeipmi/freeipmi-hostrange.txt > >> 7589: symbol=__cxa_finalize; lookup in file=pdsh [0] > >> 7589: symbol=__cxa_finalize; lookup in file=/lib/libdl.so.2 [0] > >> 7589: symbol=__cxa_finalize; lookup in > >> file=/usr/lib/libltdl.so.7 [0] > >> > >> 7589: symbol=__cxa_finalize; lookup in > >> file=/lib/libpthread.so.0 [0] > >> 7589: symbol=__cxa_finalize; lookup in file=/lib/libc.so.6 [0] > >> 7589: binding file /usr/lib/libgenders.so.0 [0] to > >> /lib/libc.so.6 [0]: > >> normal symbol `__cxa_finalize' [GLIBC_2.2.5] > >> 7589: > >> 7589: calling fini: /lib/libc.so.6 [0] > >> 7589: > >> > >> > >> > >> r...@cluster5:~# apt-cache showpkg pdsh > >> > >> Package: pdsh > >> Versions: > >> 2.18-7 > >> (/var/lib/apt/lists/ftp.debian.org_debian_dists_squeeze_main_binary-amd > >> _Packages) > >> (/var/lib/apt/lists/debian.oregonstate.edu_debian_dists_squeeze_mai > >> binary-amd64_Packages) (/var/lib/dpkg/status) > >> Description Language: > >> File: > >> /var/lib/apt/lists/ftp.debian.org_debian_dists_squeeze_ > >> in_binary-amd64_Packages > >> MD5: 83ab4853fa8b6884bd4380641e7ea649 > >> > >> > >> Reverse Depends: > >> genders,pdsh 2.8-1-1 > >> Dependencies: > >> 2.18-7 - libc6 (2 2.3.4) libgenders0 (0 (null)) libltdl7 (2 2.2.6b) > >> debconf (1 > >> 0.5) debconf-2.0 (0 (null)) perl (0 (null)) rsh-client (0 (null)) > >> openssh-clie > >> (16 (null)) ssh (3 1:3.8.1p1-9) genders (2 1.4-1-1) > >> Provides: > >> 2.18-7 - > >> Reverse Provides: > >> > >> > >> -- thanks, Mark!!!! > >> > >> > >> > >> > >> Mark A. Grondona wrote: > >> > >>> Do you have more info on the error? Can you run with > >>> > >>> LD_DEBUG=all pdsh -V > >>> > >>> Also, > >>> > >>> apt-cache showpkg pdsh > >>> > >>> Thanks > >>> mark > >>> > >>> On Mon, 27 Sep 2010 16:06:07 -0700, rk<[email protected]> wrote: > >>> > >>> > >>>> Hello Mark, do you have any idea why I have this error? . I apt-get > >>>> install pdsh and try to run it, but no luck. > >>>> I cannot find any documentation how to configure pdsh . > >>>> > >>>> Thanks for any pointers, > >>>> Ron > >>>> > >>>> > >>>> > >> > > -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

