← Back to team overview

bazel-team team mailing list archive

Re: Potential bug in openjdk-11 on mips64el


Thanks for the ideas so far!

On Sat, Feb 20, 2021 at 3:53 AM Ao Qi <aoqi@xxxxxxxxxxx> wrote:

> I tried to dpkg-buildpackage bazel-bootstrap, but I failed to
> reproduce the issue. It seems a long time is needed. Is there a
> simpler way to reproduce the problem?

When you say that you failed to reproduce the issue, do you mean that the
bazel-bootstrap package was built correctly or that you experienced a
different error? Regarding a simple example, this [1] is what causes the
problem so adapting this snippet to delete a test directory should allow
you to reproduce the problem. A guava dependency should allow you to
satisfy this: `import com.google.common.io.MoreFiles`. But I'm not
exactly a Java expert so I may be missing something here.

Regarding the long build times, if you are able to build in a persistent
environment that should speed up the build. Bazel only rebuilds changed
code so reusing the same build environment should speed up subsequent
builds. (I have done this when building software with Bazel but not with
building Bazel itself because I always build Debian packages in a clean

Just FYI, we had a workaround for another issue. I don't know if it
> has anything to do with this problem.

That looks like it may be related (from what I can tell)! I assume that
workaround is not in the current mips64el OpenJDK in Debian? If you can
confirm on your system that your workaround fixes the problem shown in [1]
then it would be great to have that fix available in Debian!

On Tue, Feb 16, 2021 at 12:29 AM Ao Qi <aoqi@xxxxxxxxxxx> wrote:
> >
> > On Mon, Feb 15, 2021 at 10:22 PM Aleksey Shipilev <shade@xxxxxxxxxx>
> wrote:
> > >
> > > On 2/15/21 1:40 AM, Olek Wojnar wrote:
> > > > On Sat, Feb 13, 2021 at 2:21 PM <raphael.jolly@xxxxxxx <mailto:
> raphael.jolly@xxxxxxx>> wrote:
> > > >     It selects the "Zero" VM, which I assume is the one used on
> mips64el.
> > > >     https://openjdk.java.net/projects/zero/
> > > >
> > > > Ah, thanks for the explanation! It helped me to appropriately adjust
> build-depends. Hmm, it looks
> > > > like Zero is not supported on MIPS at the moment, but perhaps that
> site is just out-of-date?
> > >
> > > There only Zero on mips64el for all current OpenJDKs. Zero for
> mips64el should be supported since
> > > JDK 10, see JDK-8186313:
> https://bugs.openjdk.java.net/browse/JDK-8186313
> > >
> > > ...so openjdk-11 is supposed to work.

Ok, I made a mistake previously and only activated Zero for the bootstrap
Bazel build and not for the main Bazel build. The latest version in
experimental should have both enabled [2] but it is still failing with the
same error.

> > Thing is, there is hardly anyone who supports mips64el in OpenJDK
> upstream. I think Debian folks are
> > > the most heavy users of it :) So, while you can submit a bug upstream,
> I don't think there is a high
> > > chance anyone picks it up. You can try to ask here:

That's unfortunate. :( Would filing a bug in Debian make more sense then?
That way, if we can figure out a fix, it can at least be applied to Debian.

> > I would like to pick it up. However, I am on vacation at the moment
> > and did not have a mips64el machine on hand. If time permits, I will
> > return to the company in three days to follow up on this issue.

Thanks for the follow-up! It sounds like we may have a better idea of
what's going on now.

> > It looks to me that Zero mips64el is another instance of
> SecureDirectoryStream bug tail:
> > >
> https://bugs.openjdk.java.net/issues/?jql=text%20~%20%22SecureDirectoryStream%22
> > >
> > > If there is the mips64el machine where this reproduces, the next step
> would be trying the mainline
> > > JDK NIO tests, something like:
> > >
> > >   $ git clone https://github.com/openjdk/jdk
> > >   $ cd jdk
> > >   $ wget https://builds.shipilev.net/jtreg/jtreg.zip
> > >   $ unzip jtreg.zip
> > >   $ ./configure --with-debug-level=fastdebug --with-jtreg=./jtreg
> > >   $ make run-test TEST=java/nio
> > >
> > > ...and if that does not yield failures, then MCVE would be needed.

Does anyone here have easy access to a mips64el machine to try this?



Follow ups