Opened 9 years ago

Closed 9 years ago

Last modified 44 years ago

#432 closed bug (Fixed)

runhaskell causes GHC to segfault on OS X

Reported by: nobody Owned by: nobody
Priority: normal Milestone:
Component: None Version: 6.4
Keywords: Cc:
Operating System: Architecture:
Type of failure: Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

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.



Attachments (1)

ghccrash.2.log (2.3 KB) - added by nobody 9 years ago.

Download all attachments as: .zip

Change History (8)

Changed 9 years ago by nobody

comment:1 Changed 9 years ago by gwright83

Logged In: YES 
user_id=1321993

My email was omitted in the original posting:

gwright@comcast.net

comment:2 Changed 9 years ago by gwright83

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:3 Changed 9 years ago by gwright83

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:4 Changed 9 years ago by gwright83

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:5 Changed 9 years ago by nobody

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:6 Changed 9 years ago by gwright83

Logged In: YES 
user_id=1321993


Yes, 6.4.1 fixes the problem.

A good thing too, as I have a lot of darwinports packages
that use
caballized installations waiting for updates.

Best Wishes,
Greg

comment:7 Changed 9 years ago by simonmar

  • Status changed from assigned to closed
Logged In: YES 
user_id=48280

submitter reports that the bug is fixed in 6.4.1.
Note: See TracTickets for help on using tickets.