mount:nfsmount failed: Bad file descriptor
xiao.liang at cn.alps.com
xiao.liang at cn.alps.com
Wed Aug 29 02:42:12 UTC 2007
After I try busbox 1.6.1, the bad file descriptor error disappear, but
still got RPC timeout error. And the mount service is still V1. I think it
is due to the failed nfs mount use a very early verion 1 of mount service.
Anyone who knows how to update the mount servce version?
Denys Vlasenko <vda.linux at googlemail.com>
08/28/2007 06:56 PM
宛先
xiao.liang at cn.alps.com
cc
busybox at busybox.net
"hinko.kocevar at cetrtapot.si" <hinko.kocevar at cetrtapot.si>
件名
Re: mount:nfsmount failed: Bad file descriptor
On Tuesday 28 August 2007 04:33, xiao.liang at cn.alps.com wrote:
> When use strace the log is look like this:
>
> root# cat mount.log
> execve("/bin/mount", ["mount", "-t", "nfs", "192.168.1.6:/opt/Qtopia_2",
> "/opt/Qtopia_2"], [/* 10 vars */]) = 0
> uname({sys="Linux", node="imx21", ...}) = 0
> brk(0) = 0xabeec
> old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1,
> 0) = 0x40015000
> open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or
> directory)
> open("/etc/ld.so.cache", O_RDONLY) = -1 ENOENT (No such file or
> directory)
> open("/lib/v5EJl/fast-mult/half/libcrypt.so.1", O_RDONLY) = -1 ENOENT
(No
> such file or directory)
> stat64("/lib/v5EJl/fast-mult/half", 0xbffff2bc) = -1 ENOENT (No such
file
> or directory)
> open("/lib/v5EJl/fast-mult/libcrypt.so.1", O_RDONLY) = -1 ENOENT (No
such
> file or directory)
...
> sendto(3, "]\234\333\177\0\0\0\0\0\0\0\2\0\1\206\245\0\0\0\1\0\0\0"...,
> 88, 0, {sa_family=AF_INET, sin_port=htons(635), sin_addr=inet_addr8
> poll([{fd=3, events=POLLIN}], 1, 3000) = 0
> ioctl(3, 0x8912, 0xbfffcecc) = 0
> ioctl(3, 0x8913, 0xbfffced4) = 0
> sendto(3, "]\234\333\177\0\0\0\0\0\0\0\2\0\1\206\245\0\0\0\1\0\0\0"...,
> 88, 0, {sa_family=AF_INET, sin_port=htons(635), sin_addr=inet_addr8
> poll([{fd=3, events=POLLIN}], 1, 3000) = 0
> ioctl(3, 0x8912, 0xbfffcecc) = 0
> ioctl(3, 0x8913, 0xbfffced4) = 0
> write(2, "mount: RPC: Timed out\n", 22) = 22
> close(3) = 0
> close(3) = -1 EBADF (Bad file descriptor)
> write(2, "mount: ", 7) = 7
> write(2, "nfsmount failed", 15) = 15
> write(2, ": Bad file descriptor\n", 22) = 22
> write(2, "mount: ", 7) = 7
> write(2, "Mounting 192.168.1.6:/opt/Qtopia"..., 58) = 58
> write(2, ": Bad file descriptor\n", 22) = 22
> _exit(1) = ?
Thank you for this wonderfully linewrapped listing.
It was a real joy fixing it up ;)
Ok, Im serious again. Is this 1.6.1?
if it is not, please try 1.6.1.
If it is, please try adding "msock = -1" in mount.c:
/* Connection refused */
if (!daemonized && prevt == 0) /* print just once
*/
error_msg_rpc(clnt_sperror(mclient, " "));
auth_destroy(mclient->cl_auth);
clnt_destroy(mclient);
mclient = 0;
close(msock);
+ msock = -1;
and here:
/* clean up */
auth_destroy(mclient->cl_auth);
clnt_destroy(mclient);
close(msock);
+ msock = -1;
This may fix extra close() and prevent bogus error message about
"Bad file descriptor". In reality you are seeing timeout:
time(NULL) = 197
socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 3
getpid() = 60
bind(3, {sa_family=AF_INET, sin_port=htons(660),
sin_addr=inet_addr("0.0.0.0")}, 16) = 0
connect(3, {sa_family=AF_INET, sin_port=htons(111),
sin_addr=inet_addr("192.168.1.6")}, 16) = -1 ETIMEDOUT (Connection timed
out)
close(3) = 0
brk(0) = 0xad000
brk(0xb1000) = 0xb1000
gettimeofday({386, 767720}, NULL) = 0
See? Connection to portmapper failed after almost 200 seconds of trying.
And then attempts to use default port and reach mount directly time out
too
(poll() waits for 3 seconds and returns 0 -> no reply received):
socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP) = 3
bind(3, {sa_family=AF_INET, sin_port=htons(661),
sin_addr=inet_addr("0.0.0.0")}, 16) = 0
ioctl(3, FIONBIO, [1]) = 0
setsockopt(3, SOL_IP, IP_RECVERR, [1], 4) = 0
uname({sys="Linux", node="imx21", ...}) = 0
geteuid32() = 0
getegid32() = 0
getgroups32(0x20, 0xbffff0bc) = 0
gettimeofday({386, 811220}, NULL) = 0
sendto(3, "]\234\333\177\0\0\0\0\0\0\0\2\0\1\206\245\0\0\0\1\0\0\0"...,
88, 0,
{sa_family=AF_INET, sin_port=htons(635), sin_addr=inet_addr8
poll([{fd=3, events=POLLIN}], 1, 3000) = 0
ioctl(3, 0x8912, 0xbfffcecc) = 0
ioctl(3, 0x8913, 0xbfffced4) = 0
sendto(3, "]\234\333\177\0\0\0\0\0\0\0\2\0\1\206\245\0\0\0\1\0\0\0"...,
88, 0,
{sa_family=AF_INET, sin_port=htons(635), sin_addr=inet_addr8
poll([{fd=3, events=POLLIN}], 1, 3000) = 0
ioctl(3, 0x8912, 0xbfffcecc) = 0
ioctl(3, 0x8913, 0xbfffced4) = 0
sendto(3, "]\234\333\177\0\0\0\0\0\0\0\2\0\1\206\245\0\0\0\1\0\0\0"...,
88, 0,
{sa_family=AF_INET, sin_port=htons(635), sin_addr=inet_addr8
poll([{fd=3, events=POLLIN}], 1, 3000) = 0
ioctl(3, 0x8912, 0xbfffcecc) = 0
ioctl(3, 0x8913, 0xbfffced4) = 0
sendto(3, "]\234\333\177\0\0\0\0\0\0\0\2\0\1\206\245\0\0\0\1\0\0\0"...,
88, 0,
{sa_family=AF_INET, sin_port=htons(635), sin_addr=inet_addr8
poll([{fd=3, events=POLLIN}], 1, 3000) = 0
ioctl(3, 0x8912, 0xbfffcecc) = 0
ioctl(3, 0x8913, 0xbfffced4) = 0
sendto(3, "]\234\333\177\0\0\0\0\0\0\0\2\0\1\206\245\0\0\0\1\0\0\0"...,
88, 0,
{sa_family=AF_INET, sin_port=htons(635), sin_addr=inet_addr8
poll([{fd=3, events=POLLIN}], 1, 3000) = 0
ioctl(3, 0x8912, 0xbfffcecc) = 0
ioctl(3, 0x8913, 0xbfffced4) = 0
sendto(3, "]\234\333\177\0\0\0\0\0\0\0\2\0\1\206\245\0\0\0\1\0\0\0"...,
88, 0,
{sa_family=AF_INET, sin_port=htons(635), sin_addr=inet_addr8
poll([{fd=3, events=POLLIN}], 1, 3000) = 0
ioctl(3, 0x8912, 0xbfffcecc) = 0
ioctl(3, 0x8913, 0xbfffced4) = 0
sendto(3, "]\234\333\177\0\0\0\0\0\0\0\2\0\1\206\245\0\0\0\1\0\0\0"...,
88, 0,
{sa_family=AF_INET, sin_port=htons(635), sin_addr=inet_addr8
poll([{fd=3, events=POLLIN}], 1, 3000) = 0
ioctl(3, 0x8912, 0xbfffcecc) = 0
ioctl(3, 0x8913, 0xbfffced4) = 0
write(2, "mount: RPC: Timed out\n", 22) = 22
close(3) = 0
close(3) = -1 EBADF (Bad file descriptor)
write(2, "mount: ", 7) = 7
write(2, "nfsmount failed", 15) = 15
write(2, ": Bad file descriptor\n", 22) = 22
Apart from bogus close() screwing up error code, I dont see
any problem on client side. It simply cannot reach the server.
--
vda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.busybox.net/pipermail/busybox/attachments/20070829/86d1e3df/attachment-0002.htm
More information about the busybox
mailing list