Bug#1004950: reprotest fails when using kk_KZ.RK1048 locale with java (locale not supported by java)

Vagrant Cascadian vagrant at reproducible-builds.org
Fri Feb 4 17:18:56 GMT 2022


On 2022-02-04, Fab Stz wrote:
> I have a CI job that runs reprotest. The project, at some time, makes calls to
> java. However this fails/crashes sometimes.
>
> By narrowing things down it always crashes when locale kk_KZ.RK1048 is in use.
>
> By searching further I discovered that kk_KZ.RK1048 locale/charset is not 
> supported by java [1]. Hence the crash:
>
> $ LC_ALL=kk_KZ.RK1048 java -version
> Error occurred during initialization of VM
> java.lang.IllegalArgumentException: Null charset name
>         at java.nio.charset.Charset.lookup(java.base/Charset.java:455)
...
> $ LC_ALL=C java -version
> openjdk version "11.0.12" 2021-07-20
> OpenJDK Runtime Environment (build 11.0.12+7-post-Debian-2)
> OpenJDK 64-Bit Server VM (build 11.0.12+7-post-Debian-2, mixed mode, sharing)
>
>
> Expected behavior? That it works also with call to java? or maybe an option to
> disable this locale if java is used?
>
> [1]:
> https://docs.oracle.com/javase/8/docs/technotes/guides/intl/encoding.doc.html

Well, reprotest intentionally uses some obscure locales to find bugs
exactly like this...

That said, this points out two issues, and I'm considering making some
changes to locale handling for the "experiment" tests. Currently:

  loc = random.choice(['fr_CH.UTF-8', 'es_ES', 'ru_RU.CP1251', 'kk_KZ.RK1048', 'zh_CN'])

I don't think selecting a locale at random is a good idea; this means
sometimes a build might succeed with reprotest and sometimes not,
depending on which locale happens to be randomly selected.

Secondly, I think by default reprotest should use a slightly less
obscure locale to test, and the same locale every time.

Adding a commandline flag to build with a specified locale would also be
good. Possibly another flag to do a series of builds, each with a
different locale (maybe from a list of very obscure locales).


live well,
  vagrant
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/reproducible-builds/attachments/20220204/3b7ac461/attachment.sig>


More information about the Reproducible-builds mailing list