darcs

Issue 1980 darcs push: apply fails: hIsTerminalDevice (stdin closed)

Title darcs push: apply fails: hIsTerminalDevice (stdin closed)
Priority bug Status resolved
Milestone 2.8.0 Resolved in 2.10.0
Superseder Nosy List bsrkaditya, dmitry.kurochkin
Assigned To
Topics

Created on 2010-10-19.17:09:36 by bfr, last changed 2017-07-31.01:33:39 by gh.

Messages
msg12768 (view) Author: bfr Date: 2010-10-19.17:09:35
The exact message is:

darcs: <stdin>: hIsTerminalDevice: illegal operation (handle is closed)
Apply failed!

This happens when trying to push to an NFS mounted repo. The remote
repo has a long history and contains some large binaries, so the apply
takes a few seconds.

This happens with all 2.5 pre-releases, but not with 2.4.4.

My initial investigations suggest that the error actually happens in
some external library used by darcs because it still happens after I
removed all references to hIsTerminalDevice from the code.
msg12769 (view) Author: bfr Date: 2010-10-19.17:11:32
BTW I tried ghc-6.12.3 and ghc-6.10.4. No difference.
msg12807 (view) Author: tux_rocker Date: 2010-10-23.20:06:28
Apparently there's no way to get a backtrace in Haskell, so it's going
to be hard to see what darcs is doing at the time of the crash. Could
you perhaps use strace ( man 1 strace, http://linux.die.net/man/1/strace
) to get a log of all of darcs's system calls and attach it to this
ticket? I hope that will at least show us which closed handle it's
calling hIsTerminalDevice on.
msg12816 (view) Author: tux_rocker Date: 2010-10-24.10:28:40
By the way, if your repo is highly private you probably don't want to
upload an strace here as it will show the names of files that are opened
and things like that.
msg12817 (view) Author: tux_rocker Date: 2010-10-24.12:13:00
And it would also be useful to know the output of 'darcs
--exact-version' for both the failing and the working darcs. That also
shows the versions of the libraries that were used.
msg12818 (view) Author: tux_rocker Date: 2010-10-24.13:26:59
Duplicate of issue1914.
msg12819 (view) Author: tux_rocker Date: 2010-10-24.13:27:59
Wrong bug to mark as a duplicate of 1914. Sorry for the noise.
msg13308 (view) Author: kowey Date: 2010-12-10.16:31:57
Hi Reinier: Is this one for 2.5.1?
msg13325 (view) Author: tux_rocker Date: 2010-12-12.11:59:20
This one looks like it should be fixed in 2.5.1, yes.

I recall seeing an strace and seeing the failing ioctl system call. It
didn't point to a solution however.
msg13326 (view) Author: bfr Date: 2010-12-12.20:21:54
I sent various straces and complete version info to the mailing list.
Since then, I got this error again a few times. I can try to dig up 
the mails from the archive if that would help.
msg13450 (view) Author: kowey Date: 2011-01-05.17:10:28
Note that quite a few people seem to be bitten by this, see issue2028 and 
also http://twitter.com/#!/ikegami__/status/22580401293762561 (not sure 
what it says, but Google Translate helps)
msg13465 (view) Author: ganesh Date: 2011-01-05.23:14:45
We need to get 2.5.1 out soon to support GHC 7.0 so I'm bumping this to 
2.5.2. It's still something we should aim to fix asap though.
msg14983 (view) Author: kowey Date: 2012-01-12.17:09:23
Happens for me too.  One thing to watch out for is whether this is about 
the darcs that's running on the remote end, or the one on our end :-/

Informally, I think I can sort of work around this by darcs pushing only a 
few patches at a time, but that doesn't always work.
msg17999 (view) Author: bfrk Date: 2015-02-04.22:20:18
I am marking this as resolved. It never appeared (to me) again after
upgrading to 2.8.x and definitely not in the current HEAD, which I am
using now for at least a year (and also over NFS).
History
Date User Action Args
2010-10-19 17:09:36bfrcreate
2010-10-19 17:11:33bfrsetmessages: + msg12769
2010-10-23 19:56:51tux_rockersetmilestone: 2.5.0
2010-10-23 20:06:29tux_rockersetmessages: + msg12807
2010-10-24 10:28:41tux_rockersetmessages: + msg12816
2010-10-24 12:13:01tux_rockersetmessages: + msg12817
2010-10-24 13:27:00tux_rockersetstatus: unknown -> duplicate
messages: + msg12818
superseder: + Too late to use atexit
2010-10-24 13:27:31tux_rockersetstatus: duplicate -> needs-reproduction
superseder: - Too late to use atexit
2010-10-24 13:28:00tux_rockersetmessages: + msg12819
2010-12-10 16:31:58koweysetmessages: + msg13308
2010-12-12 11:59:21tux_rockersetmessages: + msg13325
2010-12-12 20:21:55bfrsetmessages: + msg13326
2011-01-05 17:07:38koweysetmilestone: 2.5.0 -> 2.5.1
2011-01-05 17:09:04koweylinkissue2028 superseder
2011-01-05 17:10:29koweysetmessages: + msg13450
2011-01-05 23:14:46ganeshsetmessages: + msg13465
milestone: 2.5.1 -> 2.5.2
2012-01-12 17:09:25koweysetmessages: + msg14983
milestone: 2.5.2 -> 2.5.3
2012-01-14 04:23:41bsrkadityasetnosy: + bsrkaditya
2012-03-30 18:07:41koweysetmilestone: 2.5.3 -> 2.8.0
2015-02-04 22:20:20bfrksetmessages: + msg17999
resolvedin: 2.10.0
2017-07-31 01:33:39ghsetstatus: needs-reproduction -> resolved
nosy: - bfr