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

Fails to start due to invalid memory address or nil pointer dereference #80

Open
SliceCraft opened this issue Nov 13, 2022 · 0 comments

Comments

@SliceCraft
Copy link

I've been using wsl2host for a few months now and it worked fine until I noticed it was acting weird today.
Multiple times today I've had issues where a domain isn't pointing to an ip.
While checking the event viewer I noticed a lot of errors.
I assumed this might have to do with an update so I ran build.bat on the latest commit and used that executable to try again.
Unfortunately without any luck.
Below the output of 3 separate attempts at running wsl2host debug.

C:\Users\Slice\Documents\wsl2host>wsl2host.exe debug
wsl2host.info(1): starting wsl2host service
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0xfcccd7]

goroutine 1 [running]:
github.com/shayne/go-wsl2-host/cmd/wsl2host/pkg/service.updateHostIP({0x102fc68, 0xc000040640}, {0xc0001c0038, 0x1, 0xc00007bc58?})
        C:/Users/Slice/Documents/wsl2host/git/go-wsl2-host/cmd/wsl2host/pkg/service/service.go:109 +0x437
github.com/shayne/go-wsl2-host/cmd/wsl2host/pkg/service.Run({0x102fc68, 0xc000040640})
        C:/Users/Slice/Documents/wsl2host/git/go-wsl2-host/cmd/wsl2host/pkg/service/service.go:40 +0x76
github.com/shayne/go-wsl2-host/cmd/wsl2host/internal.(*windowserver).Execute(0xc0000521e0?, {0xc000040660, 0x1, 0x1}, 0xc000052120, 0x4?)
        C:/Users/Slice/Documents/wsl2host/git/go-wsl2-host/cmd/wsl2host/internal/service.go:34 +0x2f8
golang.org/x/sys/windows/svc/debug.Run({0xffb213, 0x8}, {0x102f628, 0x113e5b8})
        C:/Users/Slice/go/pkg/mod/golang.org/x/[email protected]/windows/svc/debug/service.go:40 +0x144
github.com/shayne/go-wsl2-host/cmd/wsl2host/internal.RunService({0xffb213, 0x8}, 0x1)
        C:/Users/Slice/Documents/wsl2host/git/go-wsl2-host/cmd/wsl2host/internal/service.go:82 +0x210
main.main()
        C:/Users/Slice/Documents/wsl2host/git/go-wsl2-host/cmd/wsl2host/main.go:42 +0x14e

C:\Users\Slice\Documents\wsl2host>wsl2host.exe debug
wsl2host.info(1): starting wsl2host service
wsl2host.error(1): failed to get infos: failed to get IP for distro "Ubuntu": exit status 1
wsl2host.error(1): failed to get infos: failed to get IP for distro "Ubuntu": exit status 1
wsl2host.error(1): failed to get infos: failed to get IP for distro "Ubuntu": exit status 1
wsl2host.error(1): failed to get infos: failed to get IP for distro "Ubuntu": exit status 1
wsl2host.error(1): failed to get infos: failed to get IP for distro "Ubuntu": exit status 1
wsl2host.error(1): failed to get infos: failed to get IP for distro "Ubuntu": exit status 1
wsl2host.error(1): failed to get infos: failed to get IP for distro "Ubuntu": exit status 1
wsl2host.error(1): failed to get infos: failed to get IP for distro "Ubuntu": exit status 1
wsl2host.error(1): failed to get infos: failed to get IP for distro "Ubuntu": exit status 1
wsl2host.error(1): failed to get infos: failed to get IP for distro "Ubuntu": exit status 1
wsl2host.error(1): failed to get infos: failed to get IP for distro "Ubuntu": exit status 1
wsl2host.error(1): failed to get infos: failed to get IP for distro "Ubuntu": exit status 1
wsl2host.info(1): wsl2host-0
wsl2host.info(1): wsl2host service stopped

C:\Users\Slice\Documents\wsl2host>wsl2host.exe debug
wsl2host.info(1): starting wsl2host service
wsl2host.error(1): failed to get infos: failed to get IP for distro "Ubuntu": exit status 1
wsl2host.error(1): failed to get infos: failed to get IP for distro "Ubuntu": exit status 1
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0xfcccd7]

goroutine 1 [running]:
github.com/shayne/go-wsl2-host/cmd/wsl2host/pkg/service.updateHostIP({0x102fc68, 0xc000040640}, {0xc00000a070, 0x1, 0xffa39a?})
        C:/Users/Slice/Documents/wsl2host/git/go-wsl2-host/cmd/wsl2host/pkg/service/service.go:109 +0x437
github.com/shayne/go-wsl2-host/cmd/wsl2host/pkg/service.Run({0x102fc68, 0xc000040640})
        C:/Users/Slice/Documents/wsl2host/git/go-wsl2-host/cmd/wsl2host/pkg/service/service.go:40 +0x76
github.com/shayne/go-wsl2-host/cmd/wsl2host/internal.(*windowserver).Execute(0xc0000521e0?, {0xc000040660, 0x1, 0x1}, 0xc000052120, 0x4?)
        C:/Users/Slice/Documents/wsl2host/git/go-wsl2-host/cmd/wsl2host/internal/service.go:34 +0x2f8
golang.org/x/sys/windows/svc/debug.Run({0xffb213, 0x8}, {0x102f628, 0x113e5b8})
        C:/Users/Slice/go/pkg/mod/golang.org/x/[email protected]/windows/svc/debug/service.go:40 +0x144
github.com/shayne/go-wsl2-host/cmd/wsl2host/internal.RunService({0xffb213, 0x8}, 0x1)
        C:/Users/Slice/Documents/wsl2host/git/go-wsl2-host/cmd/wsl2host/internal/service.go:82 +0x210
main.main()
        C:/Users/Slice/Documents/wsl2host/git/go-wsl2-host/cmd/wsl2host/main.go:42 +0x14e

C:\Users\Slice\Documents\wsl2host>
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

1 participant