Bug 506584 - Taskjuggler can not compile on F11
Summary: Taskjuggler can not compile on F11
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: taskjuggler
Version: 11
Hardware: All
OS: Linux
low
high
Target Milestone: ---
Assignee: Radek Novacek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-06-17 20:31 UTC by Benjamin Kahn
Modified: 2010-04-28 07:52 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2010-04-27 15:15:48 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Sample program to show the failure (1.20 KB, text/plain)
2009-06-17 20:31 UTC, Benjamin Kahn
no flags Details

Description Benjamin Kahn 2009-06-17 20:31:24 UTC
Created attachment 348342 [details]
Sample program to show the failure

Description of problem:
The attached code fragment returns the wrong value when TZ is set to "foo/bar"

Version-Release number of selected component (if applicable):
glibc-2.10.1-2.x86_64

How reproducible:
100% on F11

Steps to Reproduce:
1. compile code fragment: g++ time.cpp -o time
2. run it: ./time
  
Actual results:
  Debugging Information
  ========================
  tZone: foo/bar
  false || (true && false) == true
  strcmp(tzname[0], tZone): -1
  strcmp(tZone, "UTC"): 1
  strcmp(tzname[0], "UTC"): 1
  tzname[0]: foo, tzname[1]: 



Expected results:
F9 returns:

  Bad Timezone set.  foo/bar is not a valid timezone
  Debugging Information
  ========================
  tZone: foo/bar
  tzname[0]: foo/bar, tzname[1]: 
  true || (true && false) == false
  strcmp(tzname[0], tZone): 0
  strcmp(tZone, "UTC"): 1
  strcmp(tzname[0], "UTC"): 1


Additional info:

tzset(3) man page says:

       If the TZ variable does appear in the environment but its value is empty or its value cannot be interpreted using any of  the  formats
       specified below, Coordinated Universal Time (UTC) is used.

Comment 1 Andreas Schwab 2009-06-18 12:24:14 UTC
The F9 behaviour was actually the wrong one since a timezone name can only contain alphabetic characters.

Comment 2 Benjamin Kahn 2009-06-18 12:52:23 UTC
Aren't they both wrong since it should be UTC?

Comment 3 Jakub Jelinek 2009-06-18 12:58:26 UTC
It is like UTC, except it uses the user requested timezone name.
I don't see anything wrong with it.

Comment 4 Benjamin Kahn 2009-06-18 13:15:37 UTC
Okay.  So taskjuggler (which ships with Fedora 11) is trying to figure out a standard way to tell if a user has passed a bad timezone.  It runs this check to do it:

   if (strcmp(tzname[0], tZone) == 0  ||
	(strcmp(tZone, "UTC") != 0 && strcmp(tzname[0], "UTC") == 0))

So it is check to see if the passed timezone is the same as the returned timezone, and if it is, whether the passed timezone was UTC.

This worked for prior versions of glibc, but does not in the version in F11.  taskjuggler won't compile on Fedora 11 until either glibc changes behavior or a better failure check can be written.

Since glibc's behavior changed, and appears wrong (to me at least) I filed the bug against glibc.

How should an application tell if it received an invalid timezone?  Any test should work with the old behavior and other libcs, of course.

Comment 5 Andreas Schwab 2009-06-18 14:43:58 UTC
There is no way to tell.  This check would have failed with TZ="foo,bar" on F9 as well, anyway.

Comment 6 Benjamin Kahn 2009-06-18 15:00:34 UTC
The problematic code in taskjuggler is at:
taskjuggler-2.4.1/taskjuggler/Utility.cpp:181

The failing test is:
taskjuggler-2.4.1/TestSuite/Syntax/Errors/Timezone.tjp

Taskjuggler can no longer compile on F11.

Comment 7 Ondrej Vasik 2009-06-18 15:27:13 UTC
Thanks for reassigning, that's really something what should be handled within taskjuggler and not in glibc.
Rawhide taskjuggler already removes that test in spec file as workaround - as I spoted that failure when building 2.4.2 beta1/2 few weeks ago, that check was already reported as fragile to upstream (even if it was for tj3).
(http://www.taskjuggler.org/FUDforum2/index.php?t=msg&goto=9515&rid=0&S=b7cea9cddfb7732ca0fa1010c0603682&srch=timezone.tjp#msg_9515)

Comment 8 Andrea Veri 2009-08-05 16:51:23 UTC
could you please tell me how can I workaround this via spec file? I didnt find any relevent part to uncomment or remove regarding timezone test in that specific file.

Comment 9 Ondrej Vasik 2009-08-05 17:44:39 UTC
in %build section just add (just before make):
#/foo/bar timezone is completely valid and interpreted as UTC,skipping test
rm -f TestSuite/Syntax/Errors/Timezone.tjp

Anyway - it should be handled other way in source code, skiping/removing that test is just temporary workaround.

Comment 10 Andrea Veri 2009-08-05 22:32:29 UTC
oh you remove it directly, I'll do it other way hacking debian/rules file. Thanks for the help.

Comment 11 Bug Zapper 2010-04-27 15:02:20 UTC
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '11'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 11's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 11 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 12 Benjamin Kahn 2010-04-27 15:15:48 UTC
This is fixed.  I guess it stayed open for some reason.

Comment 13 Ondrej Vasik 2010-04-27 19:34:03 UTC
AFAIK it was still opened because:
1) Removing/skipping the test is not good solution and I had no time to further investigate the issue before I gave away maintainance of taskjuggler.
2) It was solved only in F-12+

Radek, could you please check current status?

Comment 14 Radek Novacek 2010-04-28 07:52:38 UTC
Yes, the bug is still present in F-11, in F12+ is the affected check disabled, so the package compiles properly.


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