Bug#851053: openjdk-8-jre-headless: Can't run a command with Runtime.exec() on kfreebsd-* - errcode 127
Control: tag -1 + patch On Sat, 14 Jan 2017 17:41:18 +0100 Gilles Filippini wrote: > Steven Chamberlain a écrit le 13/01/2017 à 14:43 : > > Hello, > > > > Gilles Filippini wrote: > >> While investigating about ant FTBFS on kfreebsd-* [1][2], I tried the > >> very simple testcase below. It fails with errcode 127 on kfreebsd-*: > > > > Many thanks for the report and test case. With that I could easily find > > the underlying issue: > > > > 31280 java CALL vfork > > 31280 java RET vfork 31281/0x7a31 > > 31281 java RET fork 0 > > 31281 java CALL execve(0x8041e6970,0x8026b34c0,0x7fffe610) > > 31281 java NAMI > > "/usr/lib/jvm/java-8-openjdk-kfreebsd-amd64/jre/lib/jspawnhelper" > > 31281 java RET execve -1 errno 2 No such file or directory > > 31281 java CALL exit(0x7f) > > > > AFAIK only kfreebsd uses jspawnhelper, but ISTR it was the most suitable > > implementation of exec() for us to use at the moment. > > > > The file is actually located at > > /usr/lib/jvm/java-8-openjdk-kfreebsd-amd64/jre/lib/amd64/jspawnhelper > > > > Perhaps I need to update something in the kfreebsd jdk patchset; > > although it maybe makes more sense to install that file to > > /usr/lib/jvm/java-8-openjdk-kfreebsd-amd64/jre/lib/jspawnhelper > > since the pathname is already multiarched. > > Yes, the latter sounds sensible. Patch proposal attached. Thanks, -g. diff -Nru openjdk-8-8u111-b14/debian/rules openjdk-8-8u111-b14/debian/rules --- openjdk-8-8u111-b14/debian/rules 2016-10-30 16:14:44.0 + +++ openjdk-8-8u111-b14/debian/rules 2017-01-14 20:38:11.0 + @@ -1605,6 +1605,8 @@ ifneq (,$(filter $(DEB_HOST_ARCH), kfreebsd-amd64 kfreebsd-i386)) cp -a $(d)/$(basedir)/include/bsd $(d)/$(basedir)/include/linux + : # Easy fix for #851053 + mv $(d)/$(basedir)/jre/lib/$(archdir)/jspawnhelper $(d)/$(basedir)/jre/lib/ endif chmod -R u+w $(d) signature.asc Description: OpenPGP digital signature
Bug#851053: openjdk-8-jre-headless: Can't run a command with Runtime.exec() on kfreebsd-* - errcode 127
Steven Chamberlain a écrit le 13/01/2017 à 14:43 : > Hello, > > Gilles Filippini wrote: >> While investigating about ant FTBFS on kfreebsd-* [1][2], I tried the >> very simple testcase below. It fails with errcode 127 on kfreebsd-*: > > Many thanks for the report and test case. With that I could easily find > the underlying issue: > > 31280 java CALL vfork > 31280 java RET vfork 31281/0x7a31 > 31281 java RET fork 0 > 31281 java CALL execve(0x8041e6970,0x8026b34c0,0x7fffe610) > 31281 java NAMI > "/usr/lib/jvm/java-8-openjdk-kfreebsd-amd64/jre/lib/jspawnhelper" > 31281 java RET execve -1 errno 2 No such file or directory > 31281 java CALL exit(0x7f) > > AFAIK only kfreebsd uses jspawnhelper, but ISTR it was the most suitable > implementation of exec() for us to use at the moment. > > The file is actually located at > /usr/lib/jvm/java-8-openjdk-kfreebsd-amd64/jre/lib/amd64/jspawnhelper > > Perhaps I need to update something in the kfreebsd jdk patchset; > although it maybe makes more sense to install that file to > /usr/lib/jvm/java-8-openjdk-kfreebsd-amd64/jre/lib/jspawnhelper > since the pathname is already multiarched. Yes, the latter sounds sensible. Thanks, _g. _ signature.asc Description: OpenPGP digital signature
Bug#851053: openjdk-8-jre-headless: Can't run a command with Runtime.exec() on kfreebsd-* - errcode 127
Hello, Gilles Filippini wrote: > While investigating about ant FTBFS on kfreebsd-* [1][2], I tried the > very simple testcase below. It fails with errcode 127 on kfreebsd-*: Many thanks for the report and test case. With that I could easily find the underlying issue: 31280 java CALL vfork 31280 java RET vfork 31281/0x7a31 31281 java RET fork 0 31281 java CALL execve(0x8041e6970,0x8026b34c0,0x7fffe610) 31281 java NAMI "/usr/lib/jvm/java-8-openjdk-kfreebsd-amd64/jre/lib/jspawnhelper" 31281 java RET execve -1 errno 2 No such file or directory 31281 java CALL exit(0x7f) AFAIK only kfreebsd uses jspawnhelper, but ISTR it was the most suitable implementation of exec() for us to use at the moment. The file is actually located at /usr/lib/jvm/java-8-openjdk-kfreebsd-amd64/jre/lib/amd64/jspawnhelper Perhaps I need to update something in the kfreebsd jdk patchset; although it maybe makes more sense to install that file to /usr/lib/jvm/java-8-openjdk-kfreebsd-amd64/jre/lib/jspawnhelper since the pathname is already multiarched. Regards, -- Steven Chamberlain ste...@pyro.eu.org signature.asc Description: Digital signature
Bug#851053: openjdk-8-jre-headless: Can't run a command with Runtime.exec() on kfreebsd-* - errcode 127
Package: openjdk-8-jre-headless Version: 8u111-b14-2 Severity: important -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hi, While investigating about ant FTBFS on kfreebsd-* [1][2], I tried the very simple testcase below. It fails with errcode 127 on kfreebsd-*: $ cat MyTest.java public class MyTest { public static void main(String[] args) throws Exception { String[] cmd = { "ls" }; Process process = Runtime.getRuntime().exec(cmd); int ret = process.waitFor(); System.err.format("retcode: %d\n", ret); } } $ javac MyTest.java $ java MyTest retcode: 127 $ java -version openjdk version "1.8.0_111" OpenJDK Runtime Environment (build 1.8.0_111-8u111-b14-2-b14) OpenJDK Server VM (build 25.111-b14, mixed mode) This test was run on porterboxes fischer.d.o and jalla.d.o under a clean sid chroot. Thanks, [1] https://buildd.debian.org/status/fetch.php?pkg=ant&arch=kfreebsd-i386&ver=1.9.8-1&stamp=1483664640 [2] https://buildd.debian.org/status/fetch.php?pkg=ant&arch=kfreebsd-amd64&ver=1.9.8-1&stamp=1484162770 _g. -BEGIN PGP SIGNATURE- iQEzBAEBCAAdFiEEoJObzArDE05WtIyR7+hsbH/+z4MFAlh2k4AACgkQ7+hsbH/+ z4MXcQf/fPKB+I9VuWlSF69wvm1PZxqVI3EqZKHO3U6N2cKTN19TxMYA3gDOoejp eY2xR9kR2xPxrr3dRAH6Wqky3/Fr7mvg+q/iHJvOejFUQr0NkjKBBX2GpilykWpu NZCn/xdJYj1bjgFpJMeoZ3v8dDyTTZ7BUW1kx/VRn0xAxKkvdRnspNXeyOj3ONoN giNjF11iuXPSDBHubCgj9dTMx6ZUNE3dGhl5x6vMzYTNk+Kvh+fOSI2wJGIQaUIA V/ywKE2r5kOaoJq3CTlFZsyujk8S6hyarecFcsx+tXbtx7uphSJCICO8J0JeaGeT f8ufBbjAlvAzkuHZXYD927FB7BhydA== =Vos0 -END PGP SIGNATURE-