Another showstopper in 2.2.5
Fredrik Ohrn
ohrn at chl.chalmers.se
Tue Aug 20 07:51:01 GMT 2002
On Tue, 20 Aug 2002, David Collier-Brown wrote:
> Fredrik Ohrn wrote:
> > Sooner or later the smbd dies on a SIGPIPE when trying to send a
> > keepalive. The SIGPIPE isn't catched, thus it leaves stale sharemodes.
>
> Thank you, Oh Kind Person!
> (I was wondering how this could possibly happen, you see)
>
Here's more good news.
After getting a hint on signalhandling I put a BlockSignals call into
send_keepalive.
--- lib/util_sock.c.org Tue Aug 20 12:31:58 2002
+++ lib/util_sock.c Tue Aug 20 12:33:15 2002
@@ -401,6 +401,7 @@
buf[0] = 0x85;
buf[1] = buf[2] = buf[3] = 0;
+ BlockSignals(True,SIGPIPE);
return(write_socket_data(client,(char *)buf,4) == 4);
}
This protects the smbd from flaming death, instead I get these (harmless)
messages in the log:
[2002/08/20 18:21:37, 0, pid=3392] lib/util_sock.c:write_socket_data(501)
write_socket_data: write failure. Error = Broken pipe
[2002/08/20 18:21:37, 0, pid=3392] smbd/process.c:timeout_processing(1147)
password server keepalive failed.
Apparently it's the password-server, not the client that drops the ball.
We are using samba 2.2.5 with a ldap backend as our domaincontroller and
the fileservers use 'security = server'.
Anyway, I don't know if send_keepalive is the correct place to block
signals or if it should be done higher up in the chain, I'll leave that
for you samba gurus to decide.
I have pounded at my quick-fixed server for an hour now and my problems
with broken Word documents etc. seems to be gone, nor have I seen any bad
sideeffects (yet).
/Fredrik, happy as a clam.
--
"It is easy to be blinded to the essential uselessness of computers by
the sense of accomplishment you get from getting them to work at all."
- Douglas Adams
Fredrik Öhrn Chalmers University of Technology
ohrn at chl.chalmers.se Sweden
More information about the samba-technical
mailing list