Opened 11 months ago

Last modified 7 months ago

#7926 new bug

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 Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:


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 (10)

comment:1 Changed 11 months ago by igloo

  • Difficulty set to Unknown

Discussed on IRC:

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

comment:2 Changed 11 months ago by igloo

  • Milestone set to 7.8.1
  • Priority changed from normal to highest

comment:3 Changed 11 months 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 11 months ago by mloskot

  • Cc mateusz@… added

comment:5 Changed 10 months ago by AndreasVoellmy

  • Owner set to AndreasVoellmy

comment:6 Changed 10 months 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 10 months 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 9 months 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 7 months ago by bos

  • Milestone changed from 7.8.1 to _|_
  • Priority changed from highest to low

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 7 months 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-*?

Note: See TracTickets for help on using tickets.