[GHC] #8097: internal error: getMBlock: mmap: Operation not permitted

#8097: internal error: getMBlock: mmap: Operation not permitted ------------------------------+---------------------------------- Reporter: singpolyma | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.4.2 Keywords: | Operating System: Linux Architecture: x86 | Type of failure: Runtime crash Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | ------------------------------+---------------------------------- I get the following: {{{ <interactive>: internal error: getMBlock: mmap: Operation not permitted (GHC version 7.4.2 for i386_unknown_linux) Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug Aborted (core dumped) }}} when running {{{parseOnly queryKeyParse (Data.Text.pack "hello")}}} where: {{{ queryKeyParse :: Attoparsec.Parser [T.Text] queryKeyParse = do top <- Attoparsec.takeTill (=='[') keys <- many key return (top:keys) where key = many (Attoparsec.char '[') *> Attoparsec.takeTill (==']') <* many (Attoparsec.char ']') }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8097 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8097: internal error: getMBlock: mmap: Operation not permitted ----------------------------------+--------------------------- Reporter: singpolyma | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.4.2 Resolution: | Keywords: Operating System: Linux | Architecture: x86 Type of failure: Runtime crash | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: ----------------------------------+--------------------------- Comment (by rwbarton): Looks like the same issue as #7500, but more info may be useful anyways. What distro are you running and what is the value in `/proc/sys/vm/mmap_min_addr`? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8097#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8097: internal error: getMBlock: mmap: Operation not permitted ----------------------------------+--------------------------- Reporter: singpolyma | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.4.2 Resolution: | Keywords: Operating System: Linux | Architecture: x86 Type of failure: Runtime crash | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: ----------------------------------+--------------------------- Comment (by SirReal): I've experienced this as well: {{{ internal error: getMBlock: mmap: Operation not permitted (GHC version 7.4.2 for i386_unknown_linux) Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug Aborted (core dumped) }}} value in /proc/sys/vm/mmap_min_addr : 65536 Here's the code that caused it: {{{ import Data.Ratio import Data.List limit :: Integer limit = 1000000 main :: IO() main = print $ "The solution is: " ++ show (countUniques allFractions) allFractions :: [Ratio Integer] allFractions = [x % y | y <- [1..limit], x <- [1..y-1]] countUniques :: Ord a => [a] -> Int countUniques = length . group . sort }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8097#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8097: internal error: getMBlock: mmap: Operation not permitted ----------------------------------+------------------------------ Reporter: singpolyma | Owner: Type: bug | Status: infoneeded Priority: normal | Milestone: Component: Compiler | Version: 7.4.2 Resolution: | Keywords: Operating System: Linux | Architecture: x86 Type of failure: Runtime crash | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: ----------------------------------+------------------------------ Changes (by ezyang): * status: new => infoneeded Comment: Can you reproduce on 7.6? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8097#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8097: internal error: getMBlock: mmap: Operation not permitted ----------------------------------+------------------------------ Reporter: singpolyma | Owner: Type: bug | Status: infoneeded Priority: normal | Milestone: Component: Compiler | Version: 7.4.2 Resolution: | Keywords: Operating System: Linux | Architecture: x86 Type of failure: Runtime crash | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: ----------------------------------+------------------------------ Comment (by rwbarton): Hmm, interesting. I couldn't reproduce with GHC 7.4.2 on Debian Linux 2.6.32-5-686 (mmap_min_addr = 65536). What kernel version are you running (`uname -a`)? And can you run your program under strace: {{{ strace -e trace=mmap2 -o log ./countUniques }}} and attach the last page or so of `log` to this ticket? I'm 95% sure that in HEAD, you will get an out of memory error rather than this "Operation not permitted" error, but I'd like to understand what's going on here. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8097#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8097: internal error: getMBlock: mmap: Operation not permitted ----------------------------------------+--------------------------- Reporter: singpolyma | Owner: Type: bug | Status: closed Priority: normal | Milestone: 7.10.1 Component: Compiler | Version: 7.4.2 Resolution: duplicate | Keywords: Operating System: Linux | Architecture: x86 Type of failure: Runtime crash | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: Differential Revisions: | ----------------------------------------+--------------------------- Changes (by rwbarton): * status: infoneeded => closed * resolution: => duplicate Comment: So SirReal's issue is the one fixed in #7500; hard to tell about singpolyma's but it seems highly likely, so I'm just going to close this. Please reopen if you encounter the same error in 7.6 or newer. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8097#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC