Opened 6 years ago

Last modified 4 years ago

#8151 new bug

ghc-7.4.2 on OpenIndiana (Solaris) createSubprocess fails

Reported by: troydm Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.4.2
Keywords: Cc: kgardas
Operating System: Solaris Architecture: x86_64 (amd64)
Type of failure: Runtime performance bug Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

when i'm compiling this test.hs with ghc -thread ./test.hs and then execute it i get Starting Subprocess Exit code: ExitFailure 127

This error code indicates that command isn't found (i have ghc in /usr/local/bin) and it's specified in PATH variable, however it acts as if it's not even there

however if i remove -threaded flag and recompile code again, it works

Starting Subprocess ghc: no input files Usage: For basic information, try the `--help' option. Exit code: ExitFailure 1

Attachments (1)

test.hs (1.2 KB) - added by troydm 6 years ago.
test file that reproduces the error

Download all attachments as: .zip

Change History (8)

Changed 6 years ago by troydm

Attachment: test.hs added

test file that reproduces the error

comment:1 Changed 5 years ago by thomie

Status: newinfoneeded

Can you try again with GHC 7.8.3? Does this problem only occur on Solaris? I can not reproduce it on Linux. Note: to compile with 7.4.2, first cabal install transformers.

comment:2 Changed 5 years ago by troydm

Just tested on my OpenIndiana 151a9 with ghc 7.6.3 and it's still reproduceable and I'm sure it's the same with 7.8.3 too (also unfortuneatly I don't have an Solaris box at hand with latest ghc to test it)

This bug only occurs on Solaris/OpenIndiana operating system

This bug was discovered by me when I was trying to use Snap framework as it's web server control tool does something same as in test.hs

Last edited 5 years ago by troydm (previous) (diff)

comment:3 Changed 5 years ago by troydm

Architecture: x86x86_64 (amd64)
Status: infoneededupstream

comment:4 Changed 4 years ago by thomie

Cc: kgardas added

troydm: you marked this bug as upstream. Do you suggest it is not a GHC bug? Please mark it 'new' if you think it is.

CC kgardas, maybe he can help.

comment:5 Changed 4 years ago by troydm

Status: upstreamnew

kgardas, yeah I'll mark it as new

comment:6 Changed 4 years ago by kgardas

Honestly it's quite strange that w/o -threaded this works for you, since:

karel@silence:/tmp/ttt$ ls -la
total 6392
drwxr-xr-x   2 karel    karel        178 Jul 31 15:58 .
drwxrwxrwt  25 root     sys         2823 Jul 31 15:58 ..
-rwxr-xr-x   1 karel    karel    3261384 Jul 31 15:58 test
karel@silence:/tmp/ttt$ mkdir test
mkdir: Failed to make directory "test"; File exists
karel@silence:/tmp/ttt$ 

and test also shows the same behaviour:

karel@silence:/tmp/ttt$ ./test 
test: test: createDirectory: already exists (File exists)
karel@silence:/tmp/ttt$ 

anyway, if I rename test -> textx, then I get:

karel@silence:/tmp/ttt$ ./testx 
Starting Subprocess 
testx: ghc: createProcess: runInteractiveProcess: exec: does not exist (No such file or directory)

karel@silence:/tmp/ttt$ 

single-threaded fails in the way like yours:

karel@silence:/tmp/ttt$ ./test-st 
Starting Subprocess 
ghc: no input files
Usage: For basic information, try the `--help' option.
Exit code: ExitFailure 1

karel@silence:/tmp/ttt$ 

anyway, if I modify test to point directly to ghc (full path), then it works also with -threaded

karel@silence:/tmp/ttt$ ghc -threaded ../test.hs -o test-thr
karel@silence:/tmp/ttt$ ./test-thr 
Starting Subprocess 
ghc: no input files
Usage: For basic information, try the `--help' option.
Exit code: ExitFailure 1

karel@silence:/tmp/ttt$

my guess is that environment handling is kind of fishy on Solaris. We also do have few tests in this domain failing.

comment:7 Changed 4 years ago by kgardas

Hm, last note: for tests above I've used Solaris 11.2 and GHC 7.10.1 RC3 build on AMD64.

Note: See TracTickets for help on using tickets.