Skip to content

rare segfault in a terminal game

The segfault happens with this package: http://hackage.haskell.org/package/Allure, when compiled with flag -fvty. It looks indeterministic, Happened with and without compiling with --ghc-options="-dcore-lint -debug", with and without running under gdb (shows a backtracs of length 3 each time). Happened in a few different versions of the application, with changed code. Quick keystrokes seem to help reproducing it, and/or autorepeat of keys. No luck with finding a reliable way to reproduce. Tested only on one machine; triggered over 10 times for around 5 hours of play total. I'm no longer sure it never happens with other ghc versions (and other frontends), because of how irregular it's appearance is.

This version of the application:

https://github.com/Mikolaj/Allure/commit/a769ee7f30a38574f6402fe677f537077e0b7d69

has deterministic pseudo-random numbers generation and I managed to trigger the bug twice on a map with manually set random seed 6 (in te config file). Once it happened after a few seconds of play, once after a few minutes, but still on level 1. No luck in many other attempts.

The version also has a stdin/stdout frontend and a deterministic bot. By default, the bot is run on the map generated with random seed 6, but it didn't manage to reproduce the bug so far, with many bot seeds. Details of using the bot in the commit log.

I will try to diagnose further, but probably not until the last week of August.

Trac metadata
Trac field Value
Version 7.3
Type Bug
TypeOfFailure RuntimeCrash
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information