Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 550228 - sys-fs/lvm2 on musl gives extra error messages on volume activation
Summary: sys-fs/lvm2 on musl gives extra error messages on volume activation
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: musl-porting
  Show dependency tree
 
Reported: 2015-05-23 12:22 UTC by Robert Sebastian Gerus
Modified: 2020-12-27 23:04 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
0001-Change-the-default-setting-of-use_mlockall-on-musl.patch (0001-Change-the-default-setting-of-use_mlockall-on-musl.patch,3.56 KB, patch)
2015-05-23 12:22 UTC, Robert Sebastian Gerus
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Sebastian Gerus 2015-05-23 12:22:32 UTC
On volume activation lvm uses mlock() in a way that fails on musl. Changing the /activation/use_mlockall setting to 1 helps avoid these messages.
The error messages are purely cosmetic - the volumes get activated anyway - but can be confusing.

Reproducible: Always

Steps to Reproduce:
1. vgchange -ay

Actual Results:  
# vgchange -ay
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  WARNING: Failed to connect to lvmetad. Falling back to internal scanning.
  7f9f434c2000-7f9f43702000 r-xp 00000000 fd:00 71554                      /lib/libdevmapper.so.1.02: mlock failed: Out of memory
  7f9f43707000-7f9f4390c000 r-xp 00000000 fd:00 71679                      /lib/libdevmapper-event.so.1.02: mlock failed: Out of memory
  2 logical volume(s) in volume group "scylla" now active


Expected Results:  
# vgchange -ay
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  WARNING: Failed to connect to lvmetad. Falling back to internal scanning.
  2 logical volume(s) in volume group "scylla" now active


Providing a git-formatted patch for inclusion in hardened-dev:musl
Comment 1 Robert Sebastian Gerus 2015-05-23 12:22:59 UTC
Created attachment 403812 [details, diff]
0001-Change-the-default-setting-of-use_mlockall-on-musl.patch
Comment 2 Anthony Basile gentoo-dev 2015-06-10 11:59:03 UTC
(In reply to Robert Sebastian Gerus from comment #1)
> Created attachment 403812 [details, diff] [details, diff]
> 0001-Change-the-default-setting-of-use_mlockall-on-musl.patch

I'm not against this patch, but its a workaround and not a fix.
Comment 3 Felix Janda 2015-06-23 18:53:47 UTC
This patch

http://git.alpinelinux.org/cgit/aports/tree/main/lvm2/mallinfo.patch?id=42039c543f4af10ab8f79253e0f48f33592ee533

from Alpine Linux seems to be related.