GNU bug report logs -
#71470
test failure on CentOS 7
Previous Next
Reported by: Bruno Haible <bruno <at> clisp.org>
Date: Mon, 10 Jun 2024 12:33:03 UTC
Severity: normal
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 71470 in the body.
You can then email your comments to 71470 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-grep <at> gnu.org
:
bug#71470
; Package
grep
.
(Mon, 10 Jun 2024 12:33:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Bruno Haible <bruno <at> clisp.org>
:
New bug report received and forwarded. Copy sent to
bug-grep <at> gnu.org
.
(Mon, 10 Jun 2024 12:33:04 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Building the current grep (git master) with the current Gnulib, I see a test
failure on CentOS 7:
FAIL: test-mbrlen-1.sh
======================
../../gnulib-tests/test-mbrlen.c:47: assertion 'ret == (size_t)(-2)' failed
../../gnulib-tests/test-mbrlen-1.sh: line 5: 31796 Aborted (core dumped) LC_ALL=C ${CHECKER} ./test-mbrlen${EXEEXT} 1
FAIL test-mbrlen-1.sh (exit status: 1)
The background is that mbrlen, on glibc systems <= 2.19, has a bug [1]:
This function returns 0 instead of @code{(size_t) -2} when the input
is empty.
This affects old distros:
- CentOS 7 (glibc 2.17),
- Slackware 14 (glibc 2.15),
- openSUSE 12.1 (glibc 2.14.1),
- etc.
mbrtowc has the same bug.
Gnulib has workarounds against this bug both in mbrlen and mbrtowc.
But grep deactivates the workaround for mbrtowc, in order not to
slow down 'grep' [2]. When this commit was created, Gnulib had a
mbrtowc-tests module. Now, since 2023-03-30, it also has an mbrlen-tests
module, and it is not deactivated. It fails because
- mbrlen.m4 detects that mbrlen has the bug.
- So it activates the replacement REPLACE_MBRLEN=1.
- The replacement invokes mbrtowc.
- But mbrtowc is not fixed, due to [2].
I see two reasonable fixes:
a) Remove the special optimization for CentOS 7. This distro will become
unsupported in less than a month [3], therefore it is no longer necessary
to carry complexity to optimize it.
-> patch 0001-maint-Remove-special-optimization-for-CentOS-7.patch
b) Extend the special optimization also to the mbrlen function and tests.
-> 0001-maint-Avoid-test-mbrlen-1.sh-failure-on-CentOS-7.patch
For each of the fixes, find a proposed patch (untested) attached.
Bruno
[1] https://www.gnu.org/software/gnulib/manual/html_node/mbrlen.html
[2] https://git.savannah.gnu.org/gitweb/?p=grep.git;a=commitdiff;h=6e319a818ed7b15b452ed2baab2f6a38d42fd1fe
[3] https://git.savannah.gnu.org/gitweb/?p=gnulib/maint-tools.git;a=blob;f=end-of-life.txt;h=5b7ff5559f3ddc9ea753f7837c35e8efbe0a8100;hb=HEAD
[0001-maint-Remove-special-optimization-for-CentOS-7.patch (text/x-patch, attachment)]
[0001-maint-Avoid-test-mbrlen-1.sh-failure-on-CentOS-7.patch (text/x-patch, attachment)]
Reply sent
to
Paul Eggert <eggert <at> cs.ucla.edu>
:
You have taken responsibility.
(Tue, 11 Jun 2024 16:04:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Bruno Haible <bruno <at> clisp.org>
:
bug acknowledged by developer.
(Tue, 11 Jun 2024 16:04:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 71470-done <at> debbugs.gnu.org (full text, mbox):
Thanks for the report and fixes. Close call, but since CentOS 7 is still
officially alive I installed the 2nd patch. (A plus is that 'configure'
is a bit faster....)
Information forwarded
to
bug-grep <at> gnu.org
:
bug#71470
; Package
grep
.
(Tue, 11 Jun 2024 21:26:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 71470-done <at> debbugs.gnu.org (full text, mbox):
Paul Eggert wrote:
> I installed the 2nd patch.
I confirm that "make check" now passes on CentOS 7.
Bruno
Information forwarded
to
bug-grep <at> gnu.org
:
bug#71470
; Package
grep
.
(Thu, 20 Jun 2024 02:18:01 GMT)
Full text and
rfc822 format available.
Message #16 received at 71470-done <at> debbugs.gnu.org (full text, mbox):
Paul Eggert wrote on 2024-06-11:
> Close call, but since CentOS 7 is still
> officially alive I installed the 2nd patch.
CentOS 7 will be supported until 2028.
I've updated Gnulib's end-of-life.txt:
https://git.savannah.gnu.org/gitweb/?p=gnulib/maint-tools.git;a=blob;f=end-of-life.txt;h=15e2c6cca13e36854573932b27d4efa49693a509;hb=HEAD#l15
Information forwarded
to
bug-grep <at> gnu.org
:
bug#71470
; Package
grep
.
(Thu, 20 Jun 2024 02:27:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 71470-done <at> debbugs.gnu.org (full text, mbox):
Hi Bruno,
Bruno Haible wrote:
> CentOS 7 will be supported until 2028.
> I've updated Gnulib's end-of-life.txt:
I remember we based our Python 3.7 dependency on CentOS almost being
almost end of life [1]. Does this change anything there? Or will
installing some python-3.7 package and using an alias/other method
suffice?
Collin
[1] https://lists.gnu.org/archive/html/bug-gnulib/2024-03/msg00004.html
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 18 Jul 2024 11:24:10 GMT)
Full text and
rfc822 format available.
This bug report was last modified 335 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.