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

CASE statement produces GDK error on multithreaded database: BATproject does not match always #3852

Closed
monetdb-team opened this issue Nov 30, 2020 · 0 comments

Comments

@monetdb-team
Copy link

@monetdb-team monetdb-team commented Nov 30, 2020

Date: 2015-11-06 16:27:01 +0100
From: Kevin Boulain <<kevin.boulain>>
To: SQL devs <>
Version: 11.21.5 (Jul2015)
CC: guillaume.savary, @njnes

Last updated: 2016-01-15 11:38:11 +0100

Comment 21473

Date: 2015-11-06 16:27:01 +0100
From: Kevin Boulain <<kevin.boulain>>

User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:39.0) Gecko/20100101 Firefox/39.0
Build Identifier:

On my Ubuntu work machine (Intel i5-4590) the bug happens on a multithreaded database with nthreads=4 (default value) but not with nthreads=1.

Also reproducible with a Debian test server (two Intel Xeon E5-2697 v3) with nthreads=56 (default value).

MonetDB version is Jul2015 SP1 (http://dev.monetdb.org/hg/MonetDB/rev/d1dd6e5b7a5a).

mserver5 informations from the Ubuntu machine:
$ ./bin/mserver5 --version
MonetDB 5 server v11.21.11 "Jul2015-SP1" (64-bit, 64-bit oids, 128-bit integers)
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2015 MonetDB B.V., all rights reserved
Visit http://www.monetdb.org/ for further information
Found 19.5GiB available memory, 4 available cpu cores
Libraries:
libpcre: 8.35 2014-04-04 (compiled with 8.35)
openssl: OpenSSL 1.0.1f 6 Jan 2014 (compiled with OpenSSL 1.0.1f 6 Jan 2014)
libxml2: 2.9.1 (compiled with 2.9.1)
Compiled by: ether@lethe (x86_64-unknown-linux-gnu)
Compilation: gcc -g -Werror -Wall -Wextra -W -Werror-implicit-function-declaration -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wformat=2 -Wno-format-nonliteral -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -fstack-protector-all -Wstack-protector -Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs -Wlogical-op -Wunreachable-code
Linking : /usr/bin/ld -m elf_x86_64

Reproducible: Always

Steps to Reproduce:

Generate a CSV big enough (on my work machine, it starts crashing around 200k lines, but it does not crash if I import 100k line multiple times in the same table. On the server, a table which encounter the problem has 54+ millions lines).
$ seq 1000000 > /tmp/test.csv

On the mclient:
sql>create table test (x int);
sql>COPY INTO "test" FROM '/tmp/test.csv';
sql>select 1 from test where CASE WHEN FALSE THEN TRUE ELSE (x > 0) END;

Actual Results:

GDK reported error.
BATproject: does not match always

Expected Results:

+--------------+
| single_value |
+==============+
| 1 |
| 1 |
| 1 |
| 1 |
...

The given request is quite silly (generated and not optimized) but it is not reproducible with the following one that should be equivalent:
sql>select 1 from test where CASE WHEN (x > 0) THEN TRUE ELSE FALSE END;

Comment 21481

Date: 2015-11-09 08:36:45 +0100
From: @njnes

fixed on 2015 branch. The complex expressions of boolean values are now properly handled.

Comment 21485

Date: 2015-11-09 11:01:00 +0100
From: Guillaume Savary <<guillaume.savary>>

I've updates the Juk2015 branch and test that 3851 (complex boolean expressions) is now fixed but not this one. I still have

GDK reported error.
BATproject: does not match always

Comment 21492

Date: 2015-11-09 15:41:43 +0100
From: @sjoerdmullender

With the current version (changeset 56a7f0f475c4) both SELECT queries that are mentioned in the report work for me.
Can you test again, please?

Comment 21494

Date: 2015-11-09 16:13:18 +0100
From: Guillaume Savary <<guillaume.savary>>

It works as expected now. Thanks!

Comment 21495

Date: 2015-11-09 16:30:15 +0100
From: @sjoerdmullender

Thanks for testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant