[GHC] #8977: GHC infinite loop on Solaris

#8977: GHC infinite loop on Solaris ------------------------------------+--------------------------------- Reporter: kgardas | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.1 Keywords: | Operating System: Solaris Architecture: Unknown/Multiple | Type of failure: None/Unknown Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | ------------------------------------+--------------------------------- Hello, sometimes on Solaris ghc gets into infinite loop while trying to print something. E.g. ghc --version or ghc --info are good examples. This also happens for example while trying to build another ghc by already installed ghc. The reason for loop is simple: ghc is using libiconv for printing and libiconv is using its own libraries/binary tables. The problem arise when libiconv is not able to find the appropriate library/table file, then it tries to print error message (or GHC itself) which results in calling libiconv for printing which goes to search for appropriate library/table file and loop is closed. Please note that library/table file is different for different LANG settings. That also means that if you are able to invoke ghc --version on command line, still your ./configure of a new ghc may stuck on checking ghc version since configure sets LANG=C while on command line you may have LANG=en_US.UTF-8. Running ghc --version in truss shows this issue nicely as: {{{ /1: munmap(0xFF210000, 8790) = 0 /1: access("/usr/lib/iconv/geniconvtbl/binarytables/646%UTF-32BE.bt", R_OK) Err#2 ENOENT /1: access("/usr/lib/iconv/646%UTF-32BE.so", R_OK) Err#2 ENOENT /1: lwp_unpark(2) = 0 /2: lwp_park(0x00000000, 0) = 0 /2: clock_gettime(4, 0xFF0D9E68) = 0 /2: lwp_unpark(1) = 0 /1: lwp_park(0x00000000, 0) = 0 /1: access("/usr/lib/iconv/geniconvtbl/binarytables/646%UTF-32BE.bt", R_OK) Err#2 ENOENT /1: access("/usr/lib/iconv/646%UTF-32BE.so", R_OK) Err#2 ENOENT /1: open("/usr/lib/iconv/alias", O_RDONLY) = 7 /1: fstat64(7, 0xFFBFD388) = 0 /1: fstat64(7, 0xFFBFD5C8) = 0 /1: mmap(0x00000000, 8790, PROT_READ, MAP_SHARED, 7, 0) = 0xFF210000 /1: close(7) = 0 /1: munmap(0xFF210000, 8790) = 0 /1: access("/usr/lib/iconv/geniconvtbl/binarytables/646%UTF-32BE.bt", R_OK) Err#2 ENOENT /1: access("/usr/lib/iconv/646%UTF-32BE.so", R_OK) Err#2 ENOENT /1: access("/usr/lib/iconv/geniconvtbl/binarytables/646%UTF-32BE.bt", R_OK) Err#2 ENOENT /1: access("/usr/lib/iconv/646%UTF-32BE.so", R_OK) Err#2 ENOENT /1: open("/usr/lib/iconv/alias", O_RDONLY) = 7 /1: fstat64(7, 0xFFBFD388) = 0 /1: fstat64(7, 0xFFBFD5C8) = 0 }}} So, the solution on Solaris is simple. Install appropriate libiconv files. Usually if you are hit by this issue, then at least on Solaris 11 you are missing unicode-core package and this may be installed by: {{{ # pkg install unicode-core }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8977 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8977: GHC infinite loop on Solaris ---------------------------------+------------------------------------ Reporter: kgardas | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.8.1 Resolution: wontfix | Keywords: Operating System: Solaris | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: ---------------------------------+------------------------------------ Changes (by kgardas): * status: new => closed * resolution: => wontfix Comment: I'm closing since this was merely for documentation purposes. Hopefully google find it. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8977#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8977: GHC infinite loop on Solaris ---------------------------------+------------------------------------ Reporter: kgardas | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.1 Resolution: | Keywords: Operating System: Solaris | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: ---------------------------------+------------------------------------ Changes (by trommler): * status: closed => new * resolution: wontfix => Comment: This looks like a duplicate of #7695. I am reopening and closing as duplicate. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8977#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8977: GHC infinite loop on Solaris -------------------------------------+------------------------------------ Reporter: kgardas | Owner: Type: bug | Status: closed Priority: normal | Milestone: 7.8.2 Component: Compiler | Version: 7.8.1 Resolution: duplicate | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: #7695 -------------------------------------+------------------------------------ Changes (by trommler): * status: new => closed * resolution: => duplicate * os: Solaris => Unknown/Multiple * related: => #7695 * milestone: => 7.8.2 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8977#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC