Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.nio.file.InvalidPathException happened in Ubuntu 18.04 LTS #114

Open
YoshikiHigo opened this issue Dec 9, 2018 · 12 comments
Open

java.nio.file.InvalidPathException happened in Ubuntu 18.04 LTS #114

YoshikiHigo opened this issue Dec 9, 2018 · 12 comments

Comments

@YoshikiHigo
Copy link
Member

Ubuntu 18.04の環境で下記Exceptionが起こる.
Macでは起きない.

2018-12-09 13:55:19 [DEBUG] RepositoryRewriter - Update ref: [refs/tags/Docker 261cb400dcc43272e27eecdba223b9fb4a46aae4] -> [refs/tags/Docker 30e9ac11657699e8bace7e4af5896aa1647bef5c]
java.nio.file.InvalidPathException: Malformed input or input contains unmappable characters: /opt/higo/FinerGitExperiment/02.che-20180911-6658.fg/selenium/che-selenium-test/src/main/java/org/eclipse/che/selenium/pageobject/debug/._AbstractDebugConfig$public_String_getXpathTo?RunDebugCommand(String).mjava6643745384947900096.tmp
        at sun.nio.fs.UnixPath.encode(UnixPath.java:147)
        at sun.nio.fs.UnixPath.<init>(UnixPath.java:71)
        at sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:281)
        at java.io.File.toPath(File.java:2234)
        at org.eclipse.jgit.util.FileUtils.isFile(FileUtils.java:736)
        at org.eclipse.jgit.util.FileUtils.canExecute(FileUtils.java:748)
        at org.eclipse.jgit.util.FS_POSIX.canExecute(FS_POSIX.java:238)
        at org.eclipse.jgit.dircache.DirCacheCheckout.checkoutEntry(DirCacheCheckout.java:1486)
        at org.eclipse.jgit.dircache.DirCacheCheckout.doCheckout(DirCacheCheckout.java:577)
        at org.eclipse.jgit.dircache.DirCacheCheckout.checkout(DirCacheCheckout.java:484)
        at org.eclipse.jgit.api.ResetCommand.checkoutIndex(ResetCommand.java:447)
        at org.eclipse.jgit.api.ResetCommand.call(ResetCommand.java:215)
        at finergit.GitRepo.resetHard(GitRepo.java:476)
        at finergit.TreeRewriteFinerRepoBuilder.exec(TreeRewriteFinerRepoBuilder.java:44)
        at finergit.FinerGitMain.exec(FinerGitMain.java:65)
        at finergit.FinerGitMain.main(FinerGitMain.java:40)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at finergit.JarEntryPoint.main(JarEntryPoint.java:21)
@sh5i
Copy link
Collaborator

sh5i commented Dec 9, 2018

おそらく,JGit の ResetCommand 実行時に,起動しているプロセスが想定しているロケールに該当しないファイル名に出会って失敗しているように思います.該当のリポジトリと,起動環境のロケールを教えてもらえませんか?(ja_JP.UTF-8 とかですか? それとも C ですか?)

@YoshikiHigo
Copy link
Member Author

ロケールはja_JP.UTF-8です(echo $LANGで確認すればいいんですよね?).
対象のリポジトリは,eclipse/cheです(https://github.com/eclipse/che ).

@sh5i
Copy link
Collaborator

sh5i commented Dec 16, 2018

ごめんなさい,再現しませんでした.以下の環境で(言語設定は両方)試しました.

$ uname -a
Linux ubuntu 4.15.0-42-generic #45-Ubuntu SMP Thu Nov 15 19:32:57 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

$ java -version -XshowSettings:locale
java version "1.8.0_191"
Java(TM) SE Runtime Environment (build 1.8.0_191-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.191-b12, mixed mode)

$ java -XshowSettings:locale
Locale settings:
    default locale = English
    default display locale = English (United States)
    default format locale = English (United States)

$ java -Duser.language=ja -Duser.country=JP -XshowSettings:locale
Locale settings:
    default locale = 日本語
    default display locale = 日本語 (日本)
    default format locale = 日本語 (日本)

@YoshikiHigo
Copy link
Member Author

調べてみたら,OpenJDK使っていました.
これが原因かも?

$java -version -XshowSettings:locale
openjdk version "1.8.0_181"
OpenJDK Runtime Environment (build 1.8.0_181-8u181-b13-1ubuntu0.18.04.1-b13)
OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)

@sh5i
Copy link
Collaborator

sh5i commented Dec 16, 2018

._ というファイル名をみるに,Mac のリソースフォークを想像するのですが,該当ディレクトリにネットワーク経由で Mac からアクセスしたりしていませんでしたか?(こちらの再現環境ではそういうことをしていません)

@YoshikiHigo
Copy link
Member Author

Oracle JDKにしても同じエラーが起こった.

@YoshikiHigo
Copy link
Member Author

↑のご指摘ですが,対象としていたcheのリポジトリは他のマシンからscpで持ってきたものです.
さきほどubuntuマシンでcheをgithubからgit-cloneしてみたのですが,同じエラーがでます.

@YoshikiHigo
Copy link
Member Author

ちなみに,eclipseからではなくコマンドラインで実行しています.

git fg --src 02.che-20180911-6658.git --des 02.che-20180911-6658.fg -l warn -o false -p false -t true --method-token-included false --token-type-included true

@sh5i
Copy link
Collaborator

sh5i commented Dec 18, 2018

ごめんなさい,結局再現できませんでした.

再現ができず手元では試せていないのですが,retryreset ブランチを試してみていただけませんか?
例外が出たとき,該当ファイルを消して,再挑戦するようにしています.

@YoshikiHigo
Copy link
Member Author

やってみましたが,だめでした.

java.nio.file.InvalidPathException: Malformed input or input contains unmappable characters: /opt/higo/FinerGitExperiment/Eclipse-Top10Stars/02.che-20180911-6658.fg/selenium/che-selenium-test/src/main/java/org/eclipse/che/selenium/pageobject/debug/._AbstractDebugConfig$public_String_getXpathTo?RunDebugCommand(String).mjava9005217945131439247.tmp
        at sun.nio.fs.UnixPath.encode(UnixPath.java:147)
        at sun.nio.fs.UnixPath.<init>(UnixPath.java:71)
        at sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:281)
        at java.io.File.toPath(File.java:2234)
        at org.eclipse.jgit.util.FileUtils.isFile(FileUtils.java:736)
        at org.eclipse.jgit.util.FileUtils.canExecute(FileUtils.java:748)
        at org.eclipse.jgit.util.FS_POSIX.canExecute(FS_POSIX.java:238)
        at org.eclipse.jgit.dircache.DirCacheCheckout.checkoutEntry(DirCacheCheckout.java:1513)
        at org.eclipse.jgit.dircache.DirCacheCheckout.doCheckout(DirCacheCheckout.java:577)
        at org.eclipse.jgit.dircache.DirCacheCheckout.checkout(DirCacheCheckout.java:484)
        at org.eclipse.jgit.api.ResetCommand.checkoutIndex(ResetCommand.java:447)
        at org.eclipse.jgit.api.ResetCommand.call(ResetCommand.java:215)
        at finergit.GitRepo.doResetHard(GitRepo.java:490)
        at finergit.GitRepo.resetHard(GitRepo.java:505)
        at finergit.TreeRewriteFinerRepoBuilder.exec(TreeRewriteFinerRepoBuilder.java:44)
        at finergit.FinerGitMain.exec(FinerGitMain.java:65)
        at finergit.FinerGitMain.main(FinerGitMain.java:40)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at finergit.JarEntryPoint.main(JarEntryPoint.java:21)
2018-12-18 02:01:32 [WARN]  GitRepo - Try deleting /opt/higo/FinerGitExperiment/Eclipse-Top10Stars/02.che-20180911-6658.fg/selenium/che-selenium-test/src/main/java/org/eclipse/che/selenium/pageobject/debug/._AbstractDebugConfig$public_String_getXpathTo?RunDebugCommand(String).mjava9005217945131439247.tmp: succeeded

@sh5i
Copy link
Collaborator

sh5i commented Dec 18, 2018

[WARN] Trapped のログはいくつ出ていますか?

@YoshikiHigo
Copy link
Member Author

実行が終わりませんが,8分間程度実行して142個でていました.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants