Opened 12 years ago

Closed 12 years ago

#1905 closed bug (duplicate)

runProcess: misbehaving exception on nonexistent working directory

Reported by: wferi Owned by: simonmar
Priority: normal Milestone: 6.8.2
Component: libraries/process Version: 6.6.1
Keywords: runProcess, exception, segfault Cc:
Operating System: Linux Architecture: x86
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

Compiling and running the attached Fork.hs gives unexpected results:

  • The first line is mostly OK: the working directory does not exist. (Unfortunately it's not clear from the message what does not exist...)
  • The ensuing ps output is also OK, but already shows strange process states and hierarchy:
    • Why is the parent Fork in D state?
    • Why is ps a grandchild of it, instead of being another child of the parent Fork?
  • The last line is Segmentation fault, which is bad.
$ ./Fork
sleep: runProcess: does not exist (No such file or directory)
  PID TTY      STAT   TIME COMMAND
 3504 ?        Ss     0:00 urxvt
 3505 ?        S      0:00  \_ urxvt
 3506 pts/1    Ss     0:00  \_ bash
 5571 pts/1    D+     0:00      \_ ./Fork
 5572 pts/1    S+     0:00          \_ ./Fork
 5573 pts/1    R+     0:00              \_ ps xf
Segmentation fault

(I elided the irrelevant part of the ps output.)

Somebody on IRC got Bus error instead. Others, testing under GHC 6.8, did not even get an exception. I have got the impression that exception handling inside or around runProcess is broken.

Attachments (1)

Fork.hs (395 bytes) - added by wferi 12 years ago.

Download all attachments as: .zip

Change History (4)

Changed 12 years ago by wferi

Attachment: Fork.hs added

comment:1 Changed 12 years ago by igloo

difficulty: Unknown
Milestone: 6.8.2

Thanks for the report. Not sure we'll get to it for 6.8.2, but we should try to have a look as segfaults are bad!

comment:2 Changed 12 years ago by simonmar

Owner: set to simonmar

mine

comment:3 Changed 12 years ago by simonmar

Resolution: duplicate
Status: newclosed

dup of #1593, fixed in 6.8.1

Note: See TracTickets for help on using tickets.