Date: Mon, 12 Apr 1999 17:43:30 -0400 From: "David E. Cross" <crossd@cs.rpi.edu> To: Dan Nelson <dnelson@emsphone.com> Cc: "David E. Cross" <crossd@cs.rpi.edu>, freebsd-hackers@FreeBSD.ORG, crossd@cs.rpi.edu Subject: Re: ypserv Message-ID: <199904122143.RAA25814@cs.rpi.edu> In-Reply-To: Message from Dan Nelson <dnelson@emsphone.com> of "Mon, 12 Apr 1999 16:23:56 CDT." <19990412162356.A42830@dan.emsphone.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> 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: > > > > "<functionname+number>" 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199904122143.RAA25814>