bfg-repo-cleaner jar file is not compatible with OpenJDK's `jexec`

Bug #1775785 reported by 林博仁(Buo-ren, Lin)
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openjdk-8 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

In Debian systems that install OpenJDK, they seem to be setting up jexec as the binfmt interpreter of launching JAR files (/usr/share/binfmts/jar). However when attempting to run BFG's jar file using jexec it fails with "invalid file (bad magic number): Exec format error" error message.

Refer to the discussion at bfg-repo-cleaner upstream, it seems to be that the `jexec` check is too strict or something:
https://github.com/rtyley/bfg-repo-cleaner/issues/279

Also according to the OpenJDK upstream's JDK6 bug report, `jexec` seems to be never be directly executed by external programs:
https://bugs.java.com/bugdatabase/view_bug.do?bug_id=6401361

## Additional Information ##
OS: KDE neon based on Ubuntu 16.04

Tags: xenial
tags: added: xenial
Revision history for this message
Thorsten Glaser (mirabilos) wrote :

Indeed, the references you found indicate that jexec cannot be used to run normal JARs beginning with “PK”. But these, and nothing else, are what the binfmt is installed for.

https://bugs.openjdk.org/browse/JDK-8176066 indicates jexec is slated for deprecation.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=136993#82 says jarwrapper already catches JAR files with binfmt-misc… and in contrast to jexec it’ll actually work.

I think the proper fix is to remove the binfmt-misc registration from openjdk-8 (at least, but it does work in openjdk-17).

Changed in openjdk-8 (Ubuntu):
status: New → Confirmed
Changed in openjdk-8 (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.