Bug 14096 - Race condition on timezone/tst-timezone.out
Summary: Race condition on timezone/tst-timezone.out
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: time (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: 2.26
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-10 21:39 UTC by H.J. Lu
Modified: 2017-06-07 17:16 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2012-05-10 21:39:41 UTC
"make -j8 check" on Intel Core i7 timezone/tst-timezone.out fails
at random:

[hjl@gnu-6 build-x86_64-linux]$ diff -up timezone/tst-timezone.bad  timezone/tst-timezone.out
--- timezone/tst-timezone.bad	2012-05-10 14:05:15.479544438 -0700
+++ timezone/tst-timezone.out	2012-05-10 14:36:48.510157884 -0700
@@ -55,56 +55,32 @@ tzname[1]: BRST
 daylight: 1
 timezone: 10800
 Checking timezone America/Chicago
-tzname[0]: America
-tzname[1]: 
-daylight: 0
-timezone: 0
-*** Timezone: America/Chicago, daylight is: 0 but should be: 1
-*** Timezone: America/Chicago, timezone is: 0 but should be: 21600
-*** Timezone: America/Chicago, tzname[0] is: America but should be: CST
-*** Timezone: America/Chicago, tzname[1] is:  but should be: CDT
-tzname[0]: America
-tzname[1]: 
-daylight: 0
-timezone: 0
-*** Timezone: America/Chicago, daylight is: 0 but should be: 1
-*** Timezone: America/Chicago, timezone is: 0 but should be: 21600
-*** Timezone: America/Chicago, tzname[0] is: America but should be: CST
-*** Timezone: America/Chicago, tzname[1] is:  but should be: CDT
+tzname[0]: CST
+tzname[1]: CDT
+daylight: 1
+timezone: 21600
+tzname[0]: CST
+tzname[1]: CDT
+daylight: 1
+timezone: 21600
 Checking timezone America/Indiana/Indianapolis
-tzname[0]: America
-tzname[1]: 
-daylight: 0
-timezone: 0
-*** Timezone: America/Indiana/Indianapolis, daylight is: 0 but should be: 1
-*** Timezone: America/Indiana/Indianapolis, timezone is: 0 but should be: 18000
-*** Timezone: America/Indiana/Indianapolis, tzname[0] is: America but should be: EST
-*** Timezone: America/Indiana/Indianapolis, tzname[1] is:  but should be: EDT
-tzname[0]: America
-tzname[1]: 
-daylight: 0
-timezone: 0
-*** Timezone: America/Indiana/Indianapolis, daylight is: 0 but should be: 1
-*** Timezone: America/Indiana/Indianapolis, timezone is: 0 but should be: 18000
-*** Timezone: America/Indiana/Indianapolis, tzname[0] is: America but should be: EST
-*** Timezone: America/Indiana/Indianapolis, tzname[1] is:  but should be: EDT
+tzname[0]: EST
+tzname[1]: EDT
+daylight: 1
+timezone: 18000
+tzname[0]: EST
+tzname[1]: EDT
+daylight: 1
+timezone: 18000
 Checking timezone America/Los_Angeles
-tzname[0]: America
-tzname[1]: 
-daylight: 0
-timezone: 0
-*** Timezone: America/Los_Angeles, daylight is: 0 but should be: 1
-*** Timezone: America/Los_Angeles, timezone is: 0 but should be: 28800
-*** Timezone: America/Los_Angeles, tzname[0] is: America but should be: PST
-*** Timezone: America/Los_Angeles, tzname[1] is:  but should be: PDT
-tzname[0]: America
-tzname[1]: 
-daylight: 0
-timezone: 0
-*** Timezone: America/Los_Angeles, daylight is: 0 but should be: 1
-*** Timezone: America/Los_Angeles, timezone is: 0 but should be: 28800
-*** Timezone: America/Los_Angeles, tzname[0] is: America but should be: PST
-*** Timezone: America/Los_Angeles, tzname[1] is:  but should be: PDT
+tzname[0]: PST
+tzname[1]: PDT
+daylight: 1
+timezone: 28800
+tzname[0]: PST
+tzname[1]: PDT
+daylight: 1
+timezone: 28800
 Checking timezone Pacific/Auckland
 tzname[0]: NZST
 tzname[1]: NZDT
[hjl@gnu-6 build-x86_64-linux]$
Comment 1 cvs-commit@gcc.gnu.org 2017-06-07 17:15:18 UTC
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  bd6193907a09f874553886f0986ba16b961fab8d (commit)
      from  2e87c7d1582461044f8cd983fd9be121cf23803f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=bd6193907a09f874553886f0986ba16b961fab8d

commit bd6193907a09f874553886f0986ba16b961fab8d
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Wed Jun 7 17:14:28 2017 +0000

    Fix tst-timezone race (bug 14096).
    
    I observed a failure of timezone/tst-timezone with the same symptoms
    as reported in bug 14096.
    
    I was unable to reproduce the failure on testing again.  However, from
    inspection, the cause is as follows.  tst-timezone uses time zones
    compiled from the northamerica file, but has no dependency on any such
    zones, so with a parallel build it is possible that they do not get
    compiled until after tst-timezone is run.  This patch adds a
    dependency on the compiled America/New_York zone (the one used as a
    makefile target to cause such zones to be compiled, rather than one
    which is actually used in that test) to fix the race.
    
    Tested for x86_64.
    
    	[BZ #14096]
    	* timezone/Makefile ($(objpfx)tst-timezone.out): Depend on
    	America/New_York.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog         |    6 ++++++
 timezone/Makefile |    1 +
 2 files changed, 7 insertions(+), 0 deletions(-)
Comment 2 Joseph Myers 2017-06-07 17:16:11 UTC
Fixed for 2.26.