Please describe the problem.

My server is on debian testing. After an upgrade (git annex: 3.20120629 → 4.20130521) I can't do anything in my repository anymore. git itself works, but invoking any git-annex command leads to:

git-annex: fd:6: hGetContents: user error (Pattern match failure in do expression at libraries/base/GHC/Event/Thread.hs:90:3-10)

This repo is handled by a script, which invokes only the following git/git-annex commands:

$ git annex sync
$ git annex add
$ git commit -m "…"

I realized this after trying to move files from my server to my local repo. My local machine runs debian sid. When trying to transfer files, this happens:

$ git annex sync
→ ok
$ git annex move --from origin .
move x.zip (from origin...) 
user@host's password: ← pw ok
git-annex-shell: fd:6: hGetContents: user error (Pattern match failure in do expression at libraries/base/GHC/Event/Thread.hs:90:3-10)
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(605) [Receiver=3.0.9]
failed

I updated git-annex on both machines to 4.20130627 (rest of server is still on debian testing), but it didn't change anything.

The server was not down since the last successful transfer, so I can't imagine anything interrupting any git-annex process.

What steps will reproduce the problem?

See above.

What version of git-annex are you using? On what operating system?

Server: 4.20130521 on debian testing (now: 4.20130627) Local: 4.20130621 on debian sid (now: 4.20130627)

Closing this since it's a bad kernel and there is a workaround to build a git-annex that will work with this kernel (see comments). done --Joey

This looks uncomfortably like a bug in the ghc compiler's threaded runtime.

What architecture is the server?

Comment by joeyh.name Sun Jun 30 17:31:26 2013
See this upstream bug report: http://hackage.haskell.org/trac/ghc/ticket/7653
Comment by joeyh.name Sun Jun 30 17:33:55 2013
It's a i686 virtual server at strato.de. Running kernel 2.6.32.
Comment by m-f-k [myopenid.com] Sun Jun 30 23:37:00 2013
I wonder if this could be a glibc/kernel mismatch somehow. Any chance you can upgrade your kernel to something more recent?
Comment by joeyh.name Tue Jul 2 16:41:51 2013
No, I can't. The kernel is handled by strato. :(
Comment by m-f-k [myopenid.com] Thu Jul 4 15:24:51 2013
Is there any chance I could get an account on this or a similar server, so I can investigate this in detail?
Comment by joeyh.name Fri Jul 5 15:29:11 2013

Thanks for providing me an account.

I was able to reproduce the problem:

$ git-annex-shell recvkey `pwd`
git-annex-shell: fd:6: hGetContents: user error (Pattern match failure in do expression at libraries/base/GHC/Event/Thread.hs:90:3-10)

Here's another one:

$ git annex init

git-annex: eventfd: unsupported operation (Function not implemented)
failed
init  
git-annex: fd:10: hGetContents: user error (Pattern match failure in do expression at libraries/base/GHC/Event/Thread.hs:90:3-10)
failed

Aha! I found a more relevant bug in GHC's bug tracker. This has the same error message including the eventfd problem. http://ghc.haskell.org/trac/ghc/ticket/7926

After some more digging around, it's definitely a kernel/glibc incompatability. I have filed a bug on glibc: http://bugs.debian.org/715212

Comment by joeyh.name Sun Jul 7 02:48:05 2013

This bug only affects programs built with the threaded haskell runtime.

git-annex can be built without the threaded runtime, by simply disabling the webapp. So a workaround is to pass the flag -f-WebApp to cabal when building git-annex with cabal.

Comment by joeyh.name Sun Jul 7 16:38:09 2013

Thanks a lot for investigating this!

(myopenid.com seems to be down, so I had to use another account.)

Comment by MichaelK Sun Jul 7 16:54:34 2013