Opened 2 years ago

Last modified 3 weeks ago

#7567 infoneeded bug

invalidateModSummaryCache throws exception if ms_hs_date is 0

Reported by: edsko Owned by: thoughtpolice
Priority: high Milestone: 7.12.1
Component: Compiler Version: 7.6.1
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

It will try to subtract one, and the negative value will cause Time.toClockTime: invalid input to be thrown.

Change History (10)

comment:1 Changed 2 years ago by edsko

Note that this exception may or may not be thrown, depending on the timezone (Europe/Dublin works fine for me, UTC or GMT do not, even though they come down to the same thing, at least in winter time).

comment:2 Changed 2 years ago by edsko

Incidentally, the exception is an error, so it is only thrown when ms_hs_date is forced (ModSummary does not use strict fields).

comment:3 Changed 2 years ago by igloo

  • difficulty set to Unknown
  • Milestone set to 7.8.1
  • Priority changed from normal to high

comment:4 Changed 19 months ago by bgamari

Is it not safe to assume that the users environment will be non-broken enough to have functional mtimes? Under what circumstances did this happen?

comment:5 Changed 19 months ago by edsko

Under circumstances where we manually set those mtimes (to work around http://ghc.haskell.org/trac/ghc/ticket/7473).

comment:6 Changed 10 months ago by thoughtpolice

  • Milestone changed from 7.8.3 to 7.8.4

Moving to 7.8.4.

comment:7 Changed 7 months ago by thoughtpolice

  • Owner set to thoughtpolice

comment:8 Changed 6 months ago by thoughtpolice

  • Milestone changed from 7.8.4 to 7.10.1

Moving (in bulk) to 7.10.4

comment:9 Changed 3 months ago by thoughtpolice

  • Milestone changed from 7.10.1 to 7.12.1

Moving to 7.12.1

comment:10 Changed 3 weeks ago by thomie

  • Status changed from new to infoneeded

Edsko: I am having trouble reproducing your issue.

The file main/GHC.hs uses Data.Time from the time package, and has so from the beginning. Time.toClockTime is a function from the old-time package, which GHC doesn't use. How can it throw an error?

Also if I call addUTCTime (-1) on UTCTime (ModifiedJulianDay 0) (secondsToDiffTime 0), and force its result, nothing bad happens. Can you give me instructions how to trigger the bug. Thanks.

Note: See TracTickets for help on using tickets.