Bug 17617 - Race condition in localedata tests
Summary: Race condition in localedata tests
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: locale (show other bugs)
Version: 2.21
: P2 normal
Target Milestone: 2.22
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-18 16:41 UTC by H.J. Lu
Modified: 2016-04-20 20:23 UTC (History)
5 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2014-11-18 16:41:21 UTC
When machine is under heavy load, I saw

FAIL: localedata/bug-iconv-trans
FAIL: localedata/tst-mbswcs6
FAIL: localedata/tst-trans
FAIL: localedata/tst-wctype
FAIL: localedata/tst_mbrlen
FAIL: localedata/tst_mbrtowc
FAIL: localedata/tst_mbsrtowcs
FAIL: localedata/tst_mbstowcs
FAIL: localedata/tst_mbtowc
FAIL: localedata/tst_swscanf
FAIL: localedata/tst_wcrtomb
FAIL: localedata/tst_wcsrtombs
FAIL: localedata/tst_wcstombs
FAIL: localedata/tst_wctob
FAIL: localedata/tst_wctomb

localedata/Makefile has

# Dependency for the locale files.  We actually make it depend only on
# one of the files.
$(addprefix $(objpfx),$(CTYPE_FILES)): %: \
  gen-locale.sh $(common-objpfx)locale/localedef Makefile \
  $(addprefix charmaps/,$(CHARMAPS)) $(addprefix locales/,$(LOCALE_SRCS))
        @$(SHELL) gen-locale.sh $(common-objpfx) \
                  '$(built-program-cmd-before-env)' '$(run-program-env)' \
                  '$(built-program-cmd-after-env)' $@; \
        $(evaluate-test)

$(addsuffix .out,$(addprefix $(objpfx),$(tests))): %: \
  $(addprefix $(objpfx),$(CTYPE_FILES))

$(objpfx)sort-test.out: sort-test.sh $(objpfx)collate-test $(objpfx)xfrm-test \
                       $(test-input-data) $(addprefix $(objpfx),$(CTYPE_FILES))
        $(SHELL) $< $(common-objpfx) '$(test-program-prefix-before-env)' \
          '$(run-program-env)' '$(test-program-prefix-after-env)' \
          $(test-input) \
          > $@; \
        $(evaluate-test)

However, there is no $(CTYPE_FILES) dependency for those tests
above, which fail at random under heavy load with parallel build.
Comment 1 Martin Sebor 2015-08-04 19:30:46 UTC
Also observed during 'make -j16 check' on powerpc and reported here:
https://sourceware.org/ml/libc-alpha/2015-08/msg00080.html
Comment 2 Mike Frysinger 2016-04-16 07:43:42 UTC
afaik, this has been resolved in latest master
Comment 3 joseph@codesourcery.com 2016-04-20 20:02:18 UTC
On Sat, 16 Apr 2016, vapier at gentoo dot org wrote:

>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>              Status|NEW                         |RESOLVED
>                  CC|                            |vapier at gentoo dot org
>          Resolution|---                         |FIXED
> 
> --- Comment #2 from Mike Frysinger <vapier at gentoo dot org> ---
> afaik, this has been resolved in latest master

Please set the milestone.
Comment 4 Mike Frysinger 2016-04-20 20:23:19 UTC
i think it's at least 9f53d7ad577db870c4383b4378cd23131f516c42, but i'm only remembering some of the threads that went by where we talked about parallel locale gen issues at test time and then we made changes, and then people stopped complaining :).

so going to assume it's fixed for at least glibc-2.22.  the code referenced in comment #0 doesn't exist anymore in the same form, and we've tweaked deps elsewhere.  if there's still a build failure, please post updated details.