https://redmine.pfsense.org/https://redmine.pfsense.org/favicon.ico?16780521162017-09-11T15:03:06ZpfSense bugtrackerpfSense - Bug #7790: dpinger / code using it, falsely defines a down gateway as up after dpinger gets restarted.https://redmine.pfsense.org/issues/7790?journal_id=338372017-09-11T15:03:06ZRenato Botelhorenato@netgate.com
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Feedback</i></li></ul><p>PR has been merged, thanks</p> pfSense - Bug #7790: dpinger / code using it, falsely defines a down gateway as up after dpinger gets restarted.https://redmine.pfsense.org/issues/7790?journal_id=338712017-09-11T16:20:32ZJim Thompsonjim@netgate.com
<ul><li><strong>Assignee</strong> set to <i>Pi Ba</i></li></ul> pfSense - Bug #7790: dpinger / code using it, falsely defines a down gateway as up after dpinger gets restarted.https://redmine.pfsense.org/issues/7790?journal_id=338752017-09-12T07:17:51ZPi Ba
<ul></ul><p>Works for me :). But then again, i made the patch. Would be weird if it didn't 'fix' my reported issue..</p>
<p>Question that remains is if this is the proper workaround.? Or should apinger be changed to more clearly report it hasn't gathered enough data yet to give usable results.?</p>
<p>Checked with version:<br />2.4.0-RC (amd64) <br />built on Mon Sep 11 21:38:52 CDT 2017 <br />FreeBSD 11.0-RELEASE-p12</p> pfSense - Bug #7790: dpinger / code using it, falsely defines a down gateway as up after dpinger gets restarted.https://redmine.pfsense.org/issues/7790?journal_id=339102017-09-15T14:52:23ZJim Pingle
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Resolved</i></li></ul><p>Seems OK, though I did have to push a fix because this resulted in PHP errors in some cases. See <a class="changeset" title="Move this file_exists test inside the dpinger status check loop and also suppress PHP errors from..." href="https://redmine.pfsense.org/projects/pfsense/repository/2/revisions/59104a6ff6c862482eddb9696fd8d22dec89052e">59104a6ff6c862482eddb9696fd8d22dec89052e</a></p> pfSense - Bug #7790: dpinger / code using it, falsely defines a down gateway as up after dpinger gets restarted.https://redmine.pfsense.org/issues/7790?journal_id=339172017-09-15T15:11:35ZPi Ba
<ul></ul><p>So 'file exists' check returns true, but then it doesn't exist.. Wondering how that can be ;) well i probably dont want to know.. (can of worms..)</p> pfSense - Bug #7790: dpinger / code using it, falsely defines a down gateway as up after dpinger gets restarted.https://redmine.pfsense.org/issues/7790?journal_id=339182017-09-15T15:17:45ZJim Pingle
<ul></ul><p>Because during the sleep while it's in the loop, the file can disappear if something happens in the background.</p> pfSense - Bug #7790: dpinger / code using it, falsely defines a down gateway as up after dpinger gets restarted.https://redmine.pfsense.org/issues/7790?journal_id=339222017-09-15T15:40:55ZPi Ba
<ul></ul><p>Thats kinda what i meant with "i dont want to know", as even though now the check and usage are always only microseconds apart 'something' might still happen in the background.<br />But yes the chance of it happening likely did decrease so much that no-one will encounter it again (anytime soon).</p>
<p>Adding 'locks' around lots of things to avoid such situations 100% would likely cause more issues than it solves.. and even then 'something' might happen that was not planned. a crash of dpinger or out of memory, a corrupted memory bit or something else unforeseen :)<br />I should probably leave it at that and hope that pfSense 3.0 has a different framework that avoids most of these background 'unexpected' changes.</p>
<p>Anyhow thanks for improving it!</p> pfSense - Bug #7790: dpinger / code using it, falsely defines a down gateway as up after dpinger gets restarted.https://redmine.pfsense.org/issues/7790?journal_id=339232017-09-15T15:44:43ZJim Pingle
<ul></ul><p>Yes it was definitely weird, I saw it on maybe 3/12 test systems (so ~1/4) but not every boot either. They're all OK with the current change though.</p>