Random Segfaults?
alice-comfy opened this issue · 2 comments
What language are you using?
Python
What version are you using?
0.3.2
What database are you using?
PostgresQL
What dataframe are you using?
Pandas
Can you describe your bug?
Working query randomly segfaults, happens across various DBs and on various OSes. It seems to be less common running in Jupyter on my DB server than on my MacBook.
What are the steps to reproduce the behavior?
(the cx str function just returns a constant to connect to the db).
conns = dbcon.get_cx_str()
q = r"""with source as (
SELECT sym, close, time, lag(close, 1) OVER (partition by sym order by time) as ydayclose, avg(close) OVER (partition by SYM ORDER BY time ROWS BETWEEN 199 PRECEDING AND 1 PRECEDING) as ma200 from adjusted_eod_data where time > '2022-01-01' )
SELECT * FROM source"""
df = cx.read_sql(conn = conns, query=q)
Database setup if the error only happens on specific data or data type
The table returned by the above query looks like this
I have the timescaledb extension on my postgres setup. I don't have any other DBs to try with, but it occurs for a variety of queries, both big ones and smaller.
Example query / code
Already shown above.
What is the error?
On the command line I get 'segfault', on Jupyter it will give a
19:55:12.646 [info] Kernel acknowledged execution of cell 7 @ 1707422112645
19:55:12.653 [info] End cell 7 execution after 0.008s, completed @ 1707422112653, started @ 1707422112645
19:55:43.550 [info] Handle Execution of Cells 0,1,2,3,4,5,6,7,8 for ~/quant-notebooks/equal weight.ipynb
19:56:11.653 [info] Kernel acknowledged execution of cell 0 @ 1707422171652
19:56:51.249 [error] Disposing session as kernel process died ExitCode: undefined, Reason:
19:56:51.249 [info] Dispose Kernel process 870714.