palantir / palantir/go-java-launcher

When JRE is not compatible with OS error message is tricky to understand

Open
#14 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
76
Forks
29
Avg merge
11h 34m
Merged PRs (30d)
25

Description

When trying to launch using a Unix JRE on OSX go-java-launcher fails with the following error:

panic: exec format error

goroutine 1 [running]:
panic(0x166760, 0xc8200baa50)
	/usr/local/go/src/runtime/panic.go:481 +0x3e6
github.com/palantir/go-java-launcher/launchlib.execWithChecks(0xc8200cc090, 0x24, 0xc8200e0600, 0x8, 0xc)
	/home/ubuntu/.go_workspace/src/github.com/palantir/go-java-launcher/launchlib/launcher.go:93 +0x27a
github.com/palantir/go-java-launcher/launchlib.Launch(0xc8200b9e48, 0xc8200b9e18)
	/home/ubuntu/.go_workspace/src/github.com/palantir/go-java-launcher/launchlib/launcher.go:83 +0xe38
main.LaunchWithConfig(0x7fff5fbff9b2, 0x1f, 0x7fff5fbff9d2, 0x1c)
	/home/ubuntu/.go_workspace/src/github.com/palantir/go-java-launcher/go-java-launcher/main.go:39 +0x389
main.main()
	/home/ubuntu/.go_workspace/src/github.com/palantir/go-java-launcher/go-java-launcher/main.go:56 +0xf6

Very hard to debug. Would be nice to fail with a much easier to understand error.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at launchlib/launcher.go:93, where the stack trace shows execWithChecks handling the failed launch. Trace how Launch and the main entry point propagate this failure, then define completion as reporting an understandable error instead of the raw exec format panic when the JRE is incompatible with the OS.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.