-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
eventlog2html: Ix{Int}.index: Index (48708) out of range ((0,207)) #136
Comments
I imagine this is because the eventlog is generated with a newer version of GHC than the ghc-events that eventlog2html can read. |
I don't think so, I have a single |
Could be this GHC issue, which I never got to the bottom of - https://gitlab.haskell.org/ghc/ghc/-/issues/17948 |
I just fixed a bug like this I think which was caused by incorrectly calculating the size of an event in GHC. It's quite hard to narrow down though but perhaps I should check all the events to make sure the event is declared to be the correct length. |
@mpickering do you have any news on this? we're hitting this in ~ 50% of the cases. This is especially a problem because we cannot always just rerun the program. Thanks in advance! |
I'm also suspecting that the longer the eventlog gets the higher the probability that this happens, maybe we can make eventlog2html at least recover from these issues? |
@MangoIV The issue is related to a corrupted eventlog, either due to a bug in the eventlog writing logic or because the process is terminated when the eventlog is being written. In any case, I think the fix is to investigate and fix on the GHC side. I don't think I have ever been able to reproduce this problem consistently enough to investigate. |
All the decoding of the eventlog is done by the |
good idea @BinderDavid , thank you |
after seeing both This is a small program that (more or less, sometimes it doesn't happen) reliably makes me hit this: module Main where
import Data.ByteString (ByteString)
import qualified Data.ByteString as BS
import Data.Foldable (for_)
import Data.Monoid (Endo (..))
largeEndo :: Endo ByteString
largeEndo = Endo \x -> BS.replicate 100 97 <> x
manyEndos :: Endo ByteString -> Endo ByteString
manyEndos = mconcat . replicate 10_000
main :: IO ()
main = for_ [1 .. 30] \_ ->
BS.putStr $ appEndo (manyEndos largeEndo) mempty compile with |
I can reproduce this (GHC-9.10, ghc-events-HEAD). Perhaps you could open an issue on the ghc-events tracker @MangoIV: https://github.com/haskell/ghc-events/issues? |
I periodically seem to get this. Usually re-generating an
eventlog
fixes it.The text was updated successfully, but these errors were encountered: