Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Dec 2003 10:41:45 +0900
From:      TOMITA Yoshinori <yoshint@flab.fujitsu.co.jp>
To:        freebsd-current@freebsd.org
Subject:   Re: ypwhich bus error on i386?
Message-ID:  <ywlwu8p8w86.fsf@cerberus.proc.flab.fujitsu.co.jp>
In-Reply-To: <m3u1475542.fsf@merlin.emma.line.org> (Matthias Andree's message of "Fri, 12 Dec 2003 00:03:57 %2B0100")
References:  <m3u1475542.fsf@merlin.emma.line.org>

next in thread | previous in thread | raw e-mail | index | archive | help
>> On Fri, 12 Dec 2003 00:03:57 +0100, Matthias Andree
>> <matthias.andree@gmx.de> said:

Ma> This happens on a very fresh 5-CURRENT install on a Xeon (HTT enabled):
Ma> # ypwhich -m
Ma> ypwhich: can't find the master of `=1B$BPPPPPPPP=1B(Bethers.byaddr: rea=
son: No such map in server's domain
Ma> Bus error (core dumped)


I think this "ypmaster -m" error happens from revision 1.15 of ypwhich.c

struct ypmaplist is defined in <rpcsvc/yp.h> and <rpcsvc/yp_prot.h>
and they are incompatible.

<<yp.h>>
struct ypmaplist {
        mapname map;
        struct ypmaplist *next;
};

<<yp_prot.h>>
struct ypmaplist {
        char ypml_name[YPMAXMAP + 1];
        struct ypmaplist *ypml_next;
};


struct ypmaplist of yp_prot.h is used in ypwhich.c,
while yp_maplist function returns struct ypmaplist of yp.h.


I could find this with gdb ypwhich.

<<revision 1.14>>

(gdb) p ypml
$2 =3D (struct ypmaplist *) 0x804d050
(gdb) p *ypml
$3 =3D {map =3D 0x804d060 "amd_home", next =3D 0x804d080}
(gdb) p ypml+1
$4 =3D (struct ypmaplist *) 0x804d058


<<revision 1.15>>

(gdb) p ypml
$11 =3D (struct ypmaplist *) 0x804d050
(gdb) p *ypml
$12 =3D {
  ypml_name =3D "`=D0\004\b\200=D0\004\b=D0=D0=D0=D0=D0=D0=D0=D0amd_home\0=
=D0=D0=D0=D0=D0=D0=D0udp\0", '=D0' <repeats 12 times>, "=A0=D0\004\b=B0=D0\=
004\b=D0=D0=D0=D0=D0=D0=D0=D0t", ypml_next =3D 0xd0d0d0d0}
(gdb) p ypml+1
$13 =3D (struct ypmaplist *) 0x804d098



=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /usr/local/www/cvsroot/FreeBSD/src/usr.bin/ypwhich/ypwhich.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -p -r1.14 -r1.15
--- src/usr.bin/ypwhich/ypwhich.c	2002/02/27 14:32:43	1.14
+++ src/usr.bin/ypwhich/ypwhich.c	2003/10/26 05:30:40	1.15
@@ -28,12 +28,15 @@
  */
=20
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/usr.bin/ypwhich/ypw=
hich.c,v 1.14 2002/02/27 14:32:43 dwmalone Exp $");
+__FBSDID("$FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/usr.bin/ypwhich/ypw=
hich.c,v 1.15 2003/10/26 05:30:40 peter Exp $");
=20
 #include <sys/param.h>
 #include <sys/types.h>
 #include <sys/socket.h>
=20
+#include <rpc/rpc.h>
+#include <rpc/xdr.h>
+#include <rpcsvc/yp_prot.h>
 #include <rpcsvc/ypclnt.h>
=20
 #include <netinet/in.h>
@@ -47,10 +50,6 @@ __FBSDID("$FreeBSD: /usr/local/www/cvsro
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
-#include <rpc/rpc.h>
-#include <rpc/xdr.h>
-#include <rpcsvc/yp.h>
-struct dom_binding{};

   --snip--


--=20
---
TOMITA Yoshinori
(Fujitsu Laboratories Ltd., Kawasaki, Japan)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ywlwu8p8w86.fsf>