8000 DuckDB crashes on executing SQL-query · Issue #17311 · duckdb/duckdb · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

DuckDB crashes on executing SQL-query #17311

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

Closed
2 tasks
saygoodbyye opened this issue Apr 30, 2025 · 0 comments · Fixed by #17320
Closed
2 tasks

DuckDB crashes on executing SQL-query #17311

saygoodbyye opened this issue Apr 30, 2025 · 0 comments · Fixed by #17320

Comments

@saygoodbyye
Copy link

What happens?

DuckDB crashes with this error:

Catalog Error:
Type with name varbit does not exist!
Did you mean "varint"?
Segmentation fault

To Reproduce

To reproduce to these:

  1. Create test.sql:
WITH RECURSIVE t(n) AS (
    VALUES ('01'::varbit)
UNION
    SELECT n || '10'::varbit FROM t WHERE n < '100'::varbit
)
SELECT n FROM t;

CREATE RECURSIVE VIEW nums (n) AS
    VALUES (1)
UNION ALL
    SELECT n+1 FROM nums WHERE n < 5;
  1. Perform command:
./duckdb/build/release/duckdb < test.sql
  1. Get backtrace:
#0  0x000055f633bd3e5e in duckdb::Transformer::TransformCTE(duckdb_libpgquery::PGWithClause&, duckdb::CommonTableExpressionMap&) ()
#1  0x000055f633be5ae0 in duckdb::Transformer::TransformSelectInternal(duckdb_libpgquery::PGSelectStmt&) ()
#2  0x000055f633be6395 in duckdb::Transformer::TransformSelectNodeInternal(duckdb_libpgquery::PGSelectStmt&, bool) ()
#3  0x000055f633be63e8 in duckdb::Transformer::TransformSelectNode(duckdb_libpgquery::PGNode&, bool) ()
#4  0x000055f633be69c5 in duckdb::Transformer::TransformSelectStmt(duckdb_libpgquery::PGNode&, bool) ()
#5  0x000055f633be7329 in duckdb::Transformer::TransformCreateView(duckdb_libpgquery::PGViewStmt&) ()
#6  0x000055f63349a305 in duckdb::Transformer::TransformStatementInternal(duckdb_libpgquery::PGNode&) ()
#7  0x000055f63349a50f in duckdb::Transformer::TransformStatement(duckdb_libpgquery::PGNode&) ()
#8  0x000055f63349a49f in duckdb::Transformer::TransformStatementInternal(duckdb_libpgquery::PGNode&) ()
#9  0x000055f63349a50f in duckdb::Transformer::TransformStatement(duckdb_libpgquery::PGNode&) ()
#10 0x000055f63349a5cd in duckdb::Transformer::TransformParseTree(duckdb_libpgquery::PGList*, duckdb::vector<duckdb::unique_ptr<duckdb::SQLStatement, std::default_delete<duckdb::SQLStatement>, true>, true>&) ()
#11 0x000055f63349bbeb in duckdb::Parser::ParseQuery(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
#12 0x000055f63348655c in duckdb_shell_sqlite3_prepare_v2 ()
#13 0x000055f633474611 in duckdb_shell::ShellState::ExecuteSQL(char const*, char**) ()
#14 0x000055f63347527a in duckdb_shell::ShellState::RunOneSqlLine(char*) ()
#15 0x000055f6334758c3 in duckdb_shell::ShellState::ProcessInput() ()
#16 0x000055f63345a4c0 in main ()
test@debian-12:~$ ./duckdb/build/release/duckdb -version
v1.3.0-dev2743 0069af20ab

OS:

debian-12

DuckDB Version:

v1.3.0-dev2743 0069af2

DuckDB Client:

CLI

Hardware:

No response

Full Name:

Egor Chindyaskin

Affiliation:

Postgres Professional

What is the latest build you tested with? If possible, we recommend testing with the latest nightly build.

I have tested with a source build

Did you include all relevant data sets for reproducing the issue?

Yes

Did you include all code required to reproduce the issue?

  • Yes, I have

Did you include all relevant configuration (e.g., CPU architecture, Python version, Linux distribution) to reproduce the issue?

  • Yes, I have
Mytherin added a commit to Mytherin/duckdb that referenced this issue May 1, 2025
Mytherin added a commit that referenced this issue May 1, 2025
krlmlr added a commit to duckdb/duckdb-r that referenced this issue May 18, 2025
Fix duckdb/duckdb#17311: correctly check for presence of recursive keys in transformer (duckdb/duckdb#17320)
krlmlr added a commit to duckdb/duckdb-r that referenced this issue May 18, 2025
Fix duckdb/duckdb#17311: correctly check for presence of recursive keys in transformer (duckdb/duckdb#17320)
krlmlr added a commit to duckdb/duckdb-r that referenced this issue May 19, 2025
Fix duckdb/duckdb#17311: correctly check for presence of recursive keys in transformer (duckdb/duckdb#17320)
krlmlr added a commit to duckdb/duckdb-r that referenced this issue May 19, 2025
Fix duckdb/duckdb#17311: correctly check for presence of recursive keys in transformer (duckdb/duckdb#17320)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
0