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 merge_table_prune_and_unionize #7443

Closed
fuboat opened this issue Jan 17, 2024 · 0 comments
Closed

MonetDB server crashes in merge_table_prune_and_unionize #7443

fuboat opened this issue Jan 17, 2024 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@fuboat
Copy link

fuboat commented Jan 17, 2024

Describe the bug
MonetDB server crashes in merge_table_prune_and_unionize.

To Reproduce

 CREATE MERGE TABLE a (b int, subtable2 varchar(32)) PARTITION BY VALUES ON (b)  ;
 CREATE MERGE TABLE t1 (c int, d varchar(32)) PARTITION BY RANGE ON (c)  ;
 CREATE TABLE id (t1907060_1 int, age varchar(32))  ;
 ALTER TABLE a ADD TABLE id AS PARTITION IN ('1', '2', '3')  ;
 ALTER TABLE t1 ADD TABLE a AS PARTITION FROM '0' TO '100'  ;
 SELECT c, d FROM t1 ; 

Backtrace of the Crash

#0 0x7eff4132d1ff (merge_table_prune_and_unionize+0x2df)
#1 0x7eff4132ee82 (merge_table_prune_and_unionize+0x1f62)
#2 0x7eff4132cdd5 (rel_merge_table_rewrite_+0x6e5)
#3 0x7eff413081ef (rel_visitor_topdown+0x27f)
#4 0x7eff413085a5 (rel_visitor_topdown+0x635)
#5 0x7eff4132bb5b (rel_merge_table_rewrite+0x3b)
#6 0x7eff4132c2da (rel_optimizer+0x75a)
#7 0x7eff4128ff22 (sql_processrelation+0x82)
#8 0x7eff41099e1b (sql_symbol2relation+0x1bb)
#9 0x7eff410c6b84 (SQLparser+0x624)
#10 0x7eff410c5cbc (SQLengine_+0xa5c)
#11 0x7eff410c34fe (SQLengine+0x3e)
#12 0x7eff416412cf (runScenario+0x6f)
#13 0x7eff416424de (MSscheduleClient+0xb6e)
#14 0x7eff41779182 (doChallenge+0x132)
#15 0x7eff424a28a7 (thread_starter+0xc7)
#16 0x7eff40fbd609 (start_thread+0xd9)
#17 0x7eff40ee0133 (clone+0x43)

Software versions

  • MonetDB version number: v11.49.1 (Dec2023)
  • OS and version: Ubuntu 20.04
  • From docker image monetdb/monetdb:Dec2023

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

docker container rm monetdb_test -f
docker run -e MDB_DB_ADMIN_PASS=monetdb --name monetdb_test -itd monetdb/monetdb:Dec2023
docker exec monetdb_test bash -c 'echo -n -e "user=monetdb\npassword=monetdb\n" > /root/.monetdb'

sleep 10
cat /tmp/test.sql | timeout 5s docker exec -i monetdb_test mclient monetdb     # run test case

if docker exec monetdb_test bash -c "grep '[m]server5' /proc/*/cmdline -lR"; then
    echo "[INFO] Server normal."
else
    echo "[CRASH] Mserver5 process does NOT exist."
fi

It can also be reproduced on the docker image monetdb/dev-builds:default.

Issue labeling
bug

@njnes njnes self-assigned this Jan 24, 2024
@njnes njnes added the bug Something isn't working label Jan 24, 2024
@njnes njnes added this to the NEXTRELEASE milestone Jan 24, 2024
@njnes njnes closed this as completed Jan 24, 2024
monetdb-team pushed a commit that referenced this issue Jan 24, 2024
for recursive merge tables lookup columns names correctly

in case of a large delete (all rows deleted), the empty binds
optimizer should also clean out the sql.tid calls.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants