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

System.DllNotFoundException runtime.initialization on Unity Headless Linux Server build #1730

Closed
AvinashP opened this issue Jul 19, 2024 · 3 comments · Fixed by #1748
Closed
Labels
Bug Something isn't working Linux

Comments

@AvinashP
Copy link

Environment

SaaS (https://sentry.io/)

Steps to Reproduce

  1. Make a Linux Head less server build
  2. Run the build in batch mode
  3. Check the exception
  4. 100% reproduction

Expected Result

There should not be any exception

Actual Result

Unable to load DLL 'sentry'. Tried the load the following dynamic libraries: Unable to load dynamic library 'sentry' because of 'Failed to open the requested dynamic library (0x06000000) dlerror() = sentry: cannot open shared object file: No such file or directory

https://lila-games.sentry.io/issues/5309961659/?alert_rule_id=15175631&alert_type=issue&notification_uuid=9280795c-2fed-49a1-b188-26887e77dee4&project=4507208985804800&referrer=slack

Product Area

Unknown

Link

https://lila-games.sentry.io/issues/5309961659/?alert_rule_id=15175631&alert_type=issue&notification_uuid=9280795c-2fed-49a1-b188-26887e77dee4&project=4507208985804800&referrer=slack

DSN

No response

Version

2.0.7

@getsantry
Copy link

getsantry bot commented Jul 19, 2024

Assigning to @getsentry/support for routing ⏲️

@dalnoki dalnoki transferred this issue from getsentry/sentry Jul 19, 2024
@bitsandfoxes
Copy link
Contributor

Hey @AvinashP, thanks for raising this! We'll look into it!

@bitsandfoxes bitsandfoxes added Linux Bug Something isn't working labels Jul 22, 2024
@tustanivsky
Copy link
Collaborator

tustanivsky commented Jul 25, 2024

Quick update regarding this issue:

Apparently, this behavior is specific to older Linux versions. Unity headless Linux server build works as expected on Ubuntu 22.04 but it throws the exception on startup as described above on Ubuntu 20.04
After enabling Load on startup option for libsentry.so that we provide along with other package binaries I've managed to get the following message in logs when attempting to run the build:

.../Plugins/libsentry.so, error: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found

It looks that there is a discrepancy between libs required to build libsentry.so in our CI and those that are available locally on the test machine. The CI build is running on ubuntu-latest (22.04) which yields the following GLIBC symbol dependencies for libsentry.so:

$ objdump -T libsentry.so | grep GLIBC_ | sed 's/.*GLIBC_\([.0-9]*\).*/\1/g' | sort -Vur
2.34
2.33
2.17
2.15
2.14
2.7
2.4
2.3.4
2.3.2
2.3
2.2.5

While on Ubuntu 20.04 we have:

$ strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBC_ | sed 's/.*GLIBC_\([.0-9]*\).*/\1/g' | sort -Vur
2.26
2.25
2.18
2.17
2.16
2.14
2.7
2.6
2.4
2.3.4
2.3.2
2.3
2.2.5

The potential workaround for this issue could be either updating to a newer Linux version to run server builds or installing missing dependencies on an older one.

@bitsandfoxes Alternatively, we can consider switching to ubuntu-20.04 GitHub runner to build sentry-native for Linux in CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Linux
Projects
Archived in project
Archived in project
3 participants