Debugging showed this call stack:

#1  __GI___mmap64 (addr=<optimized out>, len=221459251200, prot=0, flags=16418, 
fd=-1, offset=0) at ../sysdeps/unix/sysv/linux/mmap64.c:46
46      in ../sysdeps/unix/sysv/linux/mmap64.c
(gdb) 
#2  0x000000000bb09770 in ?? ()
(gdb) 
#3  0x000000000bb09bda in ?? ()
(gdb) 
#4  0x000000000baff886 in initMBlocks ()
(gdb) 
#5  0x000000000bb0754a in ?? ()
(gdb) 
#6  0x000000000baebfac in hs_init_ghc ()
(gdb) 
#7  0x000000000baeb7b0 in hs_main ()
(gdb) 
#8  0x000000000458828a in main ()
(gdb) 
Initial frame selected; you cannot go up.


The problem seems to occur in Haskell's initialization.
https://gitlab.haskell.org/Jade/ghc/-/blob/master/rts/sm/MBlock.c?ref_type=heads#L656

I guess the endless loop starts here:
https://gitlab.haskell.org/ghc/ghc/-/blob/master/rts/posix/OSMem.c?ref_type=heads#L589

In the loop mmap() is called repeatedly to allocate 206,25 GiB while we
would expect the size to be reduced by 1/8th on every round.

There is a configuration flag for controlling large memory usage:

/configure --disable-large-address-space

Cf. https://gitlab.haskell.org/ghc/ghc/-/issues/14193

The VM in which I tested had 16 GiB of memory assigned.

** Changed in: ghc (Ubuntu)
     Assignee: (unassigned) => Adriano Cordova Fedeli (adrianoco)

** Changed in: ghc (Ubuntu)
       Status: New => Confirmed

** Bug watch added: gitlab.haskell.org/ghc/ghc/-/issues #14193
   https://gitlab.haskell.org/ghc/ghc/-/issues/14193

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2111581

Title:
  Haskell's default behaviour of using large-address-space is causing
  pandoc to stuck in an infinite loop on QEMU 10

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ghc/+bug/2111581/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to