Custom Query (7510 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (19 - 21 of 7510)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Ticket Resolution Summary Owner Reporter
#5405 worksforme Strange closure type crash when using Template Haskell on OS X Lion AndreasVoellmy
Description

GHCI crashes when I try to use Template Haskell on OS X Lion. To illustrate this, I have a small module, in a file A.hs:

module A where

import Language.Haskell.TH (Exp)
import Language.Haskell.SyntaxTrees.ExtsToTH (parseToTH) 

transform :: String -> Either String Exp
transform = parseToTH

ex1 = "42"

When I start ghci, load A, and evaluate ex1, and wait a couple seconds I get a crash, that usually reports something like this:

*A> ghc: internal error: evacuate: strange closure type 0
    (GHC version 7.0.4 for x86_64_apple_darwin)
    Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
Abort trap: 6

Sometimes I get different crash messages as well, such as:

*A> Segmentation fault: 11

Here is the transcript of a ghci session:

Andreas$ ghci -v
GHCi, version 7.0.4: http://www.haskell.org/ghc/  :? for help
Glasgow Haskell Compiler, Version 7.0.4, for Haskell 98, stage 2 booted by GHC version 7.0.2
Using binary package database: /Library/Frameworks/GHC.framework/Versions/7.0.4-x86_64/usr/lib/ghc-7.0.4/package.conf.d/package.cache
Using binary package database: /Users/Andreas/.ghc/x86_64-darwin-7.0.4/package.conf.d/package.cache
wired-in package ghc-prim mapped to ghc-prim-0.2.0.0-d9df11f804556f362beb0ea4e67261ba
wired-in package integer-gmp mapped to integer-gmp-0.2.0.3-298c59ba68b7aaa7e76ae5b1fe5e876e
wired-in package base mapped to base-4.3.1.0-239d76b73f466dc120129098b3472858
wired-in package rts mapped to builtin_rts
wired-in package template-haskell mapped to template-haskell-2.5.0.0-b46cde34bfee890dc536d5be377e906f
wired-in package dph-seq not found.
wired-in package dph-par not found.
Hsc static flags: -static
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package ffi-1.0 ... linking ... done.
Prelude> :l A
*** Chasing dependencies:
Chasing modules from: 
Stable obj: []
Stable BCO: []
unload: retaining objs []
unload: retaining bcos []
Ready for upsweep []
Upsweep completely successful.
*** Deleting temp files:
Deleting: 
*** Chasing dependencies:
Chasing modules from: *A.hs
Stable obj: []
Stable BCO: []
unload: retaining objs []
unload: retaining bcos []
Ready for upsweep
  [NONREC
      ModSummary {
         ms_hs_date = Wed Aug 10 16:52:58 EDT 2011
         ms_mod = main:A,
         ms_imps = [import Prelude,
                    import Language.Haskell.SyntaxTrees.ExtsToTH ( parseToTH ),
                    import Language.Haskell.TH ( Exp )]
         ms_srcimps = []
      }]
compile: input file A.hs
*** Checking old interface for main:A:
[1 of 1] Compiling A                ( A.hs, interpreted )
*** Parser:
*** Renamer/typechecker:
*** Desugar:
    Result size = 13
*** Simplifier SimplMode {Phase = 0 [final],
                      inline,
                      no rules,
                      eta-expand,
                      case-of-case} max-iterations=4:
    Result size = 13
*** Tidy Core:
    Result size = 13
*** CorePrep:
    Result size = 13
*** ByteCodeGen:
*** Deleting temp files:
Deleting: 
Upsweep completely successful.
*** Deleting temp files:
Deleting: 
Ok, modules loaded: A.
wired-in package ghc-prim mapped to ghc-prim-0.2.0.0-d9df11f804556f362beb0ea4e67261ba
wired-in package integer-gmp mapped to integer-gmp-0.2.0.3-298c59ba68b7aaa7e76ae5b1fe5e876e
wired-in package base mapped to base-4.3.1.0-239d76b73f466dc120129098b3472858
wired-in package rts mapped to builtin_rts
wired-in package template-haskell mapped to template-haskell-2.5.0.0-b46cde34bfee890dc536d5be377e906f
wired-in package dph-seq not found.
wired-in package dph-par not found.
wired-in package ghc-prim mapped to ghc-prim-0.2.0.0-d9df11f804556f362beb0ea4e67261ba
wired-in package integer-gmp mapped to integer-gmp-0.2.0.3-298c59ba68b7aaa7e76ae5b1fe5e876e
wired-in package base mapped to base-4.3.1.0-239d76b73f466dc120129098b3472858
wired-in package rts mapped to builtin_rts
wired-in package template-haskell mapped to template-haskell-2.5.0.0-b46cde34bfee890dc536d5be377e906f
wired-in package dph-seq not found.
wired-in package dph-par not found.
*A> ex1
wired-in package ghc-prim mapped to ghc-prim-0.2.0.0-d9df11f804556f362beb0ea4e67261ba
wired-in package integer-gmp mapped to integer-gmp-0.2.0.3-298c59ba68b7aaa7e76ae5b1fe5e876e
wired-in package base mapped to base-4.3.1.0-239d76b73f466dc120129098b3472858
wired-in package rts mapped to builtin_rts
wired-in package template-haskell mapped to template-haskell-2.5.0.0-b46cde34bfee890dc536d5be377e906f
wired-in package dph-seq not found.
wired-in package dph-par not found.
*** Parser:
*** Desugar:
*** Simplify:
*** CorePrep:
*** ByteCodeGen:
Loading package array-0.3.0.2 ... linking ... done.
Loading package bytestring-0.9.1.10 ... linking ... done.
Loading package containers-0.4.0.0 ... linking ... done.
Loading package ghc-binary-0.5.0.2 ... linking ... done.
Loading package filepath-1.2.0.0 ... linking ... done.
Loading package old-locale-1.0.0.2 ... linking ... done.
Loading package old-time-1.0.0.6 ... linking ... done.
Loading package unix-2.4.2.0 ... linking ... done.
Loading package directory-1.1.0.0 ... linking ... done.
Loading package pretty-1.0.1.2 ... linking ... done.
Loading package process-1.0.1.5 ... linking ... done.
Loading package Cabal-1.10.2.0 ... linking ... done.
Loading package bin-package-db-0.0.0.0 ... linking ... done.
Loading package hpc-0.5.0.6 ... linking ... done.
Loading package template-haskell ... linking ... done.
Loading package ghc-7.0.4 ... linking ... done.
Loading package extensible-exceptions-0.1.1.2 ... linking ... done.
Loading package time-1.2.0.3 ... linking ... done.
Loading package random-1.0.0.3 ... linking ... done.
Loading package cpphs-1.12 ... linking ... done.
Loading package haskell-src-exts-1.11.1 ... linking ... done.
Loading package transformers-0.2.2.0 ... linking ... done.
Loading package mtl-2.0.1.0 ... linking ... done.
Loading package MonadCatchIO-mtl-0.3.0.3 ... linking ... done.
Loading package ghc-mtl-1.0.1.0 ... linking ... done.
Loading package ghc-paths-0.1.0.8 ... linking ... done.
Loading package haskell98-1.1.0.1 ... linking ... done.
Loading package syb-0.3.3 ... linking ... done.
Loading package haskell-src-1.0.1.4 ... linking ... done.
Loading package utf8-string-0.3.6 ... linking ... done.
Loading package hint-0.3.3.2 ... linking ... done.
Loading package uniplate-1.6 ... linking ... done.
Loading package syntax-trees-0.1.2 ... linking ... done.
"42"
wired-in package ghc-prim mapped to ghc-prim-0.2.0.0-d9df11f804556f362beb0ea4e67261ba
wired-in package integer-gmp mapped to integer-gmp-0.2.0.3-298c59ba68b7aaa7e76ae5b1fe5e876e
wired-in package base mapped to base-4.3.1.0-239d76b73f466dc120129098b3472858
wired-in package rts mapped to builtin_rts
wired-in package template-haskell mapped to template-haskell-2.5.0.0-b46cde34bfee890dc536d5be377e906f
wired-in package dph-seq not found.
wired-in package dph-par not found.
*A> ghc: internal error: evacuate: strange closure type 0
    (GHC version 7.0.4 for x86_64_apple_darwin)
    Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
Abort trap: 6

Some more details about my setup:

My machine:

Darwin 11.0.0 Darwin Kernel Version 11.0.0: Sat Jun 18 12:56:35 PDT 2011; root:xnu-1699.22.73~1/RELEASE_X86_64 x86_64

gcc -v:

Using built-in specs.
Target: i686-apple-darwin11
Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2335.15~25/src/configure --disable-checking --enable-werror --prefix=/Developer/usr/llvm-gcc-4.2 --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin11 --enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2335.15~25/dst-llvmCore/Developer/usr/local --program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11 --target=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)
#5693 wontfix Build of local-gc branch of ghc broken simonmar AndreasVoellmy
Description

I am unable to build the local-gc branch of ghc (http://www.haskell.org/pipermail/cvs-ghc/2011-June/062748.html). I did the following:

"git clone http://darcs.haskell.org/ghc.git/; cd ghc; ./sync-all --testsuite get; ./utils/fingerprint/fingerprint.py restore -f local-gc.fp; cd libraries; rm -rf dph vector primitive; cd .. ; perl boot; configure; make"

I then get the error:

"inplace/bin/ghc-cabal" configure --with-ghc="/home/andreas/bin/ghc" --with-ghc-pkg="/home/andreas/bin/ghc-pkg"  --package-db=/home/andreas/Download/ghc-source/ghc/libraries/bootstrapping.conf --enable-library-profiling --enable-shared --enable-library-for-ghci --configure-option=CFLAGS=" -fno-stack-protector  " --configure-option=LDFLAGS="   " --configure-option=CPPFLAGS="   " --constraint "Cabal == 1.11.0" --constraint "hpc == 0.5.0.6" --constraint "extensible-exceptions == 0.1.1.2" --constraint "binary == 0.5.0.2" --constraint "bin-package-db == 0.0.0.0" --constraint "hoopl == 3.8.7.0" --with-gcc="/usr/bin/gcc" --configure-option=--with-cc="/usr/bin/gcc" --with-ar="/usr/bin/ar" --with-ranlib="true" -- dist-boot libraries/Cabal
Configuring Cabal-1.11.0...
ghc-cabal: At least the following dependencies are missing:
base >=4 && <3 && >=2 && <5, unix >=2.0 && <2.5
make[1]: *** [libraries/Cabal/dist-boot/package-data.mk] Error 1
make: *** [all] Error 2

The fingerprint file I use (named local-gc.fp) is

.|ab5aad587de8e3d9dde539982ae728b33e5bca50
ghc-tarballs|e7b7b152083f7c3e3559e557a239757d41ac02a6
libraries/Cabal|6f01f56a2702b50e2da909566c4a01622cb2ca7f
libraries/Win32|0cf603103e9ad3fccd862171ba5e689b87930622
libraries/array|e4b4e2e0a79f4138bdff4f10d263436b0155f449
libraries/base|be2750a0a11b919fb03cc070074e430f88bdfa90
libraries/binary|376797487651cf995bd52458ce1f7d7a283341b3
libraries/bytestring|cab9d8566fba8611598f14fb4f2ac7b8d4aae75b
libraries/containers|592f6d9da9090e8d53432f22a01bb117fea2246c
libraries/deepseq|91e8a93b15ed32af3941f81e927291a023feb369
libraries/directory|3a0f2e2cb94c3e4f346023acc7201409d2876ed8
libraries/extensible-exceptions|a667b48d0cb6469b6611cb516d16836aa002e782
libraries/filepath|92d211a2752fe8827582ae0d97efd18722ad3d87
libraries/ghc-prim|7fcfc880853fa399c9468049aeb14e6eadb9eae5
libraries/haskeline|125ee5bba59fa9ac2fd77aa3922c30dffc11b7b5
libraries/haskell2010|f90687bee55adfd693fe460f2ab4bc270a7f97e3
libraries/haskell98|eb655b0317665acb9670025480b4af4465bc8f55
libraries/hoopl|0febb7f04ff4326bd120fc75549845e5e9678d72
libraries/hpc|fce8babbc3f60fb195d84545753dc342422ab8e1
libraries/integer-gmp|2567c97aaa467cb676a6ecc2cf840c92ee1cb6ec
libraries/integer-simple|c3e9c0268b4d59895829e429d1ac767e6041b06a
libraries/mtl|a748dfa2770af1d348dfaa8ad6955b25b4935711
libraries/old-locale|7f09f55ea3011c17c526805f099394a05ec9c3fe
libraries/old-time|6aae8dc2f13cef6ab48c5436c6c0e7c1b5ae3f51
libraries/parallel|f82611fac439236e22a057cd555bb9fe393597b0
libraries/pretty|e00aa7e0f82fc6f13ad85f1b3a27f53efe473e60
libraries/process|d1c2999473ba0d4ceafdc6da309debca83f91abe
libraries/random|ba8cb1b9fdfddeb29fdfedd8612c8ce85a987af8
libraries/stm|ccc6d74872916e5de7747df4cc61f64de64be591
libraries/template-haskell|acd4c3292d0f7a222a1f4f426054e4732a809fc8
libraries/terminfo|f4476f1881085b74dbe65cf4a4561e8fb34017d4
libraries/unix|c9a0bf119ce343b291bef77828066339e94fb64d
libraries/utf8-string|d28cd1fbd4ebaaa0608c070bd02ed72dc9b70399
libraries/xhtml|9a4d7d64d0491a1844d5b5759275b029ccd1e2cd
nofib|6d3ea16e56bd99d060e778fab3583aa67a6b50d4
testsuite|6560613138d61afddd0d8d428254370f8dfdb4cd
utils/haddock|ebb07175062cf5122f3c49fa025163a9d6392e63
utils/hsc2hs|c46eed44ce96f1719334ffb190eddf63695bc553

The output of configure command shows how my setup:

Configure completed successfully.

   Building GHC version  : 7.1.20110606

   Build platform        : x86_64-unknown-linux
   Host platform         : x86_64-unknown-linux
   Target platform       : x86_64-unknown-linux

   Bootstrapping using   : /home/andi/bin/ghc
      which is version   : 7.2.1

   Using GCC             : /usr/bin/gcc
      which is version   : 4.4.3

   ld       : /usr/bin/ld
   Happy    : /home/andi/.cabal/bin/happy (1.18.6)
   Alex     : /home/andi/.cabal/bin/alex (3.0.1)
   Python   : /usr/bin/python
   Perl     : /usr/bin/perl
   dblatex  : 
   xsltproc : /usr/bin/xsltproc

I also tried building with ghc-7.0.3. So I installed 7.0.3, ran make maintainer-clean in my build directory for the local gc branch, then ran perl boot and configure again. Configure shows this:

----------------------------------------------------------------------
Configure completed successfully.

   Building GHC version  : 7.1.20110606

   Build platform        : x86_64-unknown-linux
   Host platform         : x86_64-unknown-linux
   Target platform       : x86_64-unknown-linux

   Bootstrapping using   : /home/andi/bin/ghc
      which is version   : 7.0.3

   Using GCC             : /usr/bin/gcc
      which is version   : 4.4.3

   ld       : /usr/bin/ld
   Happy    : /home/andi/.cabal/bin/happy (1.18.6)
   Alex     : /home/andi/.cabal/bin/alex (3.0.1)
   Python   : /usr/bin/python
   Perl     : /usr/bin/perl
   dblatex  : 
   xsltproc : /usr/bin/xsltproc

   HsColour was not found; documentation will not contain source links

   Building DocBook HTML documentation : NO
   Building DocBook PS documentation   : NO
   Building DocBook PDF documentation  : NO
----------------------------------------------------------------------

When I run make I get still get a build error, though a different one: 

"/home/andreas/bin/ghc"   -H32m -O  -package-conf libraries/bootstrapping.conf   -i -iutils/genprimopcode/. -iutils/genprimopcode/dist/build -iutils/genprimopcode/dist/build/autogen -Iutils/genprimopcode/dist/build -Iutils/genprimopcode/dist/build/autogen        -package array -no-user-package-conf -rtsopts     -odir utils/genprimopcode/dist/build -hidir utils/genprimopcode/dist/build -stubdir utils/genprimopcode/dist/build -hisuf hi -osuf  o -hcsuf hc -c utils/genprimopcode/dist/build/Lexer.hs -o utils/genprimopcode/dist/build/Lexer.o

utils/genprimopcode/dist/build/Lexer.hs:195:22:
    Not in scope: `alexGetByte'

utils/genprimopcode/dist/build/Lexer.hs:229:8:
    Not in scope: `alexGetByte'
make[1]: *** [utils/genprimopcode/dist/build/Lexer.o] Error 1
make: *** [all] Error 2
#7216 fixed Compositional blocking on file descriptors igloo AndreasVoellmy
Description

The GHC.Event.Thread module provides threadWaitRead, threadWaitWrite :: Fd -> IO () calls that block until a particular file descriptor is ready for reading or writing. With this API a single thread cannot wait on multiple file descriptors or a file descriptor and some other condition (e.g. an MVar, STM transaction, etc). One could work around this by creating extra producer threads that each monitor one file descriptor and then multiplex messages from those threads onto a single channel (or mvar, etc) and then have a consumer thread that waits on this single multiplexed channel. Unfortunately, this extra indirection imposes a modest performance penalty in the form of longer wait times to service events due to having to switch between multiple threads to handle a single ready file.

I propose to provide analogous functions in the STM monad threadWaitReadSTM,threadWaitWriteSTM :: Fd -> STM (). These will allow a single thread to wait on multiple files or both files and other conditions. This eliminates the switching between threads to service a request.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Note: See TracQuery for help on using queries.