You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/08/12 15:28:36 UTC

[GitHub] [airflow] potiuk edited a comment on issue #17546: ImportError: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: cannot allocate memory in static TLS block

potiuk edited a comment on issue #17546:
URL: https://github.com/apache/airflow/issues/17546#issuecomment-896803730


   Looking at the workaround, I don't think there is a `8.0.19` version of mysql client for `buster` (debian10) debian. The last one I could find was `8.0.20` http://repo.mysql.com/apt/debian/pool/mysql-8.0/m/mysql-community/ 
   
   However, the issue looks slightly differently than the one from Ubuntu.
   
   ```
   readelf --dynamic libmysqlclient.so.21.1.25 | grep BIND
   ```
   
   Produces no output, and this was one of the indications,  there is a problem. It might be that there is another library involved (and mysql lib version has nothing to do with it - seems that this might be a problem with other libraries and I believe, since we are at .25 now, Oracle should have fixed the problem already).
   
   I think @JavierLopezT  if you could try two workarounds, that would be great - we could see if one of them works.
   
   ## 1. Upgrade to latest version of mysqlclient
   
   Try LATEST version of the mysqlclient. Oracle released .26 version in July, and even if I had not seen any related changes in the changelog, it might also upgrade some related libraries. The nice thing about it is that if this works, then 2.1.3 will automatically include that latest client and will fix the problem automatically. 
   
   You just need to build a new docker image with this Dockerfile:
   
   ```
   FROM apache/airflow:2.1.2
   USER root
   RUN apt-get update \
     && apt-get install -y --no-install-recommends \
           libmysqlclient21=8.0.26-1debian10  \
     && apt-get autoremove -yqq --purge \
     && apt-get clean \
     && rm -rf /var/lib/apt/lists/*
   USER airflow
   ```
   Run `docker build . -t apache/airflow:2.1.2-upgraded-libmysqlclient` and you can swap your image to use the new tag `2.1.2-upgraded-libmysqlclient`
   
   <details>
     <summary>This is what gets installed when I try it!</summary>
   
   ```
   (Reading database ... 9950 files and directories currently installed.)
   Preparing to unpack .../0-mysql-client_8.0.26-1debian10_amd64.deb ...
   Unpacking mysql-client (8.0.26-1debian10) over (8.0.25-1debian10) ...
   Preparing to unpack .../1-libmysqlclient21_8.0.26-1debian10_amd64.deb ...
   Unpacking libmysqlclient21:amd64 (8.0.26-1debian10) over (8.0.25-1debian10) ...
   Preparing to unpack .../2-mysql-community-client_8.0.26-1debian10_amd64.deb ...
   Unpacking mysql-community-client (8.0.26-1debian10) over (8.0.25-1debian10) ...
   Preparing to unpack .../3-mysql-community-client-core_8.0.26-1debian10_amd64.deb ...
   Unpacking mysql-community-client-core (8.0.26-1debian10) over (8.0.25-1debian10) ...
   Preparing to unpack .../4-mysql-community-client-plugins_8.0.26-1debian10_amd64.deb ...
   Unpacking mysql-community-client-plugins (8.0.26-1debian10) over (8.0.25-1debian10) ...
   Preparing to unpack .../5-mysql-common_8.0.26-1debian10_amd64.deb ...
   Unpacking mysql-common (8.0.26-1debian10) over (8.0.25-1debian10) ...
   Setting up mysql-common (8.0.26-1debian10) ...
   Setting up mysql-community-client-plugins (8.0.26-1debian10) ...
   Setting up libmysqlclient21:amd64 (8.0.26-1debian10) ...
   Setting up mysql-community-client-core (8.0.26-1debian10) ...
   Setting up mysql-community-client (8.0.26-1debian10) ...
   Setting up mysql-client (8.0.26-1debian10) ...
   Processing triggers for libc-bin (2.28-10) ...
   ```  
   </details>
   
   ## 2. Set LD_PRELOAD env variable
   
   One of the workarounds in the issue pointed by @uranusjr was to set LD_PRELOAD flag to preload libstdc++ library. It's a bit tricky to set it just for airflow, but in order to test it, it's enough to have it set "globally" for the whole container. This will slow down loading of executable files a bit, but at least we will be able to see if it helps.
   
   ```
   LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6
   ```
   
   If that works, we can think of a "proper" solution - but would be nice to see if it works.
    
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org