Skip to content

EPOLL_CTL_ADD returns EEXIST #1068

@ericeil

Description

@ericeil

I'm testing on rs_preview build 14915.

Running the .NET CoreFx System.Net.Http functional tests, I pretty reliably have test failures due to epoll_ctl(…, EPOLL_CTL_ADD, …) returning EEXIST. This does not occur on "real" Ubuntu.

I only see this if I allow the tests to run in parallel; when run sequentially, they all pass. So I assume this is some sort of concurrency-related bug. I’ve tried putting together a smaller repro, but haven’t had any luck. Here are the repro steps:

  1. Install the .NET Core SDK
  2. Get a build of System.Net.Http.Functional.Tests from my branch of CoreFx (I'll send binaries I've built, privately).
  3. Run the tests:
./corerun xunit.console.netcore.exe System.Net.Http.Functional.Tests.dll -notrait Benchmark=true -notrait category=nonnetcoreapp1.0tests -notrait category=failing -notrait category=nonlinuxtests

Most of the time when I run these, at least one test fails with output like this:

      System.Net.InternalException : Exception of type 'System.Net.InternalException' was thrown.
      Stack Trace:
            at System.Net.Sockets.SocketAsyncContext.Register(SocketEvents events)
            ...

Sometimes I've also seen the test hang. This may or may not be related; I haven't investigated the hang yet.

Very occasionally, the test passes. Run it again a couple of times, and you should see the failure in SocketAsyncContext.Register (which calls epoll_ctl).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions