Segfault in aod_sketch_get_estimate while lgk=16
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start with test/aod_sketch_test.sql at line 25 and reproduce the query aod_sketch_get_estimate(aod_sketch_union(sketch, 16)) using the reported PostgreSQL, datasketches-postgresql, and datasketches-cpp versions. Trace the crash and use the regression test to verify that the query completes without a server termination signal.
Written by the indexing model from the issue text.
Description
Hi team.
I am experiencing segfault while I am running datasketches-postgresql tests.
Here is the error log
psql:test/aod_sketch_test.sql:25: server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
psql:test/aod_sketch_test.sql:25: error: connection to server was lost
2025-05-23 21:14:29.609 UTC [13567] LOG: server process (PID 13607) was terminated by signal 11: Segmentation fault
2025-05-23 21:14:29.609 UTC [13567] DETAIL: Failed process was running: select aod_sketch_get_estimate(aod_sketch_union(sketch, 16)) from aod_sketch_test;
I am running with version datasketches-postgresql 1.7.0, with datasketches-cpp 5.0.0, on PostgreSQL 15.12 OEL7 linux distribution.
Here is my datasketches-postgresql set up script
# install datasketches-cpp
curl -O https://archive.apache.org/dist/datasketches/cpp/5.0.0/apache-datasketches-cpp-5.0.0-src.zip
unzip apache-datasketches-cpp-5.0.0-src.zip
mv apache-datasketches-cpp-5.0.0-src datasketches-cpp
# install boost
curl -O https://archives.boost.io/release/1.75.0/source/boost_1_75_0.tar.bz2
tar -xjf boost_1_75_0.tar.bz2
mv boost_1_75_0 boost
export BUILD_USER_DIR="/home/builduser"
# mark the extension as trusted, so that users can create it without
# superuser permissions
echo "trusted = true" >> datasketches.control
su builduser -c "make"
su builduser -c "make install"
# clean up the already created data directory
su builduser -c "rm -rf ${BUILD_USER_DIR}/data_dir"
# re-create the data directory
su builduser -c "mkdir -p ${BUILD_USER_DIR}"
# to do regression tests, we need to create new data dir
su builduser -c "pg_ctl -D ${BUILD_USER_DIR}/data_dir init"
# start postgres for testing
su builduser -c "pg_ctl start -D ${BUILD_USER_DIR}/data_dir"
# run tests
su builduser -c "psql -h 127.0.0.1 -d postgres -c 'create database test;'"
su builduser -c "make tests"
Is there anything I did wrong? Looking forward to your response.
- Dominant language
- C
- Stars
- 96
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/datasketches-postgresql
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
apache/datasketches-postgresql#75 · 3 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
All issues in apache/datasketches-postgresql
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
BasedHardware/omi#15662 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
level/task module/gcp type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
Difficulty 1/5 Under an hour Newbie friendliness 86/100
hapostgres/pg_auto_failover#1190 ·
-
docs
Difficulty 1/5 Under an hour Newbie friendliness 85/100