FTBFS after latest upgrade of karmic because of the unsuccessfull test Timezone.tjp

Bug #409178 reported by Fabrice Coutadeur
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
taskjuggler (Fedora)
Fix Released
High
taskjuggler (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: taskjuggler

Hi,

This package was buildig correctly on the 3rd of August, but after the updates done on the 4th, it's not building anymore:
make[3]: Entering directory `/build/buildd/taskjuggler-2.4.3/TestSuite'
Testing in CSV-Reports
Testing in HTML-Reports
Testing in Misc
Testing in Scheduler
Testing in Syntax
Test Timezone.tjp failed!
Testing in TJX-Reports
1 errors detected!
make[3]: *** [all-local] Error 1
make[3]: Leaving directory `/build/buildd/taskjuggler-2.4.3/TestSuite'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/build/buildd/taskjuggler-2.4.3'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/build/buildd/taskjuggler-2.4.3'
dh_auto_build: make returned exit code 2

As stated in Redhat (https://bugzilla.redhat.com/show_bug.cgi?id=506584), this test is buggy and should be disabled.

Cheers,
Fabrice

Related branches

Revision history for this message
In , Benjamin (benjamin-redhat-bugs) wrote :

Created attachment 348342
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.

Revision history for this message
In , Andreas (andreas-redhat-bugs) wrote :

The F9 behaviour was actually the wrong one since a timezone name can only contain alphabetic characters.

Revision history for this message
In , Benjamin (benjamin-redhat-bugs) wrote :

Aren't they both wrong since it should be UTC?

Revision history for this message
In , Jakub (jakub-redhat-bugs) wrote :

It is like UTC, except it uses the user requested timezone name.
I don't see anything wrong with it.

Revision history for this message
In , Benjamin (benjamin-redhat-bugs) wrote :

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.

Revision history for this message
In , Andreas (andreas-redhat-bugs) wrote :

There is no way to tell. This check would have failed with TZ="foo,bar" on F9 as well, anyway.

Revision history for this message
In , Benjamin (benjamin-redhat-bugs) wrote :

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.

Revision history for this message
In , Ondrej (ondrej-redhat-bugs) wrote :

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)

summary: - FTBFS after latest upgrade to karmic because of not passing test
+ FTBFS after latest upgrade of karmic because of the unsuccessfull test
Timezone.tjp
Changed in taskjuggler (Fedora):
status: Unknown → In Progress
Andrea Veri (av)
Changed in taskjuggler (Ubuntu):
status: New → Confirmed
Revision history for this message
Andrea Veri (av) wrote :

there seems to be no news on the fedora bug report. Last comment was made like 2 weeks ago.

Revision history for this message
In , Andrea (andrea-redhat-bugs) wrote :

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.

Revision history for this message
In , Ondrej (ondrej-redhat-bugs) wrote :

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.

Revision history for this message
Fabrice Coutadeur (fabricesp) wrote :

Hi,

As a temporary workaround, I'll remove the test in the configure target in debian/rules.

Here is the debdiff.

Fabrice

Revision history for this message
Fabrice Coutadeur (fabricesp) wrote :

Log of the successful build

Revision history for this message
Andrea Veri (av) wrote :

I found out we can workaround this by removing this test on taskjuggler.spec file too. Like adding a remove rule as the red hat developer said:

rm -f TestSuite/Syntax/Errors/Timezone.tjp

But in fact it's just a matter of where removing that test , source code or debian dir. But I wanna prevent adding a new patch to modify source files so I guess we can use your fix.

Revision history for this message
Andrea Veri (av) wrote :

I don't like the way you added that dh_clean. It works but seems to be under a wrong target (configure). I would add a clean target and removing it with a rm -f.

Revision history for this message
In , Andrea (andrea-redhat-bugs) wrote :

oh you remove it directly, I'll do it other way hacking debian/rules file. Thanks for the help.

Revision history for this message
Andrea Veri (av) wrote :

My fix is ready, do you want me to upload it or to wait your debdiff?

Revision history for this message
Fabrice Coutadeur (fabricesp) wrote :

Hi,

Upload your fix: it will be quicker and easier for everybody.

Fabrice

Revision history for this message
Andrea Veri (av) wrote :

Uploaded.

Changed in taskjuggler (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package taskjuggler - 2.4.3-1ubuntu2

---------------
taskjuggler (2.4.3-1ubuntu2) karmic; urgency=low

  * debian/rules: added a clean rule that deletes Timezone.tjp
    test, which seems to be bugged. This is just a workaround for now
    hoping that in the future there will be a real fix for this issue.
    Thanks to Fabrice Coutadeur, who triaged this bug together with
    me. (LP: #409178)

 -- Andrea Veri <email address hidden> Thu, 06 Aug 2009 00:39:12 +0200

Changed in taskjuggler (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
In , Bug (bug-redhat-bugs) wrote :

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

Revision history for this message
In , Benjamin (benjamin-redhat-bugs) wrote :

This is fixed. I guess it stayed open for some reason.

Revision history for this message
In , Ondrej (ondrej-redhat-bugs) wrote :

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?

Revision history for this message
In , Radek (radek-redhat-bugs) wrote :

Yes, the bug is still present in F-11, in F12+ is the affected check disabled, so the package compiles properly.

Changed in taskjuggler (Fedora):
importance: Unknown → High
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.