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

segfault during parsing @ pkg/parser/memo_parser.go:66 #83

Open
mackenziestarr opened this issue Dec 19, 2022 · 1 comment
Open

segfault during parsing @ pkg/parser/memo_parser.go:66 #83

mackenziestarr opened this issue Dec 19, 2022 · 1 comment

Comments

@mackenziestarr
Copy link

Hello,
I'm really excited about this project and have been following it for a bit.

I wanted to report a segfault I ran into following the most recent README.md instructions @ 995f59e. It's very possible its operator error or misconfiguration on my part but I figured I would share in the event that it is helpful to you. If it is not helpful, feel free to close since the last thing I want is making you chase a bug without enough context.

thanks for all your efforts here,
Mackenzie

console output:

$ bazel run //:gazelle

Target //:gazelle up-to-date:
  bazel-bin/gazelle-runner.bash
  bazel-bin/gazelle
INFO: Elapsed time: 6.194s, Critical Path: 0.01s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
INFO: Build completed successfully, 1 total action
gazelle: warning: error while setting up final scope: scala.* package not found (some builtin symbols may not resolve!)
resolving dependencies [==================================================>] 894/894 packages

$ bazel run //:gazelle
Target //:gazelle up-to-date:
  bazel-bin/gazelle-runner.bash
  bazel-bin/gazelle
INFO: Elapsed time: 3.631s, Critical Path: 0.01s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
INFO: Build completed successfully, 1 total action
gazelle: Parsed //<redacted> (8 files, 350ms)
gazelle: Parsed //<redacted> (1 files, 21ms)
gazelle: Parsed //<redacted> (2 files, 20ms)
gazelle: Parsed //<redacted> (1 files, 14ms)
gazelle: Parsed //<redacted> (1 files, 43ms)
gazelle: Parsed //<redacted> (1 files, 22ms)
gazelle: Parsed //<redacted> (1 files, 16ms)
gazelle: Parsed //<redacted> (1 files, 24ms)
gazelle: Parsed //<redacted> (1 files, 26ms) 
gazelle: Parsed //<redacted> (1 files, 22ms)
gazelle: Parsed //<redacted> (1 files, 11ms)
gazelle: Parsed //<redacted> (1 files, 2ms)
gazelle: Parsed //<redacted> (1 files, 1ms)
gazelle: Parsed //<redacted> (1 files, 11ms)
gazelle: Parsed //<redacted> (1 files, 2ms)
gazelle: Parsed //<redacted> (1 files, 4ms)
gazelle: Parsed //<redacted> (1 files, 8ms)
gazelle: Parsed //<redacted> (1 files, 4ms)
gazelle: Parsed //<redacted> (1 files, 3ms)
gazelle: Parsed //<redacted> (1 files, 2ms)
gazelle: Parsed //<redacted> (1 files, 14ms)
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x68 pc=0xa62fd9]

goroutine 1 [running]:
github.com/stackb/scala-gazelle/pkg/parser.(*MemoParser).ParseScalaRule(0xc00000e888, {0xc0005c8060, 0xc}, {{0x0, 0x0}, {0xc0005b61b0, 0x14}, {0xc0005c8071, 0x4}, 0x0}, ...)
        external/build_stack_scala_gazelle/pkg/parser/memo_parser.go:66 +0x299
github.com/stackb/scala-gazelle/language/scala.(*scalaPackage).ParseRule(0xc0004cfcb0, 0xc000593680, {0xbda55a, 0x4})
        external/build_stack_scala_gazelle/language/scala/scala_package.go:187 +0x416
github.com/stackb/scala-gazelle/language/scala.(*existingScalaRuleProvider).ResolveRule(0xa783a2?, 0xc00048b500, {0xed2840, 0xc0004cfcb0}, 0xc000593680)
        external/build_stack_scala_gazelle/language/scala/existing_scala_rule.go:70 +0x5e
github.com/stackb/scala-gazelle/language/scala.(*scalaPackage).resolveRule(0xc0004cfcb0, 0xc00048b500, 0xc0004d8341?)
        external/build_stack_scala_gazelle/language/scala/scala_package.go:170 +0x1af
github.com/stackb/scala-gazelle/language/scala.(*scalaPackage).generateRules(0xc0004cfcb0, 0x0?)
        external/build_stack_scala_gazelle/language/scala/scala_package.go:130 +0x37c
github.com/stackb/scala-gazelle/language/scala.newScalaPackage({0xc0005b61b0, 0x14}, 0xc0005cfd60, 0xc0004ce5a0, {0xed7e90?, 0xc000010328}, {0xed5790?, 0xc00000e888}, {0xedd938, 0xc0003a06c0})
        external/build_stack_scala_gazelle/language/scala/scala_package.go:60 +0x175
github.com/stackb/scala-gazelle/language/scala.(*scalaLang).GenerateRules(0xc0003a06c0, {0xc000d35080, {0xc000d84540, 0x34}, {0xc0005b61b0, 0x14}, 0xc0005cfd60, {0xc000d93500, 0x2, 0x2}, ...})
        external/build_stack_scala_gazelle/language/scala/generate.go:28 +0x1b4
main.runFixUpdate.func1({0xc000d84540, 0x34}, {0xc0005b61b0, 0x14}, 0xc000d35080, 0xd8?, 0xc0005cfd60, {0xc000d93500, 0x2, 0x2}, ...)
        external/bazel_gazelle/cmd/gazelle/fix-update.go:298 +0x1078
github.com/bazelbuild/bazel-gazelle/walk.Walk.func1(0xc00070f340, {0xc000d84540, 0x34}, {0xc0005b61b0, 0x14}, 0x1)
        external/bazel_gazelle/walk/walk.go:179 +0x5df
github.com/bazelbuild/bazel-gazelle/walk.Walk.func1(0xc0000f36b0, {0xc000816ab0, 0x24}, {0xc000989ce0, 0x4}, 0x1)
        external/bazel_gazelle/walk/walk.go:172 +0x7d0
github.com/bazelbuild/bazel-gazelle/walk.Walk.func1(0xc0000f36b0, {0xc00003f7c0, 0x1f}, {0x0, 0x0}, 0x0)
        external/bazel_gazelle/walk/walk.go:172 +0x7d0
github.com/bazelbuild/bazel-gazelle/walk.Walk(0xc0000f36b0, {0xc00004ca80?, 0x8, 0x8}, {0xc000363220, 0x1, 0x1}, 0x0, 0xc000121598)
        external/bazel_gazelle/walk/walk.go:182 +0x25a
main.runFixUpdate({0xc00004009a, 0x1f}, 0x7ffdae0d8dba?, {0xc0000320a0, 0x2, 0x2})
        external/bazel_gazelle/cmd/gazelle/fix-update.go:275 +0x6cb
main.run({0xc00004009a?, 0x1f?}, {0xc000032090?, 0x3?, 0x3?})
        external/bazel_gazelle/cmd/gazelle/gazelle.go:95 +0x1f3
main.main()
        external/bazel_gazelle/cmd/gazelle/gazelle.go:72 +0xdd
@pcj
Copy link
Member

pcj commented Dec 24, 2022

Thanks @mackenziestarr it's still early days, it should certainly not panic like this. Will fix.

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