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

Summary: Possible problem with drift file writing
Product: Red Hat Enterprise Linux 7 Reporter: Miroslav Lichvar <mlichvar>
Component: chronyAssignee: Miroslav Lichvar <mlichvar>
Status: CLOSED CURRENTRELEASE QA Contact: Jakub Prokes <jprokes>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: jscotka, ovasik
Target Milestone: rcKeywords: EasyFix
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: chrony-1.29.1-1.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-05-27 13:27:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

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