Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,932
    • Issues 4,932
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 470
    • Merge requests 470
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #4362
Closed
Open
Created Oct 04, 2010 by guest@trac-guest

error in multithreaded program "epollControl: does not exist (No such file or directory)"

I wrote a program that is a standard multi threaded tcp server. It listens on a socket, and then it enters a loop where it does an accept for a new connection and then handles the connection on a new thread using forkIO. For each incoming connection, the program reads some data from the socket and then downloads a file from the web using the function simpleHTTP from the HTTP library.

My program runs fine most of the time, but every now and then when I run my program, all of the simpleHTTP calls throw an IOException, with the error:

epollControl: does not exist (No such file or directory)

My program also has an additional background thread, started at program startup with forkIO, that periodically calls simpleHTTP and these calls always work, and they continue to work even as the calls from the connection threads throw the above error.

From looking at the library code, it seems simpleHTTP eventually calls one of the low level socket functions which in turn calls System.Event.Thread.ensureIOManagerIsRunning, which calls System.Event.EPoll.new, which calls epoll_ctl which fails.

epoll_ctl man page tells me that the reason for this error is: "ENOENT: op was EPOLL_CTL_MOD or EPOLL_CTL_DEL, and fd is not in epfd."

As I said above, this problem is hard to reproduce, it only happens once every 30 or so invocations of my program.

I am using ghc 7.1.20100925 and Linux 2.6.31 I am compiling with -threaded -O2

I'd be happy to give any any other needed information.

Thanks

Trac metadata
Trac field Value
Version 7.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component libraries/base
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking