Hi, I just decreased my cluster (node failed...) from 4 to 3 nodes and now it works fine, i haven't tested the patch yet. But i just updated to the latest git revision and now compiling on my node fails. root at osd4:/usr/src/sheepdog# make make -C shepherd make[1]: Entering directory `/usr/src/sheepdog/shepherd' make[1]: Nothing to be done for `all'. make[1]: Leaving directory `/usr/src/sheepdog/shepherd' make -C collie make[1]: Entering directory `/usr/src/sheepdog/collie' cc -c -g -O2 -Wall -Wstrict-prototypes -I../include -D_GNU_SOURCE -DSD_VERSION=\"3ce47e2-be8cd4e\" collie.c -o collie.o collie.c: In function ‘main’: collie.c:64: error: ‘PATH_MAX’ undeclared (first use in this function) collie.c:64: error: (Each undeclared identifier is reported only once collie.c:64: error: for each function it appears in.) collie.c:64: warning: unused variable ‘path’ make[1]: *** [collie.o] Error 1 make[1]: Leaving directory `/usr/src/sheepdog/collie' make: *** [all] Error 2 root at osd4:/usr/src/sheepdog# Any idea? -- Met vriendelijke groet, Wido den Hollander Hoofd Systeembeheer / CSO Telefoon Support Nederland: 0900 9633 (45 cpm) Telefoon Support België: 0900 70312 (45 cpm) Telefoon Direct: (+31) (0)20 50 60 104 Fax: +31 (0)20 50 60 111 E-mail: support at pcextreme.nl Website: http://www.pcextreme.nl Kennisbank: http://support.pcextreme.nl/ Netwerkstatus: http://nmc.pcextreme.nl On Thu, 2010-04-08 at 02:18 +0000, MORITA Kazutaka wrote: > Hi, > > On Thu, Apr 8, 2010 at 12:33 AM, Wido den Hollander <wido at pcextreme.nl> wrote: > > Hi, > > > > I'm using the latest version (git revision) of Sheepdog, but when > > getting "obj" information, shepherd segfaults: > > > > root at wido-desktop:~# shepherd info -t obj Wido > > 457951fcbfc62f1 > > 0, 27ca81e942cd0eef, 3207b6b8f585c0b6, 457951fcbfc62f1 > > 1, 3207b6b8f585c0b6, 4f5de28d9ad07d49, 457951fcbfc62f1 > > 2, 4f5de28d9ad07d49, d3d995c9a4f4336a, 457951fcbfc62f1 > > Looking for the inode object 0x80fe96ac00000000 with 4 nodes > > > > Segmentation fault > > Thanks for your report! > Can you try the following patch? > > > diff --git a/shepherd/shepherd.c b/shepherd/shepherd.c > index 1949f13..087c397 100644 > --- a/shepherd/shepherd.c > +++ b/shepherd/shepherd.c > @@ -777,9 +777,15 @@ static void parse_objs(uint64_t oid, obj_parser_func_t func, void *data) > { > char name[128]; > int i, fd, ret; > + char *buf; > + > + buf = zalloc(sizeof(struct sheepdog_inode)); > + if (!buf) { > + fprintf(stderr, "out of memory\n"); > + return; > + } > > for (i = 0; i < nr_nodes; i++) { > - char buf[sizeof(struct sheepdog_inode)]; > unsigned wlen = 0, rlen = sizeof(buf); > struct sd_obj_req hdr; > struct sd_obj_rsp *rsp = (struct sd_obj_rsp *)&hdr; > @@ -808,6 +814,8 @@ static void parse_objs(uint64_t oid, obj_parser_func_t func, void *data) > else > func(name, oid, rsp, buf, data); > } > + > + free(buf); > } > > static void print_obj(char *vdiname, unsigned index) |