Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 550228

Summary: sys-fs/lvm2 on musl gives extra error messages on volume activation
Product: Gentoo Linux Reporter: Robert Sebastian Gerus <ar>
Component: [OLD] Core systemAssignee: Gentoo's Team for Core System packages <base-system>
Status: CONFIRMED ---    
Severity: normal CC: agk, ar, cardoe, musl, robbat2, tsmksubc
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 430702    
Attachments: 0001-Change-the-default-setting-of-use_mlockall-on-musl.patch

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.