Bugzilla – Bug 1076028
rpc.nfsd immediately exits after Bad File Descriptor on close()
Last modified: 2018-01-30 01:34:07 UTC
Created attachment 756097 [details]
Result from running strace -tt rpc.nfsd 1
Since today's update to snapshot 20180110, rpc.nfsd tries to close a file descriptor twice and then exits due to failure.
My setup is using sssd for authentication with a freeipa server.
From strace -tt rpc.nfsd 1 (see attachment for full):
>16:24:26.616458 close(4) = 0
>16:24:26.616492 getdents(5, /* 0 entries */, 32768) = 0
>16:24:26.616524 close(5) = 0
>16:24:26.616553 openat(AT_FDCWD, "/proc/fs/nfsd/threads", O_WRONLY) = 3
>16:24:26.616591 write(3, "1\n", 2) = 2
>16:24:26.619830 close(3) = 0
>16:24:26.619878 close(4) = -1 EBADF (Bad file descriptor)
>16:24:26.619912 exit_group(0) = ?
>16:24:26.620038 +++ exited with 0 +++
I don't know if helpful, but from gdb:
>(gdb) break close
>(gdb) run 1
>Breakpoint 1, __GI___close (fd=4) at ../sysdeps/unix/sysv/linux/close.c:26
>26 in ../sysdeps/unix/sysv/linux/close.c
>#0 __GI___close (fd=4) at ../sysdeps/unix/sysv/linux/close.c:26
>#1 0x00007ffff76026f4 in sss_cli_close_socket () at src/sss_client/common.c:75
>#2 0x00007ffff7de71e3 in _dl_fini () at dl-fini.c:235
>#3 0x00007ffff7a55ce8 in __run_exit_handlers (status=0, listp=0x7ffff7dd16f8 <__exit_funcs>, run_list_ate
>#4 0x00007ffff7a55d3a in __GI_exit (status=<optimized out>) at exit.c:105
>#5 0x00007ffff7a3df51 in __libc_start_main (main=0x555555555a90 <main>, argc=2, argv=0x7fffffffe6a8, init
> at ../csu/libc-start.c:342
>#6 0x000055555555642a in _start () at ../sysdeps/x86_64/start.S:120
>[Inferior 1 (process 2660) exited normally]
I now think this is actually the correct behaviour!? At least rpc.nfsd
My issue with NFS exports not being mountable anywhere is gone today. This must
have been a different issue. I get the impression that there is some problem in
the whole sssd-ipa+kerberos+nfs+autofs-stack. Between some 42.3 and Tumbleweed
machines, after updates, NFS exports are "randomly" not mounting without
services restarts of autofs, nfs-server or sssd. Not sure how to debug that
properly at the moment.
Regardless, I apologize for the noise. I think this can be closed?
> I now think this is actually the correct behaviour!? At least rpc.nfsd
Yes. rpc.nfsd exiting is correct (it starts kernel threads and leaves them running). The error from close() is expected.
> Regardless, I apologize for the noise. I think this can be closed?
A little noise doesn't hurt. I'll close the bug.