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

dd-trace segfaults :( #4556

Closed
sualehasif opened this issue Sep 7, 2023 · 9 comments
Closed

dd-trace segfaults :( #4556

sualehasif opened this issue Sep 7, 2023 · 9 comments
Labels
bug Something isn't working

Comments

@sualehasif
Copy link

sualehasif commented Sep 7, 2023

What version of Bun is running?

v0.8.1

What platform is your computer?

Darwin 22.4.0 arm64 arm

What steps can reproduce the bug?

https://www.npmjs.com/package/dd-trace causes a dyld segfault. minimal reproduction:

import { tracer, TracerOptions } from 'dd-trace';
const tracerOptions = {
	logInjection: true,
	profiling: true,
	sampleRate: 1,
	plugins: true,
	service: 'server',
	runtimeMetrics: true,
} as TracerOptions;
tracer.init(tracerOptions);


function main() {
	console.log("Hello world!");
}

main();

What is the expected behavior?

➜  server bun src/test.ts
[0.06ms] ".env"
Hello world!

What do you see instead?

[0.06ms] ".env"
dyld[53763]: missing symbol called
/Users/sualeh/Library/pnpm/bun: line 13: 53763 Killed: 9               "$basedir/global/5/node_modules/bun/bin/bun" "$@"```

Additional information

probably datadog's fault. unclear how to resolve easily

@sualehasif sualehasif added the bug Something isn't working label Sep 7, 2023
@weyert
Copy link
Contributor

weyert commented Sep 7, 2023

Yeah, neither does the OpenTelemetry packages work for me

@birkskyum
Copy link
Collaborator

birkskyum commented Sep 7, 2023

Hmm, when I run the repro I get the "Hello world" response with both 0.8.1 and latest canary, on similar hardware. @weyert , can you make a repro for the OpenTelemetry?

@sualehasif
Copy link
Author

hmm, I am currently on:
"dd-trace": "^4.8.1",

@weyert
Copy link
Contributor

weyert commented Sep 7, 2023

There already is #4333 and #4548 for my work's usage of OpenTelemetry. But I will work on a repro

@birkskyum
Copy link
Collaborator

@sualehasif , that makes the difference in my setup. 4.8.1 breaks, whereas the latest 4.14.x works.

@sualehasif
Copy link
Author

yup this is true! 4.14.x works!

@weyert
Copy link
Contributor

weyert commented Sep 8, 2023

@birkskyum My reproduction for OpenTelemetry: https://github.com/weyert/bun-opentelemetry

@maschwenk
Copy link

@sualehasif It no longer segfaults for me but I get no tracing/metrics at all. To be expected I suppose, I'm guessing dd-trace digs into a lot of low-level Node APIs that aren't supported.

@xenyal
Copy link

xenyal commented Apr 5, 2024

@maschwenk dd-trace relies on dgram, you can track bun's support for it here: #1630

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

5 participants