> Hi,
>
> Since i upgraded to Linux Redhat 9.0 / samba-2.2.7a-8.9.0 / kernel
2.4.20-9 > i have the following problem:
>
> # smbmount //amd/Films /mnt/disk -o username=jan,password=XXXXXX
> #
>
> In 50% of the times i do this command it mounts the share and goes into
> daemon mode and ps -aux shows one process smbmount. All ok.
>
> However in the other 50% the command just hangs. If i open a new window
> it did do the mount (i can do ls in /mnt/dsk and see the files). But
smbmount> doesn't return me to the linux prompt. When i do 'ps auxf' i
see two
smbmount> processes of which the second one is a child of the first one.
>
> I can do CTRL-C here in the first window and stop that smbmount and it
> leaves o n e smbmount process.
>
> When i add the option debug=10 for example, the output is exactly the same
> the time it hangs and when not (last line is '10585: tconx ok').
But in
half> of the
> cases it doesn't return to the linux prompt and just hangs there idle
until> i press
> ctrl-c.
>
> I have this same behaviour on two different machines with the same RH
> version.
>
> Jan
Some more information. It happens on all versions also the samba-3.0alpha23
version. I ran it through strace and the results are below. I have no idea
what's
going on and why it hangs. When it hangs there are two mount.smbfs processes
and the mount is in wait4 state exactly like the strace shows below.
What?s going on here????
0 S 0 26041 25701 0 76 0 - 917 wait4 pts/0 00:00:00 mount
4 S 0 26042 26041 0 83 0 - 682 schedu pts/0 00:00:00
mount.smbfs
1 S 0 26043 26042 0 83 0 - 650 pause ? 00:00:00
mount.smbfs
=====================================================Output of strace where
mount returns normally:
=====================================================umask(022)
= 022
open("/dev/null", O_RDWR|O_LARGEFILE) = 3
close(3) = 0
getuid32() = 0
geteuid32() = 0
lstat64("/etc/mtab", {st_mode=S_IFREG|0644, st_size=326, ...}) = 0
stat64("/sbin/mount.smbfs", {st_mode=S_IFREG|0755, st_size=574846,
...}) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|0x11,
<ignored>, <ignored>, 0x400212c8) = 25739
wait4(-1, [WIFEXITED(s) && WEXITSTATUS(s) == 0], 0, NULL) = 25739
exit_group(0)
=====================================================Output of strace where
mount hangs at the end:
=====================================================
umask(022) = 022
open("/dev/null", O_RDWR|O_LARGEFILE) = 3
close(3) = 0
getuid32() = 0
geteuid32() = 0
lstat64("/etc/mtab", {st_mode=S_IFREG|0644, st_size=326, ...}) = 0
stat64("/sbin/mount.smbfs", {st_mode=S_IFREG|0755, st_size=574846,
...}) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|0x11,
<ignored>, <ignored>, 0x400212c8) = 25746
wait4(-1,
=====================================================Like you can see the wait4
line isn't finished even in
this output:
If i dig further with the strace -f option:
=====================================================
[pid 25798] wait4(-1, <unfinished ...>
[pid 25799] --- SIGSTOP (Stopped (signal)) @ 0 (0) ---
[pid 25799] --- SIGSTOP (Stopped (signal)) @ 0 (0) ---
[pid 25799] stat64("/usr/bin/smbmnt", {st_mode=S_IFREG|0755,
st_size=561294,
...}) = 0
[pid 25799] execve("/usr/bin/smbmnt", ["smbmnt",
"/mnt/backup", "-s",
"//Cdserver/Leerling", "-o", ""], [/* 34 vars */])
= 0
[pid 25799] uname({sys="Linux",
node="pandora.augustinusschool.nl", ...}) 0
........ <snip> .............
[pid 25798] open("/var/log/samba/smbmount.log",
O_WRONLY|O_APPEND|O_CREAT|O_LARGEFILE, 0666) = 0
[pid 25798] fstat64(0, {st_mode=S_IFREG|0644, st_size=35818, ...}) = 0
[pid 25798] mmap2(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40017000
[pid 25798] fstat64(0, {st_mode=S_IFREG|0644, st_size=35818, ...}) = 0
[pid 25798] _llseek(0, 35818, [35818], SEEK_SET) = 0
[pid 25798] munmap(0x40017000, 4096) = 0
[pid 25798] umask(022) = 022
[pid 25798] time(NULL) = 1050740324
[pid 25798] geteuid32() = 0
[pid 25798] write(0, "[2003/04/19 10:18:44, 0] client/"..., 63) = 63
[pid 25798] getpid() = 25798
[pid 25798] geteuid32() = 0
[pid 25798] write(0, " mount.smbfs: entering daemon m"..., 79) = 79
[pid 25798] rt_sigaction(SIGUSR1, {0x804b120, [USR1],
SA_RESTORER|SA_RESTART, 0x420276f8}, NULL, 8) = 0
[pid 25798] pause(
=====================================================
And again the mount command hangs at the end (pause line
unfinished in the strace output).
Strange is also that if i use the strace -f option which
generates more outpur that the mount command always hangs
and not in 50% of the cases like without stracing.
Jan