One goofy SELECT can freeze the computer hard

オープン
#29 コメント 0 件 リアクション 2 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
java, sql
領域
databases

調査の方向性

ソースファイルもテストも指定されていません。まず、JDBC 経由で LIMIT 10 ありとなしの無制限のクロス結合を再現し、その後、ドライバーがメモリ制限をどのように扱うかを調べてください。完了の基準は、ホストをフリーズさせることなく、動作が制限されるか安全に失敗し、報告されたクエリに対するリグレッションカバレッジがあることです。

索引モデルが issue の本文から書いたものです。

説明

Greetings!

I do understand well the memory constraints and what happens when you cross-multiply large tables. I also understand, that DuckDB gives the power to its user to set the memory correctly. So far so good.

However, I just froze my linux machine -- twice! -- by running an unlimited cross select -- and I feel like this should not happen, especially when running in/from a Java environment (although its just a JNI bridge really).

Example is Amazon Redshift's TickDB:

are@ryzen ~ [1]> duckdb Documents/JSQLTranspiler/.manticore/JSQLTranspilerTest.duckdb 
v0.10.3 70fd6a8a24
Enter ".help" for usage hints.
D select count(*) from sales
  ;
┌──────────────┐
│ count_star() │
│    int64     │
├──────────────┤
│       172456 │
└──────────────┘

D select count(*) from listing;
┌──────────────┐
│ count_star() │
│    int64     │
├──────────────┤
│       192497 │
└──────────────┘

If I run the following statement via JDBC, my computer freezes hard. I can't even get to the terminal or login via SSH:

SELECT  numtickets
        , priceperticket
        , totalprice
        , listtime
FROM sales
    , listing
-- LIMIT 10
;

Activating the LIMIT 10 of course remedies the situation.

Now I wonder: Why would it freeze like that instead of obeying the available memory and/or why would the JDBC call not set a safety DuckDB memory limit (e.g. based on -Xmx as a good benchmark figure)?

主要言語
C++
スター
129
フォーク
90
平均マージ
5時間 34分
マージ済み PR(30日)
56

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

duckdb/duckdb-java のほかの issue

duckdb/duckdb-java の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。