Hi Experts, I used strace to trace an issue that the session hold the file lock for about 20 mins after the client disconnected from the network. Then the session was terminated by Samba. In the strace output, I found select was being called periodically in a loop, returning 0. After minutes, 1 was returned by select then read was called, ETIMEDOUT returned. As a new hand, just want to know if this is the expected behavior. The log and the strace output seem too big to be sent. Just attaching a snip form the strace output: fstat(33, {st_mode=S_IFREG|0644, st_size=1439773, ...}) = 0 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0 geteuid() = 0 write(33, "[2012/04/26 00:00:16.679817, 10]"..., 77) = 77 geteuid() = 0 write(33, " smbd_idle_event_handler: idle_"..., 68) = 68 select(29, [6 8 28], [], NULL, {59, 994672}) = 1 (in [28], left {14, 934695}) read(28, 0x7fff13d0e6c0, 4) = -1 ETIMEDOUT (Connection timed out) stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0 socket(PF_FILE, 0x80002 /* SOCK_??? */, 0) = 34 connect(34, {sa_family=AF_FILE, path="/dev/log"}, 110) = 0 sendto(34, "<27>Apr 26 00:01:01 smbd[32115]:"..., 108, MSG_NOSIGNAL, NULL, 0) = 108 geteuid() = 0 write(33, "[2012/04/26 00:01:01.740501, 0]"..., 75) = 75 getpeername(28, 0x7fff13d0e460, [128]) = -1 ENOTCONN (Transport endpoint is not connected) Thanks in advance! Regards, Pei
Volker Lendecke
2012-Apr-27 06:43 UTC
[Samba] select periodically returns 0 then read ETIMEDOUT
On Fri, Apr 27, 2012 at 12:20:58PM +0800, ?? wrote:> I used strace to trace an issue that the session hold the file lock for > about 20 mins after the client disconnected from the network. Then the > session was terminated by Samba.We need a bit more context. 28 -- that's the client connection? And, can you send the strace and logs of a couple of rounds of this? Thanks, Volker Lendecke -- SerNet GmbH, Bahnhofsallee 1b, 37081 G?ttingen phone: +49-551-370000-0, fax: +49-551-370000-9 AG G?ttingen, HRB 2816, GF: Dr. Johannes Loxen http://www.sernet.de, mailto:kontakt at sernet.de