[GHC] #15060: outofmem testcase sometimes crashes on i386

#15060: outofmem testcase sometimes crashes on i386 -------------------------------------+------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Runtime | Version: 8.2.2 System | Keywords: | Operating System: Unknown/Multiple Architecture: x86 | Type of failure: None/Unknown Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Specifically in the `normal` way with, {{{ Actual stderr output differs from expected: --- ./rts/outofmem.run/outofmem.stderr-ws-32.normalised 2018-04-19 13:57:35.386373403 +0000 +++ ./rts/outofmem.run/outofmem.run.stderr.normalised 2018-04-19 13:57:35.386373403 +0000 @@ -1 +1,4 @@ -outofmem: out of memory (requested 1074790400 bytes) +outofmem: internal getMBlock: mmap: Invalid argument + (GHC version 8.5.20180419 for i386_unknown_linux) + Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug +Aborted *** unexpected failure for outofmem(normal) }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15060 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15060: outofmem testcase sometimes crashes on i386 -------------------------------------+----------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Runtime System | Version: 8.2.2 Resolution: | Keywords: ci-breakage Operating System: Unknown/Multiple | Architecture: x86 Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+----------------------------------- Changes (by bgamari): * keywords: => ci-breakage -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15060#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15060: outofmem testcase sometimes crashes on i386 -------------------------------------+----------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Runtime System | Version: 8.2.2 Resolution: | Keywords: ci-breakage Operating System: Unknown/Multiple | Architecture: x86 Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+----------------------------------- Comment (by bgamari): `gdb` has the following to say, {{{ outofmem: internal error: getMBlock: mmap: Invalid argument (GHC version 8.5.20180516 for i386_unknown_linux) Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug Program received signal SIGABRT, Aborted. 0xf7d8be2c in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt #0 0xf7d8be2c in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 #1 0xf7d8d4b3 in __GI_abort () at abort.c:89 #2 0x08306486 in rtsFatalInternalErrorFn (s=0x833e2dd "getMBlock: mmap: %s", ap=0xffffb4a4 "^\300\350\367\021") at rts/RtsMessages.c:188 #3 0x08306555 in barf (s=0x833e2dd "getMBlock: mmap: %s") at rts/RtsMessages.c:47 #4 0x08310036 in my_mmap_or_barf (addr=0x77900000, size=size@entry=1074790400, operation=3) at rts/posix/OSMem.c:233 #5 0x0831011b in osGetMBlocks (n=1025) at rts/posix/OSMem.c:291 #6 0x08309eb4 in getCommittedMBlocks (n=1025) at rts/sm/MBlock.c:534 #7 getMBlocks (n=1025) at rts/sm/MBlock.c:580 #8 0x0830a2d0 in alloc_mega_group (node=node@entry=0, mblocks=<optimized out>) at rts/sm/BlockAlloc.c:378 #9 0x0830a70a in allocGroupOnNode (node=0, n=262145) at rts/sm/BlockAlloc.c:405 #10 0x0830d12e in allocateMightFail (cap=0x8407600 <MainCapability>, n=268435459) at rts/sm/Storage.c:884 #11 0x08314a61 in stg_newByteArrayzh () #12 0x08407600 in ?? () Backtrace stopped: previous frame inner to this frame (corrupt stack?) (gdb) }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15060#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15060: outofmem testcase sometimes crashes on i386 -------------------------------------+----------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.4.3 Component: Runtime System | Version: 8.2.2 Resolution: | Keywords: ci-breakage Operating System: Unknown/Multiple | Architecture: x86 Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4704 Wiki Page: | -------------------------------------+----------------------------------- Changes (by bgamari): * differential: => Phab:D4704 * milestone: 8.6.1 => 8.4.3 Comment: Ahh, I see what is happening here. `mmap` returns `ENOMEM` yet then we nevertheless try to `madvise`, which clobbers `errno`, giving us the unexpected `EINVAL` error. Consequently we don't detect this to be an out- of-memory error. Fix in Phab:D4704. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15060#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15060: outofmem testcase sometimes crashes on i386
-------------------------------------+-----------------------------------
Reporter: bgamari | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone: 8.4.3
Component: Runtime System | Version: 8.2.2
Resolution: | Keywords: ci-breakage
Operating System: Unknown/Multiple | Architecture: x86
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D4704
Wiki Page: |
-------------------------------------+-----------------------------------
Comment (by Ben Gamari

#15060: outofmem testcase sometimes crashes on i386 -------------------------------------+----------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: 8.6.1 Component: Runtime System | Version: 8.2.2 Resolution: fixed | Keywords: ci-breakage Operating System: Unknown/Multiple | Architecture: x86 Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4704 Wiki Page: | -------------------------------------+----------------------------------- Changes (by bgamari): * status: new => closed * resolution: => fixed * milestone: 8.4.3 => 8.6.1 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15060#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC