From: Juergen Gross <jgross@suse.com>
To: Wei Liu <wei.liu2@citrix.com>
Cc: ross.lagerwall@citrix.com, dave@recoil.org,
ian.jackson@eu.citrix.com, andrew.cooper3@citrix.com,
xen-devel@lists.xen.org
Subject: Re: [PATCH v4 2/4] tools: split out xenstored starting form xencommons
Date: Tue, 2 Aug 2016 13:20:40 +0200 [thread overview]
Message-ID: <3ae636d7-bf9a-aa0b-63c5-61946f2af47f@suse.com> (raw)
In-Reply-To: <20160802111312.GC22419@citrix.com>
On 02/08/16 13:13, Wei Liu wrote:
> On Tue, Aug 02, 2016 at 12:39:26PM +0200, Juergen Gross wrote:
>> In order to prepare starting a xenstore domain split out the starting
>> of the xenstore daemon from the xencommons script into a dedicated
>> launch-xenstore script.
>>
>> Correct one error: don't remove old tdb files in background, as this
>> could lead to very subtle races.
>>
>
> Sorry to only notice this now -- I suppose this shouldn't be in commit
> message because it is a changelog for different revision of your patch,
> or you need to describe what the race is if there is really such issue
> -- and that's a potential backport candidate.
- rm -f "$XENSTORED_ROOTDIR"/tdb* &>/dev/null
...
+ rm -f "$XENSTORED_ROOTDIR"/tdb* 2>/dev/null
Please note the "&" in the removed line. And the description just tells
you that: the file shouldn't be removed in the background. How else
would you describe it?
And the race should be obvious: removing a file in the background which
is going to be used by the next command is racy.
> As far as I can tell this is pure code motion and shouldn't have any
> change in behaviour. Hence this line in commit message makes me feel a
> bit confused.
Still confused?
Juergen
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-08-02 11:20 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-02 10:39 [PATCH v4 0/4] tools: make xenstore domain/daemon configurable Juergen Gross
2016-08-02 10:39 ` [PATCH v4 1/4] tools: remove systemd xenstore socket definitions Juergen Gross
2016-08-02 11:07 ` Wei Liu
2016-08-02 19:45 ` David Scott
2016-08-02 10:39 ` [PATCH v4 2/4] tools: split out xenstored starting form xencommons Juergen Gross
2016-08-02 11:13 ` Wei Liu
2016-08-02 11:20 ` Juergen Gross [this message]
2016-08-02 11:39 ` Wei Liu
2016-08-02 13:48 ` Ian Jackson
2016-08-02 14:00 ` Wei Liu
2016-08-02 11:59 ` Olaf Hering
2016-08-02 12:08 ` Juergen Gross
2016-08-02 13:49 ` Ian Jackson
2016-08-02 10:39 ` [PATCH v4 3/4] tools: use pidfile for test if xenstored is running Juergen Gross
2016-08-02 11:14 ` Wei Liu
2016-08-02 10:39 ` [PATCH v4 4/4] tools: make xenstore domain easy configurable Juergen Gross
2016-08-02 11:14 ` Wei Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3ae636d7-bf9a-aa0b-63c5-61946f2af47f@suse.com \
--to=jgross@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=dave@recoil.org \
--cc=ian.jackson@eu.citrix.com \
--cc=ross.lagerwall@citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).