Skip to content

NFS on macOS may not terminate old connections after server restart #160

Open
@kohlschuetter

Description

@kohlschuetter

I just observed during development that the NFSv4 implementation on macOS may (only sometimes!) not like it very much when the NFS server gets restarted while an I/O write operation is happening at the same time:

Upon server restart, the client may retry the write using a stateid of "-1" and an "other" clientid of "ffffffffffffffffffffffff", which will obviously never succeed.

This effectively slows down everything, the client and the server, until nothing gets sent anymore (throughput down from ca. 1600 MB/s to 5kb/s ...)

Adding some code that checks for this bad stateid in NFSv4StateHandler, throwing a BadSessionException instead of a BadStateidException seems to fix the issue, causing the macOS client to reconnect and properly setup their state ids, etc.

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