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

panic runtime SIGSEGV (with an invalid template) #3103

Open
NN--- opened this issue Jan 9, 2025 · 4 comments
Open

panic runtime SIGSEGV (with an invalid template) #3103

NN--- opened this issue Jan 9, 2025 · 4 comments
Labels
area/cli limactl CLI user experience bug Something isn't working status/more-info-needed

Comments

@NN---
Copy link

NN--- commented Jan 9, 2025

Description

Mac M4

Using the following configuration:

With
LIMA_SSH_PORT_FORWARDER=false

portForwards:
  - guestSocket: "tcp:2222"
    hostSocket: "tcp:2222"    

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x80 pc=0x10553b134]

goroutine 1 [running]:
main.shellAction(0x14000675808, {0x1400066f6e0?, 0x4?, 0x1055544c7?})
	/private/tmp/lima-20241227-4789-ev5r3o/lima-1.0.3/cmd/limactl/shell.go:94 +0x3c4
github.com/spf13/cobra.(*Command).execute(0x14000675808, {0x1400066f6b0, 0x1, 0x1})
	/Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/spf13/[email protected]/command.go:985 +0x834
github.com/spf13/cobra.(*Command).ExecuteC(0x14000674c08)
	/Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/spf13/[email protected]/command.go:1117 +0x344
github.com/spf13/cobra.(*Command).Execute(...)
	/Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/spf13/[email protected]/command.go:1041
main.main()
	/private/tmp/lima-20241227-4789-ev5r3o/lima-1.0.3/cmd/limactl/main.go:28 +0x20
@jandubois
Copy link
Member

portForwards:
  - guestSocket: "tcp:2222"
    hostSocket: "tcp:2222"

This is wrong, the guestSocket and hostSocket properties should contains names of unix sockets, and not include the protocol name at all.

portForwards:
- guestPort: 2222
  hostPort: 2222

Please leave the issue open; limactl should not panic, regardless of the input data. It should produce meaningful validation errors instead.

@AkihiroSuda AkihiroSuda changed the title panic runtime SIGSEGV panic runtime SIGSEGV (with an invalid template) Jan 9, 2025
@olamilekan000
Copy link
Contributor

I've been trying to reproduce this but to no avail. Can you kindly provide more contexts in terms of the command your ran or any other thing you think might help?
Thanks @NN---

@nirs nirs added bug Something isn't working area/cli limactl CLI user experience labels Jan 18, 2025
@AkihiroSuda AkihiroSuda marked this as a duplicate of #3172 Jan 29, 2025
@jandubois
Copy link
Member

I cannot reproduce this:

FATA[0025] the YAML is invalid, saved the buffer as "lima.REJECTED.yaml": field `portForwards[0].guestSocket` must be an absolute path, but is "tcp:2222"

@NN---
Copy link
Author

NN--- commented Jan 29, 2025

I no longer need this configuration, the automatic port forwarding works for me too.
So closing for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli limactl CLI user experience bug Something isn't working status/more-info-needed
Projects
None yet
Development

No branches or pull requests

4 participants