From: Jean-Michel Pollion <jmp-lvm2@ookaze.fr>
To: linux-lvm <linux-lvm@redhat.com>
Cc: Zdenek Kabelac <zkabelac@redhat.com>
Subject: Re: [linux-lvm] LVM tools segfault since 2.03.12
Date: Thu, 02 Sep 2021 21:10:16 +0200 [thread overview]
Message-ID: <cf9e7f54098f38f87c2935366dfb1e9d3427bee2.camel@ookaze.fr> (raw)
In-Reply-To: <1cac267f-cad7-a511-c72d-d9a309c38b3f@redhat.com>
Le jeudi 02 septembre 2021 à 19:21 +0200, Zdenek Kabelac a écrit :
> Dne 02. 09. 21 v 17:49 Jean-Michel Pollion napsal(a):
> > Le jeudi 02 septembre 2021 à 16:11 +0200, Zdenek Kabelac a écrit :
> > > Dne 02. 09. 21 v 9:34 Jean-Michel Pollion napsal(a):
> > > > Hello,
> > > >
> > > > I have the lvm2 tools segfaulting since 2.03.12 with a message
> > > > of
> > > > unsorted commands in cmds.h.
> > > > It turns out that in my locale and on my setup, the LANG=C
> > > > setting
> > > > before "sort -u" in tools/Makefile.in is not enough, I had to
> > > > patch
> > > > and
> > > > add LC_COLLATE=C too, or the rules will not count the
> > > > underscore
> > > > while
> > > > sorting, causing the segfault in the code (command.c IIRC).
> > > > This broke the boot on some of my servers, so I think it's a
> > > > rather
> > > > big
> > > > problem that perhaps can't be caught in reproducible builds.
> > > > Can this be corrected upstream or should I just modify my build
> > > > environment for LVM2?
> > > >
> > >
> > > Hi
> > >
> > > Interesting - can you send a patch to Makefile to include
> > > LC_COLLATE=C
> > > in case it does fixes your problem
> > I fixed it with a sed, the resulting patch is attached:
> > --- LVM2.2.03.13-orig/tools/Makefile.in 2021-08-11
> > 17:37:43.000000000
> > +0200
> > +++ LVM2.2.03.13/tools/Makefile.in 2021-09-02
> > 17:41:42.113702990
> > +0200
> > @@ -181,7 +181,7 @@
> > ( cat $(srcdir)/license.inc && \
> > echo "/* Do not edit. This file is generated by the
> > Makefile.
> > */" && \
> > echo "cmd(CMD_NONE, none)" && \
> > - $(GREP) '^ID:' $(srcdir)/command-lines.in | LANG=C
> > $(SORT) -u
> > > $(AWK) '{print "cmd(" $$2 "_CMD, " $$2 ")"}' && \
> > + $(GREP) '^ID:' $(srcdir)/command-lines.in | LANG=C
> > LC_COLLATE=C $(SORT) -u | $(AWK) '{print "cmd(" $$2 "_CMD, " $$2
> > ")"}'
> > && \
> > echo "cmd(CMD_COUNT, count)" \
> > ) > $@
>
>
> And does it also work if you set LC_ALL=C (instead of LANG=C
> LC_COLLATE=C) ?
Yes, it works also with LC_ALL=C alone (without either LANG_C or
LC_COLLATE=C), I replaced LANG=C by LC_ALL=C in the Makefile and it
worked perfectly, as expected, as LC_ALL is supposed to supersede LANG.
>
> Zdenek
>
_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
next prev parent reply other threads:[~2021-09-02 19:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-02 7:34 [linux-lvm] LVM tools segfault since 2.03.12 Jean-Michel Pollion
2021-09-02 14:11 ` Zdenek Kabelac
[not found] ` <1059a9981045d052b49f0d386a9b19f1b7f1a8e2.camel@ookaze.fr>
[not found] ` <1cac267f-cad7-a511-c72d-d9a309c38b3f@redhat.com>
2021-09-02 19:10 ` Jean-Michel Pollion [this message]
2021-09-02 19:14 ` Zdenek Kabelac
2021-09-06 17:59 ` Zdenek Kabelac
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cf9e7f54098f38f87c2935366dfb1e9d3427bee2.camel@ookaze.fr \
--to=jmp-lvm2@ookaze.fr \
--cc=linux-lvm@redhat.com \
--cc=zkabelac@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).