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
DuckDB crashed in duckdb::Utf8Proc::Analyze at third_party/utf8proc/utf8proc_wrapper.cpp:74 #7348
Comments
Seems that cannot reproduce on the latest branch: 97f3f09 |
A little bit strange, it seems only reproducible when compiling with -DCMAKE_BUILD_TYPE=Debug. My steps in bash are the following: git clone https://github.com/duckdb/duckdb.git duckdb_97f3f09
cd duckdb_97f3f09/
git checkout 97f3f09
mkdir bld
cd bld/
cmake .. -DCMAKE_BUILD_TYPE=Debug
make -j20
echo "BEGIN;
CREATE TABLE t1(a VARCHAR(256) PRIMARY KEY, b INTEGER) WITH (storage_parameter='heap');
INSERT INTO t1 VALUES(' 4-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', 2+1);
INSERT INTO t1 VALUES(' 34-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', 18);
INSERT INTO t1 SELECT b, b+1 FROM t1 WHERE b<5;
UPDATE t1 SET a = CONCAT(a, 'x') WHERE b%2=0;" | ./duckdb |
I can reproduce it in the latest branch. Did you try debug build with asan? Minimal reproduction:
The problem is it tried to delete 2nd and 4th tuple and reinsert, but the scan only returns the 1st and 2nd tuple, and then it tries to access 4th tuple, which is an invalid address. |
I have read the code and the problem seems to be at It just use the row group that includes May be we need to loop through all row group that includes |
…y account for the case where the row identifiers might not all be present in the same row group
Thanks for the report! I have pushed a fix in #7442. Indeed the issue is that the The fix is to correctly check if the tuples are present in the current row group, and fetch the next row group if required. |
Fix #7348 - In RowGroupCollection::RemoveFromIndexes - correctly account for the case where the row identifiers might not all be present in the same row group
What happens?
The DuckDB binary (
/usr/local/bin/duckdb
) crashed induckdb::Utf8Proc::Analyze
atthird_party/utf8proc/utf8proc_wrapper.cpp:74
.To Reproduce
PoC:
ASAN report:
OS:
Ubuntu 20.04 64bit
DuckDB Version:
v0.7.2-dev2867 aa20f17
DuckDB Client:
Binary (/usr/local/bin/duckdb)
Full Name:
Jingzhou Fu
Affiliation:
Wingtecher Lab of Tsinghua University
Have you tried this on the latest
master
branch?Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?
The text was updated successfully, but these errors were encountered: