SMB oddness

Steven N. Hirsch (shirsch@ibm.net)
Sat, 22 Nov 1997 11:08:22 -0500 (EST)


Bill,

Here's some more input on my ongoing saga with smbfs and WfW.

*****************************

1) Brought up WfW 3.11, mounted from 2.1.65, ran 'iozone auto':

Nov 22 10:37:27 cy kernel: smb_newconn: server not locked, count=1
Nov 22 10:37:27 cy kernel: smb_offerconn: server not locked, count=1
Nov 22 10:37:27 cy kernel: smb_offerconn: state valid, pid=221
Nov 22 10:37:35 cy kernel: smb_request_ok: rcls=1, err=18 mapped to 0
Nov 22 10:37:36 cy last message repeated 2 times
Nov 22 10:37:40 cy kernel: smb_proc_open: BENCH/iozone.tmp R/W failed, error=-26, retrying R/O
Nov 22 10:37:40 cy kernel: smb_open: BENCH/iozone.tmp access denied, access=0, wish=1

It failed with "Error writing block 0".

****************************

2) Tried again:

Nov 22 10:38:47 cy kernel: smb_request_ok: rcls=1, err=18 mapped to 0

It ran correctly.

***************************

3) Umounted the smb share from Linux, then remounted and re-ran iozone:

Nov 22 10:39:27 cy kernel: smb_newconn: server not locked, count=1
Nov 22 10:39:27 cy kernel: smb_offerconn: server not locked, count=1
Nov 22 10:39:27 cy kernel: smb_offerconn: state valid, pid=236
Nov 22 10:39:49 cy kernel: smb_request_ok: rcls=1, err=18 mapped to 0
Nov 22 10:39:49 cy last message repeated 2 times

It ran correctly.

**************************

4) Umounted the smb share, shut down and restarted WfW, remounted and
ran 'strace -o /tmp/output iozone auto':

Nov 22 10:42:37 cy kernel: smb_newconn: server not locked, count=1
Nov 22 10:42:37 cy kernel: smb_offerconn: server not locked, count=1
Nov 22 10:42:37 cy kernel: smb_offerconn: state valid, pid=252
Nov 22 10:42:52 cy kernel: smb_proc_open: BENCH/iozone.tmp R/W failed, error=-26, retrying R/O
Nov 22 10:42:52 cy kernel: smb_open: BENCH/iozone.tmp access denied, access=0, wish=1

This was the strace capture:

execve("/usr/local/bin/iozone", ["iozone", "auto"], [/* 26 vars */]) = 0
mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40007000
mprotect(0x40000000, 20180, PROT_READ|PROT_WRITE|PROT_EXEC) = 0
mprotect(0x8048000, 16924, PROT_READ|PROT_WRITE|PROT_EXEC) = 0
stat("/etc/ld.so.cache", {st_mode=S_IFREG|0644, st_size=13499, ...}) = 0
open("/etc/ld.so.cache", O_RDONLY) = 4
mmap(0, 13499, PROT_READ, MAP_SHARED, 4, 0) = 0x40008000
close(4) = 0
stat("/etc/ld.so.preload", 0xbffffbe0) = -1 ENOENT (No such file or directory)
open("/lib/libc.so.5", O_RDONLY) = 4
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3"..., 4096) = 4096
mmap(0, 794624, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4000c000
mmap(0x4000c000, 562371, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 4, 0) = 0x4000c000
mmap(0x40096000, 20304, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4, 0x89000) = 0x40096000
mmap(0x4009b000, 207288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4009b000
close(4) = 0
mprotect(0x4000c000, 562371, PROT_READ|PROT_WRITE|PROT_EXEC) = 0
munmap(0x40008000, 13499) = 0
mprotect(0x8048000, 16924, PROT_READ|PROT_EXEC) = 0
mprotect(0x4000c000, 562371, PROT_READ|PROT_EXEC) = 0
mprotect(0x40000000, 20180, PROT_READ|PROT_EXEC) = 0
personality(PER_LINUX) = 0
geteuid() = 600
getuid() = 600
getgid() = 1
getegid() = 1
brk(0x805da64) = 0x805da64
brk(0x805e000) = 0x805e000
fstat(1, {st_mode=S_IFCHR|0666, st_rdev=makedev(4, 195), ...}) = 0
mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40008000
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
write(1, "\n", 1) = 1
write(1, "\tIOZONE: Performance Test of Se"..., 71) = 71
write(1, "\t\tBy Bill Norcott\n\n", 19) = 19
write(1, "\tOperating System: POSIX 1003.1"..., 55) = 55
sigaction(SIGINT, {0x8049090, [], SA_INTERRUPT|SA_NOMASK|SA_ONESHOT}, {SIG_DFL}) = 0
sigaction(SIGTERM, {0x8049090, [], SA_INTERRUPT|SA_NOMASK|SA_ONESHOT}, {SIG_DFL}) = 0
write(1, "IOZONE: auto-test mode \n\n", 25) = 25
write(1, "\tMB reclen bytes/sec writ"..., 58) = 58
brk(0x806f000) = 0x806f000
creat("iozone.tmp", 0640) = 4
times({tms_utime=0, tms_stime=0, tms_cutime=0, tms_cstime=0}) = 4428692
times({tms_utime=0, tms_stime=0, tms_cutime=0, tms_cstime=0}) = 4428692
write(4, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 512) = -1 EACCES (Permission denied)
write(1, "Error writing block 0\n", 22) = 22
stat("/etc/locale/C/libc.cat", 0xbffff6e4) = -1 ENOENT (No such file or directory)
stat("/usr/share/locale/C/libc.cat", 0xbffff6e4) = -1 ENOENT (No such file or directory)
stat("/usr/share/locale/libc/C", 0xbffff6e4) = -1 ENOENT (No such file or directory)
stat("/usr/share/locale/C/libc.cat", 0xbffff6e4) = -1 ENOENT (No such file or directory)
stat("/usr/local/share/locale/C/libc.cat", 0xbffff6e4) = -1 ENOENT (No such file or directory)
write(2, "iozone: Permission denied\n", 26) = 26
close(4) = 0
unlink("iozone.tmp") = 0
_exit(1) = ?

This appears to be a WfW wart which occurs when writing to the first
newly-created file on the server. Hopefully this information will suggest
a workaround?

Steve