Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

comm_subplan_elim segfault on main StackOverflow #15345

Closed
2 tasks done
cmdlineluser opened this issue Mar 27, 2024 · 3 comments · Fixed by #15593
Closed
2 tasks done

comm_subplan_elim segfault on main StackOverflow #15345

cmdlineluser opened this issue Mar 27, 2024 · 3 comments · Fixed by #15593
Assignees
Labels
A-other Area: not covered by other areas accepted Ready for implementation bug Something isn't working P-low Priority: low python Related to Python Polars

Comments

@cmdlineluser
Copy link
Contributor

cmdlineluser commented Mar 27, 2024

Checks

  • I have checked that this issue has not already been reported.
  • I have confirmed this bug exists on the latest version of Polars.

Reproducible example

import polars as pl

lf = pl.LazyFrame({"A": []})

lf = pl.concat([lf] * 8192)

lf.with_columns(1).collect(comm_subplan_elim=True) # default, but works with False 
# zsh: segmentation fault

Log output

found multiple sources; run comm_subplan_elim

Issue description

I guess this is related to the new CSE work.

It only seems to trigger for >= 8192

Expected behavior

No segfault.

Installed versions

main
@cmdlineluser cmdlineluser added bug Something isn't working needs triage Awaiting prioritization by a maintainer python Related to Python Polars labels Mar 27, 2024
@mcrumiller
Copy link
Contributor

mcrumiller commented Mar 28, 2024

My segfaults do start at lf = pl.concat([lf] * 12289) however. Any thing less succeeds.

import polars as pl
lf = pl.LazyFrame({"A": []})
lf = pl.concat([lf] * 12888)
lf.with_columns(1).collect(comm_subplan_elim=True)
# shape: (0, 2)
# ┌──────┬─────────┐
# │ A    ┆ literal │
# │ ---  ┆ ---     │
# │ null ┆ i32     │
# ╞══════╪═════════╡
# └──────┴─────────┘

lf = pl.LazyFrame({"A": []})
lf = pl.concat([lf] * 12889)
lf.with_columns(1).collect(comm_subplan_elim=True)
# Segmentation fault

@ritchie46 ritchie46 changed the title comm_subplan_elim segfault on main comm_subplan_elim segfault on main StackOverflow Mar 28, 2024
@ritchie46
Copy link
Member

This is a stack overflow. We hope to be able fix this properly by being able to set the stack on the heap if it grows too big, but it isn't easy.

@ritchie46
Copy link
Member

mostly fixed by #15355

@ritchie46 ritchie46 reopened this Mar 28, 2024
@stinodego stinodego added the P-low Priority: low label Mar 28, 2024
@stinodego stinodego removed the needs triage Awaiting prioritization by a maintainer label Mar 28, 2024
@github-project-automation github-project-automation bot moved this to Ready in Backlog Mar 28, 2024
@stinodego stinodego added the A-other Area: not covered by other areas label Mar 28, 2024
@stinodego stinodego moved this from Ready to In progress in Backlog Mar 28, 2024
@github-project-automation github-project-automation bot moved this from In progress to Done in Backlog Apr 11, 2024
@c-peters c-peters added the accepted Ready for implementation label Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-other Area: not covered by other areas accepted Ready for implementation bug Something isn't working P-low Priority: low python Related to Python Polars
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

6 participants