From owner-freebsd-hackers Mon Apr 12 14:46: 7 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from cs.rpi.edu (mumble.cs.rpi.edu [128.213.8.16]) by hub.freebsd.org (Postfix) with ESMTP id 18C0315542 for ; Mon, 12 Apr 1999 14:45:55 -0700 (PDT) (envelope-from crossd@cs.rpi.edu) Received: from cs.rpi.edu (monica.cs.rpi.edu [128.213.7.2]) by cs.rpi.edu (8.9.1/8.9.1) with ESMTP id RAA25814; Mon, 12 Apr 1999 17:43:31 -0400 (EDT) Message-Id: <199904122143.RAA25814@cs.rpi.edu> To: Dan Nelson Cc: "David E. Cross" , freebsd-hackers@FreeBSD.ORG, crossd@cs.rpi.edu Subject: Re: ypserv In-Reply-To: Message from Dan Nelson of "Mon, 12 Apr 1999 16:23:56 CDT." <19990412162356.A42830@dan.emsphone.com> Date: Mon, 12 Apr 1999 17:43:30 -0400 From: "David E. Cross" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > In the last episode (Apr 12), David E. Cross said: > > Our ypserv processes have been dieing a great deal lately (luckily > > they restart themselves, but not before all the clients rebind to > > another machine). I have tracked the problem down to a stack > > corruption. Apparently caused by a stack overflow (I am still > > working on it, don't get excited yet ;). I have run into a bit of a > > snag with gdb, I do not understand the following when I print out a > > function pointer: > > > > "" I have found many such references to the > > same function, but with different numbers. I am confused as to what > > this notation means, I haven't found any reference to it in the gdb > > manpage or the gdb "info". > > It's the offset (in bytes) into a function from a source file not > compiled with "-g". gcc can't get line-number information, so it > prints the next best thing. > > The solution is to recompile ypserv with CFLAGS=-g, and make sure you > install a non-stripped version. Then gdb will be able to print line > number and variable contents from coredumps. ypserv is compiled with debugging information, not stripped, and is compiled statically. The reference that I am referring to is not in a backtrace in GDB it is the result of "print *functionpointer", where functionpointer is later used to call a function with arguments that do not match that function. For example, I see the following in the code: *(dbp->seq)(dbp, &ldata, &lkey, ...,...); I do "print dbp->seq" and I see "<__hash_open+14541>" (number made up). If I then look at __hash_open, I see it takes char *filename, ... (things I forget). So the parameters that are being passed clearly do not match what the function is expecting, but I doubt it is calling that function at all. -- David Cross | WinNT:Linux::Linux:FreeBSD Systems Administrator/Research Programmer | Rensselaer Polytechnic Institute, | This space intentionally Department of Computer Science | left unblank I speak only for myself. | To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message