ghc 6.10.1 on freebsd 7 amd64 - ghci problems

Markus Barenhoff alios at alios.org
Wed Dec 3 05:20:07 EST 2008


On Fri 28.11 09:42, Simon Marlow wrote:
> Markus Barenhoff wrote:
> >On Thu 27.11 09:49, Simon Marlow wrote:


Hi!

> >I checked out and translated the head version of ghc today from darcs.
> >It compiled fine. When I now try to start the ghci I get the following:
> >
> >---- snip ----
> >GHCi, version 6.11.20081126: http://www.haskell.org/ghc/  :? for help
> >ghc: internal error: loadObj: failed to mmap() memory below 2Gb; asked for 
> >626688 bytes at 0x40000000, got 0x801635000.  Try specifying an address 
> >with +RTS -xm<addr> -RTS
> >    (GHC version 6.11.20081126 for x86_64_unknown_freebsd)
> >	    Please report this as a GHC bug:  
> >	    http://www.haskell.org/ghc/reportabug
> >		Abort (core dumped)	
> >---- snip ----
> >
> >If it helps somehow, you can find the core dump here:
> >http://www.alios.org/~alios/ghc.core.bz2
> 
> That's odd, because 6.8.3 is using 0x40000000 on FreeBSD and is working 
> fine (or is it?).

yes, it worked, but I haven't installed anymore - so I'am not sure, where it
does maps its stuff into memory.

> 
> Ideally I need to find out what the memory map is for GHCi.  I posted some 
> instructions for doing this on Linux/Xen, maybe you can adapt these to work 
> on FreeBSD:
> 
> http://www.haskell.org/pipermail/glasgow-haskell-users/2008-November/016091.html
> 
> The bit that needs to change is 'cat /proc/<pid>/maps' - does FreeBSD have 
> something similar?
> 

I tried it with the following results:

---- gdb session ----
(gdb) run --interactive -B/usr/local/lib/ghc-6.11.20081126/.
Starting program: /usr/local/lib/ghc-6.11.20081126/ghc --interactive -B/usr/local/lib/ghc-6.11.20081126/.
(no debugging symbols found)...[New LWP 100250]
(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...[New Thread 0x801e01120 (LWP 100250)]
[New Thread 0x801e01290 (LWP 100334)]
[New Thread 0x801e01400 (LWP 100335)]
GHCi, version 6.11.20081126: http://www.haskell.org/ghc/  :? for help
ghc: internal error: loadObj: failed to mmap() memory below 2Gb; asked for 626688 bytes at 0x40000000, got 0x801635000.  Try specifying an address with +RTS -xm<addr> -RTS
    (GHC version 6.11.20081126 for x86_64_unknown_freebsd)
    Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

Program received signal SIGABRT, Aborted.
[Switching to Thread 0x801e01120 (LWP 100250)]
0x0000000801bcb1dc in thr_kill () from /lib/libc.so.7
---- gdb session ----

---- process virtual memeory ----
# cat /proc/65557/map
0x400000 0x1507000 3126 3539 0xffffff0026bfe270 r-x 2 1 0x4 COW NC vnode /usr/local/lib/ghc-6.11.20081126/ghc
0x1607000 0x179e000 404 0 0xffffff00032e3a90 rw- 1 0 0x2104 COW NNC vnode /usr/local/lib/ghc-6.11.20081126/ghc
0x179e000 0x17a2000 4 0 0xffffff001c260b60 rw- 1 0 0x2104 NCOW NNC default -
0x801607000 0x80162c000 27 0 0xffffff001b143000 r-x 1 0 0x2104 COW NNC vnode /libexec/ld-elf.so.1
0x80162c000 0x801635000 8 0 0xffffff003789d820 rw- 1 0 0x2104 NCOW NNC default -
0x801635000 0x8016ce000 0 0 0xffffff001a0bad00 rwx 1 0 0x4 COW NC vnode /usr/local/lib/ghc-6.11.20081126/ghc-prim-0.1.0.0/HSghc-prim-0.1.0.0.o
0x80172b000 0x801732000 7 0 0xffffff002b24a9c0 rw- 1 0 0x2104 COW NNC vnode /libexec/ld-elf.so.1
0x801732000 0x801738000 5 0 0xffffff0033841820 rw- 1 0 0x2104 NCOW NNC default -
0x801738000 0x801748000 16 0 0xffffff00372d2750 r-x 1 0 0x2104 COW NNC vnode /lib/libthr.so.3
0x801748000 0x801749000 1 0 0xffffff002f555410 r-x 1 0 0x2104 COW NNC vnode /lib/libthr.so.3
0x801749000 0x801849000 4 0 0xffffff00052de270 r-x 218 39 0x4 COW NC vnode /lib/libthr.so.3
0x801849000 0x80184c000 3 0 0xffffff002d7b2b60 rw- 1 0 0x2104 COW NNC vnode /lib/libthr.so.3
0x80184c000 0x80184e000 2 0 0xffffff0030c72410 rw- 1 0 0x2104 NCOW NNC default -
0x80184e000 0x801859000 11 0 0xffffff0001cb29c0 r-x 174 78 0x4 COW NC vnode /lib/libutil.so.7
0x801859000 0x80185a000 1 0 0xffffff002279fb60 r-x 1 0 0x2104 COW NNC vnode /lib/libutil.so.7
0x80185a000 0x801959000 2 0 0xffffff0001cb29c0 r-x 174 78 0x4 COW NC vnode /lib/libutil.so.7
0x801959000 0x80195b000 2 0 0xffffff002f1174e0 rw- 1 0 0x2104 COW NNC vnode /lib/libutil.so.7
0x80195afff 0x80195c000 0 0 0 rw- 0 0 0x0 NCOW NNC none -
0x80195c000 0x801973000 16 0 0xffffff0001c1ec30 r-x 254 48 0x4 COW NC vnode /lib/libm.so.5
0x801973000 0x801974000 1 0 0xffffff0030f9a820 r-x 1 0 0x2104 COW NNC vnode /lib/libm.so.5
0x801974000 0x801a74000 4 0 0xffffff0001c1ec30 r-x 254 48 0x4 COW NC vnode /lib/libm.so.5
0x801a74000 0x801a76000 2 0 0xffffff0032c10270 rw- 1 0 0x2104 COW NNC vnode /lib/libm.so.5
0x801a76000 0x801a79000 3 0 0xffffff000ab1e1a0 r-x 4 2 0x4 COW NC vnode /usr/lib/librt.so.1
0x801a79000 0x801a7a000 1 0 0xffffff003721a750 r-x 1 0 0x2104 COW NNC vnode /usr/lib/librt.so.1
0x801a7a000 0x801b7a000 1 0 0xffffff000ab1e1a0 r-x 4 2 0x4 COW NC vnode /usr/lib/librt.so.1
0x801b7a000 0x801b7b000 1 0 0xffffff0033783d00 rw- 1 0 0x2104 COW NNC vnode /usr/lib/librt.so.1
0x801b7b000 0x801c60000 108 0 0xffffff0001c840d0 r-x 602 192 0x4 COW NC vnode /lib/libc.so.7
0x801c60000 0x801c61000 1 0 0xffffff001b2710d0 r-x 1 0 0x2104 COW NNC vnode /lib/libc.so.7
0x801c61000 0x801d60000 0 0 0xffffff0001c840d0 r-x 602 192 0x4 COW NC vnode /lib/libc.so.7
0x801d60000 0x801d7e000 30 0 0xffffff002277e340 rw- 1 0 0x2104 COW NNC vnode /lib/libc.so.7
0x801d7e000 0x801d94000 6 0 0xffffff0026ca3820 rw- 3 0 0x2104 NCOW NNC default -
0x801e00000 0x801f00000 41 0 0xffffff0026ca3820 rw- 3 0 0x2104 NCOW NNC default -
0x802000000 0x802300000 642 0 0xffffff0026ca3820 rw- 3 0 0x2104 NCOW NNC default -
0x7fffff9de000 0x7fffff9fe000 2 0 0xffffff002612bc30 rw- 1 0 0x2104 NCOW NNC default -
0x7fffffbdf000 0x7fffffbff000 2 0 0xffffff000d2cd8f0 rw- 1 0 0x2104 NCOW NNC default -
0x7fffffbff000 0x7fffffc00000 0 0 0 --- 0 0 0x0 NCOW NNC none -
0x7ffffffe0000 0x800000000000 4 0 0xffffff0033d95680 rwx 1 0 0x2104 NCOW NNC default -
---- process virt. mem ----


> Also you could try doing as the error message suggests, and specify a 
> different address.  e.g.
> 
>   ghci +RTS -xm30000000
>   ghci +RTS -xm50000000

I tried different locations. mmap() always seems to return a address above 0x80000000,
f.e. 0x801635000, where the -xm parameter seems to have no effect.
If I sepecify a adress above 0x80000000 I get a message, that it has to be below 2GB.


Thnx and regards
Markus 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 479 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/glasgow-haskell-users/attachments/20081203/1593f271/attachment.bin


More information about the Glasgow-haskell-users mailing list