GitLab

How we spent two weeks hunting an NFS bug in the Linux kernel

Nov 14, 2018Stan Hu
How we spent two weeks hunting an NFS bug in the Linux kernel
SummaryAI, from the source post

This post details the debugging of a 'Stale file handle' error in Git when using NFS v4.0. It describes reproducing the bug by keeping a file open while another machine renames it, and how this behavior differs between NFS v4.0 and v4.1. The investigation involved analyzing `strace` and `lsof` output to understand `git gc`'s file handling and using `tcpdump` and Wireshark to analyze NFS traffic. The root cause was identified as a bug in the Linux v4.0 NFS client related to NFS server delegations and their recall, leading to a kernel patch that was backported to stable versions.

More from the Filesystem Corruption and Outage Debugging trail