bazel-stack-vscode icon indicating copy to clipboard operation
bazel-stack-vscode copied to clipboard

bzl is segfaulting

Open jasonschroeder-sfdc opened this issue 2 years ago • 3 comments

Hi, I am trying to use bzl tool on macOS Ventura 13.2.1 but the CLI is segfault'ing. There's no additional information.

❯ ./bzl
[1]    38205 segmentation fault  ./bzl

The following versions are segfaulting (for me):

  • https://get.bzl.io/darwin_amd64/v1.4.12/bzl
  • https://get.bzl.io/darwin_amd64/v1.4.8/bzl
  • https://get.bzl.io/darwin_amd64/v1.4.7/bzl
  • https://get.bzl.io/darwin_amd64/v1.4.6/bzl
  • https://get.bzl.io/darwin_amd64/v1.3.19/bzl

I tried to run it under lldb but only get assembly:

❯ lldb bzl
(lldb) target create "bzl"
Current executable set to '/Users/jschroeder/Downloads/bzl' (x86_64).
(lldb) run
Process 14378 launched: '/Users/jschroeder/Downloads/bzl' (x86_64)
Process 14378 stopped
* thread #1, stop reason = EXC_BAD_ACCESS (code=1, address=0x7ff7bff072fc)
    frame #0: 0x000000000742abb1
->  0x742abb1: cmpl   $0x19, (%rsi)
    0x742abb4: jne    0x742abff
    0x742abb6: movq   0x20(%rsi), %r8
    0x742abba: testq  %r8, %r8
Target 0: (bzl) stopped.
(lldb) bt
* thread #1, stop reason = EXC_BAD_ACCESS (code=1, address=0x7ff7bff072fc)
  * frame #0: 0x000000000742abb1

jasonschroeder-sfdc avatar Mar 06 '23 05:03 jasonschroeder-sfdc

Hi @jasonschroeder-sfdc thanks for the report! Will try and repro. Is this an arm (m1) or intel-based processor?

pcj avatar Mar 07 '23 02:03 pcj

The testing above was done on an Intel MacBook pro laptop.

I've also tested the arm64 binary on my Mac Studio M1, and it crashes as well. Let me know if you would like a separate issue for that arm64, or I can add those details to the original post.

Cheers!

On Mon, Mar 6, 2023, 6:38 PM Paul Cody Johnston @.***> wrote:

Hi @jasonschroeder-sfdc https://github.com/jasonschroeder-sfdc thanks for the report! Will try and repro. Is this an arm (m1) or intel-based processor?

— Reply to this email directly, view it on GitHub https://github.com/stackb/bazel-stack-vscode/issues/122#issuecomment-1457412725, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFWGG6RCTGRL7K3QMLGO7LW22NQFANCNFSM6AAAAAAVQUY7WI . You are receiving this because you were mentioned.Message ID: @.***>

jasonschroeder-sfdc avatar Mar 07 '23 02:03 jasonschroeder-sfdc

Hi @pcj,

I see v1.4.16 has been released (https://get.bzl.io/darwin_arm64/bzl and https://get.bzl.io/darwin_amd64/bzl) and it doesn't crash 🎉 .

But I still cannot use it from within VS Code extension. When I set

"bsv.bzl.server.release": "v1.4.16"

in the VSCode Extension settings, then the following URLs fail with a 404

https://get.bzl.io/darwin_amd64/v1.4.16/bzl https://get.bzl.io/darwin_arm64/v1.4.16/bzl

Does something need to be updated on the download site? Thanks in advance!

UPDATE: I found that I could set "bsv.bzl.server.executable" to whatever binary I downloaded. So I'm unblocked 🎉

jasonschroeder-sfdc avatar Apr 13 '23 16:04 jasonschroeder-sfdc