You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[v2 regression] nerdctl start fails after restarting the host (msg="failed to lock state dir: unable to unmarshall lifecycle data: unexpected end of JSON input") #3350
I am getting different errors after reboot (lima VM):
$ sudo nerdctl start foo
FATA[0000] 1 errors:
failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running hook #0: error running hook: exit status 1, stdout: , stderr: time="2024-08-22T23:29:54-07:00" level=error msg="failed re-acquiring name - see https://github.com/containerd/nerdctl/issues/2992" error="name \"foo\" is already used by ID \"f58b1233941da3daabdff9ce4befde5ce0fea208109dcb421b1985c311bb3109\""
time="2024-08-22T23:29:54-07:00" level=fatal msg="failed to call cni.Setup: plugin type=\"bridge\" failed (add): failed to allocate for range 0: 10.4.0.90 has been allocated to default-f58b1233941da3daabdff9ce4befde5ce0fea208109dcb421b1985c311bb3109, duplicate allocation is not allowed": unknown
changed the title [-]`nerdctl start` fails after restarting the host (`msg="failed to lock state dir: unable to unmarshall lifecycle data: unexpected end of JSON input"`)[/-][+][v2 regression] `nerdctl start` fails after restarting the host (`msg="failed to lock state dir: unable to unmarshall lifecycle data: unexpected end of JSON input"`)[/+]on Aug 23, 2024
returnfmt.Errorf("failed to lock state dir: %w", err)
Although there is clearly more to it (as prior versions seems to fail as well), this one is suggesting that there is something wrong going on with filesystem locks / reboot.
Activity
apostasie commentedon Aug 23, 2024
I am getting different errors after reboot (lima VM):
Just repeating the command then succeed:
AkihiroSuda commentedon Aug 23, 2024
You may repro the issue with lima-vm/lima@fe7c317 (lima-vm/lima#2178)
[-]`nerdctl start` fails after restarting the host (`msg="failed to lock state dir: unable to unmarshall lifecycle data: unexpected end of JSON input"`)[/-][+][v2 regression] `nerdctl start` fails after restarting the host (`msg="failed to lock state dir: unable to unmarshall lifecycle data: unexpected end of JSON input"`)[/+]apostasie commentedon Aug 23, 2024
Will try tomorrow with updated lima + containerd v2rc.
Note:
Issue seems to have been here for some time somehow.
This is what I get with nerdctl 1.7 + ctd 1.7 on reboot:
Same thing here, on the second time you invoke start, it works.
apostasie commentedon Aug 23, 2024
The original error you saw ("failed to lock state dir") clearly points to:
nerdctl/pkg/ocihook/state/state.go
Line 59 in 607d560
Although there is clearly more to it (as prior versions seems to fail as well), this one is suggesting that there is something wrong going on with filesystem locks / reboot.
AkihiroSuda commentedon Aug 23, 2024
Seems solved in the current main branch