fcntl spinlock in Linux?

Volker Lendecke Volker.Lendecke at SerNet.DE
Tue Aug 13 22:34:50 MDT 2013


On Tue, Aug 13, 2013 at 05:15:43PM -0400, Alex Korobkin wrote:
> I found this discussion here, while troubleshooting an issue with kernel
> getting stuck in spin_lock() when a Samba 3.6-based printserver serves
> multiple Windows clients.
> https://lists.samba.org/archive/samba-technical/2013-January/090122.html
> 
> The issue is hard to reproduce. All I can see is random printservers
> crashing once in several days, with kernel (v3.2.5) being stuck in the same
> spin_lock function.
> 
> The discussion suggests this patch to try with the kernel:
> https://lists.samba.org/archive/samba-technical/2013-January/090224.html

That patch will probably not solve all the problems with the
fcntl spinlock. A different version of this patch has gone
into 3.11 I believe, but I have not fully followed that
development (sorry, Jeff... :-))

> I'm not very confident about patching the kernel, and curious if there is
> anything I could try to mitigate it on Samba's side. What would you
> recommend?

Wait a bit. We have code now that will avoid that mutex by
using robust pthread mutexes instead of fcntl. This requires
a relatively recent kernel and glibc and some patches to
Samba and tdb. Initial tests work fine and improve things
significantly, but just yesterday a deadlock involving that
code was reported to me. I'm not sure yet this deadlock is
mutex-specific, it might be something else. I'm working on
that at this very moment.

Volker

-- 
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


More information about the samba-technical mailing list