-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Endless loop when first started with empty filesystem (0.6.1) #93
Comments
The title is a bit misleading, as the filesystem is not quite empty even in the failing case -- we've still had a |
Do you have the log output from the failing case? Among other things it will have the context leading up to the exception. |
Edited an additional file |
So it's failing to find the extent tree in the root tree. Fascinating. Maybe there's some race condition during the first btrfs mount where transid 1 or the extent tree doesn't exist yet? In any case, some other things are going wrong after that: somehow we get a It should be possible to work around this by forcing a |
Confirmed: Adding that |
This was discovered when writing a NixOS system test for the bees module.
The testing logic in https://github.com/NixOS/nixpkgs/blob/923a3e4970226293e4698e44e3e5d5ccf7487603/nixos/tests/bees.nix consistently succeeds every time: This code first creates files on a new filesystem, then starts the bees service. That (passing) test is roughly equivalent to the following shell script:
By contrast, a test akin to the following -- which starts the service after the filesystem is created and initially mounted, but before any content has been created -- consistently fails, with bees running in a loop which is trying to poll the status of a file descriptor referring to a file that doesn't exist:
The actual failing test can be found at https://github.com/charles-dyfis-net/nixpkgs/blob/bees-test-failing/nixos/tests/bees.nix; if checking out the relevant branch of nixpkgs, it can be run (from the root of that working tree) with
nix-build -I nixpkgs="$PWD" ./nixos/tests/bees.nix
.strace of the loop taking place when in that failed state can be seen at https://gist.github.com/charles-dyfis-net/34ac2e4d2bada0c3a3c8632cab98c8d9
The text was updated successfully, but these errors were encountered: