You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "tatiana (via GitHub)" <gi...@apache.org> on 2025/05/07 14:03:28 UTC

[I] `airflow standalone` UI not displaying DAG import errors when `SIGSEGV` [airflow]

tatiana opened a new issue, #50303:
URL: https://github.com/apache/airflow/issues/50303

   ### Apache Airflow version
   
   3.0.0
   
   ### If "Other Airflow 2 version" selected, which one?
   
   _No response_
   
   ### What happened?
   
   The Airflow UI (when running `airflow standalone`) and `airflow dags list-import-errors` currently do not display the exception when a SIGSEGV happens.
   
   ### What you think should happen instead?
   
   I believe the Airflow UI (when running `airflow standalone`) and `airflow dags list-import-errors` should display the exception when ` SIGSEGV` happens.
   
   ### How to reproduce
   
   This was initially observed in
   
   An agnostic way to reproduce it, though, is:
   
   Create a `example_dag.py` in the DAGs folder with the following content:
   
   ```
   import signal
   import os
   
   os.kill(os.getpid(), signal.SIGSEGV)
   ```
   
   Run:
   ```
   airflow dag-processor
   ```
   
   Observe there is an error:
   ```
   dag-processor | [2025-05-07T14:50:52.962+0100] {manager.py:748} INFO -
   dag-processor | ================================================================================
   dag-processor | DAG File Processing Stats
   dag-processor | Bundle       File Path            PID    Current Duration      # DAGs    # Errors  Last Duration    Last Run At
   dag-processor | -----------  -------------------  -----  ------------------  --------  ----------  ---------------  -------------------
   dag-processor | dags-folder  example_dag.py                                    0           1  0.21s            2025-05-07T13:50:22
   
   ```
   
   Run:
   ```
   airflow standalone
   ```
   
   Open the Airflow UI via web browser:
   http://localhost:8080/dags
   
   And don't see any errors:
   
   ![Image](https://github.com/user-attachments/assets/c5945e84-718d-44b7-b68a-9343b9a0084d)
   
   Running:
   
   ```
   airflow dags list-import-errors
   ```
   
   Gives:
   
   ```
   No data found
   ```
   
   ### Operating System
   
   MacOS 15.4.1
   
   ### Versions of Apache Airflow Providers
   
   N/A
   
   ### Deployment
   
   Other
   
   ### Deployment details
   
   Local standalone
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
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.apache.org

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


Re: [I] Bug: `airflow standalone` UI not displaying DAG import errors when `SIGSEGV` happens [airflow]

Posted by "ephraimbuddy (via GitHub)" <gi...@apache.org>.
ephraimbuddy commented on issue #50303:
URL: https://github.com/apache/airflow/issues/50303#issuecomment-2916784082

   Reproduction:
   
   Run `airflow dag reserialize --bundle-name dags-folder` with the below file in dags folder:
   
   ```python
   import signal
   from airflow import DAG
   import os
   from airflow.decorators import task
   
   os.kill(os.getpid(), signal.SIGSEGV)
   
   with DAG('testbug'):
       @task
       def mytask():
           print(1)
       mytask()
   ```


-- 
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


Re: [I] Bug: `airflow standalone` UI not displaying DAG import errors when `SIGSEGV` happens [airflow]

Posted by "ephraimbuddy (via GitHub)" <gi...@apache.org>.
ephraimbuddy commented on issue #50303:
URL: https://github.com/apache/airflow/issues/50303#issuecomment-2916778310

   This issue is caused by a segmentation fault disrupting the DAG file [loading process](https://github.com/apache/airflow/blob/7fa85e2b4ea09084e40f2dbf09342ff7c96c3e40/airflow-core/src/airflow/models/dagbag.py#L382). When it occurs, the process exits immediately.
   
   Since segmentation faults cannot be caught with try...except, one viable solution would be to load DAG file modules in a subprocess. However, I'm thinking this might increase the time it takes to process each file.
   Wdyt, @jedcunningham?
   
   


-- 
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


Re: [I] Bug: `airflow standalone` UI not displaying DAG import errors when `SIGSEGV` happens [airflow]

Posted by "ephraimbuddy (via GitHub)" <gi...@apache.org>.
ephraimbuddy closed issue #50303: Bug: `airflow standalone` UI not displaying DAG import errors when `SIGSEGV` happens
URL: https://github.com/apache/airflow/issues/50303


-- 
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