haskell-src-exts: Illegal instruction (core dumped)

Hi, I already mentioned this problem earlier on this mailing list, but now I have some extra information. It's the following (on GHCi): Prelude> :m Language.Haskell.Exts Prelude Language.Haskell.Exts> parseFileContents "main = putStrLn \"Hello World\"" Loading package array-0.5.0.0 ... linking ... done. Loading package filepath-1.3.0.2 ... linking ... done. Loading package deepseq-1.3.0.2 ... linking ... done. Loading package old-locale-1.0.0.6 ... linking ... done. Loading package time-1.4.2 ... linking ... done. Loading package bytestring-0.10.4.0 ... linking ... done. Loading package unix-2.7.0.1 ... linking ... done. Loading package directory-1.2.1.0 ... linking ... done. Loading package old-time-1.1.0.2 ... linking ... done. Loading package text-1.1.0.1 ... linking ... done. Loading package polyparse-1.9 ... linking ... done. Loading package cpphs-1.18.4 ... linking ... done. Loading package pretty-1.1.1.1 ... linking ... done. Loading package haskell-src-exts-1.15.0.1 ... linking ... done. Illegal instruction (core dumped) This affects everything that depends on haskell-src-exts, like hlint and stylish-haskell. The bug shows up only on my two AMD Athlon II X2 computers, but not on my other Intel Sandybridge. I think it is related to -fllvm flag because I didn't have this bug with the 1.15.0 version, which didn't have the flag. Can someone with similar AMD architecture try to replicate it, please? Thanks Nicola

On Fri, Apr 25, 2014 at 04:10:37PM +0200, Nicola Squartini wrote:
Hi,
I already mentioned this problem earlier on this mailing list, but now I have some extra information.
It's the following (on GHCi):
Prelude> :m Language.Haskell.Exts Prelude Language.Haskell.Exts> parseFileContents "main = putStrLn \"Hello World\"" Loading package array-0.5.0.0 ... linking ... done. Loading package filepath-1.3.0.2 ... linking ... done. Loading package deepseq-1.3.0.2 ... linking ... done. Loading package old-locale-1.0.0.6 ... linking ... done. Loading package time-1.4.2 ... linking ... done. Loading package bytestring-0.10.4.0 ... linking ... done. Loading package unix-2.7.0.1 ... linking ... done. Loading package directory-1.2.1.0 ... linking ... done. Loading package old-time-1.1.0.2 ... linking ... done. Loading package text-1.1.0.1 ... linking ... done. Loading package polyparse-1.9 ... linking ... done. Loading package cpphs-1.18.4 ... linking ... done. Loading package pretty-1.1.1.1 ... linking ... done. Loading package haskell-src-exts-1.15.0.1 ... linking ... done. Illegal instruction (core dumped)
This affects everything that depends on haskell-src-exts, like hlint and stylish-haskell. The bug shows up only on my two AMD Athlon II X2 computers, but not on my other Intel Sandybridge.
I think it is related to -fllvm flag because I didn't have this bug with the 1.15.0 version, which didn't have the flag.
Can someone with similar AMD architecture try to replicate it, please?
Ouch! The reason for using LLVM is this: http://ghc.haskell.org/trac/ghc/ticket/8768 So you probably should raise this as a ticket against GHC. I hope the last comment on that ticket is correct and that it's fixed in 7.8.3. /M -- Magnus Therning OpenPGP: 0xAB4DFBA4 email: magnus@therning.org jabber: magnus@therning.org twitter: magthe http://therning.org/magnus In a hierarchy, every employee tends to rise to his level of incompetence. -- The Peter Principle

I opened a ticket a few days ago already
https://ghc.haskell.org/trac/ghc/ticket/8991 but no answer. I guess it's
difficult to reproduce.
In fact if I recompile HSE using your same PKGBUILD, it works fine!
I'm using llvm-3.4-1 and glibc-2.19-3. I wonder what could be different
between your build environment and mine.
Very strange!
On Sat, Apr 26, 2014 at 9:19 AM, Magnus Therning
On Fri, Apr 25, 2014 at 04:10:37PM +0200, Nicola Squartini wrote:
Hi,
I already mentioned this problem earlier on this mailing list, but now I have some extra information.
It's the following (on GHCi):
Prelude> :m Language.Haskell.Exts Prelude Language.Haskell.Exts> parseFileContents "main = putStrLn \"Hello World\"" Loading package array-0.5.0.0 ... linking ... done. Loading package filepath-1.3.0.2 ... linking ... done. Loading package deepseq-1.3.0.2 ... linking ... done. Loading package old-locale-1.0.0.6 ... linking ... done. Loading package time-1.4.2 ... linking ... done. Loading package bytestring-0.10.4.0 ... linking ... done. Loading package unix-2.7.0.1 ... linking ... done. Loading package directory-1.2.1.0 ... linking ... done. Loading package old-time-1.1.0.2 ... linking ... done. Loading package text-1.1.0.1 ... linking ... done. Loading package polyparse-1.9 ... linking ... done. Loading package cpphs-1.18.4 ... linking ... done. Loading package pretty-1.1.1.1 ... linking ... done. Loading package haskell-src-exts-1.15.0.1 ... linking ... done. Illegal instruction (core dumped)
This affects everything that depends on haskell-src-exts, like hlint and stylish-haskell. The bug shows up only on my two AMD Athlon II X2 computers, but not on my other Intel Sandybridge.
I think it is related to -fllvm flag because I didn't have this bug with the 1.15.0 version, which didn't have the flag.
Can someone with similar AMD architecture try to replicate it, please?
Ouch! The reason for using LLVM is this: http://ghc.haskell.org/trac/ghc/ticket/8768
So you probably should raise this as a ticket against GHC.
I hope the last comment on that ticket is correct and that it's fixed in 7.8.3.
/M
-- Magnus Therning OpenPGP: 0xAB4DFBA4 email: magnus@therning.org jabber: magnus@therning.org twitter: magthe http://therning.org/magnus
In a hierarchy, every employee tends to rise to his level of incompetence. -- The Peter Principle
_______________________________________________ arch-haskell mailing list arch-haskell@haskell.org http://www.haskell.org/mailman/listinfo/arch-haskell

Version 1.15.0 of HSE was not compiled with llvm, was it? At least from
what I see from the git history.
On Sat, Apr 26, 2014 at 10:39 AM, Nicola Squartini
I opened a ticket a few days ago already https://ghc.haskell.org/trac/ghc/ticket/8991 but no answer. I guess it's difficult to reproduce.
In fact if I recompile HSE using your same PKGBUILD, it works fine! I'm using llvm-3.4-1 and glibc-2.19-3. I wonder what could be different between your build environment and mine. Very strange!
On Sat, Apr 26, 2014 at 9:19 AM, Magnus Therning
wrote: On Fri, Apr 25, 2014 at 04:10:37PM +0200, Nicola Squartini wrote:
Hi,
I already mentioned this problem earlier on this mailing list, but now I have some extra information.
It's the following (on GHCi):
Prelude> :m Language.Haskell.Exts Prelude Language.Haskell.Exts> parseFileContents "main = putStrLn \"Hello World\"" Loading package array-0.5.0.0 ... linking ... done. Loading package filepath-1.3.0.2 ... linking ... done. Loading package deepseq-1.3.0.2 ... linking ... done. Loading package old-locale-1.0.0.6 ... linking ... done. Loading package time-1.4.2 ... linking ... done. Loading package bytestring-0.10.4.0 ... linking ... done. Loading package unix-2.7.0.1 ... linking ... done. Loading package directory-1.2.1.0 ... linking ... done. Loading package old-time-1.1.0.2 ... linking ... done. Loading package text-1.1.0.1 ... linking ... done. Loading package polyparse-1.9 ... linking ... done. Loading package cpphs-1.18.4 ... linking ... done. Loading package pretty-1.1.1.1 ... linking ... done. Loading package haskell-src-exts-1.15.0.1 ... linking ... done. Illegal instruction (core dumped)
This affects everything that depends on haskell-src-exts, like hlint and stylish-haskell. The bug shows up only on my two AMD Athlon II X2 computers, but not on my other Intel Sandybridge.
I think it is related to -fllvm flag because I didn't have this bug with the 1.15.0 version, which didn't have the flag.
Can someone with similar AMD architecture try to replicate it, please?
Ouch! The reason for using LLVM is this: http://ghc.haskell.org/trac/ghc/ticket/8768
So you probably should raise this as a ticket against GHC.
I hope the last comment on that ticket is correct and that it's fixed in 7.8.3.
/M
-- Magnus Therning OpenPGP: 0xAB4DFBA4 email: magnus@therning.org jabber: magnus@therning.org twitter: magthe http://therning.org/magnus
In a hierarchy, every employee tends to rise to his level of incompetence. -- The Peter Principle
_______________________________________________ arch-haskell mailing list arch-haskell@haskell.org http://www.haskell.org/mailman/listinfo/arch-haskell

On Sat, Apr 26, 2014 at 05:08:58PM +0200, Nicola Squartini wrote:
Version 1.15.0 of HSE was not compiled with llvm, was it? At least from what I see from the git history.
That is correct. I held back on adding HSE to [haskell-testing] for a long time due to GHC 7.8 not being able to compile it with profiling turned on. It wasn't until I had a brain fart and thought of trying with llvm that I managed to get it built. I think it was around bringing GHC 7.8 into [haskell-core] that I attempted building HSE normally again, and it worked fine. Then at the next HSE release the build problem was back and I went back to building with llvm. These days the ArchHaskell build system is my home laptop: Intel(R) Core(TM) i7-4700MQ CPU @ 2.40GHz /M -- Magnus Therning OpenPGP: 0xAB4DFBA4 email: magnus@therning.org jabber: magnus@therning.org twitter: magthe http://therning.org/magnus The results point out the fragility of programmer expertise: advanced programmers have strong expectations about what programs should look like, and when those expectations are violated--in seemingly innocuous ways--their performance drops drastically. -- Elliot Soloway and Kate Ehrlich
participants (2)
-
Magnus Therning
-
Nicola Squartini