Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,268
    • Issues 4,268
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 408
    • Merge Requests 408
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #16095

Closed
Open
Opened Dec 26, 2018 by Serge Kosyrev@_deepfireReporter

Infinite loop during error reporting (ignores SIGINT/SIGTERM, then OOMs)

Compiling the repro snippet produces the following incomplete output and hangs GHC:

$ ghc repro.hs
[1 of 1] Compiling Main             ( repro.hs, repro.o )

repro.hs:16:22: error:

The GHC process ignores SIGINT -- so it must be killed with SIGKILL. The memory usage grows, until it consumes all memory (~30G RAM + swap) and is terminated by the OOM killer.

This minimal snippet depends on generics-sop (tested with version 0.4.0.0). Sadly I didn't find a constraint in base to cause this behavior..

{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeFamilies #-}

import Generics.SOP (HasDatatypeInfo)

data family   TF i a :: *
data instance TF i a = R

class C i a where
  method :: TF i a

instance C i () where

instance HasDatatypeInfo a => C i a where
  method = undefined function

function :: C i a => TF i a
function = method

main = undefined

Affects 8.4.3 and 8.6.1.

Not tested on 8.6.2 & 8.6.3.

Edited Mar 10, 2019 by Serge Kosyrev
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#16095