https://forge.ispras.ru/https://forge.ispras.ru/favicon.ico?16490126692011-02-11T08:32:52ZOpen-Source ProjectsLinux Driver Verification - Bug #833: CSD - Bind address errorhttps://forge.ispras.ru/issues/833?journal_id=22902011-02-11T08:32:52ZPavel Shvedpavel.shved@gmail.com
<ul></ul><p>A way to do it without races is like this. Do not first check, then start server with the port found. Just start server at once, and if it fails with "already in use" error, attempt to start it on the next port. This way you'll start a server without any races.</p>
<p>Then the server somehow informs the calling program about the port it's managed to bind to (via standard output, or a pid-based temp file), and the calling program connects to that port.</p>
<p>To make a workaround, you might just sleep for a random time before checking if the port's in use.</p> Linux Driver Verification - Bug #833: CSD - Bind address errorhttps://forge.ispras.ru/issues/833?journal_id=22912011-02-11T09:09:52ZAlexandr Strakhstrakh@ispras.ru
<ul></ul><p>I will check the STDERR for a message "address already in use" in case of crash CSD. And then try to run CSD with new address.</p> Linux Driver Verification - Bug #833: CSD - Bind address errorhttps://forge.ispras.ru/issues/833?journal_id=22922011-02-11T09:12:07ZPavel Shvedpavel.shved@gmail.com
<ul></ul><p>Alexandr Strakh wrote:</p>
<blockquote>
<p>I will check the STDERR for a message "address already in use" in case of crash CSD. And then try to run CSD with new address.</p>
</blockquote>
<p>Ok, but make sure you'll still show other error messages to user. Don't forget to add comments about that!</p> Linux Driver Verification - Bug #833: CSD - Bind address errorhttps://forge.ispras.ru/issues/833?journal_id=24762011-02-22T18:41:59ZPavel Shvedpavel.shved@gmail.com
<ul><li><strong>Assignee</strong> changed from <i>Alexandr Strakh</i> to <i>Pavel Shved</i></li></ul><p>Reassigning Alexander's bugs, due to his transfer to the other project.</p> Linux Driver Verification - Bug #833: CSD - Bind address errorhttps://forge.ispras.ru/issues/833?journal_id=34162011-04-25T07:28:39ZPavel Shvedpavel.shved@gmail.com
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Rejected</i></li></ul><p>This is good old "Bind address error" from bug <a class="issue tracker-1 status-2 priority-4 priority-default" title="Bug: CSD - Bind address error (Open)" href="https://forge.ispras.ru/issues/833">#833</a>. Night tests were running simultaneously with tests for the new commits in master.</p>
<p>Closing as a duplicate.</p> Linux Driver Verification - Bug #833: CSD - Bind address errorhttps://forge.ispras.ru/issues/833?journal_id=34182011-04-25T07:37:06ZPavel Shvedpavel.shved@gmail.com
<ul><li><strong>Status</strong> changed from <i>Rejected</i> to <i>Open</i></li><li><strong>Priority</strong> changed from <i>Normal</i> to <i>High</i></li></ul><p>... now <strong>that</strong> was as stupid race condition bug in Redmine...</p> Linux Driver Verification - Bug #833: CSD - Bind address errorhttps://forge.ispras.ru/issues/833?journal_id=35272011-05-05T20:07:28ZPavel Shvedpavel.shved@gmail.com
<ul></ul><p>Just to not forget.</p>
<p>On my way home I realized one important thing, inspired by <a href="http://forge.ispras.ru/issues/974#note-4" class="external">comment 4</a> to bug <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: ldv-core skips drivers under heavy load (Closed)" href="https://forge.ispras.ru/issues/974">#974</a>. This issue with race condition in address assignment would be much easier to solve if ldv-core was the server, and CSD was the client, not vice versa...</p> Linux Driver Verification - Bug #833: CSD - Bind address errorhttps://forge.ispras.ru/issues/833?journal_id=35542011-05-11T07:19:20ZPavel Shvedpavel.shved@gmail.com
<ul><li><strong>Priority</strong> changed from <i>High</i> to <i>Normal</i></li></ul><p>It will become less urgent when we'll make QA server not require builds for each commit.</p> Linux Driver Verification - Bug #833: CSD - Bind address errorhttps://forge.ispras.ru/issues/833?journal_id=69392012-01-06T18:29:01ZAlexey Khoroshilovkhoroshilov@ispras.ru
<ul></ul><p>The right solution is proposed above:</p>
<p>Pavel Shved wrote:</p>
<blockquote>
<p>if ldv-core was the server, and CSD was the client, not vice versa...</p>
</blockquote>
<p>For now, trying to reduce probability of the race, I have committed a patch to select random ports from 8080 to 8099 instead of predefined sequence starting from 8080.</p> Linux Driver Verification - Bug #833: CSD - Bind address errorhttps://forge.ispras.ru/issues/833?journal_id=69432012-01-07T19:28:54ZEvgeny Novikovnovikov@ispras.ru
<ul></ul><p>I don't know internals, but can't we "lock" a found address at the same time when it's found? In this case other ldv-core instances will find other addresses...</p> Linux Driver Verification - Bug #833: CSD - Bind address errorhttps://forge.ispras.ru/issues/833?journal_id=173372013-08-07T07:06:23ZEvgeny Novikovnovikov@ispras.ru
<ul><li><strong>Category</strong> deleted (<del><i>Infrastructure</i></del>)</li><li><strong>Assignee</strong> changed from <i>Pavel Shved</i> to <i>Ilja Zakharov</i></li></ul><p>Please, read it thoroughly!</p>