Conversation
Benchmarks: TPC-H SF=10 on NVMESummary
Detailed Results Table
|
Benchmarks: FineWeb S3Summary
Detailed Results Table
|
Benchmarks: Statistical and Population GeneticsSummary
Detailed Results Table
|
Benchmarks: TPC-H SF=1 on S3Summary
Detailed Results Table
|
Benchmarks: TPC-H SF=10 on S3Summary
Detailed Results Table
|
Benchmarks: Clickbench on NVMESummary
Detailed Results Table
|
Benchmarks: PolarSignals ProfilingSummary
Detailed Results Table
|
Benchmarks: TPC-DS SF=1 on NVMESummary
Detailed Results Table
|
Benchmarks: FineWeb NVMeSummary
Detailed Results Table
|
Benchmarks: TPC-H SF=1 on NVMESummary
Detailed Results Table
|
Polar Signals Profiling ResultsLatest Run
Previous Runs (16)
Powered by Polar Signals Cloud |
1bbec73 to
11ada49
Compare
Benchmarks: Random AccessSummary
Detailed Results Table
|
Benchmarks: CompressionSummary
Detailed Results Table
|
|
Testing this change is tricky as 1.5 is not released, thus there are no artifacts. I'll open a patch to spin up our own building jobs and cache artifacts in own S3, so we could test pre-releases. |
^ Stacktrace for the segfault |
|
Looks like we're copying some wrong-sized memory region |
|
I believe the issue is in somewhere else. If I comment the specific copying code, it errors elsewhere: |
|
Full stacktrace: The segfault itself is trying to memcpy from an invalid string_t: both length This error reproduces from time to time. Our reproduction: LD_LIBRARY_PATH override as otherwise duckdb-bench uses copied libduckdb.so Asan build: Crashes occur only on vortex and vortex-compact Asan/ubsan build Tsan build Asan crash |
|
Sometimes I also get the following assertion in duckdb: |
|
When building with leak sanitizer, I also get the following stack trace: |
|
The segfault can be reproduced without vortex-bench, just running query 5 from tpc-ds given the pre-generated database by |
|
The simplest reproduction is |
|
Turns out we need to initialize columns for chunks that are not part of the projection to fix tpc-ds: |
|
What, why are they even reading unreferenced columns? |
|
Yah this seems weird? We never had to do it in the past. Is this a new 1.5 thing? |
|
I would be curious to know the query and the number of non projected columns. Maybe we do need to fill out a dummy column in case of 0 column projections? |
Yes, it's a 1.5 thing. |
tpcds query 5. gotta check back on the exact counts. Note that the zero-projection scan in the doc is just an example, and not the tpcds 5 case. We should check what the Parquet extension does in DuckDB cc: @myrrc in terms of initializing (or not) unprojected columns. In my understanding the Parquet ext only writes to projected columns, so the bug is likely on the Vortex side. We're probably missing on writing some of the columns here, which should not just be NULL initialized. It's not clear whether the issue popped up bc of bumping DDB to 1.5 or bumping Vortex to the commit we're using here. |
Signed-off-by: Mikhail Kot <mikhail@spiraldb.com>
Signed-off-by: Mikhail Kot <mikhail@spiraldb.com>
Signed-off-by: Mikhail Kot <mikhail@spiraldb.com>
Signed-off-by: Mikhail Kot <mikhail@spiraldb.com>
Signed-off-by: Mikhail Kot <mikhail@spiraldb.com>
Signed-off-by: Alexander Droste <alexander.droste@protonmail.com> Signed-off-by: Mikhail Kot <mikhail@spiraldb.com>
Signed-off-by: Mikhail Kot <mikhail@spiraldb.com>
Signed-off-by: Mikhail Kot <mikhail@spiraldb.com>
| } else { | ||
| // The default DuckDB version to use when DUCKDB_VERSION env var is not set. | ||
| DuckDBVersion::Release("1.4.2".to_owned()) | ||
| DuckDBVersion::Commit("7f992e5a96662d66134577cf9d8a5bad9053847e".to_owned()) |
There was a problem hiding this comment.
We have to wait until 1.5.0 is released to merge this and wrap this as DuckDBVersion::Release, in order to not build from source by default.
|
On the invalid chunk passed, the bug is also reproduced without a GROUP BY: The origin is unclear, but for the first correctly handled query duckdb tells us in init_global and init_local On the other query, duckdb tells us there is 1 column but zero projections. Vortex then forms an empty array. However, duckdb returns an output chunk with 1 column, so the semantics of TableFunctionInitInput's column_ids vs. projection_ids is unclear. Our current match is that chunks columns === projections_ids.size(), but this doesn't hold for second query. My guess is that optimizer in 1.5 correctly assumes we don't need an output column (because first over a constant is a constant) but then something strange happens in output chunk allocation. |
|
Even simpler reproduction: My second guess is a bug on our side because duckdb 1.5 does pass a chunk with 1 column (or 2, or columns present in the input file) for a .parquet, so we don't handle these correctly |
|
A non-related but ugly error is on request to write to non-existent file: The error message should be more clear |
|
Uninitialized read fixed in #6831 |
1.5 API changes:
#5767
Continuation of #5901