<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to 277: Another app is currently holding the xtables lock.</title><link>https://sourceforge.net/p/fwbuilder/bug-reports-current-version/277/</link><description>Recent changes to 277: Another app is currently holding the xtables lock.</description><atom:link href="https://sourceforge.net/p/fwbuilder/bug-reports-current-version/277/feed.rss" rel="self"/><language>en</language><lastBuildDate>Tue, 06 Feb 2018 17:59:17 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/fwbuilder/bug-reports-current-version/277/feed.rss" rel="self" type="application/rss+xml"/><item><title>#277 Another app is currently holding the xtables lock.</title><link>https://sourceforge.net/p/fwbuilder/bug-reports-current-version/277/?limit=25#6bf3</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;This is because  the the  "-w" will only cause the  task to give up after a defined number of seconds and risk security as the firewall may not have its complete rule set or it will still fail (but maybe less oftem)  "-w &lt;span&gt;[seconds]&lt;/span&gt;    maximum wait to acquire xtables lock before give up"  The newer version of IPtables nolonger sugests this as a work around.  Also i would rather fix an issue than use a sticking plaster.&lt;/p&gt;
&lt;p&gt;I've found the code to replace in  the file in reset_iptables.txt&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Andrew W</dc:creator><pubDate>Tue, 06 Feb 2018 17:59:17 -0000</pubDate><guid>https://sourceforge.netf7e44a66360a9734525d8c5db78176f2e9967602</guid></item><item><title>#277 Another app is currently holding the xtables lock.</title><link>https://sourceforge.net/p/fwbuilder/bug-reports-current-version/277/?limit=30#b9ed</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;What's wrong with using "-w" for iptables as suggested?&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Rado Q</dc:creator><pubDate>Tue, 06 Feb 2018 10:37:03 -0000</pubDate><guid>https://sourceforge.net8b41b564034610fb4bcd6e4f670f0d5f70371a61</guid></item><item><title>#277 Another app is currently holding the xtables lock.</title><link>https://sourceforge.net/p/fwbuilder/bug-reports-current-version/277/?limit=25#fe34</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;I've just had the same issue, and this reolufix fixed it. Thanks Chris&lt;/p&gt;
&lt;p&gt;How can we get this put into the current release. In the mean time can I edit any files in the the curent release. I take it there are templates ?&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Andrew W</dc:creator><pubDate>Mon, 05 Feb 2018 18:54:06 -0000</pubDate><guid>https://sourceforge.netff9785d52118a5af583447ab452aea98acbda70b</guid></item><item><title>Another app is currently holding the xtables lock.</title><link>https://sourceforge.net/p/fwbuilder/bug-reports-current-version/277/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;It seems due to &lt;a class="" href="http://https://patchwork.ozlabs.org/patch/246619/" rel="nofollow"&gt;this change &lt;/a&gt; in iptables code &lt;code&gt;reset_iptables_v4()&lt;/code&gt; function in generated &lt;code&gt;.fw&lt;/code&gt; scripts fails with error:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;Activating firewall script generated Mon Nov 21 10:08:52 2016 by chris
Running prolog script
Another app is currently holding the xtables lock. Perhaps you want to use the -w option?
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;speficically this loop:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="x"&gt;  &lt;/span&gt;&lt;span class="p"&gt;$&lt;/span&gt;&lt;span class="nv"&gt;IPTABLES&lt;/span&gt;&lt;span class="x"&gt; -t &lt;/span&gt;&lt;span class="p"&gt;$&lt;/span&gt;&lt;span class="nv"&gt;table&lt;/span&gt;&lt;span class="x"&gt; -L -n | while read c chain rest; do&lt;/span&gt;
&lt;span class="x"&gt;      if test "X&lt;/span&gt;&lt;span class="p"&gt;$&lt;/span&gt;&lt;span class="nv"&gt;c&lt;/span&gt;&lt;span class="x"&gt;" = "XChain" ; then&lt;/span&gt;
&lt;span class="x"&gt;        &lt;/span&gt;&lt;span class="p"&gt;$&lt;/span&gt;&lt;span class="nv"&gt;IPTABLES&lt;/span&gt;&lt;span class="x"&gt; -t &lt;/span&gt;&lt;span class="p"&gt;$&lt;/span&gt;&lt;span class="nv"&gt;table&lt;/span&gt;&lt;span class="x"&gt; -F &lt;/span&gt;&lt;span class="p"&gt;$&lt;/span&gt;&lt;span class="nv"&gt;chain&lt;/span&gt;&lt;span class="x"&gt;&lt;/span&gt;
&lt;span class="x"&gt;      fi&lt;/span&gt;
&lt;span class="x"&gt;  done&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;creates race condition. The solution I found is to replace it with:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="x"&gt;    chains_to_reset=`&lt;/span&gt;&lt;span class="p"&gt;$&lt;/span&gt;&lt;span class="nv"&gt;IPTABLES&lt;/span&gt;&lt;span class="x"&gt; -t &lt;/span&gt;&lt;span class="p"&gt;$&lt;/span&gt;&lt;span class="nv"&gt;table&lt;/span&gt;&lt;span class="x"&gt; -L -n`&lt;/span&gt;
&lt;span class="x"&gt;    echo "&lt;/span&gt;&lt;span class="p"&gt;$&lt;/span&gt;&lt;span class="nv"&gt;chains_to_reset&lt;/span&gt;&lt;span class="x"&gt;" |  while IFS= read -r line; do&lt;/span&gt;
&lt;span class="x"&gt;      c=`echo &lt;/span&gt;&lt;span class="p"&gt;$&lt;/span&gt;&lt;span class="nv"&gt;line&lt;/span&gt;&lt;span class="x"&gt; | cut -d' ' -f1`&lt;/span&gt;
&lt;span class="x"&gt;      chain=`echo &lt;/span&gt;&lt;span class="p"&gt;$&lt;/span&gt;&lt;span class="nv"&gt;line&lt;/span&gt;&lt;span class="x"&gt; | cut -d' ' -f2`&lt;/span&gt;
&lt;span class="x"&gt;      if test "X&lt;/span&gt;&lt;span class="p"&gt;$&lt;/span&gt;&lt;span class="nv"&gt;c&lt;/span&gt;&lt;span class="x"&gt;" = "XChain" ; then&lt;/span&gt;
&lt;span class="x"&gt;        &lt;/span&gt;&lt;span class="p"&gt;$&lt;/span&gt;&lt;span class="nv"&gt;IPTABLES&lt;/span&gt;&lt;span class="x"&gt; -t &lt;/span&gt;&lt;span class="p"&gt;$&lt;/span&gt;&lt;span class="nv"&gt;table&lt;/span&gt;&lt;span class="x"&gt; -F &lt;/span&gt;&lt;span class="p"&gt;$&lt;/span&gt;&lt;span class="nv"&gt;chain&lt;/span&gt;&lt;span class="x"&gt;&lt;/span&gt;
&lt;span class="x"&gt;      fi&lt;/span&gt;
&lt;span class="x"&gt;    done&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Regards,&lt;br/&gt;
Chris&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Chris Maciejewski</dc:creator><pubDate>Mon, 21 Nov 2016 12:25:48 -0000</pubDate><guid>https://sourceforge.neta70f9c698db261cb5afe35c846483210dc53bbbb</guid></item></channel></rss>