lvmetad hangs on startup
Clash Royale CLAN TAG#URR8PPP
I got a machine running Arch Linux that have a problem on boot. It hangs for 90s waiting for pvscan on block devices, and then give up. (actually, the pvscan process are still stuck , and any lvm command after that will hang too). Sometimes it works well.
After some digging, it looks like lvmetad(8) is responsible for this hang, as it hangs itself at start:
lvmetad[360]: Cannot lock lockfile [/run/lvmetad.pid], error was [Resource temporarily unavailable]
If I kill it and start it again after boot, the hanging pvscan processes are unlocked, finish their works, and everything goes back to normal (lvm commands works again, etc.)
You can see this in logs : Pastebin
I tried to lower verbosity of lvmetad, but I only get the error given.
sometimes the boot is a little longer than usual (waiting for root partition), and lvmetad starts well (I'm not sure it's really related, though)
Have you an idea on how to prevent this error?
I've collected more information:
- the "cannot log logfile" error appears when fcntl() fails with EAGAIN (a file to be locked is already shared-locked or exclusive-locked by another process)
- there is a lvmetad running on the system, with a very little pid (way littler than the failing process we see in logs)
- the lvmetad process spawned by lvm2-lvmetad.service is run with -f, so the running one is not this one
- the first one was started 3 seconds before the second (before systemd)
The cleanup hook of lvm2 component for initrd should kill the early lvmetad, but for some reason it does not work:
run_cleanuphook()
kill $(cat /run/lvmetad.pid)
killing the process after boot don't work either.
I took a debug trace (can't post a third link, I put it at the end of the second paste), and it looks like the main thread is waiting for terminations of other threads, and there is a client_thread stuck on a read on fd 6 (/run/lvm/lvmetad.socket)
lvm
add a comment |
I got a machine running Arch Linux that have a problem on boot. It hangs for 90s waiting for pvscan on block devices, and then give up. (actually, the pvscan process are still stuck , and any lvm command after that will hang too). Sometimes it works well.
After some digging, it looks like lvmetad(8) is responsible for this hang, as it hangs itself at start:
lvmetad[360]: Cannot lock lockfile [/run/lvmetad.pid], error was [Resource temporarily unavailable]
If I kill it and start it again after boot, the hanging pvscan processes are unlocked, finish their works, and everything goes back to normal (lvm commands works again, etc.)
You can see this in logs : Pastebin
I tried to lower verbosity of lvmetad, but I only get the error given.
sometimes the boot is a little longer than usual (waiting for root partition), and lvmetad starts well (I'm not sure it's really related, though)
Have you an idea on how to prevent this error?
I've collected more information:
- the "cannot log logfile" error appears when fcntl() fails with EAGAIN (a file to be locked is already shared-locked or exclusive-locked by another process)
- there is a lvmetad running on the system, with a very little pid (way littler than the failing process we see in logs)
- the lvmetad process spawned by lvm2-lvmetad.service is run with -f, so the running one is not this one
- the first one was started 3 seconds before the second (before systemd)
The cleanup hook of lvm2 component for initrd should kill the early lvmetad, but for some reason it does not work:
run_cleanuphook()
kill $(cat /run/lvmetad.pid)
killing the process after boot don't work either.
I took a debug trace (can't post a third link, I put it at the end of the second paste), and it looks like the main thread is waiting for terminations of other threads, and there is a client_thread stuck on a read on fd 6 (/run/lvm/lvmetad.socket)
lvm
add a comment |
I got a machine running Arch Linux that have a problem on boot. It hangs for 90s waiting for pvscan on block devices, and then give up. (actually, the pvscan process are still stuck , and any lvm command after that will hang too). Sometimes it works well.
After some digging, it looks like lvmetad(8) is responsible for this hang, as it hangs itself at start:
lvmetad[360]: Cannot lock lockfile [/run/lvmetad.pid], error was [Resource temporarily unavailable]
If I kill it and start it again after boot, the hanging pvscan processes are unlocked, finish their works, and everything goes back to normal (lvm commands works again, etc.)
You can see this in logs : Pastebin
I tried to lower verbosity of lvmetad, but I only get the error given.
sometimes the boot is a little longer than usual (waiting for root partition), and lvmetad starts well (I'm not sure it's really related, though)
Have you an idea on how to prevent this error?
I've collected more information:
- the "cannot log logfile" error appears when fcntl() fails with EAGAIN (a file to be locked is already shared-locked or exclusive-locked by another process)
- there is a lvmetad running on the system, with a very little pid (way littler than the failing process we see in logs)
- the lvmetad process spawned by lvm2-lvmetad.service is run with -f, so the running one is not this one
- the first one was started 3 seconds before the second (before systemd)
The cleanup hook of lvm2 component for initrd should kill the early lvmetad, but for some reason it does not work:
run_cleanuphook()
kill $(cat /run/lvmetad.pid)
killing the process after boot don't work either.
I took a debug trace (can't post a third link, I put it at the end of the second paste), and it looks like the main thread is waiting for terminations of other threads, and there is a client_thread stuck on a read on fd 6 (/run/lvm/lvmetad.socket)
lvm
I got a machine running Arch Linux that have a problem on boot. It hangs for 90s waiting for pvscan on block devices, and then give up. (actually, the pvscan process are still stuck , and any lvm command after that will hang too). Sometimes it works well.
After some digging, it looks like lvmetad(8) is responsible for this hang, as it hangs itself at start:
lvmetad[360]: Cannot lock lockfile [/run/lvmetad.pid], error was [Resource temporarily unavailable]
If I kill it and start it again after boot, the hanging pvscan processes are unlocked, finish their works, and everything goes back to normal (lvm commands works again, etc.)
You can see this in logs : Pastebin
I tried to lower verbosity of lvmetad, but I only get the error given.
sometimes the boot is a little longer than usual (waiting for root partition), and lvmetad starts well (I'm not sure it's really related, though)
Have you an idea on how to prevent this error?
I've collected more information:
- the "cannot log logfile" error appears when fcntl() fails with EAGAIN (a file to be locked is already shared-locked or exclusive-locked by another process)
- there is a lvmetad running on the system, with a very little pid (way littler than the failing process we see in logs)
- the lvmetad process spawned by lvm2-lvmetad.service is run with -f, so the running one is not this one
- the first one was started 3 seconds before the second (before systemd)
The cleanup hook of lvm2 component for initrd should kill the early lvmetad, but for some reason it does not work:
run_cleanuphook()
kill $(cat /run/lvmetad.pid)
killing the process after boot don't work either.
I took a debug trace (can't post a third link, I put it at the end of the second paste), and it looks like the main thread is waiting for terminations of other threads, and there is a client_thread stuck on a read on fd 6 (/run/lvm/lvmetad.socket)
lvm
lvm
edited Oct 3 '16 at 1:14
Jeff Schaller
41.3k1056131
41.3k1056131
asked Sep 4 '14 at 8:54
Bastien DurelBastien Durel
1168
1168
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Note that the author since reported this as a bug to Archlinux and there's a helpful discussion here https://bugs.archlinux.org/task/41833
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f153705%2flvmetad-hangs-on-startup%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Note that the author since reported this as a bug to Archlinux and there's a helpful discussion here https://bugs.archlinux.org/task/41833
add a comment |
Note that the author since reported this as a bug to Archlinux and there's a helpful discussion here https://bugs.archlinux.org/task/41833
add a comment |
Note that the author since reported this as a bug to Archlinux and there's a helpful discussion here https://bugs.archlinux.org/task/41833
Note that the author since reported this as a bug to Archlinux and there's a helpful discussion here https://bugs.archlinux.org/task/41833
answered Dec 15 '16 at 3:47
anonymous cowardanonymous coward
1
1
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f153705%2flvmetad-hangs-on-startup%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown