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

💣 Nil pointer dereference in xray/handler.go:1004 (v1.40.11 - linux/amd64) #741

Open
bitplane opened this issue Dec 31, 2024 · 3 comments

Comments

@bitplane
Copy link

🔍 Details

Crash in master/command/xray/handler.go, line 1004

Command run: xray --target bitplane1/uh-halp-data-binaries:ubuntu-500-x86_64

Stack trace:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0xb8 pc=0x1a9b32a]

goroutine 1 [running]:
github.com/slimtoolkit/slim/pkg/app/master/command/xray.printImagePackage(0xc0006624c8, 0xc000641520, {0x0?, 0x0?}, {0x0?, 0x0?}, 0x0?, 0x0?, 0xc000612420, 0xffffffffffffffff, ...)
        github.com/slimtoolkit/slim/pkg/app/master/command/xray/handler.go:1004 +0x6c6a
github.com/slimtoolkit/slim/pkg/app/master/command/xray.OnCommand(0xc0006624c8, 0xc00061c3f0, 0xc0006624e8, {_, _}, _, {_, _}, {0x0, 0x0}, ...)
        github.com/slimtoolkit/slim/pkg/app/master/command/xray/handler.go:521 +0x32c8
github.com/slimtoolkit/slim/pkg/app/master/command/xray.glob..func1(0xc000694cc0)
        github.com/slimtoolkit/slim/pkg/app/master/command/xray/cli.go:337 +0x1d98
github.com/urfave/cli/v2.(*Command).Run(0x33a8f00, 0xc000694cc0, {0xc0006122a0, 0x3, 0x3})
        github.com/urfave/cli/[email protected]/command.go:279 +0x9dd
github.com/urfave/cli/v2.(*Command).Run(0xc000478420, 0xc000694740, {0xc000694680, 0x4, 0x4})
        github.com/urfave/cli/[email protected]/command.go:272 +0xc2e
github.com/urfave/cli/v2.(*App).RunContext(0xc00025c200, {0x23470c8?, 0x341e0a0}, {0xc000694680, 0x4, 0x4})
        github.com/urfave/cli/[email protected]/app.go:337 +0x5db
github.com/urfave/cli/v2.(*App).Run(...)
        github.com/urfave/cli/[email protected]/app.go:311
github.com/slimtoolkit/slim/pkg/app/master/command.(*InteractiveApp).execute(0xc0006a2600, {0xc000a08140?, 0x1?})
        github.com/slimtoolkit/slim/pkg/app/master/command/cliprompt.go:108 +0x37e
github.com/c-bata/go-prompt.(*Prompt).Run(0xc000696200)
        github.com/c-bata/[email protected]/prompt.go:85 +0x846
github.com/slimtoolkit/slim/pkg/app/master/command.(*InteractiveApp).Run(...)
        github.com/slimtoolkit/slim/pkg/app/master/command/cliprompt.go:273
github.com/slimtoolkit/slim/pkg/app/master.newCLI.func4(0xc000694100?)
        github.com/slimtoolkit/slim/pkg/app/master/cli.go:187 +0x45
github.com/urfave/cli/v2.(*Command).Run(0xc000478160, 0xc000694100, {0xc0000500a0, 0x1, 0x1})
        github.com/urfave/cli/[email protected]/command.go:279 +0x9dd
github.com/urfave/cli/v2.(*App).RunContext(0xc00025c200, {0x23470c8?, 0x341e0a0}, {0xc0000500a0, 0x1, 0x1})
        github.com/urfave/cli/[email protected]/app.go:337 +0x5db
github.com/urfave/cli/v2.(*App).Run(...)
        github.com/urfave/cli/[email protected]/app.go:311
github.com/slimtoolkit/slim/pkg/app/master.Run()
        github.com/slimtoolkit/slim/pkg/app/master/app.go:15 +0x45
main.main()
        github.com/slimtoolkit/slim/cmd/slim/main.go:15 +0x187

👣 Steps

$ docker pull bitplane1/uh-halp-data-binaries:ubuntu-500-x86_64
$ slim
>>> xray --target bitplane1/uh-halp-data-binaries:ubuntu-500-x86_64

🕶️ Specs

$ slim --version
slim version linux/amd64|Transformer|1.40.11|1b271555882eacdfb4e6598d6d0552e9b9b1449b|2024-02-02_01:36:22PM
@bitplane bitplane changed the title Nil pointer dereference in xray/handler.go:1004 (linux.amd64 v1.40.11) 💣 Nil pointer dereference in xray/handler.go:1004 (v1.40.11 - linux/amd64) Dec 31, 2024
@kcq
Copy link
Member

kcq commented Dec 31, 2024

Thank you for the detailed report @bitplane ! This will be straight forward to prevent. A new release is coming in the next few days (will be here) and I'll post a release link in this issue.

@bitplane
Copy link
Author

bitplane commented Jan 1, 2025

If you're looking for a stress test case, the same repo has 200GB Ubuntu repos for x86_64 and aarch64, with as many packages as I could manage to install (well, all the ones that contain binaries that someone might type into a command line).

Source repo is here, if it's the sort of thing you'd find useful :)

@kcq
Copy link
Member

kcq commented Jan 1, 2025

If you're looking for a stress test case, the same repo has 200GB Ubuntu repos for x86_64 and aarch64, with as many packages as I could manage to install (well, all the ones that contain binaries that someone might type into a command line).

Source repo is here, if it's the sort of thing you'd find useful :)

This is very cool! Thank you @bitplane

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