Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.java > #12066

Re: Potential bug in openjdk-11 on mips64el

From Tiago Daitx <tiago.daitx@canonical.com>
Newsgroups linux.debian.maint.java, linux.debian.ports.mips
Subject Re: Potential bug in openjdk-11 on mips64el
Date 2021-02-14 01:00 +0100
Message-ID <BIcZr-2Yw-1@gated-at.bofh.it> (permalink)
References <BHOu6-5eX-7@gated-at.bofh.it> <BHXQJ-2p7-3@gated-at.bofh.it> <BI7n4-82x-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Cross-posted to 2 groups.

Show all headers | View raw


Hi,

This particular exception is being thrown by the call to unlinkat [1]
which calls native unlinkat. Man page for unlinkat describes EISDIR
error [2] as:
"EISDIR pathname refers to a directory, and AT_REMOVEDIR was not
specified in flags."

Assuming unlinkat is telling the truth and this is indeed a directory,
it can be seen from the stacktrace that deleteRecursivelySecure is
calling deleteFile [3] instead of deleteDir (deleteDir does set
AT_REMOVERDIR).

This seems to indicate that the isDirectory call [4] is getting wrong
file attributes. Following the trail, those file attributes come from
a fstatat call [5] which ultimately come from the native stack in
UnixNativeDispatcher.c [6]. The actual way that fstatat is called
depends on the build flags and defines from the arch, so somebody with
better knowledge might want to take a look at UnixNativeDispatcher.c
[6] and tell if OpenJDK is picking the right function to call for
mips64el.

References:
[1] unlinkat call
https://sources.debian.org/src/openjdk-11/11.0.10+9-1/src/java.base/unix/classes/sun/nio/fs/UnixSecureDirectoryStream.java/#L200
[2] EISDIR in OpenJDK:
https://sources.debian.org/src/openjdk-11/11.0.10+9-1/src/hotspot/share/runtime/os.cpp/#L1504
[3] https://salsa.debian.org/java-team/guava-libraries/-/blob/master/guava/src/com/google/common/io/MoreFiles.java#L630
[4] https://salsa.debian.org/java-team/guava-libraries/-/blob/master/guava/src/com/google/common/io/MoreFiles.java#L335
[5] https://sources.debian.org/src/openjdk-11/11.0.10+9-1/src/java.base/unix/classes/sun/nio/fs/UnixFileAttributes.java/#L90


cheers,

-- 
Tiago Stürmer Daitx
Software Engineer
tiago.daitx@canonical.com

PGP Key: 4096R/F5B213BE (hkp://keyserver.ubuntu.com)
Fingerprint = 45D0 FE5A 8109 1E91 866E  8CA4 1931 8D5E F5B2 13BE

Back to linux.debian.maint.java | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Potential bug in openjdk-11 on mips64el Olek Wojnar <olek@debian.org> - 2021-02-12 22:50 +0100
  Re: Potential bug in openjdk-11 on mips64el Matthias Klose <doko@debian.org> - 2021-02-13 08:50 +0100
    Re: Potential bug in openjdk-11 on mips64el Olek Wojnar <olek@debian.org> - 2021-02-13 19:00 +0100
      Re: Potential bug in openjdk-11 on mips64el raphael.jolly@free.fr - 2021-02-13 20:30 +0100
      Re: Potential bug in openjdk-11 on mips64el Tiago Daitx <tiago.daitx@canonical.com> - 2021-02-14 01:00 +0100
        Re: Potential bug in openjdk-11 on mips64el Tiago Daitx <tiago.daitx@canonical.com> - 2021-02-14 01:00 +0100
        Re: Potential bug in openjdk-11 on mips64el Olek Wojnar <olek@debian.org> - 2021-02-15 02:00 +0100
          Re: Potential bug in openjdk-11 on mips64el Matthias Klose <doko@debian.org> - 2021-02-15 09:40 +0100
          Re: Potential bug in openjdk-11 on mips64el Aleksey Shipilev <shade@redhat.com> - 2021-02-15 16:00 +0100
            Re: Potential bug in openjdk-11 on mips64el Ao Qi <aoqi@loongson.cn> - 2021-02-15 18:00 +0100
              Re: Potential bug in openjdk-11 on mips64el Ao Qi <aoqi@loongson.cn> - 2021-02-20 10:10 +0100
                Re: Potential bug in openjdk-11 on mips64el Olek Wojnar <olek@debian.org> - 2021-02-21 21:20 +0100
                Re: Potential bug in openjdk-11 on mips64el Olek Wojnar <olek@debian.org> - 2021-02-28 18:30 +0100
                Re: Potential bug in openjdk-11 on mips64el Olek Wojnar <olek@debian.org> - 2021-03-02 18:40 +0100

csiph-web