snowflake-connector-python icon indicating copy to clipboard operation
snowflake-connector-python copied to clipboard

SNOW-581527: fetch_pandas_all failing with `Segmentation fault: 11` on TRANSIENT tables.

Open voropaevp opened this issue 2 years ago • 2 comments

Please answer these questions before submitting your issue. Thanks!

  1. What version of Python are you using?

Python 3.9.12 (main, Apr 5 2022, 01:53:17) [Clang 12.0.0 ]

  1. What operating system and processor architecture are you using?

macOS-10.16-x86_64-i386-64bit

  1. What are the component versions in the environment (pip freeze)?

    Replace with the output of python -m pip freeze

  2. What did you do?

  create or replace TRANSIENT table ML_DEMO.test (s number);
  insert into ML_DEMO.TEST values (1) ;
ctx = snowflake.connector.connect(**props)
cur = ctx.cursor()
sql = "select * from ANALYTICS_DEV_DB.ML_DEMO.test"
cur.execute(sql)
df = cur.fetch_pandas_all()
  1. What did you expect to see?

pd.DataFrame object instead I got

Segmentation fault: 11

  1. Can you set logging to DEBUG and collect the logs?

    ...: df = cur.fetch_pandas_all()
    

2022-04-25 12:20:15,697 - MainThread cursor.py:616 - execute() - DEBUG - executing SQL/command 2022-04-25 12:20:15,697 - MainThread cursor.py:654 - execute() - DEBUG - binding: [select * from ANALYTICS_DEV_DB.ML_DEMO.test] with input=[None], processed=[{}] 2022-04-25 12:20:15,697 - MainThread cursor.py:700 - execute() - INFO - query: [select * from ANALYTICS_DEV_DB.ML_DEMO.test] 2022-04-25 12:20:15,697 - MainThread connection.py:1252 - _next_sequence_counter() - DEBUG - sequence counter: 1 2022-04-25 12:20:15,698 - MainThread cursor.py:447 - _execute_helper() - DEBUG - Request id: 28f1e3f8-61d2-4f5a-a41c-deea4a8200f7 2022-04-25 12:20:15,698 - MainThread cursor.py:450 - _execute_helper() - DEBUG - running query [select * from ANALYTICS_DEV_DB.ML_DEMO.test] 2022-04-25 12:20:15,698 - MainThread cursor.py:459 - _execute_helper() - DEBUG - is_file_transfer: False 2022-04-25 12:20:15,698 - MainThread connection.py:923 - cmd_query() - DEBUG - _cmd_query 2022-04-25 12:20:15,698 - MainThread connection.py:946 - cmd_query() - DEBUG - sql=[select * from ANALYTICS_DEV_DB.ML_DEMO.test], sequence_id=[1], is_file_transfer=[False] 2022-04-25 12:20:15,702 - MainThread network.py:1120 - _use_requests_session() - DEBUG - Session status for SessionPool 'yu83095.eu-west-1.snowflakecomputing.com', SessionPool 1/1 active sessions 2022-04-25 12:20:15,702 - MainThread network.py:826 - _request_exec_wrapper() - DEBUG - remaining request timeout: None, retry cnt: 1 2022-04-25 12:20:15,703 - MainThread network.py:807 - add_request_guid() - DEBUG - Request guid: 682bbf93-d0f7-432c-90a0-3d60af729c6f 2022-04-25 12:20:15,703 - MainThread network.py:976 - _request_exec() - DEBUG - socket timeout: 60 2022-04-25 12:20:15,792 - MainThread connectionpool.py:452 - _make_request() - DEBUG - https://MYREGION.snowflakecomputing.com:443 "POST /queries/v1/query-request?requestId=28f1e3f8-61d2-4f5a-a41c-deea4a8200f7&request_guid=682bbf93-d0f7-432c-90a0-3d60af729c6f HTTP/1.1" 200 1328 2022-04-25 12:20:15,793 - MainThread network.py:1005 - _request_exec() - DEBUG - SUCCESS 2022-04-25 12:20:15,793 - MainThread network.py:1125 - _use_requests_session() - DEBUG - Session status for SessionPool 'yu83095.eu-west-1.snowflakecomputing.com', SessionPool 0/1 active sessions 2022-04-25 12:20:15,793 - MainThread network.py:714 - _post_request() - DEBUG - ret[code] = None, after post request 2022-04-25 12:20:15,793 - MainThread network.py:738 - _post_request() - DEBUG - Query id: 01a3d788-3201-920d-0001-1262002dc772 2022-04-25 12:20:15,794 - MainThread cursor.py:722 - execute() - DEBUG - sfqid: 01a3d788-3201-920d-0001-1262002dc772 2022-04-25 12:20:15,794 - MainThread cursor.py:724 - execute() - INFO - query execution done 2022-04-25 12:20:15,794 - MainThread cursor.py:726 - execute() - DEBUG - SUCCESS 2022-04-25 12:20:15,794 - MainThread cursor.py:729 - execute() - DEBUG - PUT OR GET: None 2022-04-25 12:20:15,794 - MainThread cursor.py:826 - _init_result_and_meta() - DEBUG - Query result format: arrow 2022-04-25 12:20:15,794 - MainThread arrow_iterator.cpython-39-darwin.so:0 - cinit() - DEBUG - Batches read: 1 2022-04-25 12:20:15,794 - MainThread CArrowIterator.cpp:16 - CArrowIterator() - DEBUG - Arrow BatchSize: 1 Segmentation fault: 11


<!--
If you need urgent assistance reach out to support for escalated issue processing https://community.snowflake.com/s/article/How-To-Submit-a-Support-Case-in-Snowflake-Lodge
-->

voropaevp avatar Apr 25 '22 11:04 voropaevp

I have the same issue.

MareoRaft avatar May 23 '22 17:05 MareoRaft

@voropaevp We were able to fix the issue by installing the pandas-compatible version of the Snowflake Connector. So we did

pip install "snowflake-connector-python[pandas]"

in bash. We decided to try this after reading the documentation here: https://docs.snowflake.com/en/user-guide/python-connector-pandas.html#installation

MareoRaft avatar May 23 '22 17:05 MareoRaft

To clean up and re-prioritize bugs and feature requests we are closing all issues older than 6 months as of March 1, 2023. If there are any issues or feature requests that you would like us to address, please re-create them. For urgent issues, opening a support case with this link Snowflake Community is the fastest way to get a response

github-actions[bot] avatar Mar 10 '23 02:03 github-actions[bot]