https://bugs.dragonflybsd.org/https://bugs.dragonflybsd.org/favicon.ico?16293952082006-02-06T09:45:10ZDragonFlyBSD bugtrackerDragonFlyBSD - Bug #276: Patch to try - Re: Sendmail rset command hangs socket on 1.6-Releasehttps://bugs.dragonflybsd.org/issues/276?journal_id=10412006-02-06T09:45:10Zsven
<ul></ul><p>On Wed, 2006-08-02 at 17:41 -0400, Sven Willenberger wrote:</p>
<blockquote>
<p>On Wed, 2006-08-02 at 10:25 -0700, Matthew Dillon wrote:</p>
<blockquote>
<p>Please try this patch and tell me if it works. I think we have an issue<br />when one process holds an exclusive lock while 2 or more processes are<br />trying to get a shared lock, or vise-versa.</p>
<p>-Matt</p>
<p>Index: kern_lockf.c
===================================================================<br />RCS file: /cvs/src/sys/kern/kern_lockf.c,v<br />retrieving revision 1.32<br />diff <del>u -r1.32 kern_lockf.c<br />--</del> kern_lockf.c 25 Jul 2006 20:01:50 <del>0000 1.32<br />+<ins>+ kern_lockf.c 2 Aug 2006 17:23:56 -0000<br /><code>@ -772,8 +772,10 </code>@<br />TAILQ_REMOVE(&lock</del>>lf_blocked, range, lf_link);<br />range->lf_flags = 1;<br />wakeup(range);<br /></ins>#if 0<br />if (range->lf_start >= start && range->lf_end <= end)<br />break;<br />+#endif<br />}<br />}</p>
</blockquote>
<p>I have applied the patch (and recompiled) and am letting the system run<br />full steam right now (including the milter, etc); the initial results<br />look promising as it has not exhibited the aberrant behavior as of yet.<br />I will post a followup after letting this run all night (assuming it<br />does so) or after it fails (which hopefully won't happen).</p>
<p>Sven</p>
</blockquote>
<p>As a followup, the server has been running without a hitch now for 18<br />hours so it would appear that the above patch has fixed the situation,<br />unless some other more rare situation/condition crops up that would<br />cause this lock.</p>
<p>Sven</p> DragonFlyBSD - Bug #276: Patch to try - Re: Sendmail rset command hangs socket on 1.6-Releasehttps://bugs.dragonflybsd.org/issues/276?journal_id=10422006-02-06T09:45:10Zdillon
<ul></ul><p>:> I have applied the patch (and recompiled) and am letting the system run<br />:> full steam right now (including the milter, etc); the initial results<br />:> look promising as it has not exhibited the aberrant behavior as of yet.<br />:> I will post a followup after letting this run all night (assuming it<br />:> does so) or after it fails (which hopefully won't happen).<br />:> <br />:> Sven<br />:> <br />:<br />:As a followup, the server has been running without a hitch now for 18<br />:hours so it would appear that the above patch has fixed the situation,<br />:unless some other more rare situation/condition crops up that would<br />:cause this lock.<br />:<br />:Sven</p>
<pre><code>Ok, that's good to hear. I'll get the patch committed to both HEAD and<br /> REL.</code></pre>
<pre><code>This bug is serious enough to warrent rolling 1.6.1 next week, probably<br /> Monday.</code></pre>
<pre><code>-Matt<br /> Matthew Dillon <br /> &lt;<a class="email" href="mailto:dillon@backplane.com">dillon@backplane.com</a>&gt;</code></pre> DragonFlyBSD - Bug #276: Patch to try - Re: Sendmail rset command hangs socket on 1.6-Releasehttps://bugs.dragonflybsd.org/issues/276?journal_id=10452006-02-06T09:45:10Zqhwt+dfly
<ul></ul><p>On Thu, Aug 03, 2006 at 08:56:47AM -0700, Matthew Dillon wrote:</p>
<blockquote>
<p>:> I have applied the patch (and recompiled) and am letting the system run<br />:> full steam right now (including the milter, etc); the initial results<br />:> look promising as it has not exhibited the aberrant behavior as of yet.<br />:> I will post a followup after letting this run all night (assuming it<br />:> does so) or after it fails (which hopefully won't happen).<br />:> <br />:> Sven<br />:> <br />:<br />:As a followup, the server has been running without a hitch now for 18<br />:hours so it would appear that the above patch has fixed the situation,<br />:unless some other more rare situation/condition crops up that would<br />:cause this lock.<br />:<br />:Sven</p>
<p>Ok, that's good to hear. I'll get the patch committed to both HEAD and<br />REL.</p>
</blockquote>
<p>Does 1.4.x-RELEASE have this problem too?</p> DragonFlyBSD - Bug #276: Patch to try - Re: Sendmail rset command hangs socket on 1.6-Releasehttps://bugs.dragonflybsd.org/issues/276?journal_id=10462006-02-06T09:45:10Zdillon
<ul></ul><p>:<br />:Does 1.4.x-RELEASE have this problem too?</p>
<pre><code>The lockf code is different in 1.4. There is a similar test in lf_wakeup,<br /> and it doesn't look right to me, but I don't know if the bug can be<br /> triggered or not.</code></pre>
<pre><code>-Matt<br /> Matthew Dillon <br /> &lt;<a class="email" href="mailto:dillon@backplane.com">dillon@backplane.com</a>&gt;</code></pre> DragonFlyBSD - Bug #276: Patch to try - Re: Sendmail rset command hangs socket on 1.6-Releasehttps://bugs.dragonflybsd.org/issues/276?journal_id=10472006-02-06T09:45:10Zhamilton
<ul></ul><p>Matthew Dillon <<a class="email" href="mailto:dillon@apollo.backplane.com">dillon@apollo.backplane.com</a>>, said on Thu Aug 03, 2006 [08:12:27 PM]:<br />} :<br />} :Does 1.4.x-RELEASE have this problem too?<br />} <br />} The lockf code is different in 1.4. There is a similar test in lf_wakeup,<br />} and it doesn't look right to me, but I don't know if the bug can be<br />} triggered or not.</p>
<p>The postfix problem I had was present on 1.4.x as well as 1.6 and 1.7.</p>
<p>-- </p>
<pre><code>Jon Hamilton <br /> <a class="email" href="mailto:hamilton@pobox.com">hamilton@pobox.com</a></code></pre> DragonFlyBSD - Bug #276: Patch to try - Re: Sendmail rset command hangs socket on 1.6-Releasehttps://bugs.dragonflybsd.org/issues/276?journal_id=10512006-02-06T09:45:10Zdillon
<ul></ul><p>:...<br />:} and it doesn't look right to me, but I don't know if the bug can be<br />:} triggered or not.<br />:<br />:The postfix problem I had was present on 1.4.x as well as 1.6 and 1.7.<br />:<br />:-- <br />:<br />: Jon Hamilton <br />: <a class="email" href="mailto:hamilton@pobox.com">hamilton@pobox.com</a></p>
<pre><code>I'll commit a similar patch to 1.4.x to hopefully fix it there.</code></pre>
<pre><code>It looks like I copied the original bug to the new lock code when I<br /> rewrote it during 1.5. I'm not sure when it was first introduced but<br /> it looks like the code attempted to optimize the unblocking code by<br /> breaking out of the loop early in certain situations, but it turns out<br /> the optimization check it was doing was insufficient and it was breaking<br /> out too early.</code></pre>
<pre><code>-Matt<br /> Matthew Dillon <br /> &lt;<a class="email" href="mailto:dillon@backplane.com">dillon@backplane.com</a>&gt;</code></pre> DragonFlyBSD - Bug #276: Patch to try - Re: Sendmail rset command hangs socket on 1.6-Releasehttps://bugs.dragonflybsd.org/issues/276?journal_id=10522006-02-06T09:45:10Zjoerg
<ul></ul><p>On Fri, Aug 04, 2006 at 09:21:30AM -0700, Matthew Dillon wrote:</p>
<blockquote>
<p>It looks like I copied the original bug to the new lock code when I<br />rewrote it during 1.5. I'm not sure when it was first introduced but<br />it looks like the code attempted to optimize the unblocking code by<br />breaking out of the loop early in certain situations, but it turns out<br />the optimization check it was doing was insufficient and it was breaking<br />out too early.</p>
</blockquote>
<p>Braino. The check was the wrong way, e.g. it should check whether the<br />range is covering the given [start, end], not the other way around.</p>
<p>Joerg</p> DragonFlyBSD - Bug #276: Patch to try - Re: Sendmail rset command hangs socket on 1.6-Releasehttps://bugs.dragonflybsd.org/issues/276?journal_id=10602006-02-06T09:45:10Zjustin
<ul></ul><p>Fixed in 1.6.1.</p>