Skip to content
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

MonetDB server crashes in bind_col_exp #7418

Closed
fuboat opened this issue Nov 15, 2023 · 1 comment
Closed

MonetDB server crashes in bind_col_exp #7418

fuboat opened this issue Nov 15, 2023 · 1 comment
Assignees
Labels
bug Something isn't working SQL
Milestone

Comments

@fuboat
Copy link

fuboat commented Nov 15, 2023

Describe the bug
MonetDB server crashes in bind_col_exp.

To Reproduce

CREATE TABLE v0 ( v1 BIGINT NOT NULL PRIMARY KEY ) ; 
 SELECT 0 IS NOT NULL FROM v0 ORDER BY AVG ( max ( 331 ) ) OVER ( ORDER BY 634 NULLS FIRST ) NULLS LAST ; 
 SELECT * FROM v0 ORDER BY v1 ;  

Backtrace of the Crash

#0 0x7fa8aeb62ae3 (bind_col_exp+0xa3)
#1 0x7fa8aeb62500 (rel_base_projection+0x100)
#2 0x7fa8aeb5714e (_rel_projections+0x8ae)
#3 0x7fa8aeb1d725 (rel_table_projections+0x315)
#4 0x7fa8aeb1aaef (rel_select_exp+0x9ff)
#5 0x7fa8aeb11c20 (rel_subquery+0x5f0)
#6 0x7fa8aeb11ee3 (rel_selects+0x233)
#7 0x7fa8aeaf8d72 (rel_semantic+0x442)
#8 0x7fa8ae8edcf3 (sql_symbol2relation+0x93)
#9 0x7fa8ae91ab84 (SQLparser+0x624)
#10 0x7fa8ae919cbc (SQLengine_+0xa5c)
#11 0x7fa8ae9174fe (SQLengine+0x3e)
#12 0x7fa8aee952cf (runScenario+0x6f)
#13 0x7fa8aee964de (MSscheduleClient+0xb6e)
#14 0x7fa8aefcd182 (doChallenge+0x132)
#15 0x7fa8afcf68a7 (thread_starter+0xc7)
#16 0x7fa8ae811609 (start_thread+0xd9)
#17 0x7fa8ae734133 (clone+0x43)

Software versions

  • MonetDB version number: v11.47.11 (Jun2023-SP2)
  • OS and version: Ubuntu 20.04
  • From docker image monetdb/monetdb:Jun2023-SP2

An example of steps to reproduce in docker container (write the poc into /tmp/test.sql first):

docker container rm monetdb_test -f                                 # remove the old one
docker run -e MDB_DB_ADMIN_PASS=monetdb --name monetdb_test -itd monetdb/monetdb:Jun2023-SP2
                                                                    # start monetdb in docker
docker exec monetdb_test bash -c 'echo -n -e "user=monetdb\npassword=monetdb\n" > /root/.monetdb'
                                                                    # set username and password
sleep 10                                                            # wait the server start
docker exec monetdb_test bash -c "grep '/usr/bin/[m]server5' /proc/*/cmdline -lR"
                                                                    # check the existence of mserver5 process
cat /tmp/test.sql | docker exec -i monetdb_test mclient monetdb     # run test case
docker exec monetdb_test bash -c "grep '/usr/bin/[m]server5' /proc/*/cmdline -lR" || { echo "[CRASH] Mserver5 process does NOT exist."; exit 1; }
                                                                    # check the existence of mserver5 process
echo "[INFO] Server normal."

It can also be reproduced on MonetDB Dec2023_root, self-compiled by CC=clang-12 CXX=clang++-12 cmake /root/monetdb -DCMAKE_BUILD_TYPE=RelWithDebInfo.

Issue labeling
bug

@mvdvm mvdvm added bug Something isn't working SQL labels Jan 18, 2024
@njnes njnes added this to the NEXTRELEASE milestone Jan 24, 2024
@njnes njnes self-assigned this Jan 24, 2024
@njnes
Copy link
Contributor

njnes commented Jan 24, 2024

is fixed in dec2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working SQL
Projects
None yet
Development

No branches or pull requests

4 participants