Dnia 2009-11-24, o godz. 09:08:15
Andrew Deason <[email protected]> napisał(a):

> On Tue, 24 Nov 2009 14:19:43 +0100
> Jakub Witkowski <[email protected]> wrote:
> 
> > After some hunting, I narrowed the problem down to this line in
> > aklog_main.c:
> > 
> >  if ((pwd = getpwuid(getuid())) != NULL)
> 
> This specific line is where the crash occurred? Do you still have the
> core, and can you give the backtrace?
> 
> > My question is, is this a sign of some bug lurking in libnss-afs? 
> > If not, can this code be made optional or reworked to something a
> > little more robust?
> 
> If getpwuid() were segfaulting, my guess is you would see a lot more
> segfaults/aborts than in just aklog. We're not testing pwd->pw_dir for
> NULL in aklog, but I'm not sure if it's possible for it to be.
> 
> You may want to continue this in a bug report (by sending something to
> [email protected]), though it may not be a bug in aklog.
> 

The backtrace follows:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fd9c68ac700 (LWP 22199)]
0x000000000042713f in rxi_Start (event=0x0, arg0=0x1380e00, arg1=0x0,
istack=0) at rx.c:5287 5287         struct rx_peer *peer =
call->conn->peer; (gdb) backtrace
#0  0x000000000042713f in rxi_Start (event=0x0, arg0=0x1380e00,
arg1=0x0, istack=0) at rx.c:5287 #1  0x00007fd9c4bff4f0 in rxi_ReadProc
() from /lib/libnss_afs.so.2 #2  0x00007fd9c4bffa70 in rx_ReadProc32 ()
from /lib/libnss_afs.so.2 #3  0x00007fd9c4c01296 in xdrrx_getint32 ()
from /lib/libnss_afs.so.2 #4  0x00007fd9c4c00943 in afs_xdr_u_int ()
from /lib/libnss_afs.so.2 #5  0x00007fd9c4c010b1 in afs_xdr_array ()
from /lib/libnss_afs.so.2 #6  0x00007fd9c4be2f15 in xdr_namelist ()
from /lib/libnss_afs.so.2 #7  0x00007fd9c4be2149 in PR_IDToName ()
from /lib/libnss_afs.so.2 #8  0x00007fd9c4bd6e3e in ubik_Call ()
from /lib/libnss_afs.so.2 #9  0x00007fd9c4bd561d in ptsid2name
(uid=1281, buffer=0x7fff466043f8, buflen=0x7fff466043f0) at
nss_afs.c:133 #10 0x00007fd9c4bd62d0 in _nss_afs_getpwuid_r (uid=1281,
result_buf=0x7fd9c5dc18a0, buffer=0x1344ab0 "�\021���\177",
buflen=1024, errnop=0x7fd9c68ac698) at nss_afs.c:447 #11
0x00007fd9c5b0f102 in getpwuid_r () from /lib/libc.so.6 #12
0x00007fd9c5b0e9cf in getpwuid () from /lib/libc.so.6 #13
0x0000000000408254 in aklog (argc=1, argv=0x7fff466099d8) at
aklog_main.c:1441 #14 0x0000000000405b47 in main (argc=1,
argv=0x7fff466099d8) at aklog.c:14

For me, it's intriguing that this /only/ happens for aklog. I have
tested various other tools, including a short test program to directly
test of getuid and getpwuid, everything works like it should.


Jakub Witkowski
_______________________________________________
OpenAFS-devel mailing list
[email protected]
https://lists.openafs.org/mailman/listinfo/openafs-devel

Reply via email to