Ticket #777 (new defect)

Opened 3 years ago

Last modified 20 months ago

cabal install {hledger, others} ExitFailure 11

Reported by: philips Owned by:
Priority: normal Milestone: cabal-install-0.16
Component: cabal-install tool Version: 1.8.0.2
Severity: normal Keywords: ExitFailure
Cc: simon@…, andres.sicard.ramirez@…, batterseapower, mrchebas@… Difficulty: unknown
GHC Version: Platform: Linux

Description

I am getting ExitFailure? 11 when trying to install hledger on Debian and openSUSE. I reported this to the hledger author, Simon, and he said he is experiencing this on his machines too and for other packages, not just hledger.

Log file attached. Summary below:

ledger:~/ $ cabal install -v3 hledger
Lots of debug output (see attached)...
hledger-0.13 failed during the configure step. The exception was:
ExitFailure 11


ledger:~/ $ cabal --version
cabal-install version 0.8.2
using version 1.8.0.2 of the Cabal library 

ledger:~/ $ ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.12.1

Attachments

log Download (18.2 KB) - added by philips 3 years ago.
Log output from cabal install hledger session
log.txt Download (7.9 KB) - added by simonmic 3 years ago.
Simon's configure -v3 and ghc-pkg list output

Change History

Changed 3 years ago by philips

  • attachment log Download added

Log output from cabal install hledger session

Changed 3 years ago by simonmic

I first saw this a few weeks back, since then it has increased and I see it on several machines (mac and linux) and with various packages (hledger and pandoc among them). Once a package starts giving this error, it also means that "cabal configure" is terminating with non-zero exit status and no apparent error message in -v3 output. Eg:

simon@joyful:/repos$ cabal unpack pandoc Unpacking to pandoc-1.6/ simon@joyful:/repos$ cd pandoc-1.6/ simon@joyful:/repos/pandoc-1.6$ cabal configure && echo OK Resolving dependencies... [1 of 1] Compiling Main ( Setup.hs, dist/setup/Main.o ) Linking ./dist/setup/setup ... Configuring pandoc-1.6... simon@joyful:/repos/pandoc-1.6$

cabal configure -v3 and ghc-pkg list output are attached. I'm currently using ghc 6.12.3, have seen it also with 6.12.1.

Changed 3 years ago by simonmic

Simon's configure -v3 and ghc-pkg list output

Changed 3 years ago by duncan

Note that exit code 11 often means it terminated with signal 11, which is a segmentation fault.

Changed 3 years ago by andressr

  • cc andres.sicard.ramirez@… added

Changed 3 years ago by batterseapower

  • cc batterseapower added

I'm getting this on OS X as well.

Changed 3 years ago by batterseapower

OK, more information.

If I run the HEAD hledger "./Setup configure" (with a compiled Setup.lhs, GHC 6.12.3):

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0xfffffffc
0x00274f52 in scavenge_mutable_list ()
(gdb) bt
#0  0x00274f52 in scavenge_mutable_list ()
#1  0x00275223 in scavenge_capability_mut_lists ()

I get more information if I link with -debug and then run with -Ds:

$ gdb ./Setup
GNU gdb 6.3.50-20050815 (Apple version gdb-1472) (Wed Jul 21 10:53:12 UTC 2010)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries ... done

(gdb) run configure +RTS -Ds
Starting program: /Users/mbolingbroke/Programming/Checkouts/hledger/hledger/Setup configure +RTS -Ds
Reading symbols for shared libraries ++. done
new task (taskCount: 1)
task exiting
new task (taskCount: 1)
cap 0: created thread 1
cap 0: thread 1 appended to run queue
new bound thread (1)
cap 0: schedule()
cap 0: running thread 1 (ThreadRunGHC)
cap 0: thread 1 stopped (stack overflow)
increasing stack size from 240 words to 1008.
cap 0: running thread 1 (ThreadRunGHC)
cap 0: thread 1 stopped (heap overflow)
all threads:
threads on capability 0:
	thread    1 @ 0x117d000 is not blocked (TSO_DIRTY)
other threads:
cap 0: finished GC
cap 0: running thread 1 (ThreadRunGHC)
cap 0: thread 1 stopped (heap overflow)
all threads:
threads on capability 0:
	thread    1 @ 0x117d000 is not blocked (TSO_DIRTY)
other threads:
cap 0: finished GC
cap 0: running thread 1 (ThreadRunGHC)
cap 0: thread 1 stopped (suspended while making a foreign call)
cap 0: running thread 1 (ThreadRunGHC)
Configuring hledger-0.13...
cap 0: created thread 2
cap 0: thread 2 appended to run queue
cap 0: created thread 3
cap 0: thread 3 appended to run queue
cap 0: thread 1 stopped (blocked)
	thread    1 @ 0x117d000 is blocked on an MVar @ 0x11eb7a8 (TSO_DIRTY)
cap 0: running thread 2 (ThreadRunGHC)
cap 0: thread 2 stopped (blocked)
	thread    2 @ 0x11ec000 is blocked on read from fd 5 (TSO_DIRTY)
scheduler: checking for threads blocked on I/O
cap 0: running thread 3 (ThreadRunGHC)
cap 0: thread 3 stopped (blocked)
	thread    3 @ 0x11ec400 is blocked on read from fd 7 (TSO_DIRTY)
scheduler: checking for threads blocked on I/O (waiting)
Waking up blocked thread 2
cap 0: running thread 2 (ThreadRunGHC)
cap 0: thread 2 stopped (yielding)
cap 0: thread 2 appended to run queue
scheduler: checking for threads blocked on I/O
cap 0: running thread 2 (ThreadRunGHC)
cap 0: thread 2 stopped (blocked)
	thread    2 @ 0x11ec000 is blocked on read from fd 5 (TSO_DIRTY)
scheduler: checking for threads blocked on I/O (waiting)
Waking up blocked thread 3
cap 0: running thread 3 (ThreadRunGHC)
cap 0: thread 1 appended to run queue
cap 0: waking up thread 1 on cap 0
cap 0: thread 3 stopped (finished)
scheduler: checking for threads blocked on I/O
Waking up blocked thread 2
cap 0: running thread 2 (ThreadRunGHC)
cap 0: thread 2 stopped (finished)
cap 0: running thread 1 (ThreadRunGHC)
cap 0: thread 1 stopped (suspended while making a foreign call)
cap 0: running thread 1 (ThreadRunGHC)
cap 0: thread 1 stopped (yielding)
cap 0: thread 1 appended to run queue
cap 0: running thread 1 (ThreadRunGHC)
cap 0: created thread 4
cap 0: thread 4 appended to run queue
cap 0: created thread 5
cap 0: thread 5 appended to run queue
cap 0: thread 1 stopped (blocked)
	thread    1 @ 0x117d000 is blocked on an MVar @ 0x11f1fa0 (TSO_DIRTY)
cap 0: running thread 4 (ThreadRunGHC)
cap 0: thread 4 stopped (yielding)
cap 0: thread 4 appended to run queue
cap 0: running thread 5 (ThreadRunGHC)
cap 0: thread 5 stopped (blocked)
	thread    5 @ 0x11ecc00 is blocked on read from fd 7 (TSO_DIRTY)
scheduler: checking for threads blocked on I/O
cap 0: running thread 4 (ThreadRunGHC)
cap 0: thread 4 stopped (blocked)
	thread    4 @ 0x11ec800 is blocked on read from fd 5 (TSO_DIRTY)
scheduler: checking for threads blocked on I/O (waiting)
Waking up blocked thread 4
cap 0: running thread 4 (ThreadRunGHC)
cap 0: thread 4 stopped (blocked)
	thread    4 @ 0x11ec800 is blocked on read from fd 5 (TSO_DIRTY)
scheduler: checking for threads blocked on I/O (waiting)
Waking up blocked thread 5
Waking up blocked thread 4
cap 0: running thread 4 (ThreadRunGHC)
cap 0: thread 1 appended to run queue
cap 0: waking up thread 1 on cap 0
cap 0: thread 4 stopped (finished)
cap 0: running thread 5 (ThreadRunGHC)
cap 0: thread 5 stopped (finished)
cap 0: running thread 1 (ThreadRunGHC)
cap 0: thread 1 stopped (suspended while making a foreign call)
cap 0: running thread 1 (ThreadRunGHC)
cap 0: thread 1 stopped (yielding)
cap 0: thread 1 appended to run queue
cap 0: running thread 1 (ThreadRunGHC)
cap 0: created thread 6
cap 0: thread 6 appended to run queue
cap 0: created thread 7
cap 0: thread 7 appended to run queue
cap 0: thread 1 stopped (blocked)
	thread    1 @ 0x117d000 is blocked on an MVar @ 0x11f77a8 (TSO_DIRTY)
cap 0: running thread 6 (ThreadRunGHC)
cap 0: thread 6 stopped (blocked)
	thread    6 @ 0x11f8000 is blocked on read from fd 5 (TSO_DIRTY)
scheduler: checking for threads blocked on I/O
cap 0: running thread 7 (ThreadRunGHC)
cap 0: thread 7 stopped (blocked)
	thread    7 @ 0x11f8400 is blocked on read from fd 7 (TSO_DIRTY)
scheduler: checking for threads blocked on I/O (waiting)
Waking up blocked thread 6
cap 0: running thread 6 (ThreadRunGHC)
cap 0: thread 6 stopped (yielding)
cap 0: thread 6 appended to run queue
scheduler: checking for threads blocked on I/O
cap 0: running thread 6 (ThreadRunGHC)
cap 0: thread 6 stopped (heap overflow)
all threads:
threads on capability 0:
	thread    6 @ 0x11f8000 is not blocked (TSO_DIRTY)
other threads:
	thread    7 @ 0x11f8400 is blocked on read from fd 7 (TSO_DIRTY)
	thread    1 @ 0x117d000 is blocked on an MVar @ 0x11f77a8 (TSO_DIRTY)
Setup: internal error: ASSERTION FAILED: file rts/sm/Evac.c, line 373

    (GHC version 6.12.3 for i386_apple_darwin)
    Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

Program received signal SIGABRT, Aborted.
0x90ce1176 in __kill ()

With an assert failure like that, it could be anything...

Changed 3 years ago by duncan

We need a Process API that gives us access to the info about whether a process terminated normally or via a signal. If we knew that we could present a better error message about child processes failing.

As for why it failed exactly, that is indeed anyone's guess.

Changed 3 years ago by sepposade

Also seeing this with hledger and texmath (dependency of pandoc) on Mac OS 10.6.7:

$ cabal install texmath
Resolving dependencies...
[1 of 1] Compiling Main             (elided...)
Linking /var/folders/-f/-fdnjLBuGf0bDt4aVkHCvE+++TI/-Tmp-/texmath-0.5.0.14544/texmath-0.5.0.1/dist/setup/setup ...
ld: warning: could not create compact unwind for .LFB3: non-standard register 5 being saved in prolog
Configuring texmath-0.5.0.1...
cabal: Error: some packages failed to install:
texmath-0.5.0.1 failed during the configure step. The exception was:
ExitFailure 11
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.12.3

Changed 2 years ago by kosmikus

  • milestone changed from cabal-install-0.8 to cabal-install-0.16

Does this one still cause any problems with current versions of GHC and Cabal?

Changed 2 years ago by mightybyte

I just started seeing this ExitFailure? 11 issue when building a proprietary project with a large number of dependencies on MacOS. I'll post more details if I can distill smaller self-contained ways of reproducing the problem.

Changed 20 months ago by alexey

  • cc mrchebas@… added
Note: See TracTickets for help on using tickets.