[ ghc-Bugs-1249527 ] runhaskell causes GHC to segfault on OS X

SourceForge.net noreply at sourceforge.net
Tue Aug 2 13:14:13 EDT 2005


Bugs item #1249527, was opened at 2005-08-01 06:07
Message generated for change (Comment added) made by nobody
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=1249527&group_id=8032

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: 6.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: runhaskell causes GHC to segfault on OS X

Initial Comment:
Attempting to use runhaskell to build a caballized
package on OS X
causes ghc to segfault.

The user sees:

crossroads-able> cd harp 
crossroads-able> runhaskell Setup.hs configure
Warning: No license-file field.
Configuring harp-0.2...
configure: searching for ghc in path.
configure: found ghc at /opt/local/bin/ghc
runhaskell: waitForProcess: interrupted (Interrupted
system call)

(this is from the build of harp, part of the
haskell-src-exts pacakge,
but the same behavior was observed every time I tried
to use
runhaskell, including trying to caballize a build on a
small app
that I wrote. The application built successfully under
cabal on
FreeBSD-5.4 x86 with ghc-6.4.)

Attached are a crash log (ghccrash.log) and a ktrace
log (ktrace.log).
Superficially, it looks like a bad ioctl might trigger
the crash.

I'd apprecaite any hints on where to poke around in the
source
to track this down.

Thanks.




----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2005-08-02 10:14

Message:
Logged In: NO 

I think this was a problem related to the new dynamic library support, 
which will be fixed in 6.4.1 (and ghc 6.4 should work without problems for 
hand-compiled versions without dynamic libraries).
A workaround would be to use ghc --make to compile the setup script.

----------------------------------------------------------------------

Comment By: Gregory Wright (gwright83)
Date: 2005-08-02 08:57

Message:
Logged In: YES 
user_id=1321993

The ktrace was also omitted from the original posting.  Here
it is:

   414 ghc-6.4  RET   write 1
   414 ghc-6.4  CALL  getpid
   414 ghc-6.4  RET   getpid 414/0x19e
   414 ghc-6.4  CALL  stat(0x1b94528,0x1b944c0)
   414 ghc-6.4  NAMI  "tmp414"
   414 ghc-6.4  RET   stat -1 errno 2 No such file or directory
   414 ghc-6.4  CALL  sigprocmask(0x1,0xbfffd4d0,0xbfffd4d4)
   414 ghc-6.4  RET   sigprocmask 0
   414 ghc-6.4  CALL  sigaction(0x2,0xbfffd458,0)
   414 ghc-6.4  RET   sigaction 0
   414 ghc-6.4  CALL  sigprocmask(0x3,0xbfffd4d4,0)
   414 ghc-6.4  RET   sigprocmask 0
   414 ghc-6.4  CALL  sigprocmask(0x1,0xbfffd4d0,0xbfffd4d4)
   414 ghc-6.4  RET   sigprocmask 0
   414 ghc-6.4  CALL  sigaction(0x3,0xbfffd458,0)
   414 ghc-6.4  RET   sigaction 0
   414 ghc-6.4  CALL  sigprocmask(0x3,0xbfffd4d4,0)
   414 ghc-6.4  RET   sigprocmask 0
   414 ghc-6.4  CALL  fcntl(0,0x3,0)
   414 ghc-6.4  RET   fcntl 6
   414 ghc-6.4  CALL  fcntl(0,0x4,0x6)
   414 ghc-6.4  RET   fcntl 0
   414 ghc-6.4  CALL  ioctl(0,0x4004667a ,0xbfffd4b8)
   414 ghc-6.4  RET   ioctl 0
   414 ghc-6.4  PSIG  SIGSEGV SIG_DFL
   413 runhaskell RET   wait4 414/0x19e
   413 runhaskell CALL  write(0x2,0xbfffcf40,0xc)
   413 runhaskell GIO   fd 2 wrote 12 bytes
       "runhaskell: "
   413 runhaskell RET   write 12/0xc
   413 runhaskell CALL  write(0x2,0xbfffcfa0,0x36)
   413 runhaskell GIO   fd 2 wrote 54 bytes
       "waitForProcess: interrupted (Interrupted system call)
       "
   413 runhaskell RET   write 54/0x36
   413 runhaskell CALL  write(0x2,0xa0001cbb,0x1)
   413 runhaskell GIO   fd 2 wrote 1 byte
       "
       "
   413 runhaskell RET   write 1
   413 runhaskell CALL  getrusage(0,0xbfffd3a0)
   413 runhaskell RET   getrusage 0
   413 runhaskell CALL  getrusage(0xffffffff,0xbfffd3a0)
   413 runhaskell RET   getrusage 0
   413 runhaskell CALL  setitimer(0x1,0xbfffd440,0)
   413 runhaskell RET   setitimer 0
   413 runhaskell CALL  fcntl(0,0x3,0)
   413 runhaskell RET   fcntl 6
   413 runhaskell CALL  fcntl(0,0x4,0x2)
   413 runhaskell RET   fcntl 0
   413 runhaskell CALL  fcntl(0x1,0x3,0x2)
   413 runhaskell RET   fcntl 2
   413 runhaskell CALL  fcntl(0x2,0x3,0x2)
   413 runhaskell RET   fcntl 2
   413 runhaskell CALL  sigprocmask(0x1,0xbfffd4d0,0xbfffd4d4)
   413 runhaskell RET   sigprocmask 0
   413 runhaskell CALL  sigprocmask(0x3,0xbfffd4d4,0)
   413 runhaskell RET   sigprocmask 0
   413 runhaskell CALL  getrusage(0,0xbfffd3a0)
   413 runhaskell RET   getrusage 0
   413 runhaskell CALL  getrusage(0xffffffff,0xbfffd3a0)
   413 runhaskell RET   getrusage 0
   413 runhaskell CALL  exit(0x1)


----------------------------------------------------------------------

Comment By: Gregory Wright (gwright83)
Date: 2005-08-01 07:50

Message:
Logged In: YES 
user_id=1321993

The ktrace was also omitted from the original posting.  Here
it is:

   414 ghc-6.4  RET   write 1
   414 ghc-6.4  CALL  getpid
   414 ghc-6.4  RET   getpid 414/0x19e
   414 ghc-6.4  CALL  stat(0x1b94528,0x1b944c0)
   414 ghc-6.4  NAMI  "tmp414"
   414 ghc-6.4  RET   stat -1 errno 2 No such file or directory
   414 ghc-6.4  CALL  sigprocmask(0x1,0xbfffd4d0,0xbfffd4d4)
   414 ghc-6.4  RET   sigprocmask 0
   414 ghc-6.4  CALL  sigaction(0x2,0xbfffd458,0)
   414 ghc-6.4  RET   sigaction 0
   414 ghc-6.4  CALL  sigprocmask(0x3,0xbfffd4d4,0)
   414 ghc-6.4  RET   sigprocmask 0
   414 ghc-6.4  CALL  sigprocmask(0x1,0xbfffd4d0,0xbfffd4d4)
   414 ghc-6.4  RET   sigprocmask 0
   414 ghc-6.4  CALL  sigaction(0x3,0xbfffd458,0)
   414 ghc-6.4  RET   sigaction 0
   414 ghc-6.4  CALL  sigprocmask(0x3,0xbfffd4d4,0)
   414 ghc-6.4  RET   sigprocmask 0
   414 ghc-6.4  CALL  fcntl(0,0x3,0)
   414 ghc-6.4  RET   fcntl 6
   414 ghc-6.4  CALL  fcntl(0,0x4,0x6)
   414 ghc-6.4  RET   fcntl 0
   414 ghc-6.4  CALL  ioctl(0,0x4004667a ,0xbfffd4b8)
   414 ghc-6.4  RET   ioctl 0
   414 ghc-6.4  PSIG  SIGSEGV SIG_DFL
   413 runhaskell RET   wait4 414/0x19e
   413 runhaskell CALL  write(0x2,0xbfffcf40,0xc)
   413 runhaskell GIO   fd 2 wrote 12 bytes
       "runhaskell: "
   413 runhaskell RET   write 12/0xc
   413 runhaskell CALL  write(0x2,0xbfffcfa0,0x36)
   413 runhaskell GIO   fd 2 wrote 54 bytes
       "waitForProcess: interrupted (Interrupted system call)
       "
   413 runhaskell RET   write 54/0x36
   413 runhaskell CALL  write(0x2,0xa0001cbb,0x1)
   413 runhaskell GIO   fd 2 wrote 1 byte
       "
       "
   413 runhaskell RET   write 1
   413 runhaskell CALL  getrusage(0,0xbfffd3a0)
   413 runhaskell RET   getrusage 0
   413 runhaskell CALL  getrusage(0xffffffff,0xbfffd3a0)
   413 runhaskell RET   getrusage 0
   413 runhaskell CALL  setitimer(0x1,0xbfffd440,0)
   413 runhaskell RET   setitimer 0
   413 runhaskell CALL  fcntl(0,0x3,0)
   413 runhaskell RET   fcntl 6
   413 runhaskell CALL  fcntl(0,0x4,0x2)
   413 runhaskell RET   fcntl 0
   413 runhaskell CALL  fcntl(0x1,0x3,0x2)
   413 runhaskell RET   fcntl 2
   413 runhaskell CALL  fcntl(0x2,0x3,0x2)
   413 runhaskell RET   fcntl 2
   413 runhaskell CALL  sigprocmask(0x1,0xbfffd4d0,0xbfffd4d4)
   413 runhaskell RET   sigprocmask 0
   413 runhaskell CALL  sigprocmask(0x3,0xbfffd4d4,0)
   413 runhaskell RET   sigprocmask 0
   413 runhaskell CALL  getrusage(0,0xbfffd3a0)
   413 runhaskell RET   getrusage 0
   413 runhaskell CALL  getrusage(0xffffffff,0xbfffd3a0)
   413 runhaskell RET   getrusage 0
   413 runhaskell CALL  exit(0x1)


----------------------------------------------------------------------

Comment By: Gregory Wright (gwright83)
Date: 2005-08-01 06:15

Message:
Logged In: YES 
user_id=1321993

The ktrace was also omitted from the original posting.  Here
it is:

   414 ghc-6.4  RET   write 1
   414 ghc-6.4  CALL  getpid
   414 ghc-6.4  RET   getpid 414/0x19e
   414 ghc-6.4  CALL  stat(0x1b94528,0x1b944c0)
   414 ghc-6.4  NAMI  "tmp414"
   414 ghc-6.4  RET   stat -1 errno 2 No such file or directory
   414 ghc-6.4  CALL  sigprocmask(0x1,0xbfffd4d0,0xbfffd4d4)
   414 ghc-6.4  RET   sigprocmask 0
   414 ghc-6.4  CALL  sigaction(0x2,0xbfffd458,0)
   414 ghc-6.4  RET   sigaction 0
   414 ghc-6.4  CALL  sigprocmask(0x3,0xbfffd4d4,0)
   414 ghc-6.4  RET   sigprocmask 0
   414 ghc-6.4  CALL  sigprocmask(0x1,0xbfffd4d0,0xbfffd4d4)
   414 ghc-6.4  RET   sigprocmask 0
   414 ghc-6.4  CALL  sigaction(0x3,0xbfffd458,0)
   414 ghc-6.4  RET   sigaction 0
   414 ghc-6.4  CALL  sigprocmask(0x3,0xbfffd4d4,0)
   414 ghc-6.4  RET   sigprocmask 0
   414 ghc-6.4  CALL  fcntl(0,0x3,0)
   414 ghc-6.4  RET   fcntl 6
   414 ghc-6.4  CALL  fcntl(0,0x4,0x6)
   414 ghc-6.4  RET   fcntl 0
   414 ghc-6.4  CALL  ioctl(0,0x4004667a ,0xbfffd4b8)
   414 ghc-6.4  RET   ioctl 0
   414 ghc-6.4  PSIG  SIGSEGV SIG_DFL
   413 runhaskell RET   wait4 414/0x19e
   413 runhaskell CALL  write(0x2,0xbfffcf40,0xc)
   413 runhaskell GIO   fd 2 wrote 12 bytes
       "runhaskell: "
   413 runhaskell RET   write 12/0xc
   413 runhaskell CALL  write(0x2,0xbfffcfa0,0x36)
   413 runhaskell GIO   fd 2 wrote 54 bytes
       "waitForProcess: interrupted (Interrupted system call)
       "
   413 runhaskell RET   write 54/0x36
   413 runhaskell CALL  write(0x2,0xa0001cbb,0x1)
   413 runhaskell GIO   fd 2 wrote 1 byte
       "
       "
   413 runhaskell RET   write 1
   413 runhaskell CALL  getrusage(0,0xbfffd3a0)
   413 runhaskell RET   getrusage 0
   413 runhaskell CALL  getrusage(0xffffffff,0xbfffd3a0)
   413 runhaskell RET   getrusage 0
   413 runhaskell CALL  setitimer(0x1,0xbfffd440,0)
   413 runhaskell RET   setitimer 0
   413 runhaskell CALL  fcntl(0,0x3,0)
   413 runhaskell RET   fcntl 6
   413 runhaskell CALL  fcntl(0,0x4,0x2)
   413 runhaskell RET   fcntl 0
   413 runhaskell CALL  fcntl(0x1,0x3,0x2)
   413 runhaskell RET   fcntl 2
   413 runhaskell CALL  fcntl(0x2,0x3,0x2)
   413 runhaskell RET   fcntl 2
   413 runhaskell CALL  sigprocmask(0x1,0xbfffd4d0,0xbfffd4d4)
   413 runhaskell RET   sigprocmask 0
   413 runhaskell CALL  sigprocmask(0x3,0xbfffd4d4,0)
   413 runhaskell RET   sigprocmask 0
   413 runhaskell CALL  getrusage(0,0xbfffd3a0)
   413 runhaskell RET   getrusage 0
   413 runhaskell CALL  getrusage(0xffffffff,0xbfffd3a0)
   413 runhaskell RET   getrusage 0
   413 runhaskell CALL  exit(0x1)


----------------------------------------------------------------------

Comment By: Gregory Wright (gwright83)
Date: 2005-08-01 06:13

Message:
Logged In: YES 
user_id=1321993

My email was omitted in the original posting:

gwright at comcast.net

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=1249527&group_id=8032



More information about the Glasgow-haskell-bugs mailing list