Opened 5 years ago

Closed 3 years ago

#7926 closed bug (worksforme)

eventfd: unsupported operation when doing anything

Reported by: guest Owned by: AndreasVoellmy
Priority: low Milestone:
Component: Compiler Version: 7.6.3
Keywords: Cc: mateusz@…
Operating System: Linux Architecture: x86_64 (amd64)
Type of failure: Runtime crash Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


I'm using Debian jessie; sources.list is thus:

deb jessie main contrib non-free

Ran apt-get upgrade 10 minutes ago. The contents of /var/log/apt/history.log (sorry for the massive list, not sure how to narrow it down):

ghc/ghci output (exit 1):

eventfd: unsupported operation (Function not implemented)

When launching a precompiled executable, the first time it executes an I/O action (exit 1):

hClose: user error (Pattern match failure in do expression at libraries/base/GHC/Event/Thread.hs:84:3-10

strace ghci output is in this gist:

Change History (11)

comment:1 Changed 5 years ago by igloo

difficulty: Unknown

Discussed on IRC:

Affects both 7.6.3 bindist from the website, and the ghc package in jessie.

comment:2 Changed 5 years ago by igloo

Milestone: 7.8.1
Priority: normalhighest

comment:3 Changed 5 years ago by mloskot

I'm on Debian wheezy

$ cat /etc/apt/sources.list
deb testing main contrib non-free
deb wheezy-updates main contrib non-free
deb wheezy/updates main contrib non-free


$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.4.1
$ cabal --version
cabal-install version 0.14.0
using version 1.14.0 of the Cabal library

and after update yesterday (after a few weeks of w/o updates), I am now experiencing the same problem whenever I try to install a package:

$ cabal install pandoc
cabal: eventfd: unsupported operation (Function not implemented)

comment:4 Changed 5 years ago by mloskot

Cc: mateusz@… added

comment:5 Changed 5 years ago by AndreasVoellmy

Owner: set to AndreasVoellmy

comment:6 Changed 5 years ago by mloskot

This is update to the problem report after wheezy release:

$ rm -rf .cabal/
$ cabal update
Config file path source is default config file.
Config file /home/mloskot/.cabal/config not found.
Writing default configuration to /home/mloskot/.cabal/config
cabal: /home/mloskot/.cabal/config: Pattern match failure in do expression at

$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 7.1 (wheezy)
Release:        7.1
Codename:       wheezy

comment:7 Changed 5 years ago by guest

At least the eventfd part of this seems to be a bug in glibc, when used with an older linux kernel version, such as 2.6.32. See this bug report I've filed on that: <>

I am unsure if the pattern match failure is being caused by the eventfd failure, or is unrelated. I have seen a program only show the pattern match failure, while a different program first prints the eventfd error message before failing due to the pattern match failure.

-- Joey Hess

comment:8 Changed 5 years ago by guest

My program that was running into this bug was built with -threaded. Building it without the threaded runtime seems to bypass the problem.

comment:9 Changed 5 years ago by bos

Milestone: 7.8.1_|_
Priority: highestlow

The Linux kernel you are using is 4 years old. It might be best if you were to run an older version of GHC on such old systems, or to not use the threaded runtime.

Downgrading from "highest" as the abovementioned workarounds are quite effective and newer, sensibly configured systems are not affected.

comment:10 Changed 5 years ago by rwbarton

Debian 7.1 is from June 2013 and jessie is the new "testing" version, so I don't think the original reporter's (joelteon?) or mloskot's problem is a too old kernel.

Are either of you using an unusual kernel flavor, not -amd64? What's the output of uname -a and dpkg -l | grep linux-image and grep CONFIG_EVENTFD /boot/config-*?

comment:11 Changed 3 years ago by thomie

Resolution: worksforme
Status: newclosed

Since we haven't had any new reports on this, and the eventfd bug report mentioned in comment:7 was later closed for being a kernel bug, I'm closing this issue. Please re-open if there are still problems running ghc or ghci on Debian Jessie.

Note: See TracTickets for help on using tickets.