Skip to content

On Linux, failing to bind the address on Start generates a coredump #5920

Closed
@tmds

Description

@tmds

When starting Kestrel on a port that is taken an exception is thrown. e.g.:

System.IO.IOException: Failed to bind to address https://127.0.0.1:5001: address already in use

Since this exception is not handled, the runtime calls abort which (normally) generates a coredump (see https://github.com/dotnet/coreclr/issues/17929).

The behavior seems excessive for failing to bind the port. Maybe there should be a try/catch somewhere to turn this into a non-success process exit?
It may not be obvious these coredumps are being generated. And when seeing these dumps on their system, users may get the wrong impression dotnet failed in some bad way.

CC @davidfowl @halter73 @mikem8361

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-hostingIncludes Hostingarea-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions