Replies: 1 comment 1 reply
-
Likely bad combination of packages. And combination of bugs in c-code of mysql - it's known to cause issues and LD_PRELOAD is the recommended solution. I think loosing time on analysing root cause of c-libraries clashing with each other is genrally a wasted effort. You can raise the issue to mysql - BTW . We are considering dropping MysQL as supported backend in Airflow 3 because od a number of problems like this - so I recommend to use Postgres. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
ImportError: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: cannot allocate memory in static TLS block
I faced this issue while performing airflow db upgrade in my setup: airflow 2.9.2, python 3.12, ubuntu 22.04, mysql-server 8.4.0
LD preload solution as described in the linked issue did solve the issue, but so did importing the package MySQLdb before anything else by adding an import line in ./py_env/bin/airflow file
Placing the import line after 'import main' caused the issue again. So thinking it is a possible package issue, I did a binary search to find that 're2' package is related to the issue.
This causes the issue
![image](https://private-user-images.githubusercontent.com/3456652/344429017-26054137-e0f7-42f2-90bd-b5e07ae434de.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAzODE1MjksIm5iZiI6MTcyMDM4MTIyOSwicGF0aCI6Ii8zNDU2NjUyLzM0NDQyOTAxNy0yNjA1NDEzNy1lMGY3LTQyZjItOTBiZC1iNWUwN2FlNDM0ZGUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcwNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MDdUMTk0MDI5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ODc1ZjNjNDRmNWIxM2ZiNTg0NTMyMDYxM2VkOWRhYjFiMjlkMDczMTJlZDlkM2VkZDI1ZDg0YTFiYTJlYmY1OCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.RAKzHgaZXkNx20X3TMUYnsO-ybhKNljL3zQrIFFiLI0)
and this doesn't
![image](https://private-user-images.githubusercontent.com/3456652/344429013-74efb00e-8091-416d-b075-759ee2be8d29.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAzODE1MjksIm5iZiI6MTcyMDM4MTIyOSwicGF0aCI6Ii8zNDU2NjUyLzM0NDQyOTAxMy03NGVmYjAwZS04MDkxLTQxNmQtYjA3NS03NTllZTJiZThkMjkucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcwNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MDdUMTk0MDI5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NTZhMzY5Mjk2YWYyNjAwYmI2ZjJlNmNiOTY4NWNmMzJlMTczMGUzNmE2NDZhZGYxOWU4ZGI1OWM2MzA5YjNlMCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.qZuYs_92ORkwzFR_HuxQlvbkjFLu6G4G-ke1gyx568Q)
Package version google-re2==1.1.20240601 is the version installed after applying constraints. Downgrading it to google-re2==1.1 resolved the issue.
Can I assume it is this package that's causing the issue? Or is it due to some buggy library? I did install many libraries to build mysqlclient wheel (libmysqlclient-dev python3-dev libmysqlclient21 default-libmysqlclient-dev build-essential gcc)
Funny thing is, when i recreated this environment on ubuntu 20.04 with mysql-server 8.0.37, this libstdc++ issue never occurred even with google-re2==1.1.20240601 installed. Does this mean mysql 8.4.0 is the culprit?
Also, the docs say mysql 8.0 and innovation are supported versions, does 8.4.0 LTS not come under this? I didn't totally understand what they said in the oracle link in the docs about innovation. They say 8.x is all innovation.
google re 1.1.20240601 is an equality constraint. Can I use 1.1 here? Or is it better to simply go for hackish import way. Or should i downgrade mysql?
Summary picture:-
![image](https://private-user-images.githubusercontent.com/3456652/344429920-52c01f7d-3b8c-4bf9-a09f-ffa9ffb41c03.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAzODE1MjksIm5iZiI6MTcyMDM4MTIyOSwicGF0aCI6Ii8zNDU2NjUyLzM0NDQyOTkyMC01MmMwMWY3ZC0zYjhjLTRiZjktYTA5Zi1mZmE5ZmZiNDFjMDMucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcwNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MDdUMTk0MDI5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9OWZlNTI4YzdjMmQ1MTdkOWExZDIzOGFkZDNlN2E0ZGYzODg2NGFhNTFlNmQyMTYxYTVkNzJiMTBjZDcxODU0OSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.Mzyy_KU_cUc0wjDq3v078KgCUCY4IeTc4dzJhrJcjhA)
Originally posted by @lssatvik in #17546 (comment)
Beta Was this translation helpful? Give feedback.
All reactions