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

[BUG] interface conversion: interface {} is *orchestrion.contextStack, not *orchestrion.contextStack (types from different packages) #520

Open
cwouter opened this issue Jan 30, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@cwouter
Copy link

cwouter commented Jan 30, 2025

Version of orchestrion
Tried: 1.0.2, 1.0.3 and 1.0.4

Describe what happened:
Application was built using orchestrion in Docker:
orchestrion go build -mod=readonly -ldflags='-s -w' -o /app/bin/main ./cmd/${APP_NAME}

We receive the following error message at runtime:
Image

// init of fiber framework
app := fiber.New(fiber.Config{
		JSONEncoder: jsoniter.Marshal,
		JSONDecoder: jsoniter.Unmarshal,
		AppName:     appName,
	})

Downgrading to dd-trace-go v.1 fixes the issue.

Describe what you expected:
No error message :) Or at least an error message during build time

Steps to reproduce the issue:
I assume.. build and run dd-trace-go v2 with orchestrion and fiber

Additional environment details (Version of Go, Operating System, etc.):
Go 1.23

github.com/gofiber/fiber/v2 v2.52.6
github.com/DataDog/dd-trace-go/v2 v2.0.0-rc.2
github.com/DataDog/dd-trace-go/contrib/gofiber/fiber.v2/v2 v2.0.0-rc.2
github.com/DataDog/orchestrion v1.0.2

@cwouter cwouter added the bug Something isn't working label Jan 30, 2025
@RomainMuller
Copy link
Contributor

Hey!

This is a side-effect of using github.com/DataDog/dd-trace-go/v2 together with orchestrion, which injects using gopkg.in/DataDog/dd-trace-go.v1... and there is currently a conflict with access to the goroutine local storage (which is enabled by orchestrion).

We are looking into this...

RomainMuller added a commit to DataDog/dd-trace-go that referenced this issue Jan 30, 2025
Current GLS accessors for V1 and V2 conflict because they use the same
slot to store different value types. Renaming those accessors means
orchestrion will stop populating the accessors for V2, which will
address the crasher reported at DataDog/orchestrion#520
RomainMuller added a commit to DataDog/dd-trace-go that referenced this issue Jan 30, 2025
Current GLS accessors for V1 and V2 conflict because they use the same slot to store different value types. Renaming those accessors means orchestrion will stop populating the accessors for V2, which will address the crasher reported at DataDog/orchestrion#520
@RomainMuller
Copy link
Contributor

Alright - it should no longer crash if you run

go get github.com/DataDog/dd-trace-go/[email protected]

We will be releasing v2.0.0-rc.3 in the coming few days with this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants