🎄 Happy Holidays! 🥳

Most of Solace is closed December 24–January 1 so our employees can spend time with their families. We will re-open Thursday, January 2, 2024. Please expect slower response times during this period and open a support ticket for anything needing immediate assistance.

Happy Holidays!

Please note: most of Solace is closed December 25–January 2, and will re-open Tuesday, January 3, 2023.

[Solace: solace.dev/go/messaging] Unable to run debug session when solace dependency is included

jaison
jaison Member Posts: 2

Hi All,

We are unable to run go debugger when we include the `solace.dev/go/messaging` dependency in Mac with intel processor. The same works fine on Mac with the M1 chipset. The issue can be reproduced with the following code snippet:

package main
import (
	"solace.dev/go/messaging"
)
func main() {
	println("Hello, World!")
	_ = messaging.NewMessagingServiceBuilder()
	println("Goodbye, World!")
}

go.mod file is as follows:

module solace-wrapper-sample

go 1.23.3

require solace.dev/go/messaging v1.7.0

go version: go1.23.3 darwin/amd64

debugger version:

Delve Debugger
Version: 1.22.0
Build: 88380654feb85c213d2bb60532d95be8d562c86e

The error we get:

GOROOT=/usr/local/opt/go/libexec #gosetup
GOPATH=/Users/<username>/go #gosetup
/usr/local/opt/go/libexec/bin/go build -o /Users/<username>/Library/Caches/JetBrains/IntelliJIdea2023.3/tmp/GoLand/___1go_build_solace_wrapper_sample_main -gcflags all=-N -l solace-wrapper-sample/main #gosetup
"/Users/<username>/Library/Application Support/JetBrains/IntelliJIdea2023.3/plugins/go-plugin/lib/dlv/mac/dlv" --listen=127.0.0.1:59695 --headless=true --api-version=2 --check-go-version=false --only-same-user=false exec /Users/<username>/Library/Caches/JetBrains/IntelliJIdea2023.3/tmp/GoLand/___1go_build_solace_wrapper_sample_main --
API server listening at: 127.0.0.1:59695
debugserver-@(#)PROGRAM:LLDB  PROJECT:lldb-1600.0.36.3
 for x86_64.
Got a connection, launched process /Users/<username>/Library/Caches/JetBrains/IntelliJIdea2023.3/tmp/GoLand/___1go_build_solace_wrapper_sample_main (pid = 97495).
2024-11-15T17:41:03+05:30 error layer=debugger error loading binary "/Users/<username>/Library/Caches/JetBrains/IntelliJIdea2023.3/tmp/GoLand/___1go_build_solace_wrapper_sample_main": error reading debug_info: decoding dwarf section info at offset 0x67577: DW_FORM_strx with no .debug_str_offsets section
Exiting.
could not launch process: error reading debug_info: decoding dwarf section info at offset 0x67577: DW_FORM_strx with no .debug_str_offsets section
^C
Debugger finished with the exit code 1

Is this a known issue? Is there any solution for this issue?

Best Answer

  • Aaron
    Aaron Member, Administrator, Moderator, Employee Posts: 644 admin
    #2 Answer ✓

    Hi @jaison, I reached out to our internal development team to find someone that had a Mac on Intel. They performed a bunch of testing and came back with:

    Could they try upgrading Delve to 1.23 to match the Go versions, and let us know how it works?

    Please give that a try!

Answers

  • Aaron
    Aaron Member, Administrator, Moderator, Employee Posts: 644 admin
    #3 Answer ✓

    Hi @jaison, I reached out to our internal development team to find someone that had a Mac on Intel. They performed a bunch of testing and came back with:

    Could they try upgrading Delve to 1.23 to match the Go versions, and let us know how it works?

    Please give that a try!

  • jaison
    jaison Member Posts: 2

    Hi @Aaron,

    I tried running a debug session with Delve version 1.23.1. It works with that version.
    We had earlier tried running it with Delve versions 1.20.1 & 1.22.0. With 1.22.0 it was working in the M1 chipset. But was only failing in Intel.

    Thanks for the response and support.

    A Note for future reference: I attempted go install github.com/go-delve/delve/cmd/dlv@latest once. It updated the delve version 1.23.1 but I still faced the issue. I removed dlv explicitly and run go clean -modcache and followed it with go install github.com/go-delve/delve/cmd/dlv@latest. After that, it started working.