airflow icon indicating copy to clipboard operation
airflow copied to clipboard

ImportError: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: cannot allocate memory in static TLS block

Open lssatvik opened this issue 1 year ago • 0 comments

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

image

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

and this doesn't image

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

Originally posted by @lssatvik in https://github.com/apache/airflow/issues/17546#issuecomment-2198324967

lssatvik avatar Jun 30 '24 07:06 lssatvik