#8866 closed bug (fixed)

scavenge_stack: weird activation record found on stack on "cabal install -j"

Reported by: adinapoli Owned by:
Priority: normal Milestone: 7.8.3
Component: Build System Version: 7.8.1-rc2
Keywords: Cc:
Operating System: MacOS X Architecture: x86_64 (amd64)
Type of failure: Runtime crash Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

Hello everyone,

sorry if this was reported somewhere else. I know that the dreadful "scavenge_stack" is nothing new, but it's the first time I see it on Mac OS X (I'm on Maverick, OS X 10.9.2).

This is a "stacktrace" of the problem. It seems to happen almost consistently if I try to do a parallel installation:

[hsenv]☁  ~HSENV  cabal install -j snap
Resolving dependencies...
Configuring HUnit-1.2.5.2...
Downloading MonadRandom-0.1.13...
Downloading logict-0.6.0.2...
cabal: internal error: scavenge_stack: weird activation record found on stack: 415597384
    (GHC version 7.8.0.20140228 for x86_64_apple_darwin)
    Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
[1]    2328 abort      cabal install -j snap
[hsenv]☁  ~HSENV

The concerning thing is that it doesn't seem to be deterministic. After issuing that command, I have tried again and it worked this time:

[hsenv]☁  ~HSENV  cabal install -j snap
Resolving dependencies...
Configuring HUnit-1.2.5.2...
Downloading MonadRandom-0.1.13...
Configuring SHA-1.6.4...
Downloading logict-0.6.0.2...
Downloading process-1.1.0.2...
[...]

It seems to happen with every package and I have tried to install snap just for the sake of reproducing it.

Thanks!

ps. Cross-posted on Github into the cabal issue tracker: https://github.com/haskell/cabal/issues/1716

Alfredo

Change History (11)

comment:1 follow-up: Changed 13 months ago by carter

which build of GHC did you use? Austin's official RC2 build?
whats the output of your ghc --info

comment:2 in reply to: ↑ 1 Changed 13 months ago by adinapoli

Replying to carter:

which build of GHC did you use? Austin's official RC2 build?

Yes, it was Austin's official RC2 build for Mavericks.

whats the output of your ghc --info

I don't have access to that machine now, I'll edit the ticket this evening adding the relevant info :)
EDIT: As promised:

[("Project name","The Glorious Glasgow Haskell Compilation System")
 ,("GCC extra via C opts"," -fwrapv")
 ,("C compiler command","/usr/bin/gcc")
 ,("C compiler flags"," -m64 -fno-stack-protector")
 ,("C compiler link flags"," -m64")
 ,("ld command","/usr/bin/ld")
 ,("ld flags"," -arch x86_64")
 ,("ld supports compact unwind","YES")
 ,("ld supports build-id","NO")
 ,("ld supports filelist","YES")
 ,("ld is GNU ld","NO")
 ,("ar command","/usr/bin/ar")
 ,("ar flags","clqs")
 ,("ar supports at file","NO")
 ,("touch command","touch")
 ,("dllwrap command","/bin/false")
 ,("windres command","/bin/false")
 ,("libtool command","libtool")
 ,("perl command","/usr/bin/perl")
 ,("target os","OSDarwin")
 ,("target arch","ArchX86_64")
 ,("target word size","8")
 ,("target has GNU nonexec stack","False")
 ,("target has .ident directive","True")
 ,("target has subsections via symbols","True")
 ,("Unregisterised","NO")
 ,("LLVM llc command","llc")
 ,("LLVM opt command","opt")
 ,("Project version","7.8.0.20140228")
 ,("Booter version","7.6.3")
 ,("Stage","2")
 ,("Build platform","x86_64-apple-darwin")
 ,("Host platform","x86_64-apple-darwin")
 ,("Target platform","x86_64-apple-darwin")
 ,("Have interpreter","YES")
 ,("Object splitting supported","YES")
 ,("Have native code generator","YES")
 ,("Support SMP","YES")
 ,("Tables next to code","YES")
 ,("RTS ways","l debug thr thr_debug thr_l thr_p dyn debug_dyn thr_dyn thr_debug_dyn l_dyn thr_l_dyn")
 ,("Support dynamic-too","YES")
 ,("Support parallel --make","YES")
 ,("Dynamic by default","NO")
 ,("GHC Dynamic","YES")
 ,("Leading underscore","YES")
 ,("Debug on","False")
 ,("LibDir","/Users/adinapoli/Library/Haskell/ghc-7.8.0-RC2/lib/ghc-7.8.0.20140228")
 ,("Global Package DB","/Users/adinapoli/Library/Haskell/ghc-7.8.0-RC2/lib/ghc-7.8.0.20140228/package.conf.d")
 ]
Last edited 13 months ago by adinapoli (previous) (diff)

comment:3 Changed 13 months ago by simonpj

Austin says he can't reproduce this on the latest MacOS, 10.9. Can anyone else?

Simon

comment:4 follow-up: Changed 12 months ago by thoughtpolice

  • Milestone changed from 7.8.1 to 7.8.2

I've been testing a Cabal built with RC2 on OS X for quite a long time now and cannot reproduce this on Lion or Mavericks, so I'm punting this bug.

comment:5 in reply to: ↑ 4 Changed 12 months ago by adinapoli

Replying to thoughtpolice:

I've been testing a Cabal built with RC2 on OS X for quite a long time now and cannot reproduce this on Lion or Mavericks, so I'm punting this bug.

Fair enough, I'll keep you guys posted on whether or not it will show up more aggressively on my machine and if I can come up with a reproducible scenario :)

comment:6 Changed 12 months ago by thoughtpolice

  • Milestone changed from 7.8.2 to 7.8.3

comment:7 Changed 12 months ago by adinapoli

Hi guys,

I've installed GHC 7.8.1 (official release) and I'm still experiencing this on my oldish 2009 Macbook Pro (with Mavericks). This is the output of "cabal install -v3 -j", hoping we could extract some meaningful info out of this.

Using a sandbox located at
/Users/adinapoli/programming/haskell/Tidal/.cabal-sandbox
Searching for ghc in path.
Found ghc at /Users/adinapoli/Library/Haskell/current/bin/ghc
("/Users/adinapoli/Library/Haskell/current/bin/ghc",["--numeric-version"])
/Users/adinapoli/Library/Haskell/current/bin/ghc is version 7.8.1
looking for tool ghc-pkg near compiler in
/Users/adinapoli/Library/Haskell/current/bin
found ghc-pkg in /Users/adinapoli/Library/Haskell/current/bin/ghc-pkg
("/Users/adinapoli/Library/Haskell/current/bin/ghc-pkg",["--version"])
/Users/adinapoli/Library/Haskell/current/bin/ghc-pkg is version 7.8.1
("/Users/adinapoli/Library/Haskell/current/bin/ghc",["--supported-languages"])
("/Users/adinapoli/Library/Haskell/current/bin/ghc",["--info"])
The package database already exists:
/Users/adinapoli/programming/haskell/Tidal/.cabal-sandbox/x86_64-osx-ghc-7.8.1-packages.conf.d
Reading available packages...
Reading available packages...
Reading installed packages...
("/Users/adinapoli/Library/Haskell/current/bin/ghc-pkg",["dump","--package-db=/Users/adinapoli/programming/haskell/Tidal/.cabal-sandbox/x86_64-osx-ghc-7.8.1-packages.conf.d","-v0"])
("/Users/adinapoli/Library/Haskell/current/bin/ghc",["--print-libdir"])
Reading installed packages...
("/Users/adinapoli/Library/Haskell/current/bin/ghc-pkg",["dump","--global","-v0"])
("/Users/adinapoli/Library/Haskell/current/bin/ghc-pkg",["dump","--package-db=/Users/adinapoli/programming/haskell/Tidal/.cabal-sandbox/x86_64-osx-ghc-7.8.1-packages.conf.d","-v0"])
("/Users/adinapoli/Library/Haskell/current/bin/ghc",["--print-libdir"])
Reading available packages...
Choosing modular solver.
Resolving dependencies...
[__0] trying: tidal-0.3.5 (user goal)
[__1] trying: base-4.7.0.0/installed-0e1... (dependency of tidal-0.3.5)
[__2] trying: rts-1.0/installedbuil... (dependency of base-4.7.0.0/installed-0e1...)
[__3] trying: integer-gmp-0.5.1.0/installed-557... (dependency of base-4.7.0.0/installed-0e1...)
[__4] trying: ghc-prim-0.3.1.0/installed-68a... (dependency of base-4.7.0.0/installed-0e1...)
[__5] trying: bytestring-0.10.4.0/installed-294... (dependency of tidal-0.3.5)
[__6] trying: deepseq-1.3.0.2/installed-355... (dependency of bytestring-0.10.4.0/installed-294...)
[__7] trying: array-0.5.0.0/installed-867... (dependency of deepseq-1.3.0.2/installed-355...)
[__8] trying: binary-0.7.1.0/installed-619... (dependency of tidal-0.3.5)
[__9] trying: mersenne-random-pure64-0.2.0.4 (dependency of tidal-0.3.5)
[_10] trying: mersenne-random-pure64-0.2.0.4:-small_base
[_11] trying: random-1.0.1.1 (dependency of mersenne-random-pure64-0.2.0.4:-small_base)
[_12] trying: old-time-1.1.0.2/installed-9cc... (dependency of mersenne-random-pure64-0.2.0.4:-small_base)
[_13] trying: old-locale-1.0.0.6/installed-ab7... (dependency of old-time-1.1.0.2/installed-9cc...)
[_14] trying: transformers-0.3.0.0/installed-aab... (dependency of tidal-0.3.5)
[_15] trying: mtl-2.1.3.1 (dependency of tidal-0.3.5)
[_16] trying: text-1.1.0.1 (dependency of tidal-0.3.5)
[_17] trying: text-1.1.0.1:-integer-simple
[_18] trying: text-1.1.0.1:-developer
[_19] trying: text-1.1.0.1:!test
[_20] trying: websockets-0.8.2.1 (dependency of tidal-0.3.5)
[_21] trying: websockets-0.8.2.1:!test
[_22] trying: entropy-0.2.2.4 (dependency of websockets-0.8.2.1)
[_23] trying: unix-2.7.0.1/installed-a02... (dependency of entropy-0.2.2.4)
[_24] trying: SHA-1.6.4 (dependency of websockets-0.8.2.1)
[_25] trying: SHA-1.6.4:-test
[_26] trying: SHA-1.6.4:-exe
[_27] trying: SHA-1.6.4:+decoderinterface
[_28] trying: directory-1.2.1.0/installed-8da... (dependency of SHA-1.6.4)
[_29] trying: filepath-1.3.0.2/installed-ea3... (dependency of directory-1.2.1.0/installed-8da...)
[_30] trying: network-2.4.2.2 (dependency of websockets-0.8.2.1)
[_31] trying: network-2.4.2.2:!test
[_32] trying: io-streams-1.1.4.2 (dependency of websockets-0.8.2.1)
[_33] trying: io-streams-1.1.4.2:-nointeractivetests
[_34] trying: io-streams-1.1.4.2:!test
[_35] trying: zlib-bindings-0.1.1.5 (dependency of io-streams-1.1.4.2)
[_36] trying: zlib-bindings-0.1.1.5:!test
[_37] trying: zlib-0.5.4.1 (dependency of zlib-bindings-0.1.1.5)
[_38] trying: vector-0.10.9.1 (dependency of io-streams-1.1.4.2)
[_39] trying: vector-0.10.9.1:-unsafechecks
[_40] trying: vector-0.10.9.1:-internalchecks
[_41] trying: vector-0.10.9.1:+boundschecks
[_42] trying: primitive-0.5.2.1 (dependency of io-streams-1.1.4.2)
[_43] trying: case-insensitive-1.2.0.0 (dependency of websockets-0.8.2.1)
[_44] trying: case-insensitive-1.2.0.0:!bench
[_45] trying: case-insensitive-1.2.0.0:!test
[_46] trying: blaze-builder-0.3.3.2 (dependency of websockets-0.8.2.1)
[_47] trying: base64-bytestring-1.0.0.1 (dependency of websockets-0.8.2.1)
[_48] trying: base64-bytestring-1.0.0.1:!test
[_49] trying: attoparsec-0.11.2.1 (dependency of websockets-0.8.2.1)
[_50] trying: attoparsec-0.11.2.1:-developer
[_51] trying: attoparsec-0.11.2.1:!bench
[_52] trying: attoparsec-0.11.2.1:!test
[_53] trying: scientific-0.2.0.2 (dependency of attoparsec-0.11.2.1)
[_54] trying: scientific-0.2.0.2:!bench
[_55] trying: scientific-0.2.0.2:!test
[_56] trying: time-1.4.2/installed-b6e... (dependency of tidal-0.3.5)
[_57] trying: containers-0.5.5.1/installed-b57... (dependency of tidal-0.3.5)
[_58] trying: colour-2.3.3 (dependency of tidal-0.3.5)
[_59] trying: hashable-1.2.1.0 (dependency of tidal-0.3.5)
[_60] trying: hashable-1.2.1.0:-sse41
[_61] trying: hashable-1.2.1.0:+sse2
[_62] trying: hashable-1.2.1.0:+integer-gmp
[_63] trying: hashable-1.2.1.0:!bench
[_64] trying: hashable-1.2.1.0:!test
[_65] trying: hosc-0.14 (dependency of tidal-0.3.5)
[_66] trying: hosc-0.14:!bench
[_67] trying: hosc-0.14:!test
[_68] trying: data-binary-ieee754-0.4.4 (dependency of hosc-0.14)
[_69] trying: parsec-3.1.5 (dependency of tidal-0.3.5)
[_70] trying: parsec-3.1.5:+base4
[_71] next goal: process (dependency of tidal-0.3.5)
[_71] trying: process-1.2.0.0/installed-a5a...
[_72] done
Notice: installing into a sandbox located at
/Users/adinapoli/programming/haskell/Tidal/.cabal-sandbox
Ready to install SHA-1.6.4
cabal: internal error: scavenge_stack: weird activation record found on stack: 54
    (GHC version 7.8.1 for x86_64_apple_darwin)
    Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
[1]    3861 abort      cabal install -v3 -j
Last edited 12 months ago by adinapoli (previous) (diff)

comment:8 Changed 12 months ago by adinapoli

Interestingly enough, now I can't reproduce it anymore with 7.8.2.
Keep you posted.

Alfredo

comment:9 Changed 11 months ago by joelteon

This also happens to me on OSX 10.9 with the GHC 7.8.2 binary distribution. Using -j1 when using cabal prevents the bug.

comment:10 Changed 11 months ago by thoughtpolice

  • Status changed from new to infoneeded

comment:11 Changed 11 months ago by simonmar

  • Resolution set to fixed
  • Status changed from infoneeded to closed

I think this is #9045, which I've just fixed in HEAD and will be in 7.8.3. Optimistically closing; please re-open if the problem is in 7.8.3 RC.

Note: See TracTickets for help on using tickets.