Ticket #3801 (closed bug: invalid)

Opened 3 years ago

Last modified 3 years ago

ghc-6.10.4: internal error: PAP object entered

Reported by: patrikja Owned by:
Priority: normal Milestone:
Component: Compiler Version: 6.10.4
Keywords: Cc:
Operating System: Linux Architecture: x86
Type of failure: Runtime crash Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

Running the compiled code for a simple program using WX Haskell + QuickCheck? gives "internal error: PAP object entered". (I cannot submit the source code openly right now because it is a solution to course homework in the course I'm teaching Jan-March, but I could send it to whoever is assigned to this bug. Just ask patrikja+ghc AT gmail .)

The error appeared after adding a dependency on QuickCheck? (in base) and the Control.Monad.Writer (in mtl) - before that it compiled and worked fine.

Searching the trac history most PAP object entered seem to refer to  http://hackage.haskell.org/trac/ghc/ticket/1372 but I'm not sure how to make sure no "mismatched library versions" are around. I'd be happy to rebuild / reinstall my whole cabal library setup if there is an easy way to do that.

Another clue may be the libstdc++.so.6 warning I get after each compile - see below. (That warning has been there also for all the working versions of the code so I'm not sure if it is relevant here.)

patrikj@hel:~/src/gitroot/edu/AFP/Lab1_turtle$ make test
ghc -package wx --make Lab1_Part2_Task2
[1 of 3] Compiling Turtle           ( Turtle.lhs, Turtle.o )
[2 of 3] Compiling Spiral           ( Spiral.lhs, Spiral.o )
[3 of 3] Compiling Main             ( Lab1_Part2_Task2.lhs, Lab1_Part2_Task2.o )
Linking Lab1_Part2_Task2 ...
/usr/bin/ld: warning: libstdc++.so.6, needed by /usr/lib/libwx_baseu-2.8.so, may conflict with libstdc++.so.7
./Lab1_Part2_Task2 0 91
Lab1_Part2_Task2: internal error: PAP object entered!
    (GHC version 6.10.4 for i386_unknown_linux)
    Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
make: *** [test] Avbruten (SIGABRT)

patrikj@hel:~/src/gitroot/edu/AFP/Lab1_turtle$ uname -a
Linux hel 2.6.31-16-generic #53-Ubuntu SMP Tue Dec 8 04:01:29 UTC 2009 i686 GNU/Linux

Change History

Changed 3 years ago by patrikja

After testing a bit I can add that just removing the call to quickCheck is enough to get the program to work. The version of QuickCheck? is as follows:

patrikj@hel:~/src/gitroot/edu/AFP/Lab1_turtle$ ghc-pkg list QuickCheck
/usr/local/lib/ghc-6.10.4/./package.conf:
    QuickCheck-1.2.0.0

It seems unlikely that this is the problem. Also mtl seems to be the standard one:

patrikj@hel:~/src/gitroot/edu/AFP/Lab1_turtle$ ghc-pkg list mtl
/usr/local/lib/ghc-6.10.4/./package.conf:
    mtl-1.1.0.2

Changed 3 years ago by patrikja

Now I've reduced the bug down to minimal dependencies - a two-line program still showing the same problem:

> import qualified Test.QuickCheck as Q
> main = Q.quickCheck True

patrikj@hel:~/src/gitroot/edu/AFP/Lab1_turtle$ ghc --make Main && ./Main
[1 of 1] Compiling Main             ( Main.lhs, Main.o )
Linking Main ...
Main: internal error: PAP object entered!
    (GHC version 6.10.4 for i386_unknown_linux)
    Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
Avbruten (SIGABRT)

Changed 3 years ago by patrikja

Removing the local .ghc directory (and thus the local package.conf) resolved my problems. Both the libstdc++ warning and the error is gone. This means I have solved my problem, but it still means it is possible to get into some kind of "bad state" package.conf-wise.

I attach the package.conf which exhibits the problem.

patrikj@hel:~/src/gitroot/edu/AFP/Lab1_turtle$ ghc -package-conf ~/dot.ghc_20100103/i386-linux-6.10.4/package.conf -package wx --make Lab1_Part2_Task2
Linking Lab1_Part2_Task2 ...
/usr/bin/ld: warning: libstdc++.so.6, needed by /usr/lib/libwx_baseu-2.8.so, may conflict with libstdc++.so.7
patrikj@hel:~/src/gitroot/edu/AFP/Lab1_turtle$ ./Lab1_Part2_Task2 0 91
Lab1_Part2_Task2: internal error: PAP object entered!
    (GHC version 6.10.4 for i386_unknown_linux)
    Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
Avbruten (SIGABRT)
patrikj@hel:~/src/gitroot/edu/AFP/Lab1_turtle$ ghc -package-conf ~/dot.ghc_20100103/i386-linux-6.10.4/package.conf --make Bug_3801 && ./Bug_3801 
[1 of 1] Compiling Main             ( Bug_3801.lhs, Bug_3801.o )
Linking Bug_3801 ...
Bug_3801: internal error: PAP object entered!
    (GHC version 6.10.4 for i386_unknown_linux)
    Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
Avbruten (SIGABRT)

Without the "bad" package.conf it works as it should:

patrikj@hel:~/src/gitroot/edu/AFP/Lab1_turtle$ rm *.o *.hi
patrikj@hel:~/src/gitroot/edu/AFP/Lab1_turtle$ ghc --make Bug_3801 && ./Bug_3801 
[1 of 1] Compiling Main             ( Bug_3801.lhs, Bug_3801.o )
Linking Bug_3801 ...
OK, passed 100 tests.

Changed 3 years ago by simonmar

  • status changed from new to closed
  • resolution set to invalid

Thanks - I expect you had an inconsistent set of packages. GHC 6.12.1 is better at detecting such problems.

Note: See TracTickets for help on using tickets.