Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1061106 - Possible problem with drift file writing
Summary: Possible problem with drift file writing
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: chrony
Version: 7.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Miroslav Lichvar
QA Contact: Jakub Prokes
Depends On:
TreeView+ depends on / blocked
Reported: 2014-02-04 11:47 UTC by Miroslav Lichvar
Modified: 2014-06-18 03:50 UTC (History)
2 users (show)

Fixed In Version: chrony-1.29.1-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2014-05-27 13:27:02 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description Miroslav Lichvar 2014-02-04 11:47:17 UTC
Description of problem:
There is a bug in the code which updates drift files. Writing to the file and closing of the file is written in an expression using the | operator, which doesn't set a sequence point and the compiler is free to use any ordering of the two calls, possibly closing the file before new content is written to it.

It doesn't seem to be happening with our gcc version, but it may happen with a future version. This is easy to fix and will avoid an unpleasant surprise. 

Version-Release number of selected component (if applicable):

Additional info:
Upstream report:

Upstream patch:;a=commitdiff;h=925d7119ec0db3620a2350eca3cbaea1a8eb4306;hp=f456cd57b93695b1a9bd792ed084c62f9ffa7c9f

Note You need to log in before you can comment on or make changes to this bug.