issue_owner_repo listlengths 2 2 | issue_body stringlengths 0 261k ⌀ | issue_title stringlengths 1 925 | issue_comments_url stringlengths 56 81 | issue_comments_count int64 0 2.5k | issue_created_at stringlengths 20 20 | issue_updated_at stringlengths 20 20 | issue_html_url stringlengths 37 62 | issue_github_id int64 387k 2.46B | issue_number int64 1 127k |
|---|---|---|---|---|---|---|---|---|---|
[
"MonetDB",
"MonetDB"
] | Date: 2016-01-25 16:30:33 +0100
From: Kaijiang <<chenkaijiang>>
To: SQL devs <<bugs-sql>>
Version: 11.21.11 (Jul2015-SP1)
CC: @njnes
Last updated: 2016-03-25 09:59:40 +0100
## Comment 21750
Date: 2016-01-25 16:30:33 +0100
From: Kaijiang <<chenkaijiang>>
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36
Build Identifier:
COPY INTO table (column1, column2) got wrong result (the column list is actually ignored!)
Reproducible: Always
### Steps to Reproduce:
1.create table t (f1 int, f2 int);
2.create a text file, a.csv, with 1 line: 1\t2
3.COPY INTO t(f2,f1) from '/home/data/mdb_tmp/a.csv' USING DELIMITERS '\t';
4.SELECT * from t;
### Actual Results:
Got:
+------+------+
| f1 | f2 |
+======+======+
| 1 | 2 |
+------+------+
### Expected Results:
But the correct result should be:
+------+------+
| f1 | f2 |
+======+======+
| 2 | 1 |
+------+------+
Because I "COPY INTO t(f2,f1)", not "COPY INTO t(f1,f2)"!
## Comment 21812
Date: 2016-02-23 08:26:12 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [e8c4edcbfabb](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e8c4edcbfabb) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=e8c4edcbfabb](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=e8c4edcbfabb)
Changeset description:
added tests for bug #3910 and 3912.
Fixed a problem with copy into with header information
## Comment 21813
Date: 2016-02-23 08:26:20 +0100
From: @njnes
The column list after the table name isn't specifing the order (its simply (like insert into) the list of columns, which based on the name insert into that column). If you input file has a different order you should specify a header list, ie after the stdin or filename.
COPY 1 RECORDS INTO t(f1,f2) from STDIN (f2,f1) USING DELIMITERS ',';
1,2
## Comment 21971
Date: 2016-03-25 09:59:40 +0100
From: @sjoerdmullender
Jul2015-SP3 has been released.
| COPY INTO table (column1, column2) got wrong result | https://api.github.com/repos/MonetDB/MonetDB/issues/3910/comments | 0 | 2020-11-30T13:22:26Z | 2024-06-27T12:10:30Z | https://github.com/MonetDB/MonetDB/issues/3910 | 753,474,445 | 3,910 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-01-25 12:48:17 +0100
From: @yzchang
To: SQL devs <<bugs-sql>>
Version: 11.21.13 (Jul2015-SP2)
CC: @njnes
Last updated: 2016-03-25 09:59:54 +0100
## Comment 21747
Date: 2016-01-25 12:48:17 +0100
From: @yzchang
The following SELECT query triggers a server crash at rel_select.c:3109
while it should have given an error: no such column 'b.id'.
This bug is related/similar to Bug #3908, i.e., the crash only happens with the combination of LEFT JOIN and an OR condition. However, it causes crash elsewhere in the code, hence a separate bug.
I'll add a test for this shortly.
==============
CREATE TABLE foo (id INTEGER, bar1 INTEGER, bar2 INTEGER);
CREATE TABLE bar (barid INTEGER, value CHAR(10));
INSERT INTO bar VALUES (1, 'aaa');
INSERT INTO bar VALUES (2, 'bbb');
INSERT INTO bar VALUES (3, 'ccc');
INSERT INTO foo VALUES (100, 1, 2);
INSERT INTO foo VALUES (101, 2, 3);
SELECT B.value, F.id FROM bar B LEFT JOIN foo F ON (F.bar1 = B.barid OR F.bar2 = B.id);
## Comment 21748
Date: 2016-01-25 12:56:10 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [5d43ddd4e314](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5d43ddd4e314) made by Jennie Zhang <y.zhang@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=5d43ddd4e314](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=5d43ddd4e314)
Changeset description:
Added test for Bug #3909
## Comment 21756
Date: 2016-01-28 13:18:51 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [3dbdfdea3b2d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3dbdfdea3b2d) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=3dbdfdea3b2d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=3dbdfdea3b2d)
Changeset description:
fix crash in join with or and incorrect expressions (fixes bug #3909)
remove single 'TRUE' expressions, ie removes lots of unneeded crossproducts.
## Comment 21757
Date: 2016-01-30 15:02:36 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [3940d6dfeed7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3940d6dfeed7) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=3940d6dfeed7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=3940d6dfeed7)
Changeset description:
fixed crash in OR with incorrect column name (ie BUG #3909)
## Comment 21760
Date: 2016-01-31 21:45:13 +0100
From: @njnes
we now correctly check for errors in outerjoins with or expressions.
## Comment 21979
Date: 2016-03-25 09:59:54 +0100
From: @sjoerdmullender
Jul2015-SP3 has been released.
| Incorrect column name in OR condition of LEFT JOIN crashes mserver | https://api.github.com/repos/MonetDB/MonetDB/issues/3909/comments | 0 | 2020-11-30T13:22:23Z | 2024-06-27T12:10:29Z | https://github.com/MonetDB/MonetDB/issues/3909 | 753,474,409 | 3,909 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-01-25 11:36:08 +0100
From: @yzchang
To: SQL devs <<bugs-sql>>
Version: 11.21.13 (Jul2015-SP2)
CC: @njnes
Last updated: 2016-03-25 09:59:20 +0100
## Comment 21745
Date: 2016-01-25 11:36:08 +0100
From: @yzchang
The following SELECT query triggers an assertion in rel_bin.c:673.
Playing a bit with some alternatives of the SELECT query reveals that the problem lies in the combination of LEFT JOIN and the OR condition. Queries without either the LEFT JOIN or the 'OR' condition work fine.
I'll add a test for this shortly.
==============
CREATE TABLE foo (id INTEGER, bar1 INTEGER, bar2 INTEGER);
CREATE TABLE bar (barid INTEGER, value CHAR(10));
INSERT INTO bar VALUES (1, 'aaa');
INSERT INTO bar VALUES (2, 'bbb');
INSERT INTO bar VALUES (3, 'ccc');
INSERT INTO foo VALUES (100, 1, 2);
INSERT INTO foo VALUES (101, 2, 3);
SELECT B.value, F.id FROM bar B LEFT JOIN foo F ON (F.bar1 = B.barid OR F.bar2 = B.barid);
## Comment 21746
Date: 2016-01-25 12:39:01 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [cc9d1446c68d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=cc9d1446c68d) made by Jennie Zhang <y.zhang@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=cc9d1446c68d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=cc9d1446c68d)
Changeset description:
Added test for Bug #3908
## Comment 21749
Date: 2016-01-25 12:56:51 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [45e43b607470](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=45e43b607470) made by Jennie Zhang <y.zhang@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=45e43b607470](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=45e43b607470)
Changeset description:
Enable test for Bug #3908
## Comment 21758
Date: 2016-01-31 21:15:46 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [d66505ca653e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d66505ca653e) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=d66505ca653e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=d66505ca653e)
Changeset description:
rewrite outer-joins with or expressions, fixes bug #3908.
## Comment 21759
Date: 2016-01-31 21:44:31 +0100
From: @njnes
outer joins with or expressions were not correctly handled. Is fixed now.
## Comment 21961
Date: 2016-03-25 09:59:20 +0100
From: @sjoerdmullender
Jul2015-SP3 has been released.
| LEFT JOIN with OR conditions triggers assertion | https://api.github.com/repos/MonetDB/MonetDB/issues/3908/comments | 0 | 2020-11-30T13:22:20Z | 2024-06-27T12:10:28Z | https://github.com/MonetDB/MonetDB/issues/3908 | 753,474,369 | 3,908 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-01-25 00:33:29 +0100
From: Puthick <<hputhick>>
To: clients devs <<bugs-clients>>
Version: 11.21.19 (Jul2015-SP4)
Last updated: 2016-04-11 11:18:43 +0200
## Comment 21743
Date: 2016-01-25 00:33:29 +0100
From: Puthick <<hputhick>>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:40.0) Gecko/20100101 Firefox/40.0
Build Identifier:
Hi,
I'm using MonetDB-11.19.7 compiled from source on openSUSE 12.1. I'm
also using the Perl client code from MonetDB source to connect to
MonetDB from Perl via Perl DBI module. It works fine for a physical
server but a VM server with a vmdk drive.
It has an issue that the database handler must be disconnected and
reconnected in order to execute more SQL statements; otherwise
there will be an error saying 'Statement handle not marked as Active'.
So I have written 2 testing Perl scripts doing SQL select for 100 iterations.
One script is to demonstrate that it will fail while the other will
work for all the
iterations. The one that works is the script that connect and
disconnect to MonetDB in every iteration before executing the SQL.
In order to help you replicate the problem, there is an attached
tar.gz file containing the 2 perl scripts - one for success and the
other one for failure.
Due to the size limitation, I cannot include the database dump file
for the demonstration.
Regards,
Puthick
Reproducible: Always
### Steps to Reproduce:
1. $dbh = connect to monetdb via DBI
2. $sth->execute($SQL)
3. $sth->fetch_result (OK)
4. $sth->finish()
5. $sth->execute(another SQL)
6. $sth->fetch_resuot (Error: Statement handle not marked as Active)
### Actual Results:
Statement handle not marked as Active
### Expected Results:
Return data
MonetDB 5 server v11.19.7 "Oct2014-SP1" (64-bit, 64-bit oids)
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2014 MonetDB B.V., all rights reserved
Visit http://www.monetdb.org/ for further information
Found 5.8GiB available memory, 1 available cpu core
Libraries:
libpcre: 8.13 2011-08-16 (compiled with 8.13)
openssl: OpenSSL 1.0.0e 6 Sep 2011 (compiled with OpenSSL 1.0.0e 6 Sep 2011)
libxml2: 2.7.8 (compiled with 2.7.8)
Compiled by: root@kddart (x86_64-unknown-linux-gnu)
Compilation: gcc -g -O2
Linking : /usr/x86_64-suse-linux/bin/ld -m elf_x86_64
## Comment 21744
Date: 2016-01-25 00:39:09 +0100
From: Puthick <<hputhick>>
Created attachment 383
Perl scripts to reproduce the problem and work-around
This tar.gz file contains only the perl script that fails on a VM and another perl script which is a temporary work around solution. The DB dump file for these scripts is not included due to its size.
> Attached file: [monetdb_perl_dbd_issue.tar.gz](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3907_monetdb_perl_dbd_issue.tar.gz_383) (application/octet-stream, 1012 bytes)
> Description: Perl scripts to reproduce the problem and work-around
| Issue with Perl monetdb DBD plugin for DBI on a VM only | https://api.github.com/repos/MonetDB/MonetDB/issues/3907/comments | 0 | 2020-11-30T13:22:17Z | 2024-06-28T07:19:54Z | https://github.com/MonetDB/MonetDB/issues/3907 | 753,474,332 | 3,907 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-01-14 14:01:52 +0100
From: @swingbit
To: SQL devs <<bugs-sql>>
Version: 11.19.9 (Oct2014-SP2)
CC: @njnes
Last updated: 2016-03-25 09:59:07 +0100
## Comment 21732
Date: 2016-01-14 14:01:52 +0100
From: @swingbit
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36
Build Identifier:
*** background ***
I have an UDF that is used to produce a table for each row in input, and concatenate the output:
create function tokenize(id integer, s string, prob double)
returns table (id integer, token string, prob double)
external name str."UTF8tokenize";
CREATE TABLE ss (id INT, s CLOB, prob DOUBLE);
INSERT INTO ss VALUES
(0,'one two', 0.8),
(1,'three four', 0.7);
SELECT * FROM tokenize( (SELECT id, s, prob FROM ss) );
+------+-------+------+
| id | token | prob |
+======+=======+======+
| 0 | one | 0.8 |
| 0 | two | 0.8 |
| 1 | three | 0.7 |
| 1 | four | 0.7 |
+------+-------+------+
4 tuples (1.277ms)
*** ISSUE ***
When I use this on a large input table, mitosis gets triggered.
This statement:
CREATE TABLE _x13 AS
SELECT id AS a1,
token AS a2,
prob
FROM tokenize( (SELECT subject, value, prob FROM disk4_obj_string) )
WITH DATA;
Succeeds and should produce 144768135 tuples.
However, a select on this table will fail with "BATproject: does not match always", because only the first column has the correct count:
sql>select table,column,type,count from sys.storage() where table='_x13';
+-------+--------+--------+-----------+
| table | column | type | count |
+=======+========+========+===========+
| _x13 | a1 | int | 144768138 |
| _x13 | a2 | clob | 27653361 |
| _x13 | prob | double | 27653361 |
+-------+--------+--------+-----------+
I looked at the trace of this create statement, whose important part is:
*****
(X_181=<tmp_1610>[7981355]:bat[:oid,:int]{horigin=1},X_16=<tmp_1361>[7981355]:bat[:oid,:str],X_17=<tmp_1617>[7981355]:bat[:oid,:dbl]) := batstr.UTF8tokenize(X_133=<tmp_667>[16181]:bat[:oid,:int],X_149=<tmp_603>[16181]:bat[:oid,:str],X_173=<tmp_2130>[16181]:bat[:oid,:dbl]);
barrier X_206=false:bit{transparent} := language.dataflow();
(X_182=<tmp_3442>[20821211]:bat[:oid,:int]{horigin=2},X_16=<tmp_3445>[20821211]:bat[:oid,:str],X_17=<tmp_3450>[20821211]:bat[:oid,:dbl]) := batstr.UTF8tokenize(X_134=<tmp_325>[44923]:bat[:oid,:int],X_150=<tmp_1166>[44923]:bat[:oid,:str],X_174=<tmp_670>[44923]:bat[:oid,:dbl]);
(X_183=<tmp_1617>[14533911]:bat[:oid,:int]{horigin=3},X_16=<tmp_1361>[14533911]:bat[:oid,:str],X_17=<tmp_3446>[14533911]:bat[:oid,:dbl]) := batstr.UTF8tokenize(X_135=<tmp_505>[34028]:bat[:oid,:int],X_151=<tmp_1505>[34028]:bat[:oid,:str],X_175=<tmp_1060>[34028]:bat[:oid,:dbl]);
(X_184=<tmp_3450>[10380469]:bat[:oid,:int]{horigin=4},X_16=<tmp_3445>[10380469]:bat[:oid,:str],X_17=<tmp_3453>[10380469]:bat[:oid,:dbl]) := batstr.UTF8tokenize(X_136=<tmp_473>[27368]:bat[:oid,:int],X_152=<tmp_1057>[27368]:bat[:oid,:str],X_176=<tmp_1720>[27368]:bat[:oid,:dbl]);
(X_185=<tmp_3446>[10313838]:bat[:oid,:int]{horigin=5},X_16=<tmp_1361>[10313838]:bat[:oid,:str],X_17=<tmp_3454>[10313838]:bat[:oid,:dbl]) := batstr.UTF8tokenize(X_137=<tmp_2030>[29090]:bat[:oid,:int],X_153=<tmp_1427>[29090]:bat[:oid,:str],X_177=<tmp_607>[29090]:bat[:oid,:dbl]);
(X_186=<tmp_3453>[27973220]:bat[:oid,:int]{horigin=6},X_16=<tmp_3445>[27973220]:bat[:oid,:str],X_17=<tmp_3455>[27973220]:bat[:oid,:dbl]) := batstr.UTF8tokenize(X_138=<tmp_274>[69408]:bat[:oid,:int],X_154=<tmp_600>[69408]:bat[:oid,:str],X_178=<tmp_2025>[69408]:bat[:oid,:dbl]);
(X_187=<tmp_3454>[25110773]:bat[:oid,:int]{horigin=7},X_16=<tmp_1361>[25110773]:bat[:oid,:str],X_17=<tmp_3456>[25110773]:bat[:oid,:dbl]) := batstr.UTF8tokenize(X_139=<tmp_520>[65676]:bat[:oid,:int],X_155=<tmp_1727>[65676]:bat[:oid,:str],X_179=<tmp_722>[65676]:bat[:oid,:dbl]);
X_189=<tmp_1502>[7981355]:bat[:oid,:int] := mat.packIncrement(X_181=<tmp_1610>[7981355]:bat[:oid,:int],8:int);
X_191=<tmp_1502>[28802566]:bat[:oid,:int] := mat.packIncrement(X_189=<tmp_1502>[28802566]:bat[:oid,:int],X_182=<tmp_3442>[20821211]:bat[:oid,:int]);
X_192=<tmp_1502>[43336477]:bat[:oid,:int] := mat.packIncrement(X_191=<tmp_1502>[43336477]:bat[:oid,:int],X_183=<tmp_1617>[14533911]:bat[:oid,:int]);
X_193=<tmp_1502>[53716946]:bat[:oid,:int] := mat.packIncrement(X_192=<tmp_1502>[53716946]:bat[:oid,:int],X_184=<tmp_3450>[10380469]:bat[:oid,:int]);
X_194=<tmp_1502>[64030784]:bat[:oid,:int] := mat.packIncrement(X_193=<tmp_1502>[64030784]:bat[:oid,:int],X_185=<tmp_3446>[10313838]:bat[:oid,:int]);
X_195=<tmp_1502>[92004004]:bat[:oid,:int] := mat.packIncrement(X_194=<tmp_1502>[92004004]:bat[:oid,:int],X_186=<tmp_3453>[27973220]:bat[:oid,:int]);
X_196=<tmp_1502>[117114777]:bat[:oid,:int] := mat.packIncrement(X_195=<tmp_1502>[117114777]:bat[:oid,:int],X_187=<tmp_3454>[25110773]:bat[:oid,:int]);
(X_188=<tmp_662>[27653361]:bat[:oid,:int]{horigin=8},X_16=<tmp_725>[27653361]:bat[:oid,:str],X_17=<tmp_1305>[27653361]:bat[:oid,:dbl]) := batstr.UTF8tokenize(X_140=<tmp_1426>[73020]:bat[:oid,:int],X_156=<tmp_657>[73020]:bat[:oid,:str],X_180=<tmp_1511>[73020]:bat[:oid,:dbl]);
X_15=<tmp_1502>[144768138]:bat[:oid,:int] := mat.packIncrement(X_196=<tmp_1502>[144768138]:bat[:oid,:int],X_188=<tmp_662>[27653361]:bat[:oid,:int]);
barrier X_209=false:bit{transparent} := language.dataflow();
X_18=0:int := sql.append(X_2=0:int,"spinque":str,"_x13":str,"id":str,X_15=<tmp_1502>[144768138]:bat[:oid,:int]);
X_22=0:int := sql.append(X_18=0:int,"spinque":str,"_x13":str,"token":str,X_16=<tmp_725>[27653361]:bat[:oid,:str]);
sql.append(X_22=0:int,"spinque":str,"_x13":str,"prob":str,X_17=<tmp_1305>[27653361]:bat[:oid,:dbl]);
sql.exportOperation("":str);
end user.s3_1;
function user.s3_1(A0:int):void;
X_4=0@0:void := user.s3_1(9:int);
*****
I notice a couple of things in that trace:
- The partial and total counts of all calls to batstr.UTF8tokenize are correct for all columns.
- However, only the first column gets a new bat for each call. The other two columns reuse the same bat (X_16, X_17) for each call, overwriting all intermediate results. I guess this is terribly wrong.
- The final result is repacked for the first column, but simply uses the last computed (X_16,X_17) for the other two columns. No repacking. Hence the wrong count. This is probably due to the previous problem of overwriting the intermediate results.
- Last, a curiousity, I find the sequence of instructions a bit odd: There are 8 chunks. 1) UDF is called on the first 7 chunks. 2) these are packed. 3) UDF is called on the 8th chunck. 4) this is packed with the previous one. What's the reason for this?
Also, running the select statement without the CREATE TABLE around behaves differently. The count is now correct for all columns (here, much time is spent in sql.resultSet, which isn't present in the CREATE TABLE version). However, I suspect the result is wrong (same values for the last two columns reused multiple times), because the trace still shows that X_16 and X_17 are reused for each of the 8 calls to batstr.UTF8tokenize.
Reproducible: Always
$ mserver5 --version
MonetDB 5 server v11.21.14 (64-bit, 64-bit oids, 128-bit integers)
This is an unreleased version
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 15.6GiB available memory, 8 available cpu cores
Libraries:
libpcre: 8.37 2015-04-28 (compiled with 8.37)
openssl: OpenSSL 1.0.1k 8 Jan 2015 (compiled with OpenSSL 1.0.1k-fips 8 Jan 2015)
libxml2: 2.9.3 (compiled with 2.9.3)
Compiled by: roberto@photon.hq.spinque.com (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
## Comment 21733
Date: 2016-01-14 14:04:48 +0100
From: @swingbit
Meta-question: is it possible to disable automatic wrapping in the posts?
It's rather common to post trace excerpts or other text that needs to be kept in long lines. It is rather unreadable the way it is now.
## Comment 21734
Date: 2016-01-14 14:29:00 +0100
From: @swingbit
Additional issue / question:
As a *temporary* workaround, I thought it would be enough to mark the UDF as {unsafe}, so that it would be called only once on the whole input table, hence avoiding the issue described above.
But it is still called on 8 chunks. Is that right? Shouldn't {unsafe} prevent that?
## Comment 21825
Date: 2016-02-25 18:22:21 +0100
From: @swingbit
I made a reproducible test for this. A MAL implementation of the UDF is sufficient, so that no recompilation is needed.
I hope this can help you find the issue.
Forget about the tokenizer, I use here the simplest UDF: "test.tuple2table(c1,c2,c3)".
This does nothing else than turning each tuple into a 1-tuple table.
Thus the result would concatenate all these tables and obtain an exact copy of the input table.
In practice, I have implemented the bulk version of this: "battest.tuple2table()", which then simply copies the original table:
$ cat MonetDB/lib/monetdb5/autoload/99_test.mal
module battest;
function battest.tuple2table(c1:bat[:oid,:int], c2:bat[:oid,:int], c3:bat[:oid,:int]) (:bat[:oid,:int], :bat[:oid,:int], :bat[:oid,:int]);
b1:= bat.new(:oid,:int);
b2:= bat.new(:oid,:int);
b3:= bat.new(:oid,:int);
bat.append(b1,c1);
bat.append(b2,c2);
bat.append(b3,c3);
return (b1,b2,b3);
end tuple2table;
The SQL wrapper:
create function tuple2table(c1 integer, c2 integer, c3 integer)
returns table (c1 integer, c2 integer, c3 integer)
external name test."tuple2table";
Trying this on a 10-tuple table yields the table itself:
create table data(c1 integer, c2 integer, c3 integer);
insert into data values (0,0,0),(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5),(6,6,6),(7,7,7),(8,8,8),(9,9,9);
select * from tuple2table( (select c1,c2,c3 from data) );
+------+------+------+
| c1 | c2 | c3 |
+======+======+======+
| 0 | 0 | 0 |
| 1 | 1 | 1 |
| 2 | 2 | 2 |
| 3 | 3 | 3 |
| 4 | 4 | 4 |
| 5 | 5 | 5 |
| 6 | 6 | 6 |
| 7 | 7 | 7 |
| 8 | 8 | 8 |
| 9 | 9 | 9 |
+------+------+------+
10 tuples (7.060ms)
Yes, it works.
However, this works only because mitosis couldn't kick in.
Now I force mitosis, starting the server with --forcemito (in both cases: default pipe, 8 threads):
+------+------+------+
| c1 | c2 | c3 |
+======+======+======+
| 0 | 7 | 7 |
| 1 | 8 | 8 |
| 2 | 9 | 9 |
+------+------+------+
10 tuples (13.337ms)
Notice that although the result is wrong, the count is correct.
This is because the first column (from which the count is probably derived) is correct. The other two are wrong (overwritten by every chunk, see original report).
The (purged) trace of the wrong result above shows:
(X_126,X_9,X_10) := battest.tuple2table(X_101,X_109,X_117);
(X_128,X_9,X_10) := battest.tuple2table(X_102,X_110,X_118);
(X_130,X_9,X_10) := battest.tuple2table(X_103,X_111,X_119);
(X_132,X_9,X_10) := battest.tuple2table(X_104,X_112,X_120);
(X_134,X_9,X_10) := battest.tuple2table(X_105,X_113,X_121);
(X_136,X_9,X_10) := battest.tuple2table(X_106,X_114,X_122);
(X_138,X_9,X_10) := battest.tuple2table(X_107,X_115,X_123);
(X_140,X_9,X_10) := battest.tuple2table(X_108,X_116,X_124);
Notice how X_9 and X_10 get reused by all chunks for the second and third column.
## Comment 21922
Date: 2016-03-16 18:22:26 +0100
From: @njnes
In the mergetable optimizer the multiple results weren't handled properly.
## Comment 21954
Date: 2016-03-25 09:59:07 +0100
From: @sjoerdmullender
Jul2015-SP3 has been released.
| Multi-column 1-N table-function with mitosis produces different column counts | https://api.github.com/repos/MonetDB/MonetDB/issues/3906/comments | 0 | 2020-11-30T13:22:13Z | 2024-06-27T12:10:26Z | https://github.com/MonetDB/MonetDB/issues/3906 | 753,474,275 | 3,906 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-01-14 05:55:12 +0100
From: Kaijiang <<chenkaijiang>>
To: SQL devs <<bugs-sql>>
Version: 11.21.11 (Jul2015-SP1)
CC: @njnes
Last updated: 2016-04-11 11:16:08 +0200
## Comment 21729
Date: 2016-01-14 05:55:12 +0100
From: Kaijiang <<chenkaijiang>>
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36
Build Identifier:
MonetDB doesn't handle ANY/SOME/ALL operator correctly
Reproducible: Always
### Steps to Reproduce:
1.create table t1 (f1 int, f2 int); create table t3 (f1 int, f2 int);
2.insert some rows into the 2 tables
3.select * from t1 where f1 > ANY (select f2 from t3);
### Actual Results:
cardinality violation (11>1)
(SOME/ALL operator got the same result)
### Expected Results:
return rows in t1 where f1 > any f2 column in t3;
## Comment 21731
Date: 2016-01-14 06:02:45 +0100
From: Kaijiang <<chenkaijiang>>
This case works well in other DB, such as PostgreSQL.
## Comment 21993
Date: 2016-03-30 21:20:01 +0200
From: @njnes
the parser already handled the any|more and all syntax. Now in the default branch also the semantics are properly handled. This (somewhat new feature) will be in the release after the Jun2016.
## Comment 22026
Date: 2016-04-11 11:16:08 +0200
From: @sjoerdmullender
Jul2015-SP4 has been released.
| MonetDB doesn't handle ANY/SOME/ALL operator correctly | https://api.github.com/repos/MonetDB/MonetDB/issues/3905/comments | 0 | 2020-11-30T13:22:11Z | 2024-06-27T12:10:25Z | https://github.com/MonetDB/MonetDB/issues/3905 | 753,474,242 | 3,905 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-01-12 21:36:02 +0100
From: Anthony Damico <<ajdamico>>
To: Hannes Muehleisen <<hannes>>
Version: 11.21.5 (Jul2015)
CC: ajdamico
Last updated: 2016-01-20 14:37:35 +0100
## Comment 21727
Date: 2016-01-12 21:36:02 +0100
From: Anthony Damico <<ajdamico>>
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0
Build Identifier:
C:/My Directory/MonetDB and C:/My Directory/MonetDB/ should yield the same
tested on windows
Reproducible: Always
### Steps to Reproduce:
library(MonetDB.R)
library(MonetDBLite)
db <- dbConnect( MonetDBLite() , "C:/My Directory/MonetDB" )
shutdown R console
restart R console
library(MonetDB.R)
library(MonetDBLite)
FAILS because of trailing slash
db <- dbConnect( MonetDBLite() , "C:/My Directory/MonetDB/" )
Error in MonetDBLite::monetdb_embedded_startup(embedded, !getOption("monetdb.debug.embedded", :
Cannot create C:/My Directory/MonetDB/
In addition: Warning message:
In dir.create(dir, recursive = T) :
'C:\My Directory\MonetDB' already exists
works
db <- dbConnect( MonetDBLite() , "C:/My Directory/MonetDB" )
## Comment 21738
Date: 2016-01-20 14:36:08 +0100
From: @hannesmuehleisen
FWIW:
> file.exists( "C:/My Directory")
[1] TRUE
> file.exists( "C:/My Directory/")
[1] FALSE
"SO DUMB"
## Comment 21739
Date: 2016-01-20 14:37:35 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [039448111253](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=039448111253) made by Hannes Muehleisen <hannes@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=039448111253](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=039448111253)
Changeset description:
Bugs 3904 3892 3886
| monetdblite cares about trailing slash but should not | https://api.github.com/repos/MonetDB/MonetDB/issues/3904/comments | 0 | 2020-11-30T13:22:08Z | 2024-06-27T12:10:24Z | https://github.com/MonetDB/MonetDB/issues/3904 | 753,474,215 | 3,904 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-01-12 12:15:44 +0100
From: Kaijiang <<chenkaijiang>>
To: SQL devs <<bugs-sql>>
Version: 11.21.11 (Jul2015-SP1)
CC: @njnes
Last updated: 2016-02-23 08:36:06 +0100
## Comment 21725
Date: 2016-01-12 12:15:44 +0100
From: Kaijiang <<chenkaijiang>>
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36
Build Identifier:
create table t3 (f1 int, f2 int);
select * from t3 as a(cc,dd) where a.cc=1;
Got error: SELECT: no such column 'a.cc'
Reproducible: Always
### Steps to Reproduce:
1. create table t3 (f1 int, f2 int);
2. select * from t3 as a(cc,dd) where a.cc=1;
### Actual Results:
Got error: SELECT: no such column 'a.cc'
### Expected Results:
should be equivalent to "select * from t3 as a(cc,dd) where a.f1=1;"
## Comment 21728
Date: 2016-01-14 05:46:37 +0100
From: Kaijiang <<chenkaijiang>>
"select * from t3 as a(cc,dd) where a.cc=1;" should be identical to "select * from t3 where t3.f1=1;"
## Comment 21815
Date: 2016-02-23 08:36:06 +0100
From: @njnes
the selection partion part is only valid after the where is done, ie you should first put your alias into a sub query.
| SQL parser error | https://api.github.com/repos/MonetDB/MonetDB/issues/3903/comments | 0 | 2020-11-30T13:22:06Z | 2024-06-28T07:19:54Z | https://github.com/MonetDB/MonetDB/issues/3903 | 753,474,188 | 3,903 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-01-12 02:35:36 +0100
From: Clint Cummins <<ccummins>>
To: MonetDB5 devs <<bugs-monetdb5>>
Version: 11.21.19 (Jul2015-SP4)
CC: @mlkersten
Last updated: 2016-07-25 21:14:54 +0200
## Comment 21721
Date: 2016-01-12 02:35:36 +0100
From: Clint Cummins <<ccummins>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36
Build Identifier:
It works fine with 3 cases.
Full error message (also see screen shot):
SyntaxException:user.pcrn[2804]:too deeply nested MAL program
TypeException:user.s91_1[6]:'user.pcrn' undefined in: X_11:dbl := user.pcrn(X_7:bte,X_8:dbl,X_9:bte,X_10:bte)
I will attach code files pcrnm_all.sql (35 cases - bug/limitation above),
pcrnm_1_34_35.sql (3 cases, works fine).
What I am trying to do is to speed up a query which computes a percentile rank from about 600,000 rows of an 8.8 million row table.
Since the rows of interest are scattered in the original table,
I divided it into 35 tables (m1 to m35).
Now I am trying to query the appropriate table based on the value of mid (1 to 35).
I didn't see a way to program this with compact code, so I did a "brute force" coding
with IF/THEN/ELSEIF/.../END IF to handle the 35 cases for mid.
Apparently the resulting code is too large.
It works fine when I only handle 3 cases.
Reproducible: Always
### Steps to Reproduce:
1. Define tables m1 to m35, and t1. (might be required to injest pcrnm_all.sql). I didn't include code and data to do this, but I could add that. Each table has the columns metric_name tinyint, metric_value double, service_category tinyint, peer_group tinyint. They could all have the values 34, 92.0, 1, 0 for my test input.
2. In mclient: \< pcrnm_all.sql
3. In mclient: select pcrn(34,92.0,1,0);
As an alternative to step 2, you could \< pcrnm_1_34_35.sql
and then step 3 would work fine.
### Actual Results:
SyntaxException:user.pcrn[2804]:too deeply nested MAL program
TypeException:user.s91_1[6]:'user.pcrn' undefined in: X_11:dbl := user.pcrn(X_7:bte,X_8:dbl,X_9:bte,X_10:bte)
### Expected Results:
pcrn_single_value
97.3558
for my own data, or
50.
for data with all values equal (34,92.0,1,0) across rows.
## Comment 21722
Date: 2016-01-12 02:36:42 +0100
From: Clint Cummins <<ccummins>>
Created attachment 380
screen shot of error message
> Attached file: [MAL_too_deeply_nested.gif](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3902_MAL_too_deeply_nested.gif_380) (image/gif, 9359 bytes)
> Description: screen shot of error message
## Comment 21723
Date: 2016-01-12 02:39:02 +0100
From: Clint Cummins <<ccummins>>
Created attachment 381
SQL code for full version of pcrn function
Handles 35 cases with IF/THEN/ELSEIF/.../END IF to use the appropriate tablename (m1 to m35) using the value in mid (1 to 35).
> Attached file: [pcrnm_all.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3902_pcrnm_all.sql_381) (text/plain, 15926 bytes)
> Description: SQL code for full version of pcrn function
## Comment 21724
Date: 2016-01-12 02:40:51 +0100
From: Clint Cummins <<ccummins>>
Created attachment 382
SQL code for 3-case version of pcrn function (works)
Handles 3 cases with IF/THEN/ELSEIF/.../END IF to use the appropriate tablename (m1, m34 or m35) using the value in mid (1, 34 or 35).
> Attached file: [pcrnm_1_34_35.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3902_pcrnm_1_34_35.sql_382) (text/plain, 1750 bytes)
> Description: SQL code for 3-case version of pcrn function (works)
## Comment 22256
Date: 2016-07-25 21:14:54 +0200
From: @mlkersten
The max depth for MAL programs is set to 32.
mal_function.h:define MAXDEPTH 32
A larger value requires a rebuild from source.
Alternatively, you might experiment with the MERGETABLES
to split a large table into pieces.
https://www.monetdb.org/Documentation/Cookbooks/SQLrecipes/DataPartitioning
| SQL function with IF/THEN/ELSEIF/.../END IF for 35 cases fails with "too deeply nested MAL program" | https://api.github.com/repos/MonetDB/MonetDB/issues/3902/comments | 0 | 2020-11-30T13:22:03Z | 2024-06-28T07:19:54Z | https://github.com/MonetDB/MonetDB/issues/3902 | 753,474,152 | 3,902 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-01-08 17:51:29 +0100
From: Jörg Strebel <<joerg.strebel>>
To: Hannes Muehleisen <<hannes>>
Version: 11.21.11 (Jul2015-SP1)
CC: ajdamico
Last updated: 2016-02-04 12:15:35 +0100
## Comment 21718
Date: 2016-01-08 17:51:29 +0100
From: Jörg Strebel <<joerg.strebel>>
In the test case clients/R/deps-test, the test script tries to install the R package 'dplyr'. This package is only available for R Versions >=3.1.2 (see https://cran.rstudio.com/web/packages/dplyr/dplyr.pdf)
However, openSUSE 13.2 only features R Version 3.1.1, so there is no way to automatically test the package installation.
I filed the bug as an SQL bug, as the clients bug category does not list R as a client.
## Comment 21719
Date: 2016-01-08 17:56:34 +0100
From: Jörg Strebel <<joerg.strebel>>
Maybe you could somehow verify the installed R version, or document the R version requirement somewhere (maybe I just haven't found it...)
## Comment 21767
Date: 2016-02-04 12:15:35 +0100
From: Anthony Damico <<ajdamico>>
hi jorg, sorry if i'm misunderstanding this (please re-open this bug if i am)
according to the dplyr description file, it's dplyr that has the 3.1.2 dependency you are describing, so you would need to request backwards-compatibility there?
> packageDescription("dplyr")
BugReports: https://github.com/hadley/dplyr/issues
Depends: R (>= 3.1.2)
| dplyr not available for R Version <= 3.1.1 | https://api.github.com/repos/MonetDB/MonetDB/issues/3901/comments | 0 | 2020-11-30T13:22:01Z | 2024-06-28T07:19:54Z | https://github.com/MonetDB/MonetDB/issues/3901 | 753,474,115 | 3,901 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-01-06 14:29:24 +0100
From: Kevin Boulain <<kevin.boulain>>
To: SQL devs <<bugs-sql>>
Version: 11.21.5 (Jul2015)
CC: @njnes
Last updated: 2016-03-25 09:59:53 +0100
## Comment 21715
Date: 2016-01-06 14:29:24 +0100
From: Kevin Boulain <<kevin.boulain>>
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0
Build Identifier:
NULL literal support has recently been added but we discovered that using it within a IN or a BETWEEN may invalid the query.
Maybe others are impacted.
Reproducible: Always
### Steps to Reproduce:
In mclient, the following queries produce unexpected results:
1. sql>select null in (null);
TypeException:user.s14_2[4]:'calc.==' undefined in: X_7:bit := calc.==(X_5:void,X_6:void);
program contains errors
2. sql>select null in (1);
types tinyint(8,0) and any(0,0) are not equal
3. sql>select null between null and null;
TypeException:user.s18_2[4]:'calc.>=' undefined in: X_8:bit := calc.>=(X_6:void,X_7:void);
program contains errors
### Expected Results:
I think that all of the queries should return NULL.
The mserver5 --version outputs:
MonetDB 5 server v11.21.12 (64-bit, 64-bit oids, 128-bit integers)
This is an unreleased version
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 378.6GiB available memory, 56 available cpu cores
Libraries:
libpcre: 8.35 2014-04-04 (compiled with 8.35)
openssl: OpenSSL 1.0.1j 15 Oct 2014 (compiled with OpenSSL 1.0.1j 15 Oct 2014)
libxml2: 2.9.1 (compiled with 2.9.1)
Compiled by: root@builder (x86_64-unknown-linux-gnu)
Compilation: gcc -O3 -fomit-frame-pointer -pipe -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 -D_FORTIFY_SOURCE=2
Linking : /usr/bin/ld -m elf_x86_64
## Comment 21892
Date: 2016-03-14 08:21:22 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [d414fb156e84](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d414fb156e84) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=d414fb156e84](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=d414fb156e84)
Changeset description:
fixes for bug #3900, ie handle null (type any) in in/between expressions
## Comment 21893
Date: 2016-03-14 08:22:11 +0100
From: @njnes
Fixed in the 2015 branch, ie handle null(type any) in 'in expressions'
## Comment 21978
Date: 2016-03-25 09:59:53 +0100
From: @sjoerdmullender
Jul2015-SP3 has been released.
| null handling in some sql statements is incorrect | https://api.github.com/repos/MonetDB/MonetDB/issues/3900/comments | 0 | 2020-11-30T13:21:57Z | 2024-06-27T12:10:19Z | https://github.com/MonetDB/MonetDB/issues/3900 | 753,474,071 | 3,900 |
[
"MonetDB",
"MonetDB"
] | Date: 2016-01-03 19:24:12 +0100
From: Jörg Strebel <<joerg.strebel>>
To: Jörg Strebel <<joerg.strebel>>
Version: 11.21.11 (Jul2015-SP1)
CC: @drstmane
Last updated: 2016-01-08 16:10:55 +0100
## Comment 21709
Date: 2016-01-03 19:24:12 +0100
From: Jörg Strebel <<joerg.strebel>>
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36
Build Identifier:
Testing FAILED SIGNIFICANTLY (18 out of 2199 tests failed)
139 out of 2199 tests could not be executed
18 out of 2199 tests produced SIGNIFICANTLY different output
clients/R/deps-install
clients/R/deps-test
monetdb5/extras/rapi/rapi01
monetdb5/modules/mal/remote01
sql/backends/monet5/rapi09
sql/backends/monet5/rapi15
sql/test/BugTracker-2012/url_script_test.Bug-2972
sql/test/BugTracker-2013/check-constraint.Bug-3335
sql/test/BugTracker-2015/schemadiff.Bug-3778
sql/test/BugTracker-2015/fractional_precision_limitation.Bug-3808
sql/test/BugTracker-2015/timestamp_convert.Bug-3815
sql/test/BugTracker-2015/schema-trigger.Bug-3710
sql/test/Triggers/recursive_triggers
sql/test/Users/dropManyUsers.Bug-3764
sql/test/Users/grantMonetdb
sql/test/Users/copyinto
sql/test/mergetables/singlekeyconstraint
sql/test/pg_regress/timestamptz
It is unclear if the actual functionality is broken, or if the tests cases are only broken.
Reproducible: Always
### Steps to Reproduce:
0. Set appropriate environment variables and PATH variable
1. Build MonetDB from Mercurial source (default branch, 30.12.2015), as described in documentation.
2. Install locally
3. Run Mtest -r in the source package directory
### Actual Results:
Please see Details. I will provide mTests/index.html for more details.
### Expected Results:
All tests should be executed successfully
## Comment 21710
Date: 2016-01-03 19:28:57 +0100
From: Jörg Strebel <<joerg.strebel>>
Created attachment 379
Mtest output
> Attached file: [times.lst](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3899_times.lst_379) (text/plain, 139159 bytes)
> Description: Mtest output
## Comment 21716
Date: 2016-01-08 15:13:58 +0100
From: Jörg Strebel <<joerg.strebel>>
I ran the test suite on the development branch. I'll open other entries with the defects from test runs on the Jul2015 branch.
## Comment 21717
Date: 2016-01-08 16:10:55 +0100
From: @drstmane
Hi,
several tests are expected to fail, some on all platforms (mainly a reminder that the respective bug has not been fixed, yet), some on only selected platforms (e.g., because that platform does not support certain features or the we haven't approved platform-specific output, yet).
For a (kind of) "reference" which test currently fail on which platform, please see out "TestWeb" at
http://monetdb.cwi.nl/testweb/web/status.php
Having said that, we are interested in any (detailed) feedback, which test work (how) differently in other environments than in our "TestWeb".
Best,
Stefan
| Full run of test sets via Mtest -r reports 18 errors | https://api.github.com/repos/MonetDB/MonetDB/issues/3899/comments | 0 | 2020-11-30T13:21:54Z | 2024-06-28T07:19:53Z | https://github.com/MonetDB/MonetDB/issues/3899 | 753,474,037 | 3,899 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-12-29 16:16:25 +0100
From: anthonin.bonnefoy
To: SQL devs <<bugs-sql>>
Version: 11.21.11 (Jul2015-SP1)
CC: frederic.jolliton+monetdb, @mlkersten, @njnes, @yzchang
Last updated: 2017-12-14 14:45:59 +0100
## Comment 21698
Date: 2015-12-29 16:16:25 +0100
From: anthonin.bonnefoy
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0 Iceweasel/43.0
Build Identifier:
A deadlock appeared on one of our test machine.
We are based on commit eba30f4d7406e70c2918458a1d5a1c4da05a81fb from branch rel-Jul2015.
Here is the backtrace:
Thread 9 (Thread 0x7fc8598d4700 (LWP 23443)):
0 0x00007fc85b7862b3 in select () at ../sysdeps/unix/syscall-template.S:81
1 0x00007fc85cbb60b9 in MT_sleep_ms () from libbat.so.12
2 0x00007fc85d0e31cf in profilerHeartbeat () from libmonetdb5.so.19
3 0x00007fc85ba580a4 in start_thread (arg=0x7fc8598d4700) at pthread_create.c:309
4 0x00007fc85b78d04d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 8 (Thread 0x7fc8588b8700 (LWP 23445)):
0 0x00007fc85b7862b3 in select () at ../sysdeps/unix/syscall-template.S:81
1 0x00007fc85d19b263 in SERVERlistenThread () from libmonetdb5.so.19
2 0x00007fc85cbb4823 in thread_starter () from libbat.so.12
3 0x00007fc85ba580a4 in start_thread (arg=0x7fc8588b8700) at pthread_create.c:309
4 0x00007fc85b78d04d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 7 (Thread 0x7fc851127700 (LWP 23699)):
0 0x00007fc85b7862b3 in select () at ../sysdeps/unix/syscall-template.S:81
1 0x00007fc85cbb60b9 in MT_sleep_ms () from libbat.so.12
2 0x00007fc8594137a5 in store_manager () from monetdb5/lib_sql.so
3 0x00007fc8593aa079 in mvc_logmanager () from monetdb5/lib_sql.so
4 0x00007fc85cbb4823 in thread_starter () from libbat.so.12
5 0x00007fc85ba580a4 in start_thread (arg=0x7fc851127700) at pthread_create.c:309
6 0x00007fc85b78d04d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 6 (Thread 0x7fc81e788700 (LWP 21432)):
0 0x00007fc85ba594db in pthread_join (threadid=140497371657984, thread_return=0x0) at pthread_join.c:92
1 0x00007fc85cbb4a2b in MT_create_thread () from libbat.so.12
2 0x00007fc85cb9bdb8 in BATmsync () from libbat.so.12
3 0x00007fc8594275b8 in tr_update_delta.isra () from monetdb5/lib_sql.so
4 0x00007fc859427f14 in update_table () from monetdb5/lib_sql.so
5 0x00007fc859412452 in rollforward_update_table () from monetdb5/lib_sql.so
6 0x00007fc85941ce6b in rollforward_update_schema () from monetdb5/lib_sql.so
7 0x00007fc85941d821 in sql_trans_commit () from monetdb5/lib_sql.so
8 0x00007fc8593aa670 in mvc_commit () from monetdb5/lib_sql.so
9 0x00007fc8593069c1 in SQLtransaction () from monetdb5/lib_sql.so
10 0x00007fc85d0cc2c0 in runMALsequence () from libmonetdb5.so.19
11 0x00007fc85d0cdb3d in runMAL () from libmonetdb5.so.19
12 0x00007fc85931e5e3 in SQLengineIntern () from monetdb5/lib_sql.so
13 0x00007fc85d0e9817 in runScenarioBody () from libmonetdb5.so.19
14 0x00007fc85d0ea55d in runScenario () from libmonetdb5.so.19
15 0x00007fc85d0eaa88 in MSserveClient () from libmonetdb5.so.19
16 0x00007fc85d0eb0ef in MSscheduleClient () from libmonetdb5.so.19
17 0x00007fc85d19bda6 in doChallenge () from libmonetdb5.so.19
18 0x00007fc85cbb4823 in thread_starter () from libbat.so.12
19 0x00007fc85ba580a4 in start_thread (arg=0x7fc81e788700) at pthread_create.c:309
20 0x00007fc85b78d04d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 5 (Thread 0x7fc817edf700 (LWP 21623)):
0 0x00007fc85b7862b3 in select () at ../sysdeps/unix/syscall-template.S:81
1 0x00007fc85cbb60b9 in MT_sleep_ms () from libbat.so.12
2 0x00007fc859413acd in store_lock () from monetdb5/lib_sql.so
3 0x00007fc8593aaae2 in mvc_create () from monetdb5/lib_sql.so
4 0x00007fc85931b47c in SQLinitClient () from monetdb5/lib_sql.so
5 0x00007fc85d0e9706 in runScenarioBody () from libmonetdb5.so.19
6 0x00007fc85d0ea55d in runScenario () from libmonetdb5.so.19
7 0x00007fc85d0eaa88 in MSserveClient () from libmonetdb5.so.19
8 0x00007fc85d0eb0ef in MSscheduleClient () from libmonetdb5.so.19
9 0x00007fc85d19bda6 in doChallenge () from libmonetdb5.so.19
10 0x00007fc85cbb4823 in thread_starter () from libbat.so.12
11 0x00007fc85ba580a4 in start_thread (arg=0x7fc817edf700) at pthread_create.c:309
12 0x00007fc85b78d04d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 4 (Thread 0x7fc81f91c700 (LWP 5271)):
0 0x00007fc85b7862b3 in select () at ../sysdeps/unix/syscall-template.S:81
1 0x00007fc85cbb60b9 in MT_sleep_ms () from libbat.so.12
2 0x00007fc85931afc5 in SQLinitClient () from monetdb5/lib_sql.so
3 0x00007fc85d0e9706 in runScenarioBody () from libmonetdb5.so.19
4 0x00007fc85d0ea55d in runScenario () from libmonetdb5.so.19
5 0x00007fc85d0eaa88 in MSserveClient () from libmonetdb5.so.19
6 0x00007fc85d0eb0ef in MSscheduleClient () from libmonetdb5.so.19
7 0x00007fc85d19bda6 in doChallenge () from libmonetdb5.so.19
8 0x00007fc85cbb4823 in thread_starter () from libbat.so.12
9 0x00007fc85ba580a4 in start_thread (arg=0x7fc81f91c700) at pthread_create.c:309
10 0x00007fc85b78d04d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 3 (Thread 0x7fc81eb15700 (LWP 5308)):
0 0x00007fc85b7862b3 in select () at ../sysdeps/unix/syscall-template.S:81
1 0x00007fc85cbb60b9 in MT_sleep_ms () from libbat.so.12
2 0x00007fc85931afc5 in SQLinitClient () from monetdb5/lib_sql.so
3 0x00007fc85d0e9706 in runScenarioBody () from libmonetdb5.so.19
4 0x00007fc85d0ea55d in runScenario () from libmonetdb5.so.19
5 0x00007fc85d0eaa88 in MSserveClient () from libmonetdb5.so.19
6 0x00007fc85d0eb0ef in MSscheduleClient () from libmonetdb5.so.19
7 0x00007fc85d19bda6 in doChallenge () from libmonetdb5.so.19
8 0x00007fc85cbb4823 in thread_starter () from libbat.so.12
9 0x00007fc85ba580a4 in start_thread (arg=0x7fc81eb15700) at pthread_create.c:309
10 0x00007fc85b78d04d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 2 (Thread 0x7fc8210ea700 (LWP 18128)):
0 0x00007fc85b7862b3 in select () at ../sysdeps/unix/syscall-template.S:81
1 0x00007fc85cbb60b9 in MT_sleep_ms () from libbat.so.12
2 0x00007fc85931afc5 in SQLinitClient () from monetdb5/lib_sql.so
3 0x00007fc85d0e9706 in runScenarioBody () from libmonetdb5.so.19
4 0x00007fc85d0ea55d in runScenario () from libmonetdb5.so.19
5 0x00007fc85d0eaa88 in MSserveClient () from libmonetdb5.so.19
6 0x00007fc85d0eb0ef in MSscheduleClient () from libmonetdb5.so.19
7 0x00007fc85d19bda6 in doChallenge () from libmonetdb5.so.19
8 0x00007fc85cbb4823 in thread_starter () from libbat.so.12
9 0x00007fc85ba580a4 in start_thread (arg=0x7fc8210ea700) at pthread_create.c:309
10 0x00007fc85b78d04d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 1 (Thread 0x7fc85d719780 (LWP 23405)):
0 0x00007fc85b7862b3 in select () at ../sysdeps/unix/syscall-template.S:81
1 0x00007fc85cbb60b9 in MT_sleep_ms () from libbat.so.12
2 0x00000000004029ea in main ()
Thread 6 tries to join thread 5 while having the store_lock and thread 5 try to get store_lock.
Reproducible: Couldn't Reproduce
## Comment 21699
Date: 2015-12-29 20:11:33 +0100
From: @mlkersten
This looks rather suspicious.
To nail a possible issue, can you answer the following questions:
- did you use a privately compiled version of MonetDB with
-- assertions enabled
-- define MSYNC_BACKGROUND
- do you use some of your own BAT manipulation functions?
-- BATmsync may only be called for persistent BATs
-- do you use string bats for this addition?
## Comment 21703
Date: 2015-12-30 15:32:19 +0100
From: anthonin.bonnefoy
Okay, more details:
We are on changeset 58103:71a94ea8492e (I forgot we use a git mirror internally, sorry…)
MonetDB has been compiled with vertoo.data removed and the following flags:
./configure --enable-int128 --enable-strict --disable-microhttpd --without-rubygem --enable-optimize
So no assertions and MSYNC_BACKGROUND seems to be hardcoded in gdk_storage.c:648
We do use some custom functions (an aggregation function for concatenating strings with ',') but they should not have been used in this case.
The base was only insertions from csv with table creations inside the transaction.
Each table creation is followed by a commit as a (not yet removed) workaround for bug #3802.
I managed to add debug symbol on my gdb, so here a better backtrace of the deadlocked threads:
Thread 8 (Thread 0x7f311dbfa700 (LWP 18293)):
0 0x00007f31291714db in pthread_join (threadid=threadid@entry=139848246736640, thread_return=thread_return@entry=0x0) at pthread_join.c:92
1 0x00007f312a2cca2b in join_threads () at gdk_system.c:484
2 MT_create_thread (t=t@entry=0x7f311dbf7630, f=f@entry=0x7f312a2b21e0 <BATmsyncImplementation>, arg=arg@entry=0x7f30f227fd70, d=d@entry=MT_THR_DETACHED) at gdk_system.c:505
3 0x00007f312a2b3db8 in BATmsync (b=b@entry=0x7f30f072d380) at gdk_storage.c:692
4 0x00007f3126b3f5b8 in tr_update_delta (tr=tr@entry=0x7f30f80016d0, obat=0x7f30f078b050, cbat=0x7f30f0369220, unique=<optimized out>) at bat_storage.c:1904
5 0x00007f3126b3ff14 in update_table (tr=0x7f30f80016d0, ft=0x7f30f07e4b40, tt=0x7f30f22b5300) at bat_storage.c:2154
6 0x00007f3126b2a452 in rollforward_update_table (tr=0x7f30f80016d0, ft=0x7f30f07e4b40, tt=0x7f30f22b5300, mode=3) at store.c:2861
7 0x00007f3126b34e6b in rollforward_changeset_updates (mode=3, fd=<optimized out>, rollforward_deletes=0x7f3126b26a90 <rollforward_drop_table>, rollforward_creates=0x7f3126b26580 <rollforward_create_table>,
rollforward_updates=0x7f3126b29ca0 <rollforward_update_table>, b=0x54caa70, ts=0x54caaa0, fs=0x7f30f805a9e0, tr=0x7f30f80016d0) at store.c:2474
8 rollforward_update_schema (tr=0x7f30f80016d0, fs=0x7f30f805a9b0, ts=0x54caa70, mode=3) at store.c:2937
9 0x00007f3126b35821 in rollforward_changeset_updates (mode=<optimized out>, fd=<optimized out>, rollforward_deletes=<optimized out>, rollforward_creates=<optimized out>, rollforward_updates=<optimized out>, b=<optimized out>,
ts=<optimized out>, fs=<optimized out>, tr=<optimized out>) at store.c:2474
10 rollforward_trans (mode=<optimized out>, tr=<optimized out>) at store.c:2959
11 sql_trans_commit (tr=0x7f30f80016d0) at store.c:3372
12 0x00007f3126ac2670 in mvc_commit (m=0x7f30f2ee2330, chain=chain@entry=0, name=name@entry=0x0) at sql_mvc.c:258
13 0x00007f3126a1e9c1 in SQLtransaction (cntxt=0x7f3126ff3330, mb=<optimized out>, stk=<optimized out>, pci=<optimized out>) at sql.c:268
14 0x00007f312a7e42c0 in runMALsequence (cntxt=0x7f30f511b9d0, mb=0x7f30f09ea540, startpc=18396, stoppc=-1, stk=0x7f30f0a88a60, env=0x7f3100000a50, pcicaller=0x0) at mal_interpreter.c:631
15 0x00007f312a7e5b3d in runMAL (cntxt=0x7f3126ff3330, mb=0x7f30f09ea540, mbcaller=0x47dc, mbcaller@entry=0x0, env=0x0) at mal_interpreter.c:365
16 0x00007f3126a365e3 in SQLengineIntern (c=0x7f3126ff3330, be=0x7f30f0e87dc0) at sql_execute.c:408
17 0x00007f312a801817 in runPhase (phase=4, c=0x7f3126ff3330) at mal_scenario.c:515
18 runScenarioBody (c=c@entry=0x7f3126ff3330) at mal_scenario.c:559
19 0x00007f312a80255d in runScenario (c=c@entry=0x7f3126ff3330) at mal_scenario.c:579
20 0x00007f312a802a88 in MSserveClient (dummy=dummy@entry=0x7f3126ff3330) at mal_session.c:439
21 0x00007f312a8030ef in MSscheduleClient (command=command@entry=0x7f30f01cdf30 "", challenge=challenge@entry=0x7f311dbf9e60 "HC3C1LuG2", fin=0x7f30f0568e70, fout=fout@entry=0x7f30f0c51e20) at mal_session.c:319
22 0x00007f312a8b3da6 in doChallenge (data=<optimized out>) at mal_mapi.c:184
23 0x00007f312a2cc823 in thread_starter (arg=<optimized out>) at gdk_system.c:458
24 0x00007f31291700a4 in start_thread (arg=0x7f311dbfa700) at pthread_create.c:309
25 0x00007f3128ea504d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 7 (Thread 0x7f30f511b700 (LWP 18396)):
0 0x00007f3128e9e2b3 in select () at ../sysdeps/unix/syscall-template.S:81
1 0x00007f312a2ce0b9 in MT_sleep_ms (ms=ms@entry=1) at gdk_posix.c:1085
2 0x00007f3126b2bacd in store_lock () at store.c:1659
3 0x00007f3126ac2ae2 in mvc_create (clientid=2, stk=stk@entry=0, debug=0, rs=0x7f30fd1476a0, ws=0x7f30fdade3e0) at sql_mvc.c:423
4 0x00007f3126a3347c in SQLinitClient (c=0x7f3126ff9640) at sql_scenario.c:444
5 0x00007f312a801706 in runPhase (phase=5, c=0x7f3126ff9640) at mal_scenario.c:515
6 runScenarioBody (c=c@entry=0x7f3126ff9640) at mal_scenario.c:542
7 0x00007f312a80255d in runScenario (c=c@entry=0x7f3126ff9640) at mal_scenario.c:579
8 0x00007f312a802a88 in MSserveClient (dummy=dummy@entry=0x7f3126ff9640) at mal_session.c:439
9 0x00007f312a8030ef in MSscheduleClient (command=command@entry=0x7f30fd177b40 "P\321r\376\060\177", challenge=challenge@entry=0x7f30f511ae60 "JPz9UODGP", fin=0x7f30fd1476a0, fout=fout@entry=0x7f30fdade3e0) at mal_session.c:319
10 0x00007f312a8b3da6 in doChallenge (data=<optimized out>) at mal_mapi.c:184
11 0x00007f312a2cc823 in thread_starter (arg=<optimized out>) at gdk_system.c:458
12 0x00007f31291700a4 in start_thread (arg=0x7f30f511b700) at pthread_create.c:309
13 0x00007f3128ea504d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 8 was trying to add some lines on a uuid bat from what I understood from obat and cbat in tr_update_delta.
I can provide the coredump along with the binaries with debug symbol if you want.
## Comment 21705
Date: 2015-12-31 16:15:56 +0100
From: @njnes
Do you have some sql script to reproduce this situation. Its not clear why we get into this problem, ie a new client hangs on a thread_join done in a older
(long running) thread. Threads should never try to join an active client thread.
So to find out why we could use a sql or more complex script to test this.
## Comment 21776
Date: 2016-02-11 10:20:02 +0100
From: Frédéric Jolliton <<frederic.jolliton+monetdb>>
We got twice this exact problem in the past 3 days on one of our server.
It occured after 48hrs of high activity, so it's hard to figure how to reproduce it.
We're keeping the server in this state for now to try to further investigate the situation.
## Comment 21901
Date: 2016-03-14 15:06:20 +0100
From: @yzchang
Hai Anthonin, Frédéric,
Would you please test if the recent fixes for concurrent transactions have any (hopefully positive) effect on this bug? Thanks!
## Comment 22300
Date: 2016-08-17 14:00:29 +0200
From: Frédéric Jolliton <<frederic.jolliton+monetdb>>
FYI, we got the exact situation again. We are going to investigate one more time how we got there.
In the meantime, we made a tool to try to get a better view of the thread state and the pending (SQL) queries. The <var:desc> syntax indicates an attempt to get the lock pointed by 'var' with the description 'desc' (as seen in the source code). The syntax [sem_wait:14<124790>] indicates that the thread 14 (as numbered by GDB) is currently waiting in sem_wait and its LWP ID is 124790.
We see that:
- thread 32 is waiting on thread 13 to terminate (whose LWP ID 124863 is shown few lines after).
- thread 2 to 12 (partially elided, all related to SQLinitClient), but also 13, 42 and 43 are all waiting for lock bs_lock to be released.
So something has not released bs_lock.
Threads:
(23267)
|-clone
| `-start_thread
| |-DFLOWworker
| | `-q_dequeue-+-[sem_wait:14<124790>]
| | [..]
| | `-[sem_wait:41<124261>]
| |-profilerHeartbeat
| | `-MT_sleep_ms---[select:45<23524>]
| `-thread_starter
| |-SERVERlistenThread
| | `-[select:44<23527>]
| |-doChallenge
| | `-MSscheduleClient
| | `-MSserveClient
| | `-runScenario
| | `-runScenarioBody
| | |-SQLexitClient
| | | `-mvc_destroy
| | | `-store_lock<bs_lock:trans_lock>
| | | `-MT_sleep_ms
| | | `-[select:42<15669>]
| | `-runPhase
| | |-SQLengineIntern
| | | `-runMAL
| | | `-runMALsequence
| | | `-SQLtransaction
| | | `-mvc_commit
| | | `-sql_trans_commit
| | | `-rollforward_trans
| | | `-rollforward_changeset_updates
| | | `-rollforward_update_schema
| | | `-rollforward_changeset_updates
| | | `-rollforward_update_table
| | | `-update_table
| | | `-tr_update_delta
| | | `-BATmsync
| | | `-MT_create_thread
| | | `-join_threads
| | | `-[pthread_join[tid=124863]:32<124753>]
| | |-SQLinitClient
| | | `-mvc_create
| | | `-store_lock<bs_lock:trans_lock>
| | | `-MT_sleep_ms
| | | `-[select:13<124863>]
| | `-SQLinitClient<sql_contextLock:SQLinitClient>
| | `-MT_sleep_ms
| | |-[select:10<32677>]
| | [..]
| | `-[select:9<93552>]
| `-mvc_logmanager
| `-store_manager<bs_lock:store_manager>
| `-MT_sleep_ms
| `-[select:43<23582>]
`-main---MT_sleep_ms---[select:1<23267>]
To further help diagnosing, the tool also output the queries as seen from GDB by examining the process memory:
Queries:
Thread 2 [sql] [Active: 0] <initclient (5)> [Mode: runclient (2)] [Login: 2016-08-16T15:42:41] [Command: 2016-08-16T15:42:41] [Actions: 0] [Total: 0.0s]
Thread 3 [sql] [Active: 0] <initclient (5)> [Mode: runclient (2)] [Login: 2016-08-16T14:41:18] [Command: 2016-08-16T14:41:18] [Actions: 0] [Total: 0.0s]
Thread 4 [sql] [Active: 0] <initclient (5)> [Mode: runclient (2)] [Login: 2016-08-16T10:12:15] [Command: 2016-08-16T10:12:15] [Actions: 0] [Total: 0.0s]
Thread 5 [sql] [Active: 0] <initclient (5)> [Mode: runclient (2)] [Login: 2016-08-16T09:43:28] [Command: 2016-08-16T09:43:28] [Actions: 0] [Total: 0.0s]
Thread 6 [sql] [Active: 0] <initclient (5)> [Mode: runclient (2)] [Login: 2016-08-16T09:41:39] [Command: 2016-08-16T09:41:39] [Actions: 0] [Total: 0.0s]
Thread 7 [sql] [Active: 0] <initclient (5)> [Mode: runclient (2)] [Login: 2016-08-16T09:31:47] [Command: 2016-08-16T09:31:47] [Actions: 0] [Total: 0.0s]
Thread 8 [sql] [Active: 0] <initclient (5)> [Mode: runclient (2)] [Login: 2016-08-16T09:31:02] [Command: 2016-08-16T09:31:02] [Actions: 0] [Total: 0.0s]
Thread 9 [sql] [Active: 0] <initclient (5)> [Mode: runclient (2)] [Login: 2016-08-16T09:30:24] [Command: 2016-08-16T09:30:24] [Actions: 0] [Total: 0.0s]
Thread 10 [sql] [Active: 0] <initclient (5)> [Mode: runclient (2)] [Login: 2016-08-15T10:07:16] [Command: 2016-08-15T10:07:16] [Actions: 0] [Total: 0.0s]
Thread 11 [sql] [Active: 0] <initclient (5)> [Mode: runclient (2)] [Login: 2016-08-14T16:27:36] [Command: 2016-08-14T16:27:36] [Actions: 0] [Total: 0.0s]
Thread 12 [sql] [Active: 0] <initclient (5)> [Mode: runclient (2)] [Login: 2016-08-14T16:27:35] [Command: 2016-08-14T16:27:35] [Actions: 0] [Total: 0.0s]
Thread 13 [sql] [Active: 0] <initclient (5)> [Mode: runclient (2)] [Login: 2016-08-14T16:27:35] [Command: 2016-08-14T16:27:35] [Actions: 0] [Total: 0.0s]
Thread 32 [sql] [Active: 1] <engine (4)> [Mode: runclient (2)] [Login: 2016-08-14T16:27:34] [Command: 2016-08-14T16:27:35] [Actions: 31] [Total: 0.523975s]
'scommit\n;'
Thread 42 [sql] [Active: 0] <reader (0)> [Mode: finishclient (1)] [Login: 2016-08-14T10:05:13] [Command: 2016-08-15T10:07:16] [Actions: 1173] [Total: 120.62709s]
"sselect count(*) from some_table where the_column in ('foo', 'bar', 'baz')"
Thread 42 shows that we use a long running session (the last command ran 24hr after the first connection), which is normal.
(Everything is extracted from GDB, since MonetDB is totally stuck at this point.)
## Comment 22301
Date: 2016-08-17 15:21:05 +0200
From: Frédéric Jolliton <<frederic.jolliton+monetdb>>
It seems that mvc_commit() is taking the lock bs_lock through lock_store(), and it is still held when reaching pthread_join it seems (but I might be wrong).
Thus, the thread 32 is waiting (joining) a thread (13) itself waiting for bs_lock to be freed. Hence the deadlock.
## Comment 22358
Date: 2016-09-07 14:42:47 +0200
From: @sjoerdmullender
The problem is not so much that locks are being held when the thread join happens, the problem is that a thread join is done for the wrong thread.
The joins that are done in join_threads should *only* be on threads that have died or are very, very close to dieing. The thread that is being joined is neither. *That* is the problem.
What I would be interested in at this point is the contents of the posthreads linked list (gdk_system.c) and the value of *p inside the function join_threads.
## Comment 24646
Date: 2016-11-02 16:57:31 +0100
From: Frédéric Jolliton <<frederic.jolliton+monetdb>>
We got the same issue today on Jul2015-SP4.
We were able to gather some information about posthreads before restarting the database. Unfortunately, the p variable was optimized out, so there is no info about it.
This linked list had the following entries (head first). Indeed we had 9 mclient stucks (all waiting for a lock).
{next = 0x7f62900016a0, tid = 140047619213056, func = 0x7f62b2de2190 <doChallenge>, arg = 0x7f6290000d20, exited = 0}
{next = 0x7f6290001510, tid = 140048365336320, func = 0x7f62b2de2190 <doChallenge>, arg = 0x7f6290000d20, exited = 0}
{next = 0x7f62900024b0, tid = 140048915719936, func = 0x7f62b2de2190 <doChallenge>, arg = 0x7f6290000d20, exited = 0}
{next = 0x7f62900019c0, tid = 140047785166592, func = 0x7f62b2de2190 <doChallenge>, arg = 0x7f6290000d20, exited = 0}
{next = 0x7f6290001380, tid = 140047070258944, func = 0x7f62b2de2190 <doChallenge>, arg = 0x7f6290000d20, exited = 0}
{next = 0x7f6290001830, tid = 140047432980224, func = 0x7f62b2de2190 <doChallenge>, arg = 0x7f6290000d20, exited = 0}
{next = 0x7f6290003e30, tid = 140047411357440, func = 0x7f62b2de2190 <doChallenge>, arg = 0x7f6290000d20, exited = 0}
{next = 0x7f6290001060, tid = 140061527021312, func = 0x7f62b2de2190 <doChallenge>, arg = 0x7f6290000d20, exited = 0}
{next = 0x7f624da07970, tid = 140047908521728, func = 0x7f62b2de2190 <doChallenge>, arg = 0x7f6290000d20, exited = 0}
{next = 0x7f5e61850bf0, tid = 140048917821184, func = 0x7f62b27cc5d0 <BATmsyncImplementation>, arg = 0x7f5e6a5368d0, exited = 0}
{next = 0x7f5ec884d520, tid = 140047370168064, func = 0x7f62b27cc5d0 <BATmsyncImplementation>, arg = 0x7f5e616d05b0, exited = 0}
{next = 0x7f5f7e75f580, tid = 140046909499136, func = 0x7f62b27cc5d0 <BATmsyncImplementation>, arg = 0x7f5f7cf67a30, exited = 0}
{next = 0x7f5f4bfd3110, tid = 140047669192448, func = 0x7f62b27cc5d0 <BATmsyncImplementation>, arg = 0x7f5f7c1c0810, exited = 0}
{next = 0x7f5ec959ecd0, tid = 140047430878976, func = 0x7f62b27cc5d0 <BATmsyncImplementation>, arg = 0x7f5e281cdaa0, exited = 0}
{next = 0x7f5e41b93f70, tid = 140046890411776, func = 0x7f62b27cc5d0 <BATmsyncImplementation>, arg = 0x7f5ec954e470, exited = 0}
{next = 0x7f5e413d0080, tid = 140047641655040, func = 0x7f62b27cc5d0 <BATmsyncImplementation>, arg = 0x7f5e41b52a10, exited = 0}
{next = 0x7f5ec9564220, tid = 140047671293696, func = 0x7f62b27cc5d0 <BATmsyncImplementation>, arg = 0x7f5e4165f2b0, exited = 0}
{next = 0x7f622b865a80, tid = 140048417998592, func = 0x7f62b27cc5d0 <BATmsyncImplementation>, arg = 0x7f5ec886dae0, exited = 0}
{next = 0x7f5e60400510, tid = 140048206907136, func = 0x7f62b27cc5d0 <BATmsyncImplementation>, arg = 0x7f5e60400590, exited = 0}
{next = 0x7f607ec8cb30, tid = 140047179360000, func = 0x7f62b27cc5d0 <BATmsyncImplementation>, arg = 0x7f5e6063c9c0, exited = 0}
{next = 0x7f607e6ebff0, tid = 140047631148800, func = 0x7f62b27cc5d0 <BATmsyncImplementation>, arg = 0x7f607fe0f730, exited = 0}
{next = 0x7f5f4977fe00, tid = 140047910622976, func = 0x7f62b27cc5d0 <BATmsyncImplementation>, arg = 0x7f607c79dd20, exited = 0}
{next = 0x7f5f43361a40, tid = 140047361455872, func = 0x7f62b27cc5d0 <BATmsyncImplementation>, arg = 0x7f5f4bf554f0, exited = 0}
{next = 0x7f5f400c2990, tid = 140047161587456, func = 0x7f62b27cc5d0 <BATmsyncImplementation>, arg = 0x7f5f41158130, exited = 0}
{next = 0x7f5e20147270, tid = 140047066056448, func = 0x7f62b27cc5d0 <BATmsyncImplementation>, arg = 0x7f5f416aaca0, exited = 0}
{next = 0x7f5ebb644180, tid = 140047664666368, func = 0x7f62b27cc5d0 <BATmsyncImplementation>, arg = 0x7f5e201ef620, exited = 0}
{next = 0x7f5e2050b220, tid = 140047163688704, func = 0x7f62b27cc5d0 <BATmsyncImplementation>, arg = 0x7f5ebb283a00, exited = 0}
{next = 0x7f6248368800, tid = 140047042451200, func = 0x7f62b27cc5d0 <BATmsyncImplementation>, arg = 0x7f5e20126390, exited = 0}
{next = 0x7f5f4b5338c0, tid = 140047349458688, func = 0x7f62b27cc5d0 <BATmsyncImplementation>, arg = 0x7f5e307c6410, exited = 0}
{next = 0x7f5e4148a770, tid = 140047026575104, func = 0x7f62b27cc5d0 <BATmsyncImplementation>, arg = 0x7f5f496205e0, exited = 0}
{next = 0x7f5f49fbf020, tid = 140046927636224, func = 0x7f62b27cc5d0 <BATmsyncImplementation>, arg = 0x7f5fee2705c0, exited = 0}
{next = 0x7f5f4bf09550, tid = 140048497760000, func = 0x7f62b27cc5d0 <BATmsyncImplementation>, arg = 0x7f5f4a247ac0, exited = 0}
{next = 0x7f62488d9540, tid = 140047394707200, func = 0x7f62b27cc5d0 <BATmsyncImplementation>, arg = 0x7f5f4b9e1be0, exited = 0}
{next = 0x7f624a9d3810, tid = 140047629047552, func = 0x7f62b27cc5d0 <BATmsyncImplementation>, arg = 0x7f5e310b3210, exited = 0}
{next = 0x7f5f41b72350, tid = 140047054780160, func = 0x7f62b27cc5d0 <BATmsyncImplementation>, arg = 0x7f624b00be00, exited = 0}
{next = 0x7f5f434c13c0, tid = 140048200091392, func = 0x7f62b27cc5d0 <BATmsyncImplementation>, arg = 0x7f5f42d68210, exited = 0}
{next = 0x7f5e7e0f05e0, tid = 140047635351296, func = 0x7f62b27cc5d0 <BATmsyncImplementation>, arg = 0x7f5f4022f1b0, exited = 0}
{next = 0x7f5e9246da10, tid = 140055718897408, func = 0x7f62b27cc5d0 <BATmsyncImplementation>, arg = 0x7f5e41443ce0, exited = 0}
{next = 0x7f624b59c470, tid = 140047542122240, func = 0x7f62b27cc5d0 <BATmsyncImplementation>, arg = 0x7f5e920a1250, exited = 0}
{next = 0x7f5e31d21310, tid = 140047647958784, func = 0x7f62b27cc5d0 <BATmsyncImplementation>, arg = 0x7f624b4c7b20, exited = 0}
{next = 0x7f624a9edef0, tid = 140048020698880, func = 0x7f62b27cc5d0 <BATmsyncImplementation>, arg = 0x7f5e3082ced0, exited = 0}
{next = 0x7f62291ffe40, tid = 140048367437568, func = 0x7f62b27cc5d0 <BATmsyncImplementation>, arg = 0x7f5e310fb360, exited = 0}
{next = 0x7f5ee84bb2c0, tid = 140047398971136, func = 0x7f62b27cc5d0 <BATmsyncImplementation>, arg = 0x7f5e60a16b60, exited = 0}
{next = 0x7f5ebbb73dc0, tid = 140061727397632, func = 0x7f62b27cc5d0 <BATmsyncImplementation>, arg = 0x7f5ee81a3c70, exited = 0}
{next = 0x7f5f3b4d1910, tid = 140048209008384, func = 0x7f62b27cc5d0 <BATmsyncImplementation>, arg = 0x7f5e207c97b0, exited = 0}
{next = 0x7f5f423f81d0, tid = 140046605080320, func = 0x7f62b27cc5d0 <BATmsyncImplementation>, arg = 0x7f5f3b4c87c0, exited = 0}
{next = 0x7f5e31131f10, tid = 140048016369408, func = 0x7f62b27cc5d0 <BATmsyncImplementation>, arg = 0x7f5f432bb130, exited = 0}
{next = 0x7f5f423f6100, tid = 140047797950208, func = 0x7f62b27cc5d0 <BATmsyncImplementation>, arg = 0x7f624bc8a900, exited = 0}
{next = 0x7f5e308faf40, tid = 140048388953856, func = 0x7f62b27cc5d0 <BATmsyncImplementation>, arg = 0x7f5f43ef8050, exited = 0}
{next = 0x7f5e412fe500, tid = 140047535363840, func = 0x7f62b27cc5d0 <BATmsyncImplementation>, arg = 0x7f624b4d8730, exited = 0}
...
We looked further (maybe ~70 further items in the list) and it was following the same pattern (<BATmsyncImplementation> and exited=0).
The state of the process at the time of this deadlock was:
mdbtools proc -L -p -t
Not using lock map. You can generate lockmap.py with "mdbtool lockmap".
Process mserver5 (PID 25118)
Settings:
db_path = /srv/xxx/mdb/xxx
exe = /path/to/monetdb/bin/mserver5
gdk_nr_threads = 6
mapi_open = false
mapi_port = 0
mapi_usock = /srv/xxx/mdb/xxx/.mapi.sock
max_clients = 64
merovingian_uri = mapi:monetdb://DOMAIN:50000/nova
monet_daemon = yes
monet_vault_key = /srv/xxx/mdb/xxx/.vaultkey
sql_optimizer = default_pipe
Threads:
(25118)
|-clone{clone.S:111}
| `-start_thread{pthread_create.c:309}
| |-DFLOWworker{mal_dataflow.c:333}---q_dequeue{mal_dataflow.c:213}
| | |-1*[sem_wait{sem_wait.S:85}:11<28632>]
| | |-1*[sem_wait{sem_wait.S:85}:12<28631>]
| | |-1*[sem_wait{sem_wait.S:85}:13<28628>]
| | |-1*[sem_wait{sem_wait.S:85}:14<28627>]
| | `-1*[sem_wait{sem_wait.S:85}:16<28517>]
| |-profilerHeartbeat{mal_profiler.c:976}---MT_sleep_ms{gdk_posix.c:1089}
| | `-1*[select{syscall-template.S:81}:19<25119>]
| `-thread_starter{gdk_system.c:459}
| |-SERVERlistenThread{mal_mapi.c:234}---1*[select{syscall-template.S:81}:18<25120>]
| |-doChallenge{mal_mapi.c:184}
| | `-MSscheduleClient{mal_session.c:319}
| | `-MSserveClient{mal_session.c:439}
| | `-runScenario{mal_scenario.c:579}
| | `-runScenarioBody{mal_scenario.c:559}
| | `-runPhase{mal_scenario.c:515}
| | `-SQLengineIntern{sql_execute.c:390}
| | `-SQLexecutePrepared{sql_execute.c:328}
| | `-callMAL{mal_interpreter.c:447}
| | `-runMALsequence{mal_interpreter.c:631}
| | |-runMALdataflow{mal_dataflow.c:784}
| | | `-MT_sleep_ms{gdk_posix.c:1089}
| | | |-1*[select{syscall-template.S:81}:10<28634>]
| | | |-1*[select{syscall-template.S:81}:2<5042>]
| | | |-1*[select{syscall-template.S:81}:3<5039>]
| | | |-1*[select{syscall-template.S:81}:4<4979>]
| | | |-1*[select{syscall-template.S:81}:5<4110>]
| | | |-1*[select{syscall-template.S:81}:6<2170>]
| | | |-1*[select{syscall-template.S:81}:7<19210>]
| | | |-1*[select{syscall-template.S:81}:8<18598>]
| | | `-1*[select{syscall-template.S:81}:9<28650>]
| | `-runMALdataflow{mal_dataflow.c:825}
| | `-MT_create_thread{gdk_system.c:505}
| | `-join_threads{gdk_system.c:484}
| | `-1*[pthread_join{pthread_join.c:92}[tid=28634]:15<28624>]
| `-mvc_logmanager{sql_mvc.c:133}---store_manager{store.c:1630}
| `-MT_sleep_ms{gdk_posix.c:1089}
| `-1*[select{syscall-template.S:81}:17<26083>]
`-main{mserver5.c:694}---MT_sleep_ms{gdk_posix.c:1089}---1*[select{syscall-template.S:81}:1<25118>]
The value between <nnn> indicates the LWP ID, following the thread ID (1 to 19). The 1* part indicates how many threads were at the given backtrace (since we expanded everything, all the values are actually 1*).
This shows that only 19 threads were running. (Not sure if posthreads is supposed to track that).
## Comment 24885
Date: 2017-01-12 17:17:28 +0100
From: Frédéric Jolliton <<frederic.jolliton+monetdb>>
We got another occurrence of this bug (on Jul2015SP4).
Again, the `p' local variable was optimized away.
The posthread list had the following entries:
{next = 0x7f1cb4009fa0, tid = 139759232767744, func = 0x7f1ccb396190 <doChallenge>, arg = 0x7f1cb4001040, exited = 1}
{next = 0x7f1cb4009ce0, tid = 139759248590592, func = 0x7f1ccb396190 <doChallenge>, arg = 0x7f1cb4001040, exited = 0}
{next = 0x7f1cb4009a20, tid = 139759250691840, func = 0x7f1ccb396190 <doChallenge>, arg = 0x7f1cb4001040, exited = 0}
{next = 0x7f1cb4009760, tid = 139759252793088, func = 0x7f1ccb396190 <doChallenge>, arg = 0x7f1cb4001040, exited = 0}
..[64 doChallenge in total]..
{next = 0x7f1bd8456f40, tid = 139759566538496, func = 0x7f1ccb396190 <doChallenge>, arg = 0x7f1cb4001040, exited = 0}
{next = 0x7f1cb4000a50, tid = 139759522965248, func = 0x7f1ccad805d0 <BATmsyncImplementation>, arg = 0x7f1bd82c2d50, exited = 0}
{next = 0xaa5a1b0, tid = 139759634413312, func = 0x7f1ccb396190 <doChallenge>, arg = 0x7f1cb40008d0, exited = 0}
{next = 0xa8d1e90, tid = 139761509881600, func = 0x7f1cc5f7a2a0 <mvc_logmanager>, arg = 0x0, exited = 0}
{next = 0x0, tid = 139761545668352, func = 0x7f1ccb3956a0 <SERVERlistenThread>, arg = 0xa8d1e30, exited = 0}
Examining the process memory, we see that only the thread 76 was performing a query (a "commit"). All others were in state initclient=5, runclient=2, active=0.
Also, examining the journal, we see that the last entry is a commit following many insertions (~10 tables of 50 columns on average).
The state of threads on the mserver5 process were:
Threads:
(29289)
|-clone{clone.S:111}
| `-start_thread{pthread_create.c:309}
| |-DFLOWworker{mal_dataflow.c:333}
| | `-q_dequeue{mal_dataflow.c:213}-+-1*[sem_wait{sem_wait.S:85}:65<5592>]
| | |-1*[sem_wait{sem_wait.S:85}:66<5591>]
| | |-1*[sem_wait{sem_wait.S:85}:67<5590>]
| | |-1*[sem_wait{sem_wait.S:85}:68<5589>]
| | |-1*[sem_wait{sem_wait.S:85}:69<5588>]
| | |-1*[sem_wait{sem_wait.S:85}:70<5582>]
| | |-1*[sem_wait{sem_wait.S:85}:71<5579>]
| | |-1*[sem_wait{sem_wait.S:85}:72<5574>]
| | |-1*[sem_wait{sem_wait.S:85}:73<5571>]
| | |-1*[sem_wait{sem_wait.S:85}:74<5566>]
| | |-1*[sem_wait{sem_wait.S:85}:75<5558>]
| | |-1*[sem_wait{sem_wait.S:85}:77<5477>]
| | |-1*[sem_wait{sem_wait.S:85}:78<5461>]
| | |-1*[sem_wait{sem_wait.S:85}:79<5458>]
| | `-1*[sem_wait{sem_wait.S:85}:80<5454>]
| |-profilerHeartbeat{mal_profiler.c:976}
| | `-MT_sleep_ms{gdk_posix.c:1089}
| | `-1*[select{syscall-template.S:81}:83<29300>]
| `-thread_starter{gdk_system.c:459}
| |-SERVERlistenThread{mal_mapi.c:234}
| | `-1*[select{syscall-template.S:81}:82<29301>]
| |-doChallenge{mal_mapi.c:184}
| | `-MSscheduleClient{mal_session.c:319}
| | `-MSserveClient{mal_session.c:439}
| | `-runScenario{mal_scenario.c:579}
| | |-runScenarioBody{mal_scenario.c:542}
| | | `-runPhase{mal_scenario.c:515}
| | | |-SQLinitClient{sql_scenario.c:427}<sql_contextLock:SQLinitClient>
| | | | `-MT_sleep_ms{gdk_posix.c:1089}
| | | | |-1*[select{syscall-template.S:81}:10<10020>]
| | | | |-1*[select{syscall-template.S:81}:11<9733>]
| | | | |-1*[select{syscall-template.S:81}:12<9731>]
| | | | |-1*[select{syscall-template.S:81}:13<9729>]
| | | | |-1*[select{syscall-template.S:81}:14<9727>]
| | | | |-1*[select{syscall-template.S:81}:15<9429>]
| | | | |-1*[select{syscall-template.S:81}:16<9425>]
| | | | |-1*[select{syscall-template.S:81}:17<9369>]
| | | | |-1*[select{syscall-template.S:81}:18<9367>]
| | | | |-1*[select{syscall-template.S:81}:19<9108>]
| | | | |-1*[select{syscall-template.S:81}:2<10662>]
| | | | |-1*[select{syscall-template.S:81}:20<9106>]
| | | | |-1*[select{syscall-template.S:81}:21<9100>]
| | | | |-1*[select{syscall-template.S:81}:22<9098>]
| | | | |-1*[select{syscall-template.S:81}:23<8794>]
| | | | |-1*[select{syscall-template.S:81}:24<8792>]
| | | | |-1*[select{syscall-template.S:81}:25<8790>]
| | | | |-1*[select{syscall-template.S:81}:26<8788>]
| | | | |-1*[select{syscall-template.S:81}:27<8495>]
| | | | |-1*[select{syscall-template.S:81}:28<8493>]
| | | | |-1*[select{syscall-template.S:81}:29<8473>]
| | | | |-1*[select{syscall-template.S:81}:3<10386>]
| | | | |-1*[select{syscall-template.S:81}:30<8465>]
| | | | |-1*[select{syscall-template.S:81}:31<8150>]
| | | | |-1*[select{syscall-template.S:81}:32<8148>]
| | | | |-1*[select{syscall-template.S:81}:33<8146>]
| | | | |-1*[select{syscall-template.S:81}:34<8144>]
| | | | |-1*[select{syscall-template.S:81}:35<7850>]
| | | | |-1*[select{syscall-template.S:81}:36<7848>]
| | | | |-1*[select{syscall-template.S:81}:37<7786>]
| | | | |-1*[select{syscall-template.S:81}:38<7784>]
| | | | |-1*[select{syscall-template.S:81}:39<7528>]
| | | | |-1*[select{syscall-template.S:81}:4<10384>]
| | | | |-1*[select{syscall-template.S:81}:40<7526>]
| | | | |-1*[select{syscall-template.S:81}:41<7524>]
| | | | |-1*[select{syscall-template.S:81}:42<7522>]
| | | | |-1*[select{syscall-template.S:81}:43<7207>]
| | | | |-1*[select{syscall-template.S:81}:44<7205>]
| | | | |-1*[select{syscall-template.S:81}:45<7145>]
| | | | |-1*[select{syscall-template.S:81}:46<7143>]
| | | | |-1*[select{syscall-template.S:81}:47<6885>]
| | | | |-1*[select{syscall-template.S:81}:48<6883>]
| | | | |-1*[select{syscall-template.S:81}:49<6881>]
| | | | |-1*[select{syscall-template.S:81}:5<10382>]
| | | | |-1*[select{syscall-template.S:81}:50<6879>]
| | | | |-1*[select{syscall-template.S:81}:51<6544>]
| | | | |-1*[select{syscall-template.S:81}:52<6542>]
| | | | |-1*[select{syscall-template.S:81}:53<6488>]
| | | | |-1*[select{syscall-template.S:81}:54<6486>]
| | | | |-1*[select{syscall-template.S:81}:55<6229>]
| | | | |-1*[select{syscall-template.S:81}:56<6227>]
| | | | |-1*[select{syscall-template.S:81}:57<6219>]
| | | | |-1*[select{syscall-template.S:81}:58<6217>]
| | | | |-1*[select{syscall-template.S:81}:59<5912>]
| | | | |-1*[select{syscall-template.S:81}:6<10380>]
| | | | |-1*[select{syscall-template.S:81}:60<5910>]
| | | | |-1*[select{syscall-template.S:81}:61<5908>]
| | | | |-1*[select{syscall-template.S:81}:62<5906>]
| | | | |-1*[select{syscall-template.S:81}:63<5648>]
| | | | |-1*[select{syscall-template.S:81}:7<10088>]
| | | | |-1*[select{syscall-template.S:81}:8<10084>]
| | | | `-1*[select{syscall-template.S:81}:9<10022>]
| | | `-SQLinitClient{sql_scenario.c:444}
| | | `-mvc_create{sql_mvc.c:461}
| | | `-store_lock{store.c:1693}<bs_lock:trans_lock>
| | | `-MT_sleep_ms{gdk_posix.c:1089}
| | | `-1*[select{syscall-template.S:81}:64<5646>]
| | `-runScenarioBody{mal_scenario.c:559}
| | `-runPhase{mal_scenario.c:515}
| | `-SQLengineIntern{sql_execute.c:408}
| | `-runMAL{mal_interpreter.c:365}
| | `-runMALsequence{mal_interpreter.c:631}
| | `-SQLtransaction{sql.c:268}
| | `-mvc_commit{sql_mvc.c:296}
| | `-sql_trans_commit{store.c:3428}
| | `-rollforward_trans{store.c:3015}
| | `-rollforward_changeset_updates{store.c:2530}
| | `-rollforward_update_schema{store.c:2993}
| | `-rollforward_changeset_updates{store.c:2530}
| | `-rollforward_update_table{store.c:2917}
| | `-update_table{bat_storage.c:2222}
| | `-tr_update_delta{bat_storage.c:1936}
| | `-BATmsync{gdk_storage.c:692}
| | `-MT_create_thread{gdk_system.c:505}
| | `-join_threads{gdk_system.c:484}
| | `-1*[pthread_join{pthread_join.c:92}[tid=5646]:76<5544>]
| `-mvc_logmanager{sql_mvc.c:133}
| `-store_manager{store.c:1634}<bs_lock:store_manager>
| `-MT_sleep_ms{gdk_posix.c:1089}
| `-1*[select{syscall-template.S:81}:81<29324>]
`-main{mserver5.c:694}---MT_sleep_ms{gdk_posix.c:1089}
`-1*[select{syscall-template.S:81}:1<29289>]
We see that that the thread 5544 is waiting for the thread 5646.
Both the threads 5646 and 29289 are waiting for bs_lock. We don't know which thread took the bs_lock (since the internal representation is a atomic value).
## Comment 24893
Date: 2017-01-16 09:24:01 +0100
From: Frédéric Jolliton <<frederic.jolliton+monetdb>>
As discussed with Sjoerd, we are going to upgrade to Jun2016 since it seems to include a fix for this exact issue.
## Comment 24910
Date: 2017-01-24 17:14:08 +0100
From: @yzchang
Just for the record: this problem might have been fixed by [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=63f23a3d619b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=63f23a3d619b) which was released in Jun2016-SP2.
The problem addressed by changeset [63f23a3d619b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=63f23a3d619b) is, when many threads are created and then exit shortly, they can be joint on the wrong thread, due to some incorrect threads admin.
## Comment 25726
Date: 2017-10-15 20:48:18 +0200
From: @mlkersten
Can this bug be closed?
| Deadlock on insertion | https://api.github.com/repos/MonetDB/MonetDB/issues/3898/comments | 0 | 2020-11-30T13:21:49Z | 2024-06-27T12:10:17Z | https://github.com/MonetDB/MonetDB/issues/3898 | 753,473,982 | 3,898 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-12-26 17:15:47 +0100
From: Anthony Damico <<ajdamico>>
To: Hannes Muehleisen <<hannes>>
Version: 11.21.5 (Jul2015)
CC: ajdamico
Last updated: 2016-01-02 22:09:44 +0100
## Comment 21696
Date: 2015-12-26 17:15:47 +0100
From: Anthony Damico <<ajdamico>>
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0
Build Identifier:
segfault? no clue why this is (reproducibly) dying
Reproducible: Always
### Steps to Reproduce:
http://monetdb.cwi.nl/testweb/web/eanthony/fedora20-3/1450966565/timsslite.log
http://monetdb.cwi.nl/testweb/web/eanthony/fedora20-3/1451127317/timsslite.log
### Actual Results:
QQ: 'select totwgt from bst20033'
*** caught segfault ***
address 0x2e0, cause 'memory not mapped'
Traceback:
1: .Call("monetdb_connect_R", PACKAGE = "libmonetdb5")
2: MonetDBLite::monetdb_embedded_connect()
3: .local(drv, ...)
4: dbConnect(db, dbname, ...)
5: dbConnect(db, dbname, ...)
6: svrepdesign.character(repweights = repweights, weights = weights, data = d, ...)
7: svrepdesign(repweights = repweights, weights = weights, data = d, ...)
8: FUN(X[[i]], ...)
9: lapply(data$imputations, function(d) svrepdesign(repweights = repweights, weights = weights, data = d, ...))
10: svrepdesign.imputationList(weights = as.formula(paste("~", wgt)), repweights = z, data = imputationList(datasets = as.list(paste0(df, this.year, 1:5)), dbtype = "MonetDBLite"), type = "other", combined.weights = TRUE, dbtype = "MonetDBLite", dbname = dbfolder)
11: svrepdesign(weights = as.formula(paste("~", wgt)), repweights = z, data = imputationList(datasets = as.list(paste0(df, this.year, 1:5)), dbtype = "MonetDBLite"), type = "other", combined.weights = TRUE, dbtype = "MonetDBLite", dbname = dbfolder)
12: eval(expr, envir, enclos)
13: eval(ei, envir)
14: withVisible(eval(ei, envir))
15: source(temp_file, ...)
16: downloader::source_url("https://raw.githubusercontent.com/ajdamico/asdfree/timsslite/Trends%20in%20International%20Mathematics%20and%20Science%20Study/construct%20designs.R", prompt = FALSE, echo = TRUE)
aborting ...
### Expected Results:
not that ;)
## Comment 21706
Date: 2016-01-02 22:08:49 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [ff4cb599a3b2](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ff4cb599a3b2) made by Hannes Muehleisen <hannes@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=ff4cb599a3b2](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=ff4cb599a3b2)
Changeset description:
finalizer for connections, bug #3897
| monetdblite: memory not mapped breakdown of `timsslite` eanthony runs | https://api.github.com/repos/MonetDB/MonetDB/issues/3897/comments | 0 | 2020-11-30T13:21:46Z | 2024-06-27T12:10:16Z | https://github.com/MonetDB/MonetDB/issues/3897 | 753,473,946 | 3,897 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-12-26 15:40:36 +0100
From: Anthony Damico <<ajdamico>>
To: Hannes Muehleisen <<hannes>>
Version: 11.21.5 (Jul2015)
CC: ajdamico
Last updated: 2016-02-02 15:50:58 +0100
## Comment 21695
Date: 2015-12-26 15:40:36 +0100
From: Anthony Damico <<ajdamico>>
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0
Build Identifier:
works fine on unix/mac.. example to reproduce below
Reproducible: Always
### Steps to Reproduce:
setwd( "C:/My Directory/ACS/" )
library(downloader)
single.year.datasets.to.download <- 2013:2014
three.year.datasets.to.download <- 2013
five.year.datasets.to.download <- NULL
source_url( "https://raw.githubusercontent.com/ajdamico/asdfree/master/American%20Community%20Survey/download%20all%20microdata.R" , prompt = FALSE , echo = TRUE )
### Actual Results:
the console just disappears
## Comment 21707
Date: 2016-01-02 22:17:57 +0100
From: @hannesmuehleisen
can you run from command line? Often there is some output there...
## Comment 21708
Date: 2016-01-02 22:31:13 +0100
From: Anthony Damico <<ajdamico>>
hi, could you do this? thanks
## Comment 21742
Date: 2016-01-24 01:50:45 +0100
From: Anthony Damico <<ajdamico>>
this previously made the console vanish, now (after some changes to MonetDBLite) it simply jams up and hangs forever. windows task manager shows this process consuming gigs of ram, but the amount of ram has frozen -- the cpu share is also zero
## Comment 21765
Date: 2016-02-02 15:50:58 +0100
From: @hannesmuehleisen
Should be fixed.
| monetdblite: american community survey 2013 3-year loading crashes R console on windows | https://api.github.com/repos/MonetDB/MonetDB/issues/3896/comments | 0 | 2020-11-30T13:21:43Z | 2024-06-27T12:10:15Z | https://github.com/MonetDB/MonetDB/issues/3896 | 753,473,905 | 3,896 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-12-22 22:55:33 +0100
From: Anthony Damico <<ajdamico>>
To: SQL devs <<bugs-sql>>
Version: 11.21.5 (Jul2015)
CC: ajdamico, @njnes
Last updated: 2016-01-15 11:37:56 +0100
## Comment 21684
Date: 2015-12-22 22:55:33 +0100
From: Anthony Damico <<ajdamico>>
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0
Build Identifier:
example table with one record - still not protected
Reproducible: Always
### Steps to Reproduce:
CREATE TABLE my_table AS SELECT 1 AS my_column WITH DATA;
ALTER TABLE my_table SET READ ONLY;
SELECT COUNT(*) FROM my_table;
DROP TABLE my_table;
### Actual Results:
Welcome to mclient, the MonetDB/SQL interactive terminal (Jul2015-91007a50e91b)
Database: MonetDB v11.21.8 (Jul2015-91007a50e91b), 'demo'
Type \q to quit, \? for a list of available commands
auto commit mode: on
sql>CREATE TABLE my_table AS SELECT 1 AS my_column WITH DATA;
operation successful (11.739ms)
sql>ALTER TABLE my_table SET READ ONLY;
operation successful (5.956ms)
sql>SELECT COUNT(*) FROM my_table;
+------+
| L1 |
+======+
| 1 |
+------+
1 tuple (0.703ms)
sql>DROP TABLE my_table;
operation successful (5.322ms)
sql>
### Expected Results:
table should not be dropped
## Comment 21687
Date: 2015-12-23 10:20:42 +0100
From: @njnes
protecting agains ddl statements is done using grant and revoke privileges. The
table level read only flags only protect the row level content, ie disallowes
update/insert and delete statements. This allows for less delta statements, ie
more efficient bat access.
## Comment 21688
Date: 2015-12-23 13:17:52 +0100
From: Anthony Damico <<ajdamico>>
ahh, i misunderstood that, sorry.
you wrote "resolved nextrelease" - but i do not see a changeset. does that mean you have also prevented DROP TABLE from occurring on read-only tables? or are read only tables allowed to be dropped?
thanks niels!!
| read only does not protect this table | https://api.github.com/repos/MonetDB/MonetDB/issues/3895/comments | 0 | 2020-11-30T13:21:40Z | 2024-06-27T12:10:14Z | https://github.com/MonetDB/MonetDB/issues/3895 | 753,473,866 | 3,895 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-12-22 18:14:29 +0100
From: Marcin K <<marcin>>
To: clients devs <<bugs-clients>>
Version: 11.21.19 (Jul2015-SP4)
CC: showerproof86
Last updated: 2016-04-11 11:18:44 +0200
## Comment 21682
Date: 2015-12-22 18:14:29 +0100
From: Marcin K <<marcin>>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36
Build Identifier:
I recently updated to newest MonetDB - Jul2015SP1. This update also required changing python-monetdb package to the newest release but PIP repo still points to old package which is not compatible with new MonetDB release.
Reproducible: Always
## Comment 21712
Date: 2016-01-05 22:16:37 +0100
From: squeaky <<showerproof86>>
This is also affecting me. Addtionaly the version on PyPI (https://pypi.python.org/pypi/python-monetdb/) has a bug about hugeint datatype, it doesnt recognize it. After installing the version from tip of default the bug is resolved.
| PIP repository points to the older version of python-monetdb | https://api.github.com/repos/MonetDB/MonetDB/issues/3894/comments | 0 | 2020-11-30T13:21:37Z | 2024-06-28T07:19:53Z | https://github.com/MonetDB/MonetDB/issues/3894 | 753,473,835 | 3,894 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-12-20 20:48:46 +0100
From: Anthony Damico <<ajdamico>>
To: Hannes Muehleisen <<hannes>>
Version: 11.21.5 (Jul2015)
CC: ajdamico
Last updated: 2016-02-02 15:50:37 +0100
## Comment 21678
Date: 2015-12-20 20:48:46 +0100
From: Anthony Damico <<ajdamico>>
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0
Build Identifier:
it runs the whole script, then the console just disappears!
Reproducible: Always
### Steps to Reproduce:
years.to.download <- 2014:2006
downloader::source_url( "https://raw.githubusercontent.com/ajdamico/asdfree/master/Home%20Mortgage%20Disclosure%20Act/download%20all%20microdata.R" , prompt = FALSE , echo = TRUE )
## Comment 21679
Date: 2015-12-20 22:50:25 +0100
From: Anthony Damico <<ajdamico>>
Created attachment 378
some process has not closed down
not sure if this is any clue:
even though the r console has disappeared, the folder holding the monetdb cannot be deleted. see attached screenshot
> Attached file: [background process.png](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3893_background_process.png_378) (image/png, 13954 bytes)
> Description: some process has not closed down
## Comment 21680
Date: 2015-12-21 02:13:32 +0100
From: Anthony Damico <<ajdamico>>
this r-console-vanishing bug is not limited to hmda. happens when i try with the censo demografico as well
## Comment 21681
Date: 2015-12-21 02:24:19 +0100
From: Anthony Damico <<ajdamico>>
sorry, i misspoke- censo demografico doesn't cause the crash, nibrs does. the r console will vanish while running nibrs and hmda
## Comment 21726
Date: 2016-01-12 19:32:54 +0100
From: Anthony Damico <<ajdamico>>
another note: when the console vanishes, the database folder is still locked up. when trying to delete it, windows says
"the action can't be completed because the folder or a file in it is open in another program"
requires a restart to delete the folder
## Comment 21741
Date: 2016-01-24 01:50:40 +0100
From: Anthony Damico <<ajdamico>>
this previously made the console vanish, now (after some changes to MonetDBLite) it simply jams up and hangs forever. windows task manager shows this process consuming gigs of ram, but the amount of ram has frozen -- the cpu share is also zero
## Comment 21752
Date: 2016-01-26 04:52:10 +0100
From: Anthony Damico <<ajdamico>>
reproduced? or something else? looks like it prevents win-eanthony from starting its next round..
http://monetdb.cwi.nl/testweb/web/eanthony/lab07win/1453783506/hmda.log
## Comment 21764
Date: 2016-02-02 15:50:37 +0100
From: @hannesmuehleisen
Should be fixed
| hmda download script with monetdblite kills R console 3.2.3 on windows | https://api.github.com/repos/MonetDB/MonetDB/issues/3893/comments | 0 | 2020-11-30T13:21:34Z | 2024-06-27T12:10:12Z | https://github.com/MonetDB/MonetDB/issues/3893 | 753,473,808 | 3,893 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-12-19 03:01:19 +0100
From: Anthony Damico <<ajdamico>>
To: Hannes Muehleisen <<hannes>>
Version: 11.21.5 (Jul2015)
CC: ajdamico
Last updated: 2016-01-20 14:37:14 +0100
## Comment 21677
Date: 2015-12-19 03:01:19 +0100
From: Anthony Damico <<ajdamico>>
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0
Build Identifier:
dir.create() should first check if the directory exists and is empty.. error below
Reproducible: Always
### Steps to Reproduce:
> db <- dbConnect( MonetDBLite() , dbfolder )
Error in MonetDBLite::monetdb_embedded_startup(embedded, !getOption("monetdb.debug.embedded", :
Cannot create c:/my directory/MonetDB/
In addition: Warning message:
In dir.create(dir, recursive = T) :
'c:\my directory\MonetDB' already exists
| if the database directory exists - but is empty - dbConnect() should not fail | https://api.github.com/repos/MonetDB/MonetDB/issues/3892/comments | 0 | 2020-11-30T13:21:31Z | 2024-06-27T12:10:11Z | https://github.com/MonetDB/MonetDB/issues/3892 | 753,473,773 | 3,892 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-12-18 17:40:21 +0100
From: Kaijiang <<chenkaijiang>>
To: SQL devs <<bugs-sql>>
Version: 11.21.11 (Jul2015-SP1)
CC: @njnes
Last updated: 2016-03-25 09:59:25 +0100
## Comment 21676
Date: 2015-12-18 17:40:21 +0100
From: Kaijiang <<chenkaijiang>>
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36
Build Identifier:
create a table and insert some integers; execute sql with window function; then mserver5 process is gone.
Reproducible: Always
### Steps to Reproduce:
1. create table t3 (f1 int, f2 int);
2. insert into t3 values (1,1), (2,2), (3,3), (4,4), (5,5);
3. select f1,f2, avg(f1) over (order by f2 rows between 2 PRECEDING AND CURRENT ROW) from t3;
### Actual Results:
mserver5 process gone
### Expected Results:
gives sql result
## Comment 21713
Date: 2016-01-06 08:05:09 +0100
From: Kaijiang <<chenkaijiang>>
also crashes if I use RANGE clause:
select f1,f2, avg(f1) over (order by f2 range between 2 PRECEDING AND CURRENT ROW) from t3;
## Comment 21898
Date: 2016-03-14 09:07:58 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [b195a709fce8](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b195a709fce8) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b195a709fce8](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b195a709fce8)
Changeset description:
remove bogus (debug) assert, fixes bug #3891 (well the crash only, as
window functions with aggregation (avg,sum etc) isn't supported).
## Comment 21899
Date: 2016-03-14 09:08:28 +0100
From: @njnes
Crash is fixed (window functions with aggregation aren't supported at the moment)
## Comment 21965
Date: 2016-03-25 09:59:25 +0100
From: @sjoerdmullender
Jul2015-SP3 has been released.
| MonetDB crashes when executing SQL with window function | https://api.github.com/repos/MonetDB/MonetDB/issues/3891/comments | 0 | 2020-11-30T13:21:28Z | 2024-06-27T12:10:10Z | https://github.com/MonetDB/MonetDB/issues/3891 | 753,473,728 | 3,891 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-12-18 15:18:56 +0100
From: @swingbit
To: SQL devs <<bugs-sql>>
Version: 11.21.11 (Jul2015-SP1)
CC: @njnes
Last updated: 2016-03-25 09:59:57 +0100
## Comment 21675
Date: 2015-12-18 15:18:56 +0100
From: @swingbit
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.80 Safari/537.36
Build Identifier:
(Possibly related to https://www.monetdb.org/bugzilla/show_bug.cgi?id=3705)
CREATE TABLE x(a1 string);
INSERT INTO x VALUES ('aa'),('bb'),('cc'),('aa');
CREATE VIEW y AS SELECT row_number() OVER(ORDER BY a1) AS a1, a1 AS a2 FROM (SELECT a1 FROM x GROUP BY a1) AS t;
Gives:
2015-12-18 15:09:57 MSG trec2[17004]: could not find t.a1
2015-12-18 15:09:57 MSG trec2[17004]: x.a1
2015-12-18 15:09:57 ERR trec2[17004]: mserver5: /opt/monetdb/Jul2015_optimized/MonetDB.Spinque_Jul2015/src/sql/backends/monet5/rel_bin.c:2378: rel2bin_project: Assertion `0' failed.
The query works if I remove either the window function or the group by in the subselect.
Reproducible: Always
MonetDB 5 server v11.21.12 (64-bit, 64-bit oids, 128-bit integers)
This is an unreleased version
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 31.4GiB available memory, 8 available cpu cores
Libraries:
libpcre: 8.37 2015-04-28 (compiled with 8.37)
openssl: OpenSSL 1.0.1k 8 Jan 2015 (compiled with OpenSSL 1.0.1k-fips 8 Jan 2015)
libxml2: 2.9.2 (compiled with 2.9.2)
Compiled by: roberto@spinque02.spinque.com (x86_64-unknown-linux-gnu)
Compilation: gcc -O3 -pipe -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 -D_FORTIFY_SOURCE=2
Linking : /usr/bin/ld -m elf_x86_64
## Comment 21895
Date: 2016-03-14 08:55:51 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [98cdca21a670](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=98cdca21a670) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=98cdca21a670](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=98cdca21a670)
Changeset description:
fix bug #3890, ie incorrect rewrite of rank over expressions. 'Should not be propagated to the default branch'
## Comment 21896
Date: 2016-03-14 09:02:48 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [ab01ce4fa677](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ab01ce4fa677) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=ab01ce4fa677](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=ab01ce4fa677)
Changeset description:
add test and stable output for bug #3890
## Comment 21897
Date: 2016-03-14 09:03:14 +0100
From: @njnes
fixed in 2015 branch (default has a new implementation for window functions, ie didn't have this bug)
## Comment 21981
Date: 2016-03-25 09:59:57 +0100
From: @sjoerdmullender
Jul2015-SP3 has been released.
| Window function + group by in subselect, rel2bin_project: Assertion `0' failed | https://api.github.com/repos/MonetDB/MonetDB/issues/3890/comments | 0 | 2020-11-30T13:21:25Z | 2024-06-27T12:10:09Z | https://github.com/MonetDB/MonetDB/issues/3890 | 753,473,684 | 3,890 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-12-18 14:11:42 +0100
From: Anthony Damico <<ajdamico>>
To: SQL devs <<bugs-sql>>
Version: 11.21.11 (Jul2015-SP1)
CC: ajdamico, @njnes
Last updated: 2016-01-15 11:37:39 +0100
## Comment 21674
Date: 2015-12-18 14:11:42 +0100
From: Anthony Damico <<ajdamico>>
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0
Build Identifier:
simple reproduction below, thanks!
Reproducible: Always
### Steps to Reproduce:
sql>create table my_table as select 1 with data;
operation successful (57.729ms)
sql>alter table my_table set read only;
operation successful (5.488ms)
sql>alter table my_table add column my_column integer;
operation successful (10.563ms)
sql>drop table my_table;
operation successful (6.075ms)
sql>
## Comment 21683
Date: 2015-12-22 22:21:00 +0100
From: @njnes
read only only protects content of a table.
## Comment 21685
Date: 2015-12-22 22:58:33 +0100
From: Anthony Damico <<ajdamico>>
hi niels,
sorry, is there a changeset associated with this bug? or are you saying that tables with zero records cannot be protected?
here's an example of a table with one record as well--
https://www.monetdb.org/bugzilla/show_bug.cgi?id=3895
thanks, and sorry if i'm misunderstanding something
| read only does not protect empty tables | https://api.github.com/repos/MonetDB/MonetDB/issues/3889/comments | 0 | 2020-11-30T13:21:22Z | 2024-06-27T12:10:08Z | https://github.com/MonetDB/MonetDB/issues/3889 | 753,473,640 | 3,889 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-12-17 21:27:18 +0100
From: Anthony Damico <<ajdamico>>
To: SQL devs <<bugs-sql>>
Version: -- development
CC: ajdamico, martin.van.dinther
Duplicates: #3567
Last updated: 2017-04-21 17:54:29 +0200
## Comment 21671
Date: 2015-12-17 21:27:18 +0100
From: Anthony Damico <<ajdamico>>
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0
Build Identifier:
thanks
Reproducible: Always
## Comment 25258
Date: 2017-04-21 17:54:29 +0200
From: Martin van Dinther <<martin.van.dinther>>
*** This bug has been marked as a duplicate of bug #3567 ***
| please support table renaming - ALTER TABLE my_table RENAME TO new_table | https://api.github.com/repos/MonetDB/MonetDB/issues/3888/comments | 0 | 2020-11-30T13:21:19Z | 2024-06-28T07:19:53Z | https://github.com/MonetDB/MonetDB/issues/3888 | 753,473,600 | 3,888 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-12-17 13:21:55 +0100
From: Martin van Dinther <<martin.van.dinther>>
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes
Last updated: 2016-01-15 11:38:15 +0100
## Comment 21669
Date: 2015-12-17 13:21:55 +0100
From: Martin van Dinther <<martin.van.dinther>>
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0
Build Identifier:
BBPkeepref: range error 50462774
mserver5: ../../dev/gdk/gdk_bbp.c:2470: getBBPdescriptor: Assertion `BBP[abs(i)>>14][abs(i)&((1 << 14)-1)].refs' failed.
./start_INSTALL_mserver5.sh: line 6: 9522 Aborted (core dumped) /export/scratch2/dinther_scratch1/INSTALL/bin/mserver5 -d10 --set embedded_r=true --set mapi_port=41000
Reproducible: Always
### Steps to Reproduce:
1. Start mserver5 (built from default branch with assertions enabled)
2. Start mclient
3. Issue SQL queries for all (currently 15) system views:
select count(*) from "sys"."columns";
select count(*) from "sys"."environment";
select count(*) from "sys"."optimizers";
select count(*) from "sys"."querylog_calls";
select count(*) from "sys"."querylog_catalog";
select count(*) from "sys"."querylog_history";
select count(*) from "sys"."queue";
select count(*) from "sys"."rejects";
select count(*) from "sys"."sessions";
select count(*) from "sys"."storage";
select count(*) from "sys"."storagemodel";
select count(*) from "sys"."tables";
select count(*) from "sys"."tablestoragemodel";
select count(*) from "sys"."tracelog";
select count(*) from "sys"."users";
### Actual Results:
builtin opt gdk_dbpath = /export/scratch2/dinther_scratch1/INSTALL/var/monetdb5/dbfarm/demo
builtin opt gdk_debug = 0
builtin opt gdk_vmtrim = no
builtin opt monet_prompt = >
builtin opt monet_daemon = no
builtin opt mapi_port = 50000
builtin opt mapi_open = false
builtin opt mapi_autosense = false
builtin opt sql_optimizer = default_pipe
builtin opt sql_debug = 0
cmdline opt embedded_r = true
cmdline opt mapi_port = 41000
cmdline opt gdk_debug = 10
MonetDB 5 server v11.22.0
This is an unreleased version
Serving database 'demo', using 8 threads
Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs and 128bit integers dynamically linked
Found 15.589 GiB available main-memory.
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
Listening for connection requests on mapi:monetdb://127.0.0.1:41000/
MonetDB/GIS module loaded
Start processing logs sql/sql_logs version 52200
Finished processing logs sql/sql_logs
MonetDB/SQL module loaded
MonetDB/R module loaded
> SQL catalog created, loading sql scripts once
loading sql script: 09_like.sql
loading sql script: 10_math.sql
loading sql script: 11_times.sql
loading sql script: 12_url.sql
loading sql script: 13_date.sql
loading sql script: 14_inet.sql
loading sql script: 15_querylog.sql
loading sql script: 16_tracelog.sql
loading sql script: 17_temporal.sql
loading sql script: 20_vacuum.sql
loading sql script: 21_dependency_functions.sql
loading sql script: 22_clients.sql
loading sql script: 23_skyserver.sql
loading sql script: 24_zorder.sql
loading sql script: 25_debug.sql
loading sql script: 26_sysmon.sql
loading sql script: 27_rejects.sql
loading sql script: 39_analytics.sql
loading sql script: 39_analytics_hge.sql
loading sql script: 40_geom.sql
loading sql script: 40_json.sql
loading sql script: 40_json_hge.sql
loading sql script: 41_md5sum.sql
loading sql script: 45_uuid.sql
loading sql script: 46_gsl.sql
loading sql script: 46_profiler.sql
loading sql script: 51_sys_schema_extension.sql
loading sql script: 72_fits.sql
loading sql script: 74_netcdf.sql
loading sql script: 75_storagemodel.sql
loading sql script: 80_statistics.sql
loading sql script: 80_udf.sql
loading sql script: 80_udf_hge.sql
loading sql script: 85_bam.sql
loading sql script: 90_generator.sql
loading sql script: 90_generator_hge.sql
loading sql script: 99_system.sql
WARNING To speedup user.columnsize a bulk operator implementation is needed
X_59:bat[:oid,:lng] := mal.multiplex("user":str,"columnsize":str,X_44:bat[:oid,:str],X_51:bat[:oid,:lng],X_58:bat[:oid,:lng]);
WARNING To speedup user.heapsize a bulk operator implementation is needed
X_69:bat[:oid,:lng] := mal.multiplex("user":str,"heapsize":str,X_44:bat[:oid,:str],X_58:bat[:oid,:lng],X_68:bat[:oid,:int]);
WARNING To speedup user.hashsize a bulk operator implementation is needed
X_78:bat[:oid,:lng] := mal.multiplex("user":str,"hashsize":str,X_77:bat[:oid,:bit],X_51:bat[:oid,:lng]);
WARNING To speedup user.imprintsize a bulk operator implementation is needed
X_80:bat[:oid,:lng] := mal.multiplex("user":str,"imprintsize":str,X_51:bat[:oid,:lng],X_44:bat[:oid,:str]);
BBPkeepref: range error 50462774
mserver5: ../../dev/gdk/gdk_bbp.c:2470: getBBPdescriptor: Assertion `BBP[abs(i)>>14][abs(i)&((1 << 14)-1)].refs' failed.
./start_INSTALL_mserver5.sh: line 6: 9522 Aborted (core dumped) /export/scratch2/dinther_scratch1/INSTALL/bin/mserver5 -d10 --set embedded_r=true --set mapi_port=41000
bash-4.3$ mclient -p 41000
Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased)
Database: MonetDB v11.22.0 (unreleased), 'demo'
Type \q to quit, \? for a list of available commands
auto commit mode: on
sql>select count(*) from "sys"."columns";
+------+
| L1 |
+======+
| 361 |
+------+
1 tuple (1.623ms)
sql>select count(*) from "sys"."environment";
+------+
| L1 |
+======+
| 22 |
+------+
1 tuple (0.761ms)
sql>select count(*) from "sys"."optimizers";
+------+
| L1 |
+======+
| 4 |
+------+
1 tuple (0.737ms)
sql>select count(*) from "sys"."querylog_calls";
+------+
| L1 |
+======+
| 0 |
+------+
1 tuple (557.079ms)
sql>select count(*) from "sys"."querylog_catalog";
+------+
| L1 |
+======+
| 0 |
+------+
1 tuple (1.453ms)
sql>select count(*) from "sys"."querylog_history";
+------+
| L1 |
+======+
| 0 |
+------+
1 tuple (2.040ms)
sql>select count(*) from "sys"."queue";
+------+
| L1 |
+======+
| 1 |
+------+
1 tuple (0.762ms)
sql>select count(*) from "sys"."rejects";
+------+
| L1 |
+======+
| 0 |
+------+
1 tuple (0.666ms)
sql>select count(*) from "sys"."sessions";
+------+
| L1 |
+======+
| 2 |
+------+
1 tuple (0.750ms)
sql>select count(*) from "sys"."storage";
+------+
| L1 |
+======+
| 250 |
+------+
1 tuple (4.209ms)
sql>select count(*) from "sys"."storagemodel";
+------+
| L1 |
+======+
| 0 |
+------+
1 tuple (10.755ms)
sql>select count(*) from "sys"."tables";
+------+
| L3 |
+======+
| 54 |
+------+
1 tuple (59.083ms)
sql>select count(*) from "sys"."tablestoragemodel";
+------+
| L7 |
+======+
| 0 |
+------+
1 tuple (3.693ms)
sql>select count(*) from "sys"."tracelog";
sql>select count(*) from "sys"."users";
bash-4.3$
### Expected Results:
bash-4.3$ mclient
Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased)
Database: MonetDB v11.22.0 (unreleased), 'demo'
Type \q to quit, \? for a list of available commands
auto commit mode: on
sql>select count(*) from "sys"."columns";
+------+
| L1 |
+======+
| 361 |
+------+
1 tuple (1.623ms)
sql>select count(*) from "sys"."environment";
+------+
| L1 |
+======+
| 22 |
+------+
1 tuple (0.761ms)
sql>select count(*) from "sys"."optimizers";
+------+
| L1 |
+======+
| 4 |
+------+
1 tuple (0.737ms)
sql>select count(*) from "sys"."querylog_calls";
+------+
| L1 |
+======+
| 0 |
+------+
1 tuple (557.079ms)
sql>select count(*) from "sys"."querylog_catalog";
+------+
| L1 |
+======+
| 0 |
+------+
1 tuple (1.453ms)
sql>select count(*) from "sys"."querylog_history";
+------+
| L1 |
+======+
| 0 |
+------+
1 tuple (2.040ms)
sql>select count(*) from "sys"."queue";
+------+
| L1 |
+======+
| 1 |
+------+
1 tuple (0.762ms)
sql>select count(*) from "sys"."rejects";
+------+
| L1 |
+======+
| 0 |
+------+
1 tuple (0.666ms)
sql>select count(*) from "sys"."sessions";
+------+
| L1 |
+======+
| 2 |
+------+
1 tuple (0.750ms)
sql>select count(*) from "sys"."storage";
+------+
| L1 |
+======+
| 250 |
+------+
1 tuple (4.209ms)
sql>select count(*) from "sys"."storagemodel";
+------+
| L1 |
+======+
| 0 |
+------+
1 tuple (10.755ms)
sql>select count(*) from "sys"."tables";
+------+
| L3 |
+======+
| 54 |
+------+
1 tuple (59.083ms)
sql>select count(*) from "sys"."tablestoragemodel";
+------+
| L7 |
+======+
| 0 |
+------+
1 tuple (3.693ms)
sql>select count(*) from "sys"."tracelog";
+------+
| L7 |
+======+
| 0 |
+------+
1 tuple (3.693ms)
sql>select count(*) from "sys"."users";
+------+
| L7 |
+======+
| 1 |
+------+
1 tuple (3.693ms)
No assertion violation. No crash of mserver5 proces.
## Comment 21670
Date: 2015-12-17 14:27:45 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [7124d3e42bee](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7124d3e42bee) made by Martin van Dinther <martin.van.dinther@monetdbsolutions.com> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=7124d3e42bee](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=7124d3e42bee)
Changeset description:
Added test for Bug #3887
## Comment 21672
Date: 2015-12-18 13:05:23 +0100
From: @njnes
fixed, ie return error when profiler isn't started jet.
## Comment 21673
Date: 2015-12-18 13:07:17 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [6a05428d4df7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6a05428d4df7) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=6a05428d4df7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=6a05428d4df7)
Changeset description:
fixed bug #3887, ie return error when profiler isn't started
handle over() again on query without where.
| Querying "sys"."tracelog" causes assertion violation and crash of mserver5 process | https://api.github.com/repos/MonetDB/MonetDB/issues/3887/comments | 0 | 2020-11-30T13:21:16Z | 2024-06-27T12:10:06Z | https://github.com/MonetDB/MonetDB/issues/3887 | 753,473,562 | 3,887 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-12-15 17:05:59 +0100
From: Anthony Damico <<ajdamico>>
To: Hannes Muehleisen <<hannes>>
Version: 11.21.5 (Jul2015)
CC: ajdamico
Last updated: 2016-01-20 14:11:35 +0100
## Comment 21666
Date: 2015-12-15 17:05:59 +0100
From: Anthony Damico <<ajdamico>>
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0
Build Identifier:
normalizing the path needs to account for the case sensitivity of the operating system. the last line of the example below throws an error. on windows, it should not.
Reproducible: Always
### Steps to Reproduce:
library(MonetDB.R)
library(MonetDBLite)
td <- tempdir()
utd <- toupper( td )
con <- dbConnect(MonetDB.R(), embedded=td)
con2 <- dbConnect(MonetDB.R(), embedded=utd)
error
## Comment 21737
Date: 2016-01-20 14:11:35 +0100
From: @hannesmuehleisen
We use normalizePath to (surprise) normalize path names. If this function thinks two paths are equal we treat them as equal. But on Windows:
> td <- tempdir()
> td
[1] "C:\\Users\\Vanilla\\AppData\\Local\\Temp\\RtmpCIt9Hf"
> utd
[1] "C:\\USERS\\VANILLA\\APPDATA\\LOCAL\\TEMP\\RTMPCIT9HF"
> normalizePath(td)
[1] "C:\\Users\\Vanilla\\AppData\\Local\\Temp\\RtmpCIt9Hf"
> utd <- toupper(td)
> normalizePath(utd)
[1] "C:\\Users\\Vanilla\\AppData\\Local\\Temp\\RTMPCIT9HF"
As you can see, normalizePath fails to turn RTMPCIT9HF into the (existing) RtmpCIt9Hf. In other words, not my department.
| windows dbdir= argument cannot be case sensitive | https://api.github.com/repos/MonetDB/MonetDB/issues/3886/comments | 0 | 2020-11-30T13:21:14Z | 2024-06-28T07:19:53Z | https://github.com/MonetDB/MonetDB/issues/3886 | 753,473,519 | 3,886 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-12-15 15:09:43 +0100
From: Anthony Damico <<ajdamico>>
To: Hannes Muehleisen <<hannes>>
Version: 11.21.5 (Jul2015)
CC: ajdamico
Last updated: 2016-01-20 13:40:17 +0100
## Comment 21664
Date: 2015-12-15 15:09:43 +0100
From: Anthony Damico <<ajdamico>>
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0
Build Identifier:
happens on windows. happened two separate times. easy to reproduce. thanks teamonetdb
Reproducible: Always
### Steps to Reproduce:
library(MonetDB.R)
library(survey)
tf <- tempfile()
td <- tempdir()
db <- dbConnect( MonetDBLite() , dbdir = td )
data(api)
dbWriteTable( db , 'api' , apiclus1 )
dclus1<-svydesign(id=~dnum, weights=~pw, data="api", fpc=~fpc,dbname=td,dbtype="MonetDBLite")
svymean( ~stype , dclus1 )
save( dclus1 , file = tf )
dput( tf )
close R
reopen R
library(MonetDB.R)
library(survey)
load( tf )
svymean( ~ stype , dclus1 )
R WINDOWS CRASH
## Comment 21665
Date: 2015-12-15 15:19:24 +0100
From: Anthony Damico <<ajdamico>>
one note.. adding in the line
dclus1 <- open( dclus1 , driver = MonetDB.R() )
not only prevents the crash, but it allows the computation to work properly
but if the user forgets to open the connection, obviously the whole building shouldn't burn down ;)
## Comment 21736
Date: 2016-01-20 13:39:36 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [6ca60818140b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6ca60818140b) made by Hannes Muehleisen <hannes@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=6ca60818140b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=6ca60818140b)
Changeset description:
Bug #3885
| monetdblite crashes R console when connection not properly formed | https://api.github.com/repos/MonetDB/MonetDB/issues/3885/comments | 0 | 2020-11-30T13:21:10Z | 2024-06-27T12:10:04Z | https://github.com/MonetDB/MonetDB/issues/3885 | 753,473,485 | 3,885 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-12-14 21:21:16 +0100
From: Anthony Damico <<ajdamico>>
To: Hannes Muehleisen <<hannes>>
Version: 11.21.19 (Jul2015-SP4)
CC: ajdamico
Duplicates: #3993
Last updated: 2016-04-29 07:56:39 +0200
## Comment 21662
Date: 2015-12-14 21:21:16 +0100
From: Anthony Damico <<ajdamico>>
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0
Build Identifier:
the gdklock error makes sense to me--
Failed to initialize embedded MonetDB !FATAL: GDKlockHome: Database lock '.gdk_lock' denied
--but after disconnecting, i would not expect this error?
Failed to initialize embedded MonetDB !FATAL: BBPaddfarm: bad rolemask
Reproducible: Always
### Steps to Reproduce:
console 1
> library(MonetDB.R)
Loading required package: DBI
> dbdir <- tempdir()
> con <- dbConnect(MonetDB.R(), embedded=dbdir)
Loading required package: MonetDBLite
Warning message:
package ‘MonetDBLite’ was built under R version 3.2.3
> dput(dbdir)
"C:\\Users\\anthonyd.KFF\\AppData\\Local\\Temp\\RtmpA9FFK0"
console 2
> library(MonetDB.R)
Loading required package: DBI
> dbdir <- "C:\\Users\\anthonyd.KFF\\AppData\\Local\\Temp\\RtmpA9FFK0"
> con <- dbConnect(MonetDB.R(), embedded=dbdir)
Loading required package: MonetDBLite
Error in MonetDBLite::monetdb_embedded_startup(embedded, !getOption("monetdb.debug.embedded", :
Failed to initialize embedded MonetDB !FATAL: GDKlockHome: Database lock '.gdk_lock' denied
In addition: Warning message:
package ‘MonetDBLite’ was built under R version 3.2.3
>
console 1
> dbDisconnect(con)
[1] TRUE
>
console 2
> con <- dbConnect(MonetDB.R(), embedded=dbdir)
Error in MonetDBLite::monetdb_embedded_startup(embedded, !getOption("monetdb.debug.embedded", :
Failed to initialize embedded MonetDB !FATAL: BBPaddfarm: bad rolemask
## Comment 21667
Date: 2015-12-15 17:50:13 +0100
From: @hannesmuehleisen
correct, it does not do that yet.
## Comment 22111
Date: 2016-04-29 07:56:39 +0200
From: Anthony Damico <<ajdamico>>
*** This bug has been marked as a duplicate of bug #3993 ***
| MonetDBLite dbDisconnect does not release dbfarm yet? | https://api.github.com/repos/MonetDB/MonetDB/issues/3884/comments | 0 | 2020-11-30T13:21:07Z | 2024-06-28T07:19:52Z | https://github.com/MonetDB/MonetDB/issues/3884 | 753,473,453 | 3,884 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-12-10 15:55:59 +0100
From: Martin van Dinther <<martin.van.dinther>>
To: GDK devs <<bugs-common>>
Version: 11.21.19 (Jul2015-SP4)
Last updated: 2018-02-08 18:56:54 +0100
## Comment 21656
Date: 2015-12-10 15:55:59 +0100
From: Martin van Dinther <<martin.van.dinther>>
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0
Build Identifier:
The testweb (branches Jul2015 and default) report a C (crash) for some sql tests on Solaris (Sol-Sol-i64)
See:
http://monetdb.cwi.nl/testweb/web/testgrid.php?serial=58025:116968e7daf0&targets=Sol-Solaris-x86_64&module=sql
It is probably due to limited internal (and virtual) memory.
However the server should catch a failed GDKMalloc and proper report the issue following by canceling the current statement processing and cleanup.
Potentially the GDKmalloc(65536) could be replaced by allocating a smaller size.
Reproducible: Always
### Steps to Reproduce:
1. check testweb results for branch: Jul2015 (and default)
2. search for results on Solaris (Sol-Sol-i64) which reported a C(rash)
See: http://monetdb.cwi.nl/testweb/web/testgrid.php?serial=58025:116968e7daf0&targets=Sol-Solaris-x86_64&module=sql
and
http://monetdb.cwi.nl/testweb/web/testgrid.php?serial=58027:4c53026fad4c&targets=Sol-Solaris-x86_64&module=sql
### Actual Results:
http://monetdb.cwi.nl/testweb/web/showtestoutput.php?serial=58025:116968e7daf0&target=Sol-Solaris-x86_64&module=sql&test=sql%2Ftest%2FBugTracker-2012%2Fhuge_table_update.Bug-2803&which=err
GDKmalloc(65536) fails, try to free up space [memory in use=970127896,virtual memory in use=970127896]
GDKmalloc(65536) result [mem=948233352,vm=948233352]
GDKmallocmax: recovery ok. Continuing..
GDKmalloc(65536) fails, try to free up space [memory in use=1002938568,virtual memory in use=1002938568]
GDKmalloc(65536) result [mem=1002747944,vm=1002747944]
GDKmallocmax: recovery ok. Continuing..
GDKmalloc(65536) fails, try to free up space [memory in use=1003206808,virtual memory in use=1003206808]
GDKmalloc(65536) result [mem=1003206808,vm=1003206808]
Segmentation fault
and:
http://monetdb.cwi.nl/testweb/web/showtestoutput.php?serial=58025:116968e7daf0&target=Sol-Solaris-x86_64&module=sql&test=sql%2Ftest%2FSQLite_regress%2Fsqllogictest%2Fselect5.test&which=err
GDKmalloc(65536) fails, try to free up space [memory in use=920026352,virtual memory in use=920026352]
GDKmalloc(65536) result [mem=916231928,vm=916231928]
Segmentation fault
and:
http://monetdb.cwi.nl/testweb/web/showtestoutput.php?serial=58025:116968e7daf0&target=Sol-Solaris-x86_64&module=sql&test=sql%2Ftest%2Frdf%2Fq8_v&which=err
GDKmalloc(65536) fails, try to free up space [memory in use=943413600,virtual memory in use=943413600]
GDKmalloc(65536) result [mem=942724168,vm=942724168]
GDKmallocmax: recovery ok. Continuing..
GDKmalloc(65536) fails, try to free up space [memory in use=974385784,virtual memory in use=974385784]
GDKmalloc(65536) result [mem=974385784,vm=974385784]
Segmentation fault
### Expected Results:
No segmentation fault but
an error msg stating there is not enough internal or virtual memory to complete the SQL statement.
## Comment 26183
Date: 2018-02-08 18:56:54 +0100
From: Martin van Dinther <<martin.van.dinther>>
In Jul2017 (and Mar2018) releases many memory allocation failures are checked and handled properly.
It is still possible to get out of virtual memory errors on smaller systems, typically on 32-bit OSes.
| Segmentation fault due to failed GDKmalloc(65536) on Solaris (Sol-Sol-i64) | https://api.github.com/repos/MonetDB/MonetDB/issues/3883/comments | 0 | 2020-11-30T13:21:04Z | 2024-06-27T12:10:02Z | https://github.com/MonetDB/MonetDB/issues/3883 | 753,473,410 | 3,883 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-12-08 06:07:56 +0100
From: Kaijiang <<chenkaijiang>>
To: MonetDB5 devs <<bugs-monetdb5>>
Version: 11.21.19 (Jul2015-SP4)
CC: @mlkersten
Last updated: 2016-07-26 18:20:47 +0200
## Comment 21646
Date: 2015-12-08 06:07:56 +0100
From: Kaijiang <<chenkaijiang>>
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36
Build Identifier:
SQL "select count(*) from r1 where myfunc(c1) > 17;" causes an error after running for about 20 minutes:
GDK reported error.
BATproject: does not match always
Reproducible: Always
### Steps to Reproduce:
1.download and unzip the attached int_10240.csv.gz
2.create table r1 (c1 int);
3. COPY 10240 RECORDS INTO r1 from '%_the_file_generated_from_STEP_1%' USING DELIMITERS '\t' NULL AS '\\N';
4. insert into r1 select * from r1; -- repeat this until r1 got more than 41 million records
5. create table t1 (f1 int, f2 int); insert into t1 values (10881,111111), (3,33), (884, 984), (885, 985), (886, 986), (887, 987), (888, 988), (889, 989), (8810, 9810);
6. CREATE FUNCTION myfunc(a int) RETURNS int
RETURN
(
SELECT (case when MAX(f2) is not null then MAX(f2) else 0 end)
FROM t1 WHERE f1>=a
);
7. select count(*) from r1 where myfunc(c1) > 17;
### Actual Results:
Got an error:
GDK reported error.
BATproject: does not match always
### Expected Results:
Got the count of the qualified records
## Comment 21647
Date: 2015-12-08 06:08:56 +0100
From: Kaijiang <<chenkaijiang>>
Created attachment 377
data for table r1
> Attached file: [int_10240.csv.gz](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3882_int_10240.csv.gz_377) (application/x-gzip, 23260 bytes)
> Description: data for table r1
## Comment 21648
Date: 2015-12-08 06:12:28 +0100
From: Kaijiang <<chenkaijiang>>
(In reply to Kaijiang from comment 1)
> Created attachment 377 [details]
> data for table r1
More info, I ran it on a 4-CPU server and the loading to table r1 is split into 4 parts. It looks like that the 2nd part causes the problem.
The plan for the SQL is:
sql>explain select count(*) from r1 where myfunc(c1) > 17;
+---------------------------------------------------------------------------------------------------------------+
| mal |
+===============================================================================================================+
| function user.s3_1{autoCommit=true}(A0:int):void; |
| X_21:void := querylog.define("explain select count(*) from r1 where myfunc(c1) > 16;","default_pipe",77); |
| barrier X_86 := language.dataflow(); |
| X_3 := sql.mvc(); |
| X_37:bat[:oid,:oid] := sql.tid(X_3,"sys","r1",0,4); |
| X_44:bat[:oid,:int] := sql.bind(X_3,"sys","r1","c1",0,0,4); |
| (X_48:bat[:oid,:oid],X_49:bat[:oid,:int]) := sql.bind(X_3,"sys","r1","c1",2,0,4); |
| X_56 := sql.delta(X_44,X_48,X_49); |
| X_60 := algebra.leftfetchjoin(X_37,X_56); |
| exit X_86; |
| X_98 := bat.new(nil:oid,nil:int); |
| barrier (X_102,X_103) := iterator.new(X_60); |
| X_105 := user.myfunc(X_103); |
| bat.append(X_98,X_105); |
| redo (X_102,X_103) := iterator.next(X_60); |
| exit (X_102,X_103); |
| X_64 := X_98; |
| barrier X_89 := language.dataflow(); |
| X_68 := algebra.thetasubselect(X_64,A0,">"); |
| X_73 := algebra.leftfetchjoin(X_68,X_60); |
| X_81 := aggr.count(X_73); |
| X_39:bat[:oid,:oid] := sql.tid(X_3,"sys","r1",1,4); |
| X_45:bat[:oid,:int] := sql.bind(X_3,"sys","r1","c1",0,1,4); |
| (X_50:bat[:oid,:oid],X_51:bat[:oid,:int]) := sql.bind(X_3,"sys","r1","c1",2,1,4); |
| X_57 := sql.delta(X_45,X_50,X_51); |
| X_61 := algebra.leftfetchjoin(X_39,X_57); |
| exit X_89; |
| X_110 := bat.new(nil:oid,nil:int); |
| barrier (X_112,X_113) := iterator.new(X_61); |
| X_115 := user.myfunc(X_113); |
| bat.append(X_110,X_115); |
| redo (X_112,X_113) := iterator.next(X_61); |
| exit (X_112,X_113); |
| X_65 := X_110; |
| barrier X_92 := language.dataflow(); |
| X_69 := algebra.thetasubselect(X_65,A0,">"); |
| X_75 := algebra.leftfetchjoin(X_69,X_61); |
| X_82 := aggr.count(X_75); |
| X_41:bat[:oid,:oid] := sql.tid(X_3,"sys","r1",2,4); |
| X_46:bat[:oid,:int] := sql.bind(X_3,"sys","r1","c1",0,2,4); |
| (X_52:bat[:oid,:oid],X_53:bat[:oid,:int]) := sql.bind(X_3,"sys","r1","c1",2,2,4); |
| X_58 := sql.delta(X_46,X_52,X_53); |
| X_62 := algebra.leftfetchjoin(X_41,X_58); |
| exit X_92; |
| X_120 := bat.new(nil:oid,nil:int); |
| barrier (X_122,X_123) := iterator.new(X_62); |
| X_125 := user.myfunc(X_123); |
| bat.append(X_120,X_125); |
| redo (X_122,X_123) := iterator.next(X_62); |
| exit (X_122,X_123); |
| X_66 := X_120; |
| barrier X_95 := language.dataflow(); |
| X_70 := algebra.thetasubselect(X_66,A0,">"); |
| X_77 := algebra.leftfetchjoin(X_70,X_62); |
| X_83 := aggr.count(X_77); |
| X_43:bat[:oid,:oid] := sql.tid(X_3,"sys","r1",3,4); |
| X_47:bat[:oid,:int] := sql.bind(X_3,"sys","r1","c1",0,3,4); |
| (X_54:bat[:oid,:oid],X_55:bat[:oid,:int]) := sql.bind(X_3,"sys","r1","c1",2,3,4); |
| X_9:bat[:oid,:int] := sql.bind(X_3,"sys","r1","c1",1); |
| X_59 := sql.delta(X_47,X_54,X_55,X_9); |
| X_63 := algebra.leftfetchjoin(X_43,X_59); |
| exit X_95; |
| X_130 := bat.new(nil:oid,nil:int); |
| barrier (X_132,X_133) := iterator.new(X_63); |
| X_135 := user.myfunc(X_133); |
| bat.append(X_130,X_135); |
| redo (X_132,X_133) := iterator.next(X_63); |
| exit (X_132,X_133); |
| X_67 := X_130; |
| X_71 := algebra.thetasubselect(X_67,A0,">"); |
| X_79 := algebra.leftfetchjoin(X_71,X_63); |
| X_84 := aggr.count(X_79); |
| X_80 := mat.pack(X_81,X_82,X_83,X_84); |
| X_85 := algebra.selectNotNil(X_80); |
| X_14 := aggr.sum(X_85); |
| sql.resultSet("sys.L1","L1","wrd",64,0,7,X_14); |
| end user.s3_1; |
+---------------------------------------------------------------------------------------------------------------+
77 tuples (2.786ms)
## Comment 21650
Date: 2015-12-09 05:03:15 +0100
From: Kaijiang <<chenkaijiang>>
(In reply to Kaijiang from comment 2)
> (In reply to Kaijiang from comment 1)
> > Created attachment 377 [details]
> > data for table r1
>
> More info, I ran it on a 4-CPU server and the loading to table r1 is split
> into 4 parts. It looks like that the 2nd part causes the problem.
>
> The plan for the SQL is:
> sql>explain select count(*) from r1 where myfunc(c1) > 17;
> +----------------------------------------------------------------------------
> -----------------------------------+
> | mal
> |
> +============================================================================
> ===================================+
> | function user.s3_1{autoCommit=true}(A0:int):void;
> |
> | X_21:void := querylog.define("explain select count(*) from r1 where
> myfunc(c1) > 16;","default_pipe",77); |
> | barrier X_86 := language.dataflow();
> |
> | X_3 := sql.mvc();
> |
> | X_37:bat[:oid,:oid] := sql.tid(X_3,"sys","r1",0,4);
> |
> | X_44:bat[:oid,:int] := sql.bind(X_3,"sys","r1","c1",0,0,4);
> |
> | (X_48:bat[:oid,:oid],X_49:bat[:oid,:int]) :=
> sql.bind(X_3,"sys","r1","c1",2,0,4); |
> | X_56 := sql.delta(X_44,X_48,X_49);
> |
> | X_60 := algebra.leftfetchjoin(X_37,X_56);
> |
> | exit X_86;
> |
> | X_98 := bat.new(nil:oid,nil:int);
> |
> | barrier (X_102,X_103) := iterator.new(X_60);
> |
> | X_105 := user.myfunc(X_103);
> |
> | bat.append(X_98,X_105);
> |
> | redo (X_102,X_103) := iterator.next(X_60);
> |
> | exit (X_102,X_103);
> |
> | X_64 := X_98;
> |
> | barrier X_89 := language.dataflow();
> |
> | X_68 := algebra.thetasubselect(X_64,A0,">");
> |
> | X_73 := algebra.leftfetchjoin(X_68,X_60);
> |
> | X_81 := aggr.count(X_73);
> |
> | X_39:bat[:oid,:oid] := sql.tid(X_3,"sys","r1",1,4);
> |
> | X_45:bat[:oid,:int] := sql.bind(X_3,"sys","r1","c1",0,1,4);
> |
> | (X_50:bat[:oid,:oid],X_51:bat[:oid,:int]) :=
> sql.bind(X_3,"sys","r1","c1",2,1,4); |
> | X_57 := sql.delta(X_45,X_50,X_51);
> |
> | X_61 := algebra.leftfetchjoin(X_39,X_57);
> |
> | exit X_89;
> |
> | X_110 := bat.new(nil:oid,nil:int);
> |
> | barrier (X_112,X_113) := iterator.new(X_61);
> |
> | X_115 := user.myfunc(X_113);
> |
> | bat.append(X_110,X_115);
> |
> | redo (X_112,X_113) := iterator.next(X_61);
> |
> | exit (X_112,X_113);
> |
> | X_65 := X_110;
> |
> | barrier X_92 := language.dataflow();
> |
> | X_69 := algebra.thetasubselect(X_65,A0,">");
> |
> | X_75 := algebra.leftfetchjoin(X_69,X_61);
> |
> | X_82 := aggr.count(X_75);
> |
> | X_41:bat[:oid,:oid] := sql.tid(X_3,"sys","r1",2,4);
> |
> | X_46:bat[:oid,:int] := sql.bind(X_3,"sys","r1","c1",0,2,4);
> |
> | (X_52:bat[:oid,:oid],X_53:bat[:oid,:int]) :=
> sql.bind(X_3,"sys","r1","c1",2,2,4); |
> | X_58 := sql.delta(X_46,X_52,X_53);
> |
> | X_62 := algebra.leftfetchjoin(X_41,X_58);
> |
> | exit X_92;
> |
> | X_120 := bat.new(nil:oid,nil:int);
> |
> | barrier (X_122,X_123) := iterator.new(X_62);
> |
> | X_125 := user.myfunc(X_123);
> |
> | bat.append(X_120,X_125);
> |
> | redo (X_122,X_123) := iterator.next(X_62);
> |
> | exit (X_122,X_123);
> |
> | X_66 := X_120;
> |
> | barrier X_95 := language.dataflow();
> |
> | X_70 := algebra.thetasubselect(X_66,A0,">");
> |
> | X_77 := algebra.leftfetchjoin(X_70,X_62);
> |
> | X_83 := aggr.count(X_77);
> |
> | X_43:bat[:oid,:oid] := sql.tid(X_3,"sys","r1",3,4);
> |
> | X_47:bat[:oid,:int] := sql.bind(X_3,"sys","r1","c1",0,3,4);
> |
> | (X_54:bat[:oid,:oid],X_55:bat[:oid,:int]) :=
> sql.bind(X_3,"sys","r1","c1",2,3,4); |
> | X_9:bat[:oid,:int] := sql.bind(X_3,"sys","r1","c1",1);
> |
> | X_59 := sql.delta(X_47,X_54,X_55,X_9);
> |
> | X_63 := algebra.leftfetchjoin(X_43,X_59);
> |
> | exit X_95;
> |
> | X_130 := bat.new(nil:oid,nil:int);
> |
> | barrier (X_132,X_133) := iterator.new(X_63);
> |
> | X_135 := user.myfunc(X_133);
> |
> | bat.append(X_130,X_135);
> |
> | redo (X_132,X_133) := iterator.next(X_63);
> |
> | exit (X_132,X_133);
> |
> | X_67 := X_130;
> |
> | X_71 := algebra.thetasubselect(X_67,A0,">");
> |
> | X_79 := algebra.leftfetchjoin(X_71,X_63);
> |
> | X_84 := aggr.count(X_79);
> |
> | X_80 := mat.pack(X_81,X_82,X_83,X_84);
> |
> | X_85 := algebra.selectNotNil(X_80);
> |
> | X_14 := aggr.sum(X_85);
> |
> | sql.resultSet("sys.L1","L1","wrd",64,0,7,X_14);
> |
> | end user.s3_1;
> |
> +----------------------------------------------------------------------------
> -----------------------------------+
> 77 tuples (2.786ms)
I think the generated MAL to process the 2nd part data is wrong.
The MAL code:
barrier (X_112,X_113) := iterator.new(X_61);
X_115 := user.myfunc(X_113);
bat.append(X_110,X_115);
redo (X_112,X_113) := iterator.next(X_61);
exit (X_112,X_113);
X_65 := X_110;
barrier X_92 := language.dataflow();
X_69 := algebra.thetasubselect(X_65,A0,">");
X_75 := algebra.leftfetchjoin(X_69,X_61);
In (X_112,X_113) := iterator.new(X_61);, the OID of X_61 is stored in X_112, which is never used in the following codes.
So, the X_110, X_65 and X_69 got OID completely different from X_61. This causes failure in algebra.leftfetchjoin(X_69,X_61);
Is my understanding correct?
## Comment 22255
Date: 2016-07-25 21:09:07 +0200
From: @mlkersten
yes, correct.
To keep the oid around as well, you have to create two BATs.
One with the oid and one for the values.
This is consequence of moving from a 2-column BAT to a 1-column BAT representation.
## Comment 22262
Date: 2016-07-26 18:20:47 +0200
From: Kaijiang <<chenkaijiang>>
I don't think that this bug can be resolved as WONTFIX.
Because I just run a SQL with user defined function (function also written in SQL): select count(*) from r1 where myfunc(c1) > 17;
And then the GDK reported an error in MAL -- which means that MonetDB didn't generate correct MAL for my SQL.
Since I didn't write any MAL, I don't have to make the MAL work by myself and MonetDB should do it.
| Error "BATproject: does not match always" when executing SQL with user defined function | https://api.github.com/repos/MonetDB/MonetDB/issues/3882/comments | 0 | 2020-11-30T13:21:00Z | 2024-06-28T07:19:52Z | https://github.com/MonetDB/MonetDB/issues/3882 | 753,473,372 | 3,882 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-12-07 16:30:59 +0100
From: Daniel Sali <<daniel.sali>>
To: SQL devs <<bugs-sql>>
Version: 11.21.11 (Jul2015-SP1)
CC: @njnes
Last updated: 2016-03-25 09:59:13 +0100
## Comment 21642
Date: 2015-12-07 16:30:59 +0100
From: Daniel Sali <<daniel.sali>>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36
Build Identifier:
We are trying to load a large amount of data using Pentaho Kettle a Java ETL suite, which creates a COPY INTO table FROM fifo file statement and uses the driver. The Java process makes a COPY INTO call every 100,000 records, but after about 32 million records loaded, the server process dies with a segmentation fault.
Reproducible: Always
### Steps to Reproduce:
1. Load 100000 records 33-34 times with COPY INTO table
### Actual Results:
The server process died with a segmentation fault.
### Expected Results:
Records should load successfully.
We have attached gdb to the mserver process after repeatedly experiencing the issue, and the following stack trace was captured:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f7f54bef700 (LWP 21904)]
0x00007f7f5a9460b2 in ebat_copy () from /usr/lib64/monetdb5/lib_sql.so
(gdb) where
0 0x00007f7f5a9460b2 in ebat_copy () from /usr/lib64/monetdb5/lib_sql.so
1 0x00007f7f5a9437bc in dup_bat () from /usr/lib64/monetdb5/lib_sql.so
2 0x00007f7f5a9447eb in append_col () from /usr/lib64/monetdb5/lib_sql.so
3 0x00007f7f5a833ecf in mvc_append_wrap () from /usr/lib64/monetdb5/lib_sql.so
4 0x00007f7f679c41c8 in runMALsequence () from /lib64/libmonetdb5.so.19
5 0x00007f7f679c514a in callMAL () from /lib64/libmonetdb5.so.19
6 0x00007f7f5a845acf in SQLexecutePrepared () from /usr/lib64/monetdb5/lib_sql.so
7 0x00007f7f5a845fca in SQLengineIntern () from /usr/lib64/monetdb5/lib_sql.so
8 0x00007f7f679df1c0 in runScenarioBody () from /lib64/libmonetdb5.so.19
9 0x00007f7f679dfcad in runScenario () from /lib64/libmonetdb5.so.19
10 0x00007f7f679e00f0 in MSserveClient () from /lib64/libmonetdb5.so.19
11 0x00007f7f679e06fb in MSscheduleClient () from /lib64/libmonetdb5.so.19
12 0x00007f7f67a8564c in doChallenge () from /lib64/libmonetdb5.so.19
13 0x00007f7f674b5d1f in thread_starter () from /lib64/libbat.so.12
14 0x00007f7f64ff7df5 in start_thread (arg=0x7f7f54bef700) at pthread_create.c:308
15 0x00007f7f64d1e1ad in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113
The output of the 'list' gdb command:
(gdb) list
76 else
77
78 /* This is a "normal" system call stub: if there is an error,
79 it returns -1 and sets errno. */
80
81 T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS)
82 ret
83 T_PSEUDO_END (SYSCALL_SYMBOL)
84
85 endif
Thread dump will be added as an attachment.
Thanks,
Daniel Sali
## Comment 21643
Date: 2015-12-07 16:32:21 +0100
From: Daniel Sali <<daniel.sali>>
Created attachment 376
Output of the 'thr app all bt' gdb command
> Attached file: [monetdb_thread_dump.txt](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3881_monetdb_thread_dump.txt_376) (text/plain, 8686 bytes)
> Description: Output of the 'thr app all bt' gdb command
## Comment 21649
Date: 2015-12-08 11:25:29 +0100
From: Daniel Sali <<daniel.sali>>
Please note that though the symptoms are similar to Bug #3848, the stack trace is different.
## Comment 21714
Date: 2016-01-06 13:30:21 +0100
From: @njnes
I'm tried to reproduce this problem (and failed). Could you give some more details about the data types your loading. A schema /create table statement could help a lot. On what system are you running, do you have enough diskspace available for the db?
## Comment 21894
Date: 2016-03-14 08:30:36 +0100
From: @njnes
the ebat_copy code has now more protection against out of memory situations.
## Comment 21957
Date: 2016-03-25 09:59:13 +0100
From: @sjoerdmullender
Jul2015-SP3 has been released.
| Server crashes on bulk load | https://api.github.com/repos/MonetDB/MonetDB/issues/3881/comments | 0 | 2020-11-30T13:20:56Z | 2024-06-27T12:10:00Z | https://github.com/MonetDB/MonetDB/issues/3881 | 753,473,317 | 3,881 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-12-02 10:09:11 +0100
From: Clint Cummins <<ccummins>>
To: GDK devs <<bugs-common>>
Version: 11.21.19 (Jul2015-SP4)
CC: martin.van.dinther
Last updated: 2016-04-11 11:23:02 +0200
## Comment 21627
Date: 2015-12-02 10:09:11 +0100
From: Clint Cummins <<ccummins>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36
Build Identifier:
There were 2 clients - one using Python to send queries, and a second in mclient who was inactive. Not sure exactly what was going on when it crashed.
We've loaded about 3.5Tb of data into this dbfarm at present; doing this fairly continuously over the past week or so.
When we try to restart mserver5, it crashes. There was no explicit error message, so we turned on much debug output using gdk_debug=32767 and directed output to a file (attached: debug.log ).
This log shows a series of "BBPdescriptor set to unloading BAT ..." (last one on line 3054.
Then there is a long series of "DELTAinit and BBPdecref ..." using only 3-4 of the same BAT ids (lines 3058 to 12430/end).
Reproducible: Always
### Steps to Reproduce:
Run mserver5.exe on the dbfarm we've been using for a couple of months.
### Actual Results:
mserver5 crashes with no error message if debug output is not enabled.
### Expected Results:
Normal start.
1. Tried restarting multiple times; always crashes.
2. We're running the public distribution .exe and .DLL s, not something I made.
mserver5 --version:
-----
MonetDB 5 server v11.19.9 "Oct2014-SP2" (64-bit, 64-bit oids)
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 512.0GiB available memory, 8 available cpu cores
Libraries:
libpcre: 8.36 2014-09-26
openssl: OpenSSL 1.0.1k 8 Jan 2015
libxml2: 2.9.2
Compiled by: monet@LAB03 (x86_64-pc-winnt)
Compilation: cl -GF -W3 -WX -MD -nologo -Ox -Zi -Oi
Linking : cl -GF -W3 -WX -MD -nologo -Ox -Zi -Oi
-----
MonetDB 5 server v11.19.9 "Oct2014-SP2"
Serving database 'CWF', using 8 threads
Compiled for x86_64-pc-winnt/64bit with 64bit OIDs dynamically linked
Found 511.967 GiB available main-memory.
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
Listening for connection requests on mapi:monetdb://127.0.0.1:50000/
MonetDB/GIS module loaded
## Comment 21628
Date: 2015-12-02 10:10:56 +0100
From: Clint Cummins <<ccummins>>
Created attachment 375
mserver5 debug output ( --set gdk_debug=32767 )
> Attached file: [debug.log](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3880_debug.log_375) (text/plain, 868950 bytes)
> Description: mserver5 debug output ( --set gdk_debug=32767 )
## Comment 21655
Date: 2015-12-10 15:19:24 +0100
From: Martin van Dinther <<martin.van.dinther>>
Hi Clint,
I see you are using Oct2014-SP2 version of MonetDB.
We have improved many things since that release, possibly also your problem.
See https://www.monetdb.org/blog/monetdb-jul2015-sp1-released
Could to install the latest version of MonetDB (https://www.monetdb.org/downloads/Windows/Jul2015-SP1/) and test if the problem still exists in this version?
Please let us know your test results.
| mserver5 crashed and fails to restart | https://api.github.com/repos/MonetDB/MonetDB/issues/3880/comments | 0 | 2020-11-30T13:20:53Z | 2024-06-28T07:19:52Z | https://github.com/MonetDB/MonetDB/issues/3880 | 753,473,289 | 3,880 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-12-01 18:45:54 +0100
From: Frédéric Jolliton <<frederic.jolliton+monetdb>>
To: SQL devs <<bugs-sql>>
Version: 11.17.21 (Jan2014-SP3)
CC: martin.van.dinther, @njnes
Last updated: 2016-01-15 11:38:04 +0100
## Comment 21623
Date: 2015-12-01 18:45:54 +0100
From: Frédéric Jolliton <<frederic.jolliton+monetdb>>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0
Build Identifier:
A query with a serie of UNION ALLs fails because of an assert that trigger when the optimizer reaches 10 levels (of iterations?).
It fails even with optimizer set to `minimal_pipe'. This is worrying :/
Reproducible: Always
### Steps to Reproduce:
1. Create a simple table:
CREATE TABLE foo (a INT);
2. Execute the following query:
SELECT 1
FROM (SELECT a FROM foo
UNION ALL
SELECT 0 FROM foo
UNION ALL
SELECT 0 FROM foo
UNION ALL
SELECT 0 FROM foo
UNION ALL
SELECT 0 FROM foo
UNION ALL
SELECT 0 FROM foo
UNION ALL
SELECT 0 FROM foo
UNION ALL
SELECT 0 FROM foo
UNION ALL
SELECT 0 FROM foo
UNION ALL
SELECT 0 FROM foo
UNION ALL
SELECT 0 FROM foo
UNION ALL
SELECT 0 FROM foo) AS t;
### Actual Results:
The log says:
mserver5: rel_optimizer.c:7675: _rel_optimizer: Assertion `0' failed.
database 'test' (12345) was killed by signal SIGABRT
## Comment 21624
Date: 2015-12-01 22:48:42 +0100
From: @sjoerdmullender
This only seems to be an actual problem when assertions are enabled. And they're not in binary releases.
## Comment 21629
Date: 2015-12-02 14:46:55 +0100
From: Frédéric Jolliton <<frederic.jolliton+monetdb>>
Indeed, we're testing with assert enabled. And it is actually fine with a production release.
We made the assumption that an assert was really pointing at a problem, but you seems to imply that it is benign here. In this case, we will disable this specific assert for our tests.
Thanks.
## Comment 21644
Date: 2015-12-07 19:07:00 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [3c24051e28fa](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3c24051e28fa) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=3c24051e28fa](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=3c24051e28fa)
Changeset description:
fixed bug #3879, after pushing down project (through the union), we merge
multiple projects directly.
## Comment 21645
Date: 2015-12-07 20:33:07 +0100
From: @njnes
improved the optimizer which solve this recursion.
## Comment 21657
Date: 2015-12-10 16:52:04 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [f59d2713050c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f59d2713050c) made by Martin van Dinther <martin.van.dinther@monetdbsolutions.com> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=f59d2713050c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=f59d2713050c)
Changeset description:
Corrected wrong bug number. Should be Bug #3879 instead of 3897
## Comment 21658
Date: 2015-12-10 16:55:39 +0100
From: Martin van Dinther <<martin.van.dinther>>
Hi Niels,
Found another test case where the assertion:
mserver5: ../../../dev/sql/server/rel_optimizer.c:7680: _rel_optimizer: Assertion `0' failed.
is still occuring.
See test script: sql/test/BugTracker-2015/Tests/many_union_all.Bug-3879.sql
## Comment 21660
Date: 2015-12-12 12:36:26 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [bc157090c301](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=bc157090c301) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=bc157090c301](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=bc157090c301)
Changeset description:
fixed many_union_all bug #3879
## Comment 21661
Date: 2015-12-12 13:13:28 +0100
From: @njnes
fixed, we now cleanup the extra projects right after a project push down union.
| Database crashes when querying with several UNION ALLs. | https://api.github.com/repos/MonetDB/MonetDB/issues/3879/comments | 0 | 2020-11-30T13:20:50Z | 2024-06-27T12:09:58Z | https://github.com/MonetDB/MonetDB/issues/3879 | 753,473,257 | 3,879 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-11-28 20:55:25 +0100
From: Brian Hood <<brianh6854>>
To: GDK devs <<bugs-common>>
Version: 11.21.19 (Jul2015-SP4)
CC: @mlkersten
Last updated: 2016-12-22 20:01:17 +0100
## Comment 21621
Date: 2015-11-28 20:55:25 +0100
From: Brian Hood <<brianh6854>>
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.90 Safari/537.36
Build Identifier:
When having a PRIMARY constraint on my guid char(36) NOT NULL field constraint field i am not able to perform a JOIN across 2 MERGE TABLES each or 4 remote tables.
Reproducible: Always
### Steps to Reproduce:
1. Create schema across 5 nodes with one as master and the others as remote nodes with constraints
2. SELECT * FROM ippacket a JOIN tcppacket b ON (a.guid = b.guid);
3. Recreate schema's without primary key constraint everything works with the above query.
### Actual Results:
sql>select count(*) from ippacket a, tcppacket b where a.guid = b.guid;
(mapi:monetdb://monetdb@172.17.0.5/threatmonitor) GDK reported error.
ERROR: BATproject: does not match always
### Expected Results:
Results from the query not the above error.
http://pastebin.com/YwT3NvS3
Uncomment constraints to produce bug on 11.21.11
| MonetDB Merge / Remotes tables GDKerror: Doesn't always match good | https://api.github.com/repos/MonetDB/MonetDB/issues/3878/comments | 0 | 2020-11-30T13:20:47Z | 2024-06-28T07:19:51Z | https://github.com/MonetDB/MonetDB/issues/3878 | 753,473,211 | 3,878 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-11-28 16:46:01 +0100
From: Anthony Damico <<ajdamico>>
To: Hannes Muehleisen <<hannes>>
Version: -- development
CC: ajdamico
Last updated: 2016-06-23 10:24:47 +0200
## Comment 21617
Date: 2015-11-28 16:46:01 +0100
From: Anthony Damico <<ajdamico>>
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0
Build Identifier:
library(MonetDB.R)
library(MonetDBLite)
td1 <- paste0( tempdir() , "/one" )
td2 <- paste0( tempdir() , "/two" )
dir.create( td1 )
dir.create( td2 )
db1 <- dbConnect( MonetDB.R() , embedded = td1 )
dbWriteTable( db1 , 'mtcars' , mtcars )
dbDisconnect( db1 , shutdown = TRUE )
db2 <- dbConnect( MonetDB.R() , embedded = td2 )
dbWriteTable( db1 , 'mtcars' , mtcars )
Reproducible: Always
## Comment 22110
Date: 2016-04-29 07:52:46 +0200
From: Anthony Damico <<ajdamico>>
wilbur would be proud
| MonetDBLite should allow close then re-open databases? without restarting R | https://api.github.com/repos/MonetDB/MonetDB/issues/3877/comments | 0 | 2020-11-30T13:20:44Z | 2024-06-27T12:09:56Z | https://github.com/MonetDB/MonetDB/issues/3877 | 753,473,171 | 3,877 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-11-28 16:33:28 +0100
From: Anthony Damico <<ajdamico>>
To: Hannes Muehleisen <<hannes>>
Version: 11.21.5 (Jul2015)
CC: ajdamico
Last updated: 2015-11-30 10:15:47 +0100
## Comment 21616
Date: 2015-11-28 16:33:28 +0100
From: Anthony Damico <<ajdamico>>
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0
Build Identifier:
isIdCurrent <-
function (obj)
{
.Deprecated("dbIsValid")
dbIsValid(obj)
}
Reproducible: Always
## Comment 21622
Date: 2015-11-30 10:15:47 +0100
From: @hannesmuehleisen
Fixed in revision [cd9072035663](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=cd9072035663) and uploaded 1.0.1 to https://www.monetdb.org/Assets/R/
| for compatibility with RSQLite syntax, add this function to MonetDBLite | https://api.github.com/repos/MonetDB/MonetDB/issues/3876/comments | 0 | 2020-11-30T13:20:41Z | 2024-06-27T12:09:55Z | https://github.com/MonetDB/MonetDB/issues/3876 | 753,473,143 | 3,876 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-11-23 18:24:48 +0100
From: Frédéric Jolliton <<frederic.jolliton+monetdb>>
To: SQL devs <<bugs-sql>>
Version: -- development
Last updated: 2016-04-11 11:45:24 +0200
## Comment 21583
Date: 2015-11-23 18:24:48 +0100
From: Frédéric Jolliton <<frederic.jolliton+monetdb>>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0
Build Identifier:
That's probably more a feature request that a bug per se.
We have implemented various aggregates functions in C for MonetDB, such as "concat" to concatenate all the strings of a column, separated by comma. (These aggregates works fine and are pretty generics, and we plan to release the code for them if there are any interest.)
With PostgreSQL it is possible to use the DISTINCT keyword within a single argument aggregate function, such that "concat(DISTINCT name)" behave by concatenating only distinct names, which is very convenient (like SUM(DISTINCT value) that sums only distinct values for instance.)
But it seems that MonetDB can't even parse it. This is rejected right when reading the SQL query:
syntax error, unexpected IDENT, expecting ')' or ',' in: "select concat(distinct name"
Is this feature planned to be supported at some point?
Reproducible: Always
| Adding support for DISTINCT in custom single-argument aggregates | https://api.github.com/repos/MonetDB/MonetDB/issues/3875/comments | 0 | 2020-11-30T13:20:39Z | 2024-06-28T07:19:51Z | https://github.com/MonetDB/MonetDB/issues/3875 | 753,473,115 | 3,875 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-11-20 01:53:17 +0100
From: @skinkie
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes
Last updated: 2015-11-23 08:06:53 +0100
## Comment 21562
Date: 2015-11-20 01:53:17 +0100
From: @skinkie
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36
Build Identifier:
I am loading a data files of about 8000000 rows each. Loading takes about 1 minute.
I notice that when loading each file in the same table the performance of loading decreases.
sql>select count(*) from xxx_2015_04;
+------+
| L1 |
+======+
| 0 |
+------+
1 tuple (0.846ms)
sql>copy 8178578 records into "sys"."xxx_2015_04" from '/mnt/storage1/tmp/xxx_2015_03.csv.gz' delimiters ';', '\n' null as '';
8178578 affected rows (1m 13s)
sql>copy 8178578 records into "sys"."xxx_2015_04" from '/mnt/storage1/tmp/xxx_2015_03.csv.gz' delimiters ';', '\n' null as '';
8178578 affected rows (3m 13s)
sql>copy 8178578 records into "sys"."xxx_2015_04" from '/mnt/storage1/tmp/xxx_2015_03.csv.gz' delimiters ';', '\n' null as '';
8178578 affected rows (2m 15s)
sql>copy 8178578 records into "sys"."xxx_2015_04" from '/mnt/storage1/tmp/xxx_2015_03.csv.gz' delimiters ';', '\n' null as '';
8178578 affected rows (4m 15s)
I would expect that appending to an existing table without a primary key to check, give roughly the same performance.
Reproducible: Always
MonetDB 5 server v11.22.0 (64-bit, 64-bit oids, 128-bit integers)
This is an unreleased version
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 31.4GiB available memory, 8 available cpu cores
Libraries:
libpcre: 8.33 2013-05-28 (compiled with 8.33)
openssl: OpenSSL 1.0.2d 9 Jul 2015 (compiled with OpenSSL 1.0.2d 9 Jul 2015)
libxml2: 2.9.1 (compiled with 2.9.1)
Compiled by: skinkie@bigdata.openebs.nl (x86_64-unknown-linux-gnu)
Compilation: gcc -O3 -pipe -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/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64
## Comment 21573
Date: 2015-11-23 08:06:53 +0100
From: @njnes
Copy into in this form writes a lot to the logs. Use the locked version instead or leave some time between the copy-into (about 30 sec). That should make sure the bats are appended and the log will stay clean.
| Tables with a high row count perform worse on copy into than empty tables | https://api.github.com/repos/MonetDB/MonetDB/issues/3874/comments | 0 | 2020-11-30T13:20:36Z | 2024-06-28T07:19:51Z | https://github.com/MonetDB/MonetDB/issues/3874 | 753,473,077 | 3,874 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-11-20 01:20:47 +0100
From: @skinkie
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes
Last updated: 2016-01-15 11:38:17 +0100
## Comment 21560
Date: 2015-11-20 01:20:47 +0100
From: @skinkie
mserver5: gdk_bat.c:1015: setcolprops: Assertion `x != ((void *)0) || col->type == 0' failed.
When trying to import a reasonably big dataset, I end up with the above error after the copy statement. The incident can be reproduced by loading the specific file.
Statement used:
copy 7624307 records into "sys"."xxx_2015_04" from '/mnt/storage1/tmp/xxx_2015_04.csv.gz' delimiters ';', '\n' null as '';
## Comment 21561
Date: 2015-11-20 01:21:25 +0100
From: @skinkie
MonetDB 5 server v11.22.0 (64-bit, 64-bit oids, 128-bit integers)
This is an unreleased version
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 31.4GiB available memory, 8 available cpu cores
Libraries:
libpcre: 8.33 2013-05-28 (compiled with 8.33)
openssl: OpenSSL 1.0.2d 9 Jul 2015 (compiled with OpenSSL 1.0.2d 9 Jul 2015)
libxml2: 2.9.1 (compiled with 2.9.1)
Compiled by: skinkie@bigdata.openebs.nl (x86_64-unknown-linux-gnu)
Compilation: gcc -O3 -pipe -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/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64
## Comment 21572
Date: 2015-11-22 17:17:55 +0100
From: @njnes
detect incorrect input earlier (ie preventing out of buffer writes)
| mserver5: gdk_bat.c:1015: setcolprops: Assertion `x != ((void *)0) || col->type == 0' failed. | https://api.github.com/repos/MonetDB/MonetDB/issues/3873/comments | 0 | 2020-11-30T13:20:33Z | 2024-06-27T12:09:52Z | https://github.com/MonetDB/MonetDB/issues/3873 | 753,473,039 | 3,873 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-11-18 21:59:43 +0100
From: @yzchang
To: SQL devs <<bugs-sql>>
Version: 11.21.11 (Jul2015-SP1)
CC: @yzchang
Last updated: 2016-01-15 11:38:07 +0100
## Comment 21554
Date: 2015-11-18 21:59:43 +0100
From: @yzchang
It seems that only the specific combination of the JOIN and WHERE conditions in the query below crashes mserver, because the crash doesn't happen when the conditions are slightly changed.
CREATE TABLE foo (startdate DATE, enddate DATE);
CREATE TABLE bar (id INTEGER);
SELECT COUNT(*)
FROM foo AS A
INNER JOIN foo AS B
ON (
(B.startdate = B.enddate
AND (B.startdate = A.startdate OR B.startdate = A.enddate)
) OR (
A.startdate < B.enddate AND A.enddate > B.startdate
)
)
WHERE EXISTS (
SELECT TRUE
FROM bar
WHERE A.startdate > '2010-10-01'
)
AND A.startdate >= B.startdate;
## Comment 21555
Date: 2015-11-18 22:05:21 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [cf67ddd5966a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=cf67ddd5966a) made by Jennie Zhang <y.zhang@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=cf67ddd5966a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=cf67ddd5966a)
Changeset description:
Added test for Bug #3872
## Comment 21556
Date: 2015-11-18 22:08:58 +0100
From: @yzchang
This bug is fixed by Changeset: [07d638d6680a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=07d638d6680a)
| mserver crashes under specific combination of JOIN and WHERE conditions | https://api.github.com/repos/MonetDB/MonetDB/issues/3872/comments | 0 | 2020-11-30T13:20:29Z | 2024-06-27T12:09:51Z | https://github.com/MonetDB/MonetDB/issues/3872 | 753,472,996 | 3,872 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-11-18 12:57:04 +0100
From: @yzchang
To: SQL devs <<bugs-sql>>
Version: 11.21.11 (Jul2015-SP1)
CC: @yzchang
Last updated: 2016-01-15 11:37:35 +0100
## Comment 21550
Date: 2015-11-18 12:57:04 +0100
From: @yzchang
The following query triggers a "too many nested operators" error:
CREATE TABLE foo (col CHAR(8));
INSERT INTO foo VALUES ('bee');
SELECT * FROM foo WHERE NOT col LIKE 'b%';
## Comment 21551
Date: 2015-11-18 13:04:26 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [2995f557a12f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2995f557a12f) made by Jennie Zhang <y.zhang@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=2995f557a12f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=2995f557a12f)
Changeset description:
Added test for Bug #3871
## Comment 21552
Date: 2015-11-18 13:12:14 +0100
From: @yzchang
There are two ways of combining NOT and LIKE: NOT x LIKE y and x NOT LIKE y. The first case was not properly dealt with, which results in an infinite recursion when processing logical value expressions. The recursion ends in a "Too many nested operators" error.
This bug is fixed by Changeset: [9d0956084854](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9d0956084854) Also, the combination: NOT x NOT LIKE y should work now.
| NOT x LIKE triggers "too many nested operators" | https://api.github.com/repos/MonetDB/MonetDB/issues/3871/comments | 0 | 2020-11-30T13:20:27Z | 2024-06-27T12:09:50Z | https://github.com/MonetDB/MonetDB/issues/3871 | 753,472,953 | 3,871 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-11-17 17:02:43 +0100
From: Anthony Damico <<ajdamico>>
To: Hannes Muehleisen <<hannes>>
Version: 11.21.5 (Jul2015)
CC: ajdamico, @hannesmuehleisen
Last updated: 2016-01-02 22:24:43 +0100
## Comment 21544
Date: 2015-11-17 17:02:43 +0100
From: Anthony Damico <<ajdamico>>
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0
Build Identifier:
tried multiple times on rocks040.
this script previously worked and has nothing special.
Reproducible: Always
### Steps to Reproduce:
options("monetdb.debug.mapi"=T)
library(downloader)
your.username <- 'your@email'
your.password <- 'register here for password' https://www.icpsr.umich.edu/rpxlogin
source_url( "https://raw.github.com/ajdamico/asdfree/master/National%20Incident-Based%20Reporting%20System/download%20all%20microdata.R" , prompt = FALSE , echo = TRUE )
### Actual Results:
server crash, then monetdb.r just waits forever
### Expected Results:
same behavior as prior to jul2015-sp1
you can run an abridged version of the code above with
studies.to.download <- c( "1994 Extract Files" , "1994" , "1993 Extract Files" )
but it does not crash. this crash only reproducibly happens when running the entire script.
## Comment 21579
Date: 2015-11-23 15:32:45 +0100
From: @hannesmuehleisen
confirmed, crashes mserver5 on osx
## Comment 21694
Date: 2015-12-25 17:25:01 +0100
From: Anthony Damico <<ajdamico>>
hannes- i think this was fixed? not sure
| national incident based reporting system script crashes after downloading 1994 | https://api.github.com/repos/MonetDB/MonetDB/issues/3870/comments | 0 | 2020-11-30T13:20:23Z | 2024-06-28T07:19:51Z | https://github.com/MonetDB/MonetDB/issues/3870 | 753,472,919 | 3,870 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-11-17 16:44:09 +0100
From: Anthony Damico <<ajdamico>>
To: Hannes Muehleisen <<hannes>>
Version: 11.21.5 (Jul2015)
CC: ajdamico
Last updated: 2015-11-23 15:17:57 +0100
## Comment 21543
Date: 2015-11-17 16:44:09 +0100
From: Anthony Damico <<ajdamico>>
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0
Build Identifier:
please fix before releasing monetdb.r 1.0.0 on cran
thinking about MonetDBLite, this code is something RSQLite users will have
Reproducible: Always
### Steps to Reproduce:
> countLines(csv_file_location)
[1] 23603050
attr(,"lastLineHasNewline")
[1] TRUE
> options("monetdb.debug.mapi"=TRUE)
> system.time(dbWriteTable( db , 'this_extract' , csv_file_location , sep = "," , header = TRUE ))
TX: 'sSTART TRANSACTION
;
RX: '&4 f
TX: 'sselect schemas.name as sn, tables.name as tn from sys.tables join sys.schemas on tables.schema_id=schemas.id
;
RX: '&1 6 44 2 44
% .L2, .L2 table_name
% sn, tn name
% varchar, varchar type
% 3, 17 length
[ "sys", "schemas" ]
[ "sys", "types" ]
[ "sys", "functions" ]
[ "sys", "args" ]
[ "sys", "sequences" ]
TX: 'Xclose 6
RX: '
TX: 'sselect schemas.name as sn, tables.name as tn from sys.tables join sys.schemas on tables.schema_id=schemas.id
;
RX: '&1 7 44 2 44
% .L2, .L2 table_name
% sn, tn name
% varchar, varchar type
% 3, 17 length
[ "sys", "schemas" ]
[ "sys", "types" ]
[ "sys", "functions" ]
[ "sys", "args" ]
[ "sys", "sequences" ]
TX: 'Xclose 7
RX: '
TX: 'sCREATE TABLE this_extract (x STRING)
;
RX: '&3
TX: 'sINSERT INTO this_extract VALUES ('ipumsi_00004.csv')
;
RX: '&2 1 -1
TX: 'sCOMMIT
;
RX: '&4 t
user system elapsed
0.01 0.00 0.02
> options("monetdb.debug.mapi"=FALSE)
> dbGetQuery(db,'select count(*) from this_extract')
L1
1 1
>
## Comment 21578
Date: 2015-11-23 15:17:57 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [c6b8e79b087d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c6b8e79b087d) made by Hannes Muehleisen <hannes@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=c6b8e79b087d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=c6b8e79b087d)
Changeset description:
R Connector, dealing with file names passed to dbWriteTable, Bug #3869
| dbWriteTable does not serve as an alternative to monet.read.csv | https://api.github.com/repos/MonetDB/MonetDB/issues/3869/comments | 0 | 2020-11-30T13:20:21Z | 2024-06-27T12:09:48Z | https://github.com/MonetDB/MonetDB/issues/3869 | 753,472,868 | 3,869 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-11-17 16:40:40 +0100
From: Anthony Damico <<ajdamico>>
To: Hannes Muehleisen <<hannes>>
Version: 11.21.5 (Jul2015)
CC: ajdamico
Last updated: 2015-11-23 14:27:29 +0100
## Comment 21542
Date: 2015-11-17 16:40:40 +0100
From: Anthony Damico <<ajdamico>>
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0
Build Identifier:
please fix before releasing monetdb.r 1.0.0
Reproducible: Always
### Steps to Reproduce:
CREATE TABLE hmda_ins_14 (
activityyear DOUBLE,
respondentid VARCHAR(255),
agencycode VARCHAR(255),
fedtaxid VARCHAR(255),
respondentname_ts VARCHAR(255),
respondentmailingaddress VARCHAR(255),
respondentcity_ts VARCHAR(255),
respondentstate_ts VARCHAR(255),
respondentzipcode VARCHAR(255),
parentname_ts VARCHAR(255),
parentaddress VARCHAR(255),
parentcity_ts VARCHAR(255),
parentstate_ts VARCHAR(255),
parentzipcode VARCHAR(255),
respondentname_panel VARCHAR(255),
respondentcity_panel VARCHAR(255),
respondentstate_panel VARCHAR(255),
assets_panel DOUBLE,
otherlendercode_panel DOUBLE,
regioncode_panel DOUBLE,
larcount DOUBLE,
validityerror VARCHAR(255)
);
## Comment 21576
Date: 2015-11-23 14:26:56 +0100
From: @hannesmuehleisen
Removed mclient() from MonetDB.R for now. For multi-line queries we would need incremental query sending. We can do this over MAPI, but MonetDBLite currently does not support it (and perhaps never will). So...
## Comment 21577
Date: 2015-11-23 14:27:29 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [b2ccd452dddb](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b2ccd452dddb) made by Hannes Muehleisen <hannes@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b2ccd452dddb](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b2ccd452dddb)
Changeset description:
Removed mclient functionality again, Bug #3868
| MonetDB.R::mclient() does not accept return characters | https://api.github.com/repos/MonetDB/MonetDB/issues/3868/comments | 0 | 2020-11-30T13:20:18Z | 2024-06-28T07:19:50Z | https://github.com/MonetDB/MonetDB/issues/3868 | 753,472,833 | 3,868 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-11-17 16:37:50 +0100
From: Anthony Damico <<ajdamico>>
To: Hannes Muehleisen <<hannes>>
Version: 11.21.5 (Jul2015)
CC: ajdamico
Last updated: 2015-12-09 15:06:10 +0100
## Comment 21541
Date: 2015-11-17 16:37:50 +0100
From: Anthony Damico <<ajdamico>>
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0
Build Identifier:
https://github.com/ajdamico/asdfree/search?utf8=%E2%9C%93&q=MonetDB.R
gotta happen for any updates of MonetDB.R beyond 1.0.0
this checking is too much work
Reproducible: Always
## Comment 21653
Date: 2015-12-09 15:06:10 +0100
From: @hannesmuehleisen
Online at http://monetdb.cwi.nl/testweb/web/eanthony/
| incorporate asdfree monetdb.r scripts into testing infrastructure | https://api.github.com/repos/MonetDB/MonetDB/issues/3867/comments | 0 | 2020-11-30T13:20:15Z | 2024-06-27T12:09:46Z | https://github.com/MonetDB/MonetDB/issues/3867 | 753,472,803 | 3,867 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-11-17 16:34:04 +0100
From: Anthony Damico <<ajdamico>>
To: SQL devs <<bugs-sql>>
Version: 11.21.5 (Jul2015)
CC: ajdamico
Last updated: 2015-11-17 17:08:53 +0100
## Comment 21538
Date: 2015-11-17 16:34:04 +0100
From: Anthony Damico <<ajdamico>>
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0
Build Identifier:
thanks
Reproducible: Always
## Comment 21539
Date: 2015-11-17 16:35:56 +0100
From: @sjoerdmullender
What makes you think we don't test on Windows?
We in fact test both on Windows 7 and Windows 2012 with two different versions of Microsoft Visual Studio and also with the Intel compiler.
## Comment 21540
Date: 2015-11-17 16:37:19 +0100
From: Anthony Damico <<ajdamico>>
hi, i was told the nightly builds did not run the same tests on windows that they do on unix/mac. do they? thanks
## Comment 21545
Date: 2015-11-17 17:04:12 +0100
From: @sjoerdmullender
Some tests don't (cannot) work on Windows, so they are not run.
I'm guessing what's relevant for you is the embedded R configuration. We removed the code to embed an R interpreter in MonetDB on Windows. Therefore all tests that need that feature are not run on Windows.
The reason the code was removed was because it didn't work anyway and can't be made to work (or at least not without a great deal of effort). I think the main reason for it not working is that R requires MinGW and we compile using Visual Studio.
## Comment 21546
Date: 2015-11-17 17:08:53 +0100
From: Anthony Damico <<ajdamico>>
you're right, sorry for the bother. misunderstanding on my part
| please include windows testing in the nightly builds | https://api.github.com/repos/MonetDB/MonetDB/issues/3866/comments | 0 | 2020-11-30T13:20:12Z | 2024-06-28T07:19:50Z | https://github.com/MonetDB/MonetDB/issues/3866 | 753,472,753 | 3,866 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-11-17 16:18:38 +0100
From: Anthony Damico <<ajdamico>>
To: Hannes Muehleisen <<hannes>>
Version: 11.21.5 (Jul2015)
CC: ajdamico
Last updated: 2016-01-20 14:38:47 +0100
## Comment 21537
Date: 2015-11-17 16:18:38 +0100
From: Anthony Damico <<ajdamico>>
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0
Build Identifier:
could not reproduce using a smaller example, but this happens every time.
only a problem with assertions turned on? not sure about windows.
confirmed on rocks040
Reproducible: Always
### Steps to Reproduce:
options("monetdb.debug.mapi"=T)
path.to.7z <- "7za" only macintosh and *nix users need this line
library(downloader)
single.year.datasets.to.download <- 2005:2014
three.year.datasets.to.download <- 2007:2013
five.year.datasets.to.download <- 2009:2013
source_url( "https://raw.github.com/ajdamico/asdfree/master/American%20Community%20Survey/download%20all%20microdata.R" , prompt = FALSE , echo = TRUE )
### Actual Results:
if you have assertions turned on, this code destroys the database.
### Expected Results:
same behavior as prior to jul2015-sp1
| assertion crash on american community survey | https://api.github.com/repos/MonetDB/MonetDB/issues/3865/comments | 0 | 2020-11-30T13:20:09Z | 2024-06-28T07:19:50Z | https://github.com/MonetDB/MonetDB/issues/3865 | 753,472,723 | 3,865 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-11-17 10:03:28 +0100
From: MRA <<mraillard>>
To: SQL devs <<bugs-sql>>
Version: 11.21.11 (Jul2015-SP1)
Last updated: 2016-01-15 11:37:59 +0100
## Comment 21531
Date: 2015-11-17 10:03:28 +0100
From: MRA <<mraillard>>
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36
Build Identifier:
We have in our database a field defined with VARCHAR(5) and a chinese string "不要让早把" to be inserted.
If we insert the string with SQL insert everything works find, but if we try to insert via BULK monet throw an error.
I made several test and i need to extend the varchar from 5 to 10 to get the bulk insert working.
Reproducible: Always
### Steps to Reproduce:
create table test.varcharsize5
(
id int,
varchar106 varchar(5),
primary key (id)
);
insert into test.varcharsize5 values (1,'不要让早把');
BULK Line to insert in a file:
"1","不要让早把"
COPY 10 RECORDS INTO test.varcharsize5 FROM '/root/test_varchar_chinois'
USING DELIMITERS ',','\n','\"' NULL AS '\\N' ;
### Actual Results:
Failed to import table line 1 field 2 'varchar(5)' expected in '不要让早把'
### Expected Results:
Should be insterted
## Comment 21532
Date: 2015-11-17 10:47:02 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [d35f9308f670](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d35f9308f670) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=d35f9308f670](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=d35f9308f670)
Changeset description:
Added test for bug #3864.
## Comment 21533
Date: 2015-11-17 10:47:42 +0100
From: @sjoerdmullender
Fixed with changeset [535bb896b400](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=535bb896b400)
| Error in bulk import for chinese character | https://api.github.com/repos/MonetDB/MonetDB/issues/3864/comments | 0 | 2020-11-30T13:20:06Z | 2024-06-27T12:09:43Z | https://github.com/MonetDB/MonetDB/issues/3864 | 753,472,683 | 3,864 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-11-16 22:01:11 +0100
From: @yzchang
To: clients devs <<bugs-clients>>
Version: 11.21.5 (Jul2015)
CC: @yzchang
Last updated: 2015-11-17 20:49:20 +0100
## Comment 21529
Date: 2015-11-16 22:01:11 +0100
From: @yzchang
The query below, which was actually created by msqldump, returns an error:
decimal(19,3) isn't supported because P=19 > 18 in: "create table "sys"."foo" (
"eur" decimal(19,3)"
CREATE TABLE "sys"."foo" (
"eur" DECIMAL(19,3)
);
COPY 1 RECORDS INTO "sys"."foo" FROM stdin USING DELIMITERS '\t','\n','"';
5.790
This is because the monetdb server creates columns of type decimal(19,3) (on a system without hugeint), but doesn't accept them when parsing. (Similarly for decimal(39,3) when hugeint is available.)
## Comment 21530
Date: 2015-11-16 22:05:18 +0100
From: @yzchang
This bug is fixed by Changeset: [66141ffe9d92](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=66141ffe9d92) (http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=66141ffe9d92), which is included in Jul2015-SP1
## Comment 21547
Date: 2015-11-17 20:49:20 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [356163790cd3](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=356163790cd3) made by Jennie Zhang <y.zhang@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=356163790cd3](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=356163790cd3)
Changeset description:
Added test for Bug #3863
| mserver creates but doesn't accept columns of type decimal(19,X) and decimal(39,X) | https://api.github.com/repos/MonetDB/MonetDB/issues/3863/comments | 0 | 2020-11-30T13:20:03Z | 2024-06-27T12:09:42Z | https://github.com/MonetDB/MonetDB/issues/3863 | 753,472,629 | 3,863 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-11-16 16:50:41 +0100
From: Iain <<iain.m.wallace>>
To: Hannes Muehleisen <<hannes>>
Version: 11.21.11 (Jul2015-SP1)
CC: ajdamico, iain.m.wallace
Last updated: 2015-11-23 10:49:13 +0100
## Comment 21528
Date: 2015-11-16 16:50:41 +0100
From: Iain <<iain.m.wallace>>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.107 Safari/537.36
Build Identifier:
I came acrros an issue that I thought you might want to be aware of. The compute() function doesn't appear to be working with MonetDBLite while collect() does
Building from the example
https://www.monetdb.org/blog/monetdblite-r
library(MonetDB.R)
ms <- src_monetdb(embedded=dbdir)
x<-table(ms,"mtcars")
y<-x%>%filter(gear==4)
dim(y)
[1] 12 11
compute(y)
Source: MonetDB ()
From: lmsomncnjj [0 x 11]
Error: n not greater than 0L
Reproducible: Always
### Steps to Reproduce:
library(MonetDB.R)
ms <- src_monetdb(embedded=dbdir)
x<-table(ms,"mtcars")
y<-x%>%filter(gear==4)
compute(y)
Source: MonetDB ()
From: lmsomncnjj [0 x 11]
Error: n not greater than 0L
### Actual Results:
From: lmsomncnjj [0 x 11]
### Expected Results:
not returned an error, but rather stored a temporary table with the result.
Compute should also enable creating a new table with the result without writing the result back to R
## Comment 21574
Date: 2015-11-23 10:48:24 +0100
From: @hannesmuehleisen
Fixed, please update MonetDB.R 1.0.0 to the latest version from https://www.monetdb.org/Assets/R/
## Comment 21575
Date: 2015-11-23 10:49:13 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [3892b4194a6d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3892b4194a6d) made by Hannes Muehleisen <hannes@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=3892b4194a6d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=3892b4194a6d)
Changeset description:
Fix for Bug #3862
| Issue with compute() function in MonetDBLite | https://api.github.com/repos/MonetDB/MonetDB/issues/3862/comments | 0 | 2020-11-30T13:19:59Z | 2024-06-27T12:09:41Z | https://github.com/MonetDB/MonetDB/issues/3862 | 753,472,594 | 3,862 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-11-16 14:41:33 +0100
From: @rkoopmanschap
To: SQL devs <<bugs-sql>>
Version: 11.21.11 (Jul2015-SP1)
CC: @yzchang
Last updated: 2018-11-07 17:08:03 +0100
## Comment 21525
Date: 2015-11-16 14:41:33 +0100
From: @rkoopmanschap
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:42.0) Gecko/20100101 Firefox/42.0
Build Identifier:
Entering the information below, which utilize window functions cause the database connection to be lost.
Reproducible: Always
### Steps to Reproduce:
Problem 1
---------
CREATE TABLE foo (
test1 VARCHAR(48),
test2 VARCHAR(65535) DEFAULT '',
test3 VARCHAR(32),
test4 INTEGER,
test5 INTEGER
);
ALTER TABLE foo ADD COLUMN test6 BOOLEAN;
ALTER TABLE foo ADD COLUMN test7 BOOLEAN;
ALTER TABLE foo ADD COLUMN test8 BOOLEAN;
UPDATE foo SET test5 = ROW_NUMBER() OVER (
PARTITION BY test1
ORDER BY test4 ASC,
test6 DESC,
test8 DESC,
test7 ASC,
test3 ASC);
Problem 2
---------
CREATE TABLE foo (col INTEGER);
UPDATE foo SET col = ROW_NUMBER() OVER (ORDER BY col);
### Actual Results:
Both cause a bug
### Expected Results:
0 affected rows (5.368ms)
This bug has already been fixed.
## Comment 21534
Date: 2015-11-17 11:16:32 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [b948d3410112](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b948d3410112) made by Richard Koopmanschap <richard.koopmanschap@monetdbsolutions.com> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b948d3410112](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b948d3410112)
Changeset description:
Added test for fixed bug #3861
## Comment 21536
Date: 2015-11-17 13:05:11 +0100
From: @yzchang
Just to keep the info. This bug is fixed by Changeset: [e922ae6a3178](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e922ae6a3178)
## Comment 26666
Date: 2018-11-06 16:25:38 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [a3adc35abffc](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a3adc35abffc) made by Pedro Ferreira <pedro.ferreira@monetdbsolutions.com> in the MonetDB repo, refers to this bug.
For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=a3adc35abffc](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=a3adc35abffc)
Changeset description:
Fix for failing window_function_crash.Bug-3861 test.
However this makes some update statements fail in other tests.
## Comment 26674
Date: 2018-11-07 17:08:03 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [dadf2515acf9](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=dadf2515acf9) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=dadf2515acf9](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=dadf2515acf9)
Changeset description:
fix for window_function_crash.Bug-3861
| Using window functions cause a crash | https://api.github.com/repos/MonetDB/MonetDB/issues/3861/comments | 0 | 2020-11-30T13:19:57Z | 2024-06-27T12:09:40Z | https://github.com/MonetDB/MonetDB/issues/3861 | 753,472,562 | 3,861 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-11-15 17:06:45 +0100
From: @skinkie
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes
Last updated: 2016-02-18 11:29:37 +0100
## Comment 21522
Date: 2015-11-15 17:06:45 +0100
From: @skinkie
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36
Build Identifier:
onsidering the following trivial example I have no issues with creating a
merge table:
create table m1 (test int);
create merge table mt (test int);
alter table mt add table m1;
Works as expected.
MERGE TABLE sys.mt
Considering the following existing definition, which contains existing data:
sql>\d tt_20151110
CREATE TABLE "sys"."tt_20151110" (
"operatingday" DATE,
"trip_id" VARCHAR(16),
"pointorder" SMALLINT,
"passagesequencenumber" SMALLINT,
"userstopcode" VARCHAR(10),
"targetarrivaltime" VARCHAR(8),
"targetdeparturetime" VARCHAR(8),
"trip_hash" BIGINT
);
I want to create a merge table. Thus:
CREATE MERGE TABLE "sys"."tt_merge" (
"operatingday" DATE,
"trip_id" VARCHAR(16),
"pointorder" SMALLINT,
"passagesequencenumber" SMALLINT,
"userstopcode" VARCHAR(10),
"targetarrivaltime" VARCHAR(8),
"targetdeparturetime" VARCHAR(8),
"trip_hash" BIGINT
);
operation successful (2.736ms)
sql>alter table tt_merge add table tt_20151110;
ALTER MERGE TABLE: to be added table column type doesn't match MERGE TABLE definition
1) I fail to see how it doesn't match the table.
When I redo the above from an empty table - as below - everything works as expected.
CREATE TABLE "sys"."test" (
"operatingday" DATE,
"trip_id" VARCHAR(16),
"pointorder" SMALLINT,
"passagesequencenumber" SMALLINT,
"userstopcode" VARCHAR(10),
"targetarrivaltime" VARCHAR(8),
"targetdeparturetime" VARCHAR(8),
"trip_hash" BIGINT
);
CREATE MERGE TABLE "sys"."test_merge" (
"operatingday" DATE,
"trip_id" VARCHAR(16),
"pointorder" SMALLINT,
"passagesequencenumber" SMALLINT,
"userstopcode" VARCHAR(10),
"targetarrivaltime" VARCHAR(8),
"targetdeparturetime" VARCHAR(8),
"trip_hash" BIGINT
);
alter table test_merge add table test_merge;
operation successful (0.816ms)
But then lets remove them:
drop table test_merge;
DROP TABLE: unable to drop table test_merge (there are database objects which depend on it)
drop table test;
operation successful (3.043ms)
drop table test_merge;
DROP TABLE: unable to drop table test_merge (there are database objects which depend on it)
2) I feel the working of the above removal sequence is broken.
Reproducible: Always
MonetDB 5 server v11.22.0 (64-bit, 64-bit oids, 128-bit integers)
This is an unreleased version
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 31.4GiB available memory, 8 available cpu cores
Libraries:
libpcre: 8.33 2013-05-28 (compiled with 8.33)
openssl: OpenSSL 1.0.2d 9 Jul 2015 (compiled with OpenSSL 1.0.2d 9 Jul 2015)
libxml2: 2.9.1 (compiled with 2.9.1)
Compiled by: skinkie@bigdata.openebs.nl (x86_64-unknown-linux-gnu)
Compilation: gcc -O3 -pipe -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/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64
## Comment 21523
Date: 2015-11-15 17:17:46 +0100
From: @skinkie
I noticed I pasted the merge in merge example;
alter table test_merge add table test;
operation successful (0.982ms)
alter table test_merge drop table test;
operation successful (1.166ms)
alter table test_merge add table test;
operation successful (1.174ms)
drop table test;
DROP TABLE: unable to drop table test (there are database objects which depend on it)
drop table test_merge;
operation successful (3.299ms)
drop table test;
operation successful (3.382ms)
So it is able to drop the merge table, when it doesn't depend on itself.
## Comment 21524
Date: 2015-11-15 17:44:03 +0100
From: @skinkie
Created attachment 367
Import data to reproduce the issue.
Complete reproduction, incl. failure:
CREATE MERGE TABLE "sys"."tt_merge" (
"operatingday" DATE,
"trip_id" VARCHAR(16),
"pointorder" SMALLINT,
"passagesequencenumber" SMALLINT,
"userstopcode" VARCHAR(10),
"targetarrivaltime" VARCHAR(8),
"targetdeparturetime" VARCHAR(8),
"trip_hash" BIGINT
);
CREATE TABLE "sys"."test_import" (
"operatingday" DATE,
"trip_id" VARCHAR(16),
"pointorder" SMALLINT,
"passagesequencenumber" SMALLINT,
"userstopcode" VARCHAR(10),
"targetarrivaltime" VARCHAR(8),
"targetdeparturetime" VARCHAR(8),
"empty1" VARCHAR(8),
"empty2" VARCHAR(8)
);
copy into test_import from '/tmp/HTM_TT_20151115.csv.gz' delimiters ',', '\n' NULL AS '';
CREATE TABLE test as SELECT operatingday, trip_id, pointorder, passagesequencenumber, userstopcode, targetarrivaltime, targetdeparturetime, hash(trip_id||':0:'||operatingday) AS trip_hash FROM test_import WITH DATA;
sql>\d test
CREATE TABLE "sys"."test" (
"operatingday" DATE,
"trip_id" VARCHAR(16),
"pointorder" SMALLINT,
"passagesequencenumber" SMALLINT,
"userstopcode" VARCHAR(10),
"targetarrivaltime" VARCHAR(8),
"targetdeparturetime" VARCHAR(8),
"trip_hash" BIGINT
);
ALTER TABLE test_merge ADD TABLE test;
ALTER MERGE TABLE: to be added table column type doesn't match MERGE TABLE definition
> Attached file: [HTM_TT_20151115.csv.gz](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3860_HTM_TT_20151115.csv.gz_367) (application/x-gzip, 710405 bytes)
> Description: Import data to reproduce the issue.
## Comment 21620
Date: 2015-11-28 17:54:25 +0100
From: @njnes
In this case we require equal (mal level) types. Your hash returns an
oid(64 bit), which is close to an BIGINT (lng) but not exactly.
A cast after the hash should fix this problem.
## Comment 21799
Date: 2016-02-18 11:29:37 +0100
From: @skinkie
Is there a way how to test what internal datatypes are in use?
CREATE MERGE TABLE "sys"."punctdep_2015" (
"operatingday" DATE,
"lineplanningnumber" VARCHAR(16),
"journeynumber" VARCHAR(16),
"pointorder" SMALLINT,
"userstopcode" CHARACTER LARGE OBJECT,
"punctuality" INTEGER,
"name" VARCHAR(255),
"vanaf" CHARACTER LARGE OBJECT,
"richting" CHARACTER LARGE OBJECT,
"vehiclenumber" INTEGER
);
CREATE TABLE "sys"."punctdep_20150101" (
"operatingday" DATE,
"lineplanningnumber" VARCHAR(16),
"journeynumber" VARCHAR(16),
"pointorder" SMALLINT,
"userstopcode" CHARACTER LARGE OBJECT,
"punctuality" INTEGER,
"name" VARCHAR(255),
"vanaf" CHARACTER LARGE OBJECT,
"richting" CHARACTER LARGE OBJECT,
"vehiclenumber" INTEGER
);
Which is created via:
create table punctdep_$YESTERDAY as select operatingday, split_part(trip_id, ':', 2) as lineplanningnumber, split_part(trip_id, ':', 3) as journeynumber, pointorder, userstopcode, punctuality, name, vanaf, richting, vehiclenumber from tt_$YESTERDAY left join (
select punctuality, trip_hash, userstopcode, vehiclenumber from kv6_$YESTERDAY join (select max(receive) as receive, trip_hash, userstopcode, vehiclenumber from kv6_$YESTERDAY where messagetype = 'DEPARTURE' group by trip_hash, userstopcode, vehiclenumber) as x using (receive, trip_hash, userstopcode, vehiclenumber) where messagetype = 'DEPARTURE' )
as x using (trip_hash, userstopcode)
left join htmhalte using (userstopcode)
join (select trip_hash, coalesce(name, userstopcode) as richting from (select userstopcode, trip_hash from tt_$YESTERDAY join (select max(pointorder) as pointorder, trip_hash from tt_$YESTERDAY group by trip_hash) as laatstehalte using (trip_hash, pointorder)) as x left join htmhalte using (userstopcode)) as y using (trip_hash)
join (select trip_hash, coalesce(name, userstopcode) as vanaf from (select userstopcode, trip_hash from tt_$YESTERDAY join (select min(pointorder) as pointorder, trip_hash from tt_$YESTERDAY group by trip_hash) as eerstehalte using (trip_hash, pointorder)) as xy left join htmhalte using (userstopcode)) as yy using (trip_hash)
order by trip_id, pointorder, vehiclenumber with data;
alter table punctdep_2015 add table punctdep_20150101;
ALTER MERGE TABLE: to be added table column type doesn't match MERGE TABLE definition
| Merge tables do not work as expected | https://api.github.com/repos/MonetDB/MonetDB/issues/3860/comments | 0 | 2020-11-30T13:19:53Z | 2024-06-28T07:19:50Z | https://github.com/MonetDB/MonetDB/issues/3860 | 753,472,522 | 3,860 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-11-14 15:49:55 +0100
From: @skinkie
To: SQL devs <<bugs-sql>>
Version: 11.21.11 (Jul2015-SP1)
Last updated: 2015-11-14 19:46:45 +0100
## Comment 21520
Date: 2015-11-14 15:49:55 +0100
From: @skinkie
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36
Build Identifier:
MonetDB crashes using:
create table subtitles (prid text, idx integer, word text);
create table stopwoorden (word text);
create table meta (prid text, title text, omroep text);
copy 37714 records into meta from '/mnt/storage1/tmp/hack/meta.csv' delimiters '\t', '\n' null as '';
copy 8816063 records into subtitles from '/mnt/storage1/tmp/hack/poging3.csv' delimiters '\t', '\n' null as '';
copy into stopwoorden from '/mnt/storage1/tmp/hack/stopwoorden.txt';
select * from subtitles left join stopwoorden on (subtitles.word = stopwoorden.word) where stopwoorden.word is null limit 10;
Which results into:
2015-11-14 15:42:11 ERR npo[5224]: mserver5: gdk_select.c:1008: BAT_scanselect: Assertion `bn->S->capacity >= cnt' failed.
Is this again a theta join?
% .explain table_name
% mal name
% clob type
% 189 length
function user.s2_1{autoCommit=true}():void;
X_87:void := querylog.define("explain select * from subtitles left join stopwoorden on (subtitles.word = stopwoorden.word) where stopwoorden.word is null limit 10;","default_pipe",377);
barrier X_535 := language.dataflow();
X_57 := bat.new(nil:oid,nil:str);
X_62 := bat.append(X_57,".subtitles");
X_69 := bat.append(X_62,".subtitles");
X_76 := bat.append(X_69,".subtitles");
X_81 := bat.append(X_76,".stopwoorden");
X_58 := bat.new(nil:oid,nil:str);
X_64 := bat.append(X_58,"prid");
X_70 := bat.append(X_64,"idx");
X_77 := bat.append(X_70,"word");
X_83 := bat.append(X_77,"word");
X_59 := bat.new(nil:oid,nil:str);
X_65 := bat.append(X_59,"clob");
X_71 := bat.append(X_65,"int");
X_78 := bat.append(X_71,"clob");
X_84 := bat.append(X_78,"clob");
X_60 := bat.new(nil:oid,nil:int);
X_67 := bat.append(X_60,0);
X_73 := bat.append(X_67,32);
X_79 := bat.append(X_73,0);
X_85 := bat.append(X_79,0);
X_61 := bat.new(nil:oid,nil:int);
X_68 := bat.append(X_61,0);
X_75 := bat.append(X_68,0);
X_80 := bat.append(X_75,0);
X_86 := bat.append(X_80,0);
X_3:bat[:oid,:str] := bat.new(nil:oid,nil:str);
X_2 := sql.mvc();
X_113:bat[:oid,:oid] := sql.tid(X_2,"sys","subtitles",0,8);
X_126:bat[:oid,:str] := sql.bind(X_2,"sys","subtitles","word",0,0,8);
(X_134:bat[:oid,:oid],X_135:bat[:oid,:str]) := sql.bind(X_2,"sys","subtitles","word",2,0,8);
X_206 := sql.delta(X_126,X_134,X_135);
X_214 := algebra.leftfetchjoin(X_113,X_206);
X_13:bat[:oid,:oid] := sql.tid(X_2,"sys","stopwoorden");
X_15:bat[:oid,:str] := sql.bind(X_2,"sys","stopwoorden","word",0);
(X_16,r1_22) := sql.bind(X_2,"sys","stopwoorden","word",2);
X_18:bat[:oid,:str] := sql.bind(X_2,"sys","stopwoorden","word",1);
X_19 := sql.delta(X_15,X_16,r1_22,X_18);
X_20 := algebra.leftfetchjoin(X_13,X_19);
(X_229,X_230) := algebra.subjoin(X_214,X_20,nil:BAT,nil:BAT,false,nil:lng);
X_247 := algebra.leftfetchjoin(X_230,X_20);
X_114:bat[:oid,:oid] := sql.tid(X_2,"sys","subtitles",1,8);
X_127:bat[:oid,:str] := sql.bind(X_2,"sys","subtitles","word",0,1,8);
(X_136:bat[:oid,:oid],X_137:bat[:oid,:str]) := sql.bind(X_2,"sys","subtitles","word",2,1,8);
X_207 := sql.delta(X_127,X_136,X_137);
X_216 := algebra.leftfetchjoin(X_114,X_207);
(X_231,X_232) := algebra.subjoin(X_216,X_20,nil:BAT,nil:BAT,false,nil:lng);
X_249 := algebra.leftfetchjoin(X_232,X_20);
X_115:bat[:oid,:oid] := sql.tid(X_2,"sys","subtitles",2,8);
X_128:bat[:oid,:str] := sql.bind(X_2,"sys","subtitles","word",0,2,8);
(X_138:bat[:oid,:oid],X_139:bat[:oid,:str]) := sql.bind(X_2,"sys","subtitles","word",2,2,8);
X_208 := sql.delta(X_128,X_138,X_139);
X_218 := algebra.leftfetchjoin(X_115,X_208);
(X_233,X_234) := algebra.subjoin(X_218,X_20,nil:BAT,nil:BAT,false,nil:lng);
X_251 := algebra.leftfetchjoin(X_234,X_20);
X_117:bat[:oid,:oid] := sql.tid(X_2,"sys","subtitles",3,8);
X_129:bat[:oid,:str] := sql.bind(X_2,"sys","subtitles","word",0,3,8);
(X_140:bat[:oid,:oid],X_141:bat[:oid,:str]) := sql.bind(X_2,"sys","subtitles","word",2,3,8);
X_209 := sql.delta(X_129,X_140,X_141);
X_220 := algebra.leftfetchjoin(X_117,X_209);
(X_235,X_236) := algebra.subjoin(X_220,X_20,nil:BAT,nil:BAT,false,nil:lng);
X_253 := algebra.leftfetchjoin(X_236,X_20);
X_119:bat[:oid,:oid] := sql.tid(X_2,"sys","subtitles",4,8);
X_130:bat[:oid,:str] := sql.bind(X_2,"sys","subtitles","word",0,4,8);
(X_142:bat[:oid,:oid],X_143:bat[:oid,:str]) := sql.bind(X_2,"sys","subtitles","word",2,4,8);
X_210 := sql.delta(X_130,X_142,X_143);
X_222 := algebra.leftfetchjoin(X_119,X_210);
(X_237,X_238) := algebra.subjoin(X_222,X_20,nil:BAT,nil:BAT,false,nil:lng);
X_255 := algebra.leftfetchjoin(X_238,X_20);
X_121:bat[:oid,:oid] := sql.tid(X_2,"sys","subtitles",5,8);
X_131:bat[:oid,:str] := sql.bind(X_2,"sys","subtitles","word",0,5,8);
(X_144:bat[:oid,:oid],X_145:bat[:oid,:str]) := sql.bind(X_2,"sys","subtitles","word",2,5,8);
X_211 := sql.delta(X_131,X_144,X_145);
X_224 := algebra.leftfetchjoin(X_121,X_211);
(X_239,X_240) := algebra.subjoin(X_224,X_20,nil:BAT,nil:BAT,false,nil:lng);
X_257 := algebra.leftfetchjoin(X_240,X_20);
X_123:bat[:oid,:oid] := sql.tid(X_2,"sys","subtitles",6,8);
X_132:bat[:oid,:str] := sql.bind(X_2,"sys","subtitles","word",0,6,8);
(X_146:bat[:oid,:oid],X_147:bat[:oid,:str]) := sql.bind(X_2,"sys","subtitles","word",2,6,8);
X_212 := sql.delta(X_132,X_146,X_147);
X_226 := algebra.leftfetchjoin(X_123,X_212);
(X_241,X_242) := algebra.subjoin(X_226,X_20,nil:BAT,nil:BAT,false,nil:lng);
X_259 := algebra.leftfetchjoin(X_242,X_20);
X_125:bat[:oid,:oid] := sql.tid(X_2,"sys","subtitles",7,8);
X_133:bat[:oid,:str] := sql.bind(X_2,"sys","subtitles","word",0,7,8);
(X_148:bat[:oid,:oid],X_149:bat[:oid,:str]) := sql.bind(X_2,"sys","subtitles","word",2,7,8);
X_11:bat[:oid,:str] := sql.bind(X_2,"sys","subtitles","word",1);
X_213 := sql.delta(X_133,X_148,X_149,X_11);
X_228 := algebra.leftfetchjoin(X_125,X_213);
(X_243,X_244) := algebra.subjoin(X_228,X_20,nil:BAT,nil:BAT,false,nil:lng);
X_261 := algebra.leftfetchjoin(X_244,X_20);
X_407 := mat.packIncrement(X_247,8);
X_408 := mat.packIncrement(X_407,X_249);
X_409 := mat.packIncrement(X_408,X_251);
X_410 := mat.packIncrement(X_409,X_253);
X_411 := mat.packIncrement(X_410,X_255);
X_412 := mat.packIncrement(X_411,X_257);
X_413 := mat.packIncrement(X_412,X_259);
X_24 := mat.packIncrement(X_413,X_261);
X_25 := bat.append(X_3,X_24,true);
X_150:bat[:oid,:str] := sql.bind(X_2,"sys","subtitles","prid",0,0,8);
(X_158:bat[:oid,:oid],X_159:bat[:oid,:str]) := sql.bind(X_2,"sys","subtitles","prid",2,0,8);
X_262 := sql.delta(X_150,X_158,X_159);
X_270 := algebra.leftfetchjoin(X_113,X_262);
X_278 := bat.mirror(X_270);
X_288 := mat.packIncrement(X_229,1);
X_289 := algebra.tdiff(X_278,X_288);
X_318 := algebra.project(X_289,nil:str);
X_151:bat[:oid,:str] := sql.bind(X_2,"sys","subtitles","prid",0,1,8);
(X_160:bat[:oid,:oid],X_161:bat[:oid,:str]) := sql.bind(X_2,"sys","subtitles","prid",2,1,8);
X_263 := sql.delta(X_151,X_160,X_161);
X_271 := algebra.leftfetchjoin(X_114,X_263);
X_279 := bat.mirror(X_271);
X_292 := mat.packIncrement(X_231,1);
X_293 := algebra.tdiff(X_279,X_292);
X_319 := algebra.project(X_293,nil:str);
X_152:bat[:oid,:str] := sql.bind(X_2,"sys","subtitles","prid",0,2,8);
(X_162:bat[:oid,:oid],X_163:bat[:oid,:str]) := sql.bind(X_2,"sys","subtitles","prid",2,2,8);
X_264 := sql.delta(X_152,X_162,X_163);
X_272 := algebra.leftfetchjoin(X_115,X_264);
X_280 := bat.mirror(X_272);
X_296 := mat.packIncrement(X_233,1);
X_297 := algebra.tdiff(X_280,X_296);
X_320 := algebra.project(X_297,nil:str);
X_153:bat[:oid,:str] := sql.bind(X_2,"sys","subtitles","prid",0,3,8);
(X_164:bat[:oid,:oid],X_165:bat[:oid,:str]) := sql.bind(X_2,"sys","subtitles","prid",2,3,8);
X_265 := sql.delta(X_153,X_164,X_165);
X_273 := algebra.leftfetchjoin(X_117,X_265);
X_281 := bat.mirror(X_273);
X_300 := mat.packIncrement(X_235,1);
X_301 := algebra.tdiff(X_281,X_300);
X_321 := algebra.project(X_301,nil:str);
X_154:bat[:oid,:str] := sql.bind(X_2,"sys","subtitles","prid",0,4,8);
(X_166:bat[:oid,:oid],X_167:bat[:oid,:str]) := sql.bind(X_2,"sys","subtitles","prid",2,4,8);
X_266 := sql.delta(X_154,X_166,X_167);
X_274 := algebra.leftfetchjoin(X_119,X_266);
X_282 := bat.mirror(X_274);
X_304 := mat.packIncrement(X_237,1);
X_305 := algebra.tdiff(X_282,X_304);
X_322 := algebra.project(X_305,nil:str);
X_155:bat[:oid,:str] := sql.bind(X_2,"sys","subtitles","prid",0,5,8);
(X_168:bat[:oid,:oid],X_169:bat[:oid,:str]) := sql.bind(X_2,"sys","subtitles","prid",2,5,8);
X_267 := sql.delta(X_155,X_168,X_169);
X_275 := algebra.leftfetchjoin(X_121,X_267);
X_283 := bat.mirror(X_275);
X_308 := mat.packIncrement(X_239,1);
X_309 := algebra.tdiff(X_283,X_308);
X_323 := algebra.project(X_309,nil:str);
X_156:bat[:oid,:str] := sql.bind(X_2,"sys","subtitles","prid",0,6,8);
(X_170:bat[:oid,:oid],X_171:bat[:oid,:str]) := sql.bind(X_2,"sys","subtitles","prid",2,6,8);
X_268 := sql.delta(X_156,X_170,X_171);
X_276 := algebra.leftfetchjoin(X_123,X_268);
X_284 := bat.mirror(X_276);
X_312 := mat.packIncrement(X_241,1);
X_313 := algebra.tdiff(X_284,X_312);
X_324 := algebra.project(X_313,nil:str);
X_157:bat[:oid,:str] := sql.bind(X_2,"sys","subtitles","prid",0,7,8);
(X_172:bat[:oid,:oid],X_173:bat[:oid,:str]) := sql.bind(X_2,"sys","subtitles","prid",2,7,8);
X_27:bat[:oid,:str] := sql.bind(X_2,"sys","subtitles","prid",1);
X_269 := sql.delta(X_157,X_172,X_173,X_27);
X_277 := algebra.leftfetchjoin(X_125,X_269);
X_285 := bat.mirror(X_277);
X_316 := mat.packIncrement(X_243,1);
X_317 := algebra.tdiff(X_285,X_316);
X_325 := algebra.project(X_317,nil:str);
X_424 := mat.packIncrement(X_318,8);
X_425 := mat.packIncrement(X_424,X_319);
X_426 := mat.packIncrement(X_425,X_320);
X_427 := mat.packIncrement(X_426,X_321);
X_428 := mat.packIncrement(X_427,X_322);
X_429 := mat.packIncrement(X_428,X_323);
X_430 := mat.packIncrement(X_429,X_324);
X_28 := mat.packIncrement(X_430,X_325);
X_29 := bat.append(X_25,X_28,true);
X_30 := algebra.subselect(X_29,nil:str,nil:str,true,true,false);
X_31:bat[:oid,:str] := bat.new(nil:oid,nil:str);
X_327 := algebra.leftfetchjoin(X_229,X_270);
X_329 := algebra.leftfetchjoin(X_231,X_271);
X_331 := algebra.leftfetchjoin(X_233,X_272);
X_333 := algebra.leftfetchjoin(X_235,X_273);
X_334 := algebra.leftfetchjoin(X_237,X_274);
X_335 := algebra.leftfetchjoin(X_239,X_275);
X_336 := algebra.leftfetchjoin(X_241,X_276);
X_337 := algebra.leftfetchjoin(X_243,X_277);
X_432 := mat.packIncrement(X_327,8);
X_433 := mat.packIncrement(X_432,X_329);
X_434 := mat.packIncrement(X_433,X_331);
X_435 := mat.packIncrement(X_434,X_333);
X_436 := mat.packIncrement(X_435,X_334);
X_437 := mat.packIncrement(X_436,X_335);
X_438 := mat.packIncrement(X_437,X_336);
X_32 := mat.packIncrement(X_438,X_337);
X_33 := bat.append(X_31,X_32,true);
X_338 := algebra.leftfetchjoin(X_289,X_270);
X_339 := algebra.leftfetchjoin(X_293,X_271);
X_340 := algebra.leftfetchjoin(X_297,X_272);
X_341 := algebra.leftfetchjoin(X_301,X_273);
X_343 := algebra.leftfetchjoin(X_305,X_274);
X_345 := algebra.leftfetchjoin(X_309,X_275);
X_347 := algebra.leftfetchjoin(X_313,X_276);
X_349 := algebra.leftfetchjoin(X_317,X_277);
X_440 := mat.packIncrement(X_338,8);
X_442 := mat.packIncrement(X_440,X_339);
X_443 := mat.packIncrement(X_442,X_340);
X_444 := mat.packIncrement(X_443,X_341);
X_445 := mat.packIncrement(X_444,X_343);
X_446 := mat.packIncrement(X_445,X_345);
X_447 := mat.packIncrement(X_446,X_347);
X_34 := mat.packIncrement(X_447,X_349);
X_35 := bat.append(X_33,X_34,true);
X_36 := algebra.leftfetchjoin(X_30,X_35);
X_38 := algebra.subslice(X_36,0,9:wrd);
X_39 := algebra.leftfetchjoin(X_38,X_36);
X_40:bat[:oid,:int] := bat.new(nil:oid,nil:int);
X_174:bat[:oid,:int] := sql.bind(X_2,"sys","subtitles","idx",0,0,8);
(X_189:bat[:oid,:oid],X_190:bat[:oid,:int]) := sql.bind(X_2,"sys","subtitles","idx",2,0,8);
X_350 := sql.delta(X_174,X_189,X_190);
X_358 := algebra.leftfetchjoin(X_113,X_350);
X_367 := algebra.leftfetchjoin(X_229,X_358);
X_176:bat[:oid,:int] := sql.bind(X_2,"sys","subtitles","idx",0,1,8);
(X_191:bat[:oid,:oid],X_192:bat[:oid,:int]) := sql.bind(X_2,"sys","subtitles","idx",2,1,8);
X_351 := sql.delta(X_176,X_191,X_192);
X_359 := algebra.leftfetchjoin(X_114,X_351);
X_369 := algebra.leftfetchjoin(X_231,X_359);
X_178:bat[:oid,:int] := sql.bind(X_2,"sys","subtitles","idx",0,2,8);
(X_193:bat[:oid,:oid],X_194:bat[:oid,:int]) := sql.bind(X_2,"sys","subtitles","idx",2,2,8);
X_352 := sql.delta(X_178,X_193,X_194);
X_360 := algebra.leftfetchjoin(X_115,X_352);
X_371 := algebra.leftfetchjoin(X_233,X_360);
X_180:bat[:oid,:int] := sql.bind(X_2,"sys","subtitles","idx",0,3,8);
(X_195:bat[:oid,:oid],X_196:bat[:oid,:int]) := sql.bind(X_2,"sys","subtitles","idx",2,3,8);
X_353 := sql.delta(X_180,X_195,X_196);
X_361 := algebra.leftfetchjoin(X_117,X_353);
X_373 := algebra.leftfetchjoin(X_235,X_361);
X_182:bat[:oid,:int] := sql.bind(X_2,"sys","subtitles","idx",0,4,8);
(X_197:bat[:oid,:oid],X_198:bat[:oid,:int]) := sql.bind(X_2,"sys","subtitles","idx",2,4,8);
X_354 := sql.delta(X_182,X_197,X_198);
X_362 := algebra.leftfetchjoin(X_119,X_354);
X_374 := algebra.leftfetchjoin(X_237,X_362);
X_184:bat[:oid,:int] := sql.bind(X_2,"sys","subtitles","idx",0,5,8);
(X_200:bat[:oid,:oid],X_201:bat[:oid,:int]) := sql.bind(X_2,"sys","subtitles","idx",2,5,8);
X_355 := sql.delta(X_184,X_200,X_201);
X_363 := algebra.leftfetchjoin(X_121,X_355);
X_375 := algebra.leftfetchjoin(X_239,X_363);
X_186:bat[:oid,:int] := sql.bind(X_2,"sys","subtitles","idx",0,6,8);
(X_202:bat[:oid,:oid],X_203:bat[:oid,:int]) := sql.bind(X_2,"sys","subtitles","idx",2,6,8);
X_356 := sql.delta(X_186,X_202,X_203);
X_364 := algebra.leftfetchjoin(X_123,X_356);
X_376 := algebra.leftfetchjoin(X_241,X_364);
X_188:bat[:oid,:int] := sql.bind(X_2,"sys","subtitles","idx",0,7,8);
(X_204:bat[:oid,:oid],X_205:bat[:oid,:int]) := sql.bind(X_2,"sys","subtitles","idx",2,7,8);
X_43:bat[:oid,:int] := sql.bind(X_2,"sys","subtitles","idx",1);
X_357 := sql.delta(X_188,X_204,X_205,X_43);
X_365 := algebra.leftfetchjoin(X_125,X_357);
X_377 := algebra.leftfetchjoin(X_243,X_365);
X_449 := mat.packIncrement(X_367,8);
X_450 := mat.packIncrement(X_449,X_369);
X_451 := mat.packIncrement(X_450,X_371);
X_452 := mat.packIncrement(X_451,X_373);
X_453 := mat.packIncrement(X_452,X_374);
X_454 := mat.packIncrement(X_453,X_375);
X_455 := mat.packIncrement(X_454,X_376);
X_44 := mat.packIncrement(X_455,X_377);
X_45 := bat.append(X_40,X_44,true);
X_378 := algebra.leftfetchjoin(X_289,X_358);
X_379 := algebra.leftfetchjoin(X_293,X_359);
X_380 := algebra.leftfetchjoin(X_297,X_360);
X_381 := algebra.leftfetchjoin(X_301,X_361);
X_383 := algebra.leftfetchjoin(X_305,X_362);
X_385 := algebra.leftfetchjoin(X_309,X_363);
X_387 := algebra.leftfetchjoin(X_313,X_364);
X_389 := algebra.leftfetchjoin(X_317,X_365);
X_457 := mat.packIncrement(X_378,8);
X_458 := mat.packIncrement(X_457,X_379);
X_459 := mat.packIncrement(X_458,X_380);
X_460 := mat.packIncrement(X_459,X_381);
X_461 := mat.packIncrement(X_460,X_383);
X_462 := mat.packIncrement(X_461,X_385);
X_463 := mat.packIncrement(X_462,X_387);
X_46 := mat.packIncrement(X_463,X_389);
X_47 := bat.append(X_45,X_46,true);
X_48:bat[:oid,:int] := algebra.leftfetchjoinPath(X_38,X_30,X_47);
X_49:bat[:oid,:str] := bat.new(nil:oid,nil:str);
X_390 := algebra.leftfetchjoin(X_229,X_214);
X_391 := algebra.leftfetchjoin(X_231,X_216);
X_392 := algebra.leftfetchjoin(X_233,X_218);
X_393 := algebra.leftfetchjoin(X_235,X_220);
X_394 := algebra.leftfetchjoin(X_237,X_222);
X_395 := algebra.leftfetchjoin(X_239,X_224);
X_396 := algebra.leftfetchjoin(X_241,X_226);
X_397 := algebra.leftfetchjoin(X_243,X_228);
X_465 := mat.packIncrement(X_390,8);
X_466 := mat.packIncrement(X_465,X_391);
X_467 := mat.packIncrement(X_466,X_392);
X_468 := mat.packIncrement(X_467,X_393);
X_469 := mat.packIncrement(X_468,X_394);
X_470 := mat.packIncrement(X_469,X_395);
X_471 := mat.packIncrement(X_470,X_396);
X_50 := mat.packIncrement(X_471,X_397);
X_51 := bat.append(X_49,X_50,true);
X_398 := algebra.leftfetchjoin(X_289,X_214);
X_399 := algebra.leftfetchjoin(X_293,X_216);
X_400 := algebra.leftfetchjoin(X_297,X_218);
X_401 := algebra.leftfetchjoin(X_301,X_220);
X_402 := algebra.leftfetchjoin(X_305,X_222);
X_403 := algebra.leftfetchjoin(X_309,X_224);
X_404 := algebra.leftfetchjoin(X_313,X_226);
X_405 := algebra.leftfetchjoin(X_317,X_228);
X_473 := mat.packIncrement(X_398,8);
X_475 := mat.packIncrement(X_473,X_399);
X_476 := mat.packIncrement(X_475,X_400);
X_477 := mat.packIncrement(X_476,X_401);
X_478 := mat.packIncrement(X_477,X_402);
X_479 := mat.packIncrement(X_478,X_403);
X_480 := mat.packIncrement(X_479,X_404);
X_52 := mat.packIncrement(X_480,X_405);
X_53 := bat.append(X_51,X_52,true);
X_54:bat[:oid,:str] := algebra.leftfetchjoinPath(X_38,X_30,X_53);
X_55:bat[:oid,:str] := algebra.leftfetchjoinPath(X_38,X_30,X_29);
language.pass(X_20);
language.pass(X_270);
language.pass(X_271);
language.pass(X_272);
language.pass(X_273);
language.pass(X_274);
language.pass(X_275);
language.pass(X_276);
language.pass(X_277);
language.pass(X_36);
language.pass(X_113);
language.pass(X_114);
language.pass(X_115);
language.pass(X_117);
language.pass(X_119);
language.pass(X_121);
language.pass(X_123);
language.pass(X_125);
language.pass(X_358);
language.pass(X_359);
language.pass(X_360);
language.pass(X_361);
language.pass(X_362);
language.pass(X_363);
language.pass(X_364);
language.pass(X_365);
language.pass(X_229);
language.pass(X_231);
language.pass(X_233);
language.pass(X_235);
language.pass(X_237);
language.pass(X_239);
language.pass(X_241);
language.pass(X_243);
language.pass(X_289);
language.pass(X_214);
language.pass(X_293);
language.pass(X_216);
language.pass(X_297);
language.pass(X_218);
language.pass(X_301);
language.pass(X_220);
language.pass(X_305);
language.pass(X_222);
language.pass(X_309);
language.pass(X_224);
language.pass(X_313);
language.pass(X_226);
language.pass(X_317);
language.pass(X_228);
language.pass(X_38);
language.pass(X_30);
language.pass(X_29);
exit X_535;
sql.resultSet(X_81,X_83,X_84,X_85,X_86,X_39,X_48,X_54,X_55);
end user.s2_1;
Reproducible: Always
MonetDB 5 server v11.22.0 (64-bit, 64-bit oids, 128-bit integers)
This is an unreleased version
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 31.4GiB available memory, 8 available cpu cores
Libraries:
libpcre: 8.33 2013-05-28 (compiled with 8.33)
openssl: OpenSSL 1.0.2d 9 Jul 2015 (compiled with OpenSSL 1.0.2d 9 Jul 2015)
libxml2: 2.9.1 (compiled with 2.9.1)
Compiled by: skinkie@bigdata.openebs.nl (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/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64
## Comment 21521
Date: 2015-11-14 19:46:45 +0100
From: @skinkie
I was again under the impression that I was on the latest default, which I was not.
| gdk_select.c:1008: BAT_scanselect: Assertion `bn->S->capacity >= cnt' failed | https://api.github.com/repos/MonetDB/MonetDB/issues/3859/comments | 0 | 2020-11-30T13:19:50Z | 2024-06-28T07:19:49Z | https://github.com/MonetDB/MonetDB/issues/3859 | 753,472,470 | 3,859 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-11-11 09:43:55 +0100
From: slawomir.chodnicki
To: SQL devs <<bugs-sql>>
Version: 11.21.5 (Jul2015)
CC: arkr17997, @njnes
Last updated: 2018-12-24 11:46:21 +0100
## Comment 21508
Date: 2015-11-11 09:43:55 +0100
From: slawomir.chodnicki
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36
Build Identifier:
I've experienced an issue where MonetDB would give me bad data. Here's the kind of symptom I've seen on mclient.
SELECT * from my_table WHERE foo = 'bar';
+------------+---------+
| date_id | foo |
+============+=========+
| 2015-10-20 | bar |
| 2015-10-20 | bar |
| 2015-10-20 | hello!! |
| 2015-10-20 | hello!! |
| 2015-10-20 | wrong |
| 2015-10-20 | wrong |
+------------+---------+
There were no errors, I've just been getting bad rows back from queries.
Originally I've noticed the issue because my counts/distinct counts in reports were not plausible: the group by clauses were not grouping correctly. I've tried to look at the data directly using mclient, and it boiled down to the above.
The only thing I did to that table just before the issue started appearing: I added two BIGINT colmns with default 0 using ALTER TABLE, then bulk loaded some data as usual.
A monetdb server restart did seeem to fix it, and we kept loading data. Some reports were still returning bad data however.
After ~ 10 days of not touching the DB at all the problem seems to have went away on its own. Same reporting queries started returning correct results.
Some sort of cache getting out of sync when an ALTER TABLE ADD COLUMN happens?
Reproducible: Didn't try
## Comment 21516
Date: 2015-11-12 09:52:39 +0100
From: slawomir.chodnicki
Additional observation:
Apparently the error has not gone away. It's hard to reproduce though.
When I run a query stand-alone, it gives me good results.
When I run multiple SELECTS in parallel on multiple connections, the results are corrupted. Sometimes. Repeating the SELECTS individually makes them return correct data.
## Comment 21519
Date: 2015-11-13 14:48:37 +0100
From: slawomir.chodnicki
Additional observation:
I've dumped the database tables using msqldump, deleted the entire database. Then re-created it and imported the data back.
Error keeps surfacing under the following circumstances:
I'm bulk loading data using Pentaho PDI into the table. That succeeds without error. For an indeterminate amount of time after the bulk load, SELECT results are erratic as per description. A simple foo = 'bar' does not hold.
Without any further data changes, just issuing the same select every now and then, the table returns to 'sane' mode. Usually it takes 5-10 mins or so for it to start behaving sanely again.
The same SELECT returns proper data.
## Comment 21549
Date: 2015-11-18 09:03:31 +0100
From: slawomir.chodnicki
Tracked the problem to trigger when using the pentaho bulkloader. After loading a second table as part of the same ETL process MonetDB starts giving bad results in selects. The problem persists until said ETL process finishes completely (it does things completely unrelated to MonetDB after bulkloading some tables).
Workaround is to use regular jdbc inserts. Takes much more time, but MonetDB does not get corrupted this way.
## Comment 21900
Date: 2016-03-14 09:10:50 +0100
From: @njnes
lots of fixes went into the code recently which are related to this issue. Could you verify that this problem is also fixed ?
## Comment 26749
Date: 2018-12-24 11:46:21 +0100
From: Thanos <<arkr17997>>
It is the batter post to all web users need to connect here https://setclockwindows.com/ and save the all tips for set the windows 10 desktop clock according the working managements.
| simple SELECT returns bad data after bulk loading | https://api.github.com/repos/MonetDB/MonetDB/issues/3858/comments | 0 | 2020-11-30T13:19:46Z | 2024-06-27T12:09:37Z | https://github.com/MonetDB/MonetDB/issues/3858 | 753,472,440 | 3,858 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-11-10 18:12:13 +0100
From: Kevin Boulain <<kevin.boulain>>
To: SQL devs <<bugs-sql>>
Version: 11.21.5 (Jul2015)
CC: @njnes
Last updated: 2016-01-15 11:37:52 +0100
## Comment 21499
Date: 2015-11-10 18:12:13 +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:
Using an unusual large LIMIT on a SELECT may abort the query.
Reproducible: Always
### Steps to Reproduce:
On the mclient:
1. sql>create table test (x int);
2. sql>select * from test limit 1000000000000000000000000000000000000000;
### Actual Results:
GDK reported error.
CMDslice: argument out of range
### Expected Results:
+---+
| x |
+===+
+---+
0 tuples (1.693ms)
Note that the select should be done on a table (even empty as shown above), this simpler query won't trigger the problem since the LIMIT seems to be optimised out:
sql>select 1 limit 1000000000000000000000000000000000000000;
+--------------+
| single_value |
+==============+
| 1 |
+--------------+
1 tuple (0.329ms)
## Comment 21513
Date: 2015-11-11 11:08:25 +0100
From: @njnes
integer value parsing should have failed, ie the query should fail with a clear sql error not an mal level one.
| Large LIMIT in SELECT may abort the query | https://api.github.com/repos/MonetDB/MonetDB/issues/3857/comments | 0 | 2020-11-30T13:19:43Z | 2024-06-27T12:09:36Z | https://github.com/MonetDB/MonetDB/issues/3857 | 753,472,405 | 3,857 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-11-10 13:39:08 +0100
From: Endre Palatinus <<palatinus>>
To: SQL devs <<bugs-sql>>
Version: 11.21.11 (Jul2015-SP1)
Last updated: 2015-11-10 15:56:56 +0100
## Comment 21497
Date: 2015-11-10 13:39:08 +0100
From: Endre Palatinus <<palatinus>>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/601.2.7 (KHTML, like Gecko) Version/9.0.1 Safari/537.86.2
Build Identifier:
When executing a query on table in schema1, it is not possible to run a user-defined aggregate function defined in schema2, i.e. in a different schema. The schema name is simply ignored!
Reproducible: Always
### Steps to Reproduce:
create schema schema1;
create schema schema2;
create table schema1.table1 (key int, value double);
insert into schema1.table1 values (1, 5.5);
insert into schema1.table1 values (1, 3.5);
insert into schema1.table1 values (2, 4.0);
insert into schema1.table1 values (2, 5.0);
create AGGREGATE schema2.rapi04(val INTEGER) RETURNS DOUBLE LANGUAGE R {
aggregate(val, by=list(aggr_group), FUN=median)$x
};
select key, schema2.rapi04(value)
from schema1.table1
group by key;
### Actual Results:
operation successful
operation successful
operation successful
1 affected row
1 affected row
1 affected row
1 affected row
operation successful
SELECT: no such unary operator 'rapi04(double)'
### Expected Results:
operation successful
operation successful
operation successful
1 affected row
1 affected row
1 affected row
1 affected row
operation successful
+----------+--------------------------+
| groupcol | L1 |
+==========+==========================+
| 1 | 5.5 |
| 2 | 4 |
+----------+--------------------------+
## Comment 21498
Date: 2015-11-10 15:56:56 +0100
From: @sjoerdmullender
Look carefully at the error message:
no such unary operator 'rapi04(double)'
The system is looking for a function with a DOUBLE argument, but your aggregate function takes an INTEGER argument.
If I modify the query thusly:
select key, schema2.rapi04(cast(value as integer)) from schema1.table1 group by key;
I don't get an error (but also not your expected answer, but that's partly because of the cast and loss of precision).
Alternatively, if I change the aggregate function to:
create AGGREGATE schema2.rapi04(val DOUBLE) RETURNS DOUBLE LANGUAGE R {
aggregate(val, by=list(aggr_group), FUN=median)$x
};
I also don't get an error (and still not your expected answer -- the answer I expect is two times 4.5).
| It is not possible to access a user defined aggregate function from another schema | https://api.github.com/repos/MonetDB/MonetDB/issues/3856/comments | 0 | 2020-11-30T13:19:40Z | 2024-06-28T07:19:49Z | https://github.com/MonetDB/MonetDB/issues/3856 | 753,472,373 | 3,856 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-11-09 16:40:39 +0100
From: Endre Palatinus <<palatinus>>
To: SQL devs <<bugs-sql>>
Version: 11.21.11 (Jul2015-SP1)
CC: @njnes
Last updated: 2016-01-15 11:37:42 +0100
## Comment 21496
Date: 2015-11-09 16:40:39 +0100
From: Endre Palatinus <<palatinus>>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/601.2.7 (KHTML, like Gecko) Version/9.0.1 Safari/537.86.2
Build Identifier:
It is not possible to add a foreign key reference to a column of a table belonging to a schema different to the table's schema being created.
Reproducible: Always
### Steps to Reproduce:
create schema schema1;
create schema schema2;
create table schema1.basetable(id serial);
create table schema1.childtable(id serial, fk int references schema1.basetable(id));
create table schema2.childtable(id serial, fk int references schema1.basetable(id));
### Actual Results:
operation successful
operation successful
operation successful
operation successful
CONSTRAINT FOREIGN KEY: no such table 'basetable'
### Expected Results:
operation successful
operation successful
operation successful
operation successful
operation successful
## Comment 21553
Date: 2015-11-18 19:51:05 +0100
From: @njnes
we now handle foreign keys between tables in different schemas
| Foreign key referencing table in a different schema - not allowed. | https://api.github.com/repos/MonetDB/MonetDB/issues/3855/comments | 0 | 2020-11-30T13:19:38Z | 2024-06-27T12:09:33Z | https://github.com/MonetDB/MonetDB/issues/3855 | 753,472,341 | 3,855 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-11-09 11:26:50 +0100
From: @rkoopmanschap
To: SQL devs <<bugs-sql>>
Version: 11.21.11 (Jul2015-SP1)
CC: @njnes
Last updated: 2016-01-15 11:37:57 +0100
## Comment 21486
Date: 2015-11-09 11:26:50 +0100
From: @rkoopmanschap
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:41.0) Gecko/20100101 Firefox/41.0
Build Identifier:
This bug is similar, but not the same as bug #3851. In the query below a comparison is used "15 > 1". The outcome of the comparison should not matter as the whole expression should evaluate to FALSE regardless, but the presence of the comparison makes it evaluate to TRUE. The bug does not seem to occur if anything else than a comparison with a variable is put here, including "15 > 1" or "TRUE".
This was tested in a version that already fixed bug #3851.
Reproducible: Always
### Steps to Reproduce:
Run the following commands in mclient:
CREATE TABLE test (id INTEGER, foo INTEGER);
INSERT INTO test VALUES (1, 1);
SELECT t.id, t.foo FROM test t
WHERE FALSE
AND (TRUE OR TRUE)
AND ((FALSE AND (TRUE OR FALSE))
OR (15 > t.foo)
);
### Actual Results:
+------+------+
| id | foo |
+======+======+
| 1 | 1 |
+------+------+
### Expected Results:
+----+-----+
| id | foo |
+====+=====+
+----+-----+
This is a bug report from our client CHS.
## Comment 21487
Date: 2015-11-09 11:36:19 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [a84afe3cb9fc](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a84afe3cb9fc) made by Richard Koopmanschap <richard.koopmanschap@monetdbsolutions.com> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=a84afe3cb9fc](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=a84afe3cb9fc)
Changeset description:
Added test for bug #3854
## Comment 21488
Date: 2015-11-09 13:47:14 +0100
From: @njnes
fixed. The sql select push down lost one of the boolean expressions. This is fixed now..
## Comment 21489
Date: 2015-11-09 15:25:35 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [3e237ae16358](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3e237ae16358) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=3e237ae16358](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=3e237ae16358)
Changeset description:
fixed bug #3854
| Complex expression with comparison evaluates incorrectly in WHERE clause | https://api.github.com/repos/MonetDB/MonetDB/issues/3854/comments | 0 | 2020-11-30T13:19:34Z | 2024-06-27T12:09:33Z | https://github.com/MonetDB/MonetDB/issues/3854 | 753,472,309 | 3,854 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-11-09 08:25:01 +0100
From: duskiv <<duskiv>>
To: GDK devs <<bugs-common>>
Version: 11.21.19 (Jul2015-SP4)
CC: kislenok.roman, @njnes
Last updated: 2019-09-04 13:10:41 +0200
## Comment 21480
Date: 2015-11-09 08:25:01 +0100
From: duskiv <<duskiv>>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36
Build Identifier:
CREATE TABLE import
(
d varchar(10),
t varchar(8),
price NUMERIC(11, 5),
amount INTEGER
);
CREATE TABLE md
(
ts TIMESTAMP,
symbol varchar(50),
price NUMERIC(11, 5),
amount INTEGER,
source TINYINT
);
... imported ~140 GB of synthetic data in multiple files by doing few times following ...
COPY INTO import from '/x/fileX.txt' USING DELIMITERS ',','\n','"';
insert into md select str_to_timestamp(d || t, '%m/%d/%Y%H:%M:%S'), 'X', price, amount, 1 from import; delete from import;
...
after that majority of queries do not work or if they work they return wrong result, some examples:
sql>select * from md where symbol='anySymbol' limit 10;
+----+--------+-------+--------+--------+
| ts | symbol | price | amount | source |
+====+========+=======+========+========+
+----+--------+-------+--------+--------+
0 tuples (4.8s)
sql>select symbol, count(*) from md group by symbol;
GDK reported error.
sql>select count(*) from md;
+----------+
| L1 |
+==========+
| 44377979 |
+----------+
1 tuple (5.475ms)
(I'm expecting many more... around 10^9)
sql>CREATE INDEX md_ts_idx ON md (ts,symbol);
GDK reported error.
BATproject: does not match always
on FS it looks like:
$ ~/x $ du -h /usr/local/var/monetdb/
428K /usr/local/var/monetdb//md/bat/01
356K /usr/local/var/monetdb//md/bat/02
104K /usr/local/var/monetdb//md/bat/03
17G /usr/local/var/monetdb//md/bat/04
373M /usr/local/var/monetdb//md/bat/05
176K /usr/local/var/monetdb//md/bat/06
128K /usr/local/var/monetdb//md/bat/07
593M /usr/local/var/monetdb//md/bat/10
36G /usr/local/var/monetdb//md/bat/11
6.0G /usr/local/var/monetdb//md/bat/12
11G /usr/local/var/monetdb//md/bat/13
0B /usr/local/var/monetdb//md/bat/14
28K /usr/local/var/monetdb//md/bat/BACKUP
71G /usr/local/var/monetdb//md/bat
520K /usr/local/var/monetdb//md/sql_logs/sql
520K /usr/local/var/monetdb//md/sql_logs
71G /usr/local/var/monetdb//md
71G /usr/local/var/monetdb/
Reproducible: Always
### Steps to Reproduce:
See description above.
### Actual Results:
See description above.
### Expected Results:
See description above.
## Comment 25863
Date: 2017-11-10 07:29:15 +0100
From: Roman <<kislenok.roman>>
The same using 11.27.9:
* a lot of insertion
* !GDK reported error: BATproject: does not match always
* queries return wrong result
## Comment 27261
Date: 2019-09-04 13:10:41 +0200
From: @njnes
please test on a current version
| GDK reported error, BATproject: does not match always when running queries | https://api.github.com/repos/MonetDB/MonetDB/issues/3853/comments | 0 | 2020-11-30T13:19:31Z | 2024-06-27T12:09:31Z | https://github.com/MonetDB/MonetDB/issues/3853 | 753,472,279 | 3,853 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-11-06 16:27:01 +0100
From: Kevin Boulain <<kevin.boulain>>
To: SQL devs <<bugs-sql>>
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.
| CASE statement produces GDK error on multithreaded database: BATproject does not match always | https://api.github.com/repos/MonetDB/MonetDB/issues/3852/comments | 0 | 2020-11-30T13:19:28Z | 2024-06-27T12:09:30Z | https://github.com/MonetDB/MonetDB/issues/3852 | 753,472,228 | 3,852 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-11-05 15:09:32 +0100
From: @rkoopmanschap
To: SQL devs <<bugs-sql>>
Version: 11.21.11 (Jul2015-SP1)
CC: kevin.boulain, @njnes
Last updated: 2016-01-15 11:38:13 +0100
## Comment 21469
Date: 2015-11-05 15:09:32 +0100
From: @rkoopmanschap
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:41.0) Gecko/20100101 Firefox/41.0
Build Identifier:
A select query with an expression in the WHERE clause evaluates incorrectly to TRUE instead of FALSE.
Reproducible: Always
### Steps to Reproduce:
1. Open mclient and use run the following commands:
CREATE TABLE test3 (pid INTEGER);
INSERT INTO test3 VALUES (1);
SELECT t3.pid FROM test3 t3
WHERE FALSE
AND (FALSE OR TRUE)
AND (
(FALSE AND (FALSE OR FALSE))
OR TRUE
);
### Actual Results:
+------+
| pid |
+======+
| 1 |
+------+
### Expected Results:
+-----+
| pid |
+=====+
+-----+
This is a bug report from the client CHS.
## Comment 21471
Date: 2015-11-06 13:58:00 +0100
From: Kevin Boulain <<kevin.boulain>>
Hi,
This bug caught our attention and we tried some minor variants.
Just to let you known, a simple modification triggered a segfault on the Jul2015 SP1 (http://dev.monetdb.org/hg/MonetDB/rev/d1dd6e5b7a5a):
sql>select 1 where false and (false or true) and ((false and (false or false)) or true);
The request is kinda similar to https://www.monetdb.org/bugzilla/show_bug.cgi?id=3829 that we reported earlier.
It was tested on three different systems (Gentoo, Debian and Ubuntu) and crashed on each.
No special flags for the configure, only a --prefix.
mserver5 --version output the following from the Ubuntu system:
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
## Comment 21472
Date: 2015-11-06 14:18:46 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [1a6c52046b1c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1a6c52046b1c) made by Richard Koopmanschap <richard.koopmanschap@monetdbsolutions.com> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=1a6c52046b1c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=1a6c52046b1c)
Changeset description:
Added test for bug #3851
## Comment 21479
Date: 2015-11-09 08:03:05 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [05634058c6e2](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=05634058c6e2) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=05634058c6e2](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=05634058c6e2)
Changeset description:
fixed bug #3851, ie handle complex combinations of boolean values
## Comment 21482
Date: 2015-11-09 08:38:36 +0100
From: @njnes
fixed in 2015. The complex boolean expressions are now handled properly.
| expression that should evaluate to FALSE evaluates to TRUE in SELECT query | https://api.github.com/repos/MonetDB/MonetDB/issues/3851/comments | 0 | 2020-11-30T13:19:25Z | 2024-06-27T12:09:29Z | https://github.com/MonetDB/MonetDB/issues/3851 | 753,472,177 | 3,851 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-11-05 13:00:03 +0100
From: sebastien.raillard
To: clients devs <<bugs-clients>>
Version: 11.21.11 (Jul2015-SP1)
Last updated: 2016-01-15 11:37:54 +0100
## Comment 21464
Date: 2015-11-05 13:00:03 +0100
From: sebastien.raillard
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko
Build Identifier:
When dumping a table with CHAR/VARCHAR/TEXT columns containing a DEL character (code 0x7F) using the tool msqldump, this control character isn't escaped.
All the other control characters (0x01 to 0x1F) are correctly escaped.
The control character NUL (0x00) isn't stored.
Reproducible: Always
## Comment 21467
Date: 2015-11-05 14:40:40 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [b4b8d84f5931](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b4b8d84f5931) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b4b8d84f5931](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b4b8d84f5931)
Changeset description:
Test for bug #3850.
## Comment 21468
Date: 2015-11-05 14:41:11 +0100
From: @sjoerdmullender
Fixed with changeset [c6969b8883e4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c6969b8883e4)
| DEL character not escaped | https://api.github.com/repos/MonetDB/MonetDB/issues/3850/comments | 0 | 2020-11-30T13:19:22Z | 2024-06-27T12:09:28Z | https://github.com/MonetDB/MonetDB/issues/3850 | 753,472,148 | 3,850 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-11-05 12:56:54 +0100
From: sebastien.raillard
To: Merovingian devs <<bugs-merovingian>>
Version: 11.21.11 (Jul2015-SP1)
Last updated: 2016-01-15 11:37:44 +0100
## Comment 21463
Date: 2015-11-05 12:56:54 +0100
From: sebastien.raillard
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko
Build Identifier:
The value -9223372036854775808 isn't correctly inserted in HUGEINT column, the result of the insertion is a "nil" value.
Steps to reproduce the issue:
CREATE TABLE "seb"."test_hugeint" (
"ID" INTEGER NOT NULL AUTO_INCREMENT,
"cHUGEINT" HUGEINT,
CONSTRAINT "pkey2" PRIMARY KEY ("ID")
);
INSERT INTO "seb"."test_hugeint" ("cHUGEINT") VALUES (-9223372036854775807); INSERT INTO "seb"."test_hugeint" ("cHUGEINT") VALUES (-9223372036854775808); INSERT INTO "seb"."test_hugeint" ("cHUGEINT") VALUES (-9223372036854775809);
And the result of SELECT * FROM "seb"."test_hugeint"; is:
+------+----------------------+
| ID | cHUGEINT |
+======+======================+
| 1 | -9223372036854775807 |
| 2 | nil |
| 3 | -9223372036854775809 |
+------+----------------------+
Reproducible: Always
## Comment 21465
Date: 2015-11-05 14:35:47 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [e10b4706429d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e10b4706429d) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=e10b4706429d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=e10b4706429d)
Changeset description:
Test for bug #3849.
## Comment 21466
Date: 2015-11-05 14:36:30 +0100
From: @sjoerdmullender
Fixed with changeset [cccaf3bbbb5b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=cccaf3bbbb5b)
| HUGEINT incorrect value | https://api.github.com/repos/MonetDB/MonetDB/issues/3849/comments | 0 | 2020-11-30T13:19:19Z | 2024-06-27T12:09:27Z | https://github.com/MonetDB/MonetDB/issues/3849 | 753,472,103 | 3,849 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-11-04 18:10:40 +0100
From: John Thomas <<john>>
To: SQL devs <<bugs-sql>>
Version: 11.21.11 (Jul2015-SP1)
CC: daniel.sali, @mlkersten, @njnes
Last updated: 2016-01-15 11:37:55 +0100
## Comment 21460
Date: 2015-11-04 18:10:40 +0100
From: John Thomas <<john>>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36
Build Identifier:
I've been seeing a lot of crashes with the following backtrace since upgrading to Jul2015 (and Jul2015-SP1):
0 BATproject (l=l@entry=0x0, r=r@entry=0x7fb7e8a3a820) at gdk_join.c:3299
1 0x00007fbb96394b3f in delta_update_bat (bat=bat@entry=0x7fb7e89f1a70,
tids=tids@entry=0x7fb7e8a3a820, updates=updates@entry=0x7fb7e8ad51a0,
is_new=<optimized out>) at bat_storage.c:223
2 0x00007fbb96396434 in delta_update_bat (is_new=<optimized out>,
updates=0x7fb7e8ad51a0, tids=0x7fb7e8a3a820, bat=0x7fb7e89f1a70)
at bat_storage.c:442
3 update_col (tr=0x7fb9d40034b0, c=0x7fb9d413b180, tids=0x7fb7e8a3a820,
upd=0x7fb7e8ad51a0, tpe=4) at bat_storage.c:442
4 0x00007fbb962aaf0c in mvc_update_wrap (cntxt=<optimized out>, mb=<optimized out>,
stk=<optimized out>, pci=<optimized out>) at sql.c:2053
5 0x00007fbba236fa80 in runMALsequence (cntxt=cntxt@entry=0x7fbb96848630,
mb=mb@entry=0x7fb7e896c410, startpc=startpc@entry=1, stoppc=stoppc@entry=0,
stk=stk@entry=0x7fb7e8a19960, env=env@entry=0x7fb7e8a19960,
pcicaller=pcicaller@entry=0x0) at mal_interpreter.c:631
6 0x00007fbba2370bd3 in runMAL (cntxt=cntxt@entry=0x7fbb96848630, mb=0x7fb7e896c410,
mbcaller=mbcaller@entry=0x0, env=0x7fb7e8a19960) at mal_interpreter.c:365
7 0x00007fbba2388e3d in MALengine (c=0x7fbb96848630) at mal_session.c:637
8 0x00007fbba2387607 in runPhase (phase=4, c=0x7fbb96848630) at mal_scenario.c:515
9 runScenarioBody (c=c@entry=0x7fbb96848630) at mal_scenario.c:559
10 0x00007fbba2387d0d in runScenario (c=c@entry=0x7fbb96848630) at mal_scenario.c:579
11 0x00007fbba23881b0 in MSserveClient (dummy=dummy@entry=0x7fbb96848630)
at mal_session.c:439
12 0x00007fbba2388706 in MSscheduleClient (
command=command@entry=0x7fb7e89b51a0 "!ERROR: BATsubselect: invalid argument: b must have a dense head.\n", challenge=challenge@entry=0x7fbb94943e30 "RDhCiOnCN",
fin=0x7fb7e8a52230, fout=fout@entry=0x7fb7e891d600) at mal_session.c:319
13 0x00007fbba2416bcc in doChallenge (data=<optimized out>) at mal_mapi.c:184
14 0x00007fbba1efe64f in thread_starter (arg=<optimized out>) at gdk_system.c:458
15 0x00007fbba1876182 in start_thread (arg=0x7fbb94944700) at pthread_create.c:312
16 0x00007fbba15a347d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Reproducible: Sometimes
### Steps to Reproduce:
1. Run lots of bulk updates (possibly intermingled with lots of bulk inserts)
### Actual Results:
Crash
### Expected Results:
Not crash
My workload includes a lot of bulk inserts and updates (with high frequency) that occur in parallel with analytical queries. This particular trace seems to happen during times of heavy loading (many copy into statements and bulk updates back to back). I'm not sure if it's correlated with concurrent analytical queries or not.
## Comment 21461
Date: 2015-11-04 18:47:30 +0100
From: John Thomas <<john>>
Note: I was previously running Feb2013-SP6, so I'm not sure if this bug was introduced in the latest build or somewhere in between.
## Comment 21474
Date: 2015-11-06 16:34:29 +0100
From: John Thomas <<john>>
Here are a couple more errors I've been seeing that feel like they might be related to the same root cause.
Segfault with following backtrace:
0 DELTAproject (result=0x7f9d582733c0, sub=<optimized out>, col=<optimized out>, uid=<optimized out>, uval=0x7f9d58273380,
ins=<optimized out>) at sql.c:2418
1 0x00007fa5701f986b in runMALsequence (cntxt=<optimized out>, mb=<optimized out>, startpc=<optimized out>, stoppc=<optimized out>,
stk=<optimized out>, env=env@entry=0x0, pcicaller=pcicaller@entry=0x0) at mal_interpreter.c:655
2 0x00007fa5701fb4e3 in DFLOWworker (T=<optimized out>) at mal_dataflow.c:376
3 0x00007fa56f700182 in start_thread (arg=0x7fa55cdcf700) at pthread_create.c:312
4 0x00007fa56f42d47d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Error thrown during a query (select distinct col1, col2, col3, col4 from foo where [lots of predicates]):
"Can not bind delete column" (which comes out of SQLtid, sql.c:2497)
## Comment 21475
Date: 2015-11-06 21:08:14 +0100
From: John Thomas <<john>>
At this point, there are so many crashes happening that this version is basically unusable. I've been running it in parallel with our production system to evaluate it under realistic load, and it crashed 12 times in less than an hour!
Here are some more of the common backtraces:
0 mvc_bind_wrap (cntxt=<optimized out>, mb=<optimized out>, stk=0x7fb5c4f658a0, pci=<optimized out>) at sql.c:1836
1 0x00007fb76969f850 in runMALsequence (cntxt=<optimized out>, mb=<optimized out>, startpc=<optimized out>, stoppc=<optimized out>,
stk=<optimized out>, env=env@entry=0x0, pcicaller=pcicaller@entry=0x0) at mal_interpreter.c:631
2 0x00007fb7696a14e3 in DFLOWworker (T=<optimized out>) at mal_dataflow.c:376
3 0x00007fb768ba6182 in start_thread (arg=0x7fb71ff7f700) at pthread_create.c:312
4 0x00007fb7688d347d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
0 hash_new (sa=0x3567e30, size=59, key=0x7fcf9a5ac320 <base_key>) at sql_hash.c:35
1 0x00007fcf9a5a1f06 in _list_find_name (l=0x39baf80, name=0x7fb054133110 "ts") at sql_catalog.c:22
2 0x00007fcf9a5a7c71 in sorted_col (tr=0x7fb0540016d0, col=0x1cf24d00) at bat_storage.c:891
3 0x00007fcf9a59aec8 in sql_trans_is_sorted (tr=<optimized out>, col=<optimized out>) at store.c:4493
4 0x00007fcf9a54a72f in mvc_is_sorted (m=m@entry=0x7fb05410e4e0, col=<optimized out>) at sql_mvc.c:1227
5 0x00007fcf9a577b94 in score_gbe (sql=sql@entry=0x7fb05410e4e0, rel=rel@entry=0x7fb0542288d0, e=0x7fb054228d10) at rel_optimizer.c:4210
6 0x00007fcf9a577c8b in score_se (e=0x7fb054228d90, rel=0x7fb0542288d0, sql=0x7fb05410e4e0) at rel_optimizer.c:5696
7 rel_select_order (changes=<optimized out>, sql=0x7fb05410e4e0, rel=0x7fb0542288d0) at rel_optimizer.c:5712
8 0x00007fcf9a56a244 in rewrite (sql=0x7fb05410e4e0, rel=0x7fb0542288d0, rewriter=rewriter@entry=0x7fcf9a577bb0 <rel_select_order>,
has_changes=0x7fb4502dfc28) at rel_optimizer.c:7396
9 0x00007fcf9a56a21c in rewrite (sql=0x7fb05410e4e0, rel=0x7fb05421c770, rewriter=rewriter@entry=0x7fcf9a577bb0 <rel_select_order>,
has_changes=0x7fb4502dfc28) at rel_optimizer.c:7392
10 0x00007fcf9a56a27c in rewrite (sql=0x7fb05410e4e0, rel=0x7fb0542286d0, rewriter=rewriter@entry=0x7fcf9a577bb0 <rel_select_order>,
has_changes=0x7fb4502dfc28) at rel_optimizer.c:7382
11 0x00007fcf9a56a27c in rewrite (sql=0x7fb05410e4e0, rel=0x7fb054225450, rewriter=rewriter@entry=0x7fcf9a577bb0 <rel_select_order>,
has_changes=0x7fb4502dfc28) at rel_optimizer.c:7382
12 0x00007fcf9a56a27c in rewrite (sql=0x7fb05410e4e0, rel=0x7fb054226bb0, rewriter=rewriter@entry=0x7fcf9a577bb0 <rel_select_order>,
has_changes=0x7fb4502dfc28) at rel_optimizer.c:7382
13 0x00007fcf9a56a27c in rewrite (sql=sql@entry=0x7fb05410e4e0, rel=rel@entry=0x7fb054226cf0,
rewriter=rewriter@entry=0x7fcf9a577bb0 <rel_select_order>, has_changes=has_changes@entry=0x7fb4502dfc28) at rel_optimizer.c:7382
14 0x00007fcf9a57935d in _rel_optimizer (sql=sql@entry=0x7fb05410e4e0, rel=0x7fb054226cf0, level=level@entry=0) at rel_optimizer.c:7581
15 0x00007fcf9a57bfd7 in rel_optimizer (sql=sql@entry=0x7fb05410e4e0, rel=<optimized out>) at rel_optimizer.c:7625
16 0x00007fcf9a4b787d in sql_symbol2relation (c=c@entry=0x7fb05410e4e0, sym=<optimized out>) at sql.c:115
17 0x00007fcf9a4cccac in SQLparser (c=0x7fcf9aa6cf48) at sql_scenario.c:1183
18 0x00007fcfa929c299 in runPhase (phase=1, c=0x7fcf9aa6cf48) at mal_scenario.c:515
19 runScenarioBody (c=c@entry=0x7fcf9aa6cf48) at mal_scenario.c:550
20 0x00007fcfa929cadd in runScenario (c=c@entry=0x7fcf9aa6cf48) at mal_scenario.c:579
21 0x00007fcfa929cf80 in MSserveClient (dummy=dummy@entry=0x7fcf9aa6cf48) at mal_session.c:439
22 0x00007fcfa929d4d6 in MSscheduleClient (command=command@entry=0x7fb0540008d0 "0", challenge=challenge@entry=0x7fb4502dfe70 "FqndAbxS",
fin=0x7fb054006b40, fout=fout@entry=0x7fb0540049c0) at mal_session.c:319
23 0x00007fcfa932b4dc in doChallenge (data=<optimized out>) at mal_mapi.c:184
24 0x00007fcfa8e1364f in thread_starter (arg=<optimized out>) at gdk_system.c:458
25 0x00007fcfa878b182 in start_thread (arg=0x7fb4502e0700) at pthread_create.c:312
26 0x00007fcfa84b847d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
0 strlen () at ../sysdeps/x86_64/strlen.S:106
1 0x00007f97d3ab4b1f in strWrite (a=a@entry=0x7f808c85be80 <error: Cannot access memory at address 0x7f808c85be80>, s=0x3321f10,
cnt=cnt@entry=1) at gdk_atoms.c:1707
2 0x00007f97d3b13cc7 in log_delta (lg=0x2fc0aa0, uid=uid@entry=0x7f808c8492a0, uval=uval@entry=0x7f808c849520,
name=0x7f8094279fc0 "sys_u268435456_customers__android_android_push_tokens") at gdk_logger.c:2056
3 0x00007f97c52a289c in tr_log_delta (cbat=0x7f8094279f50, cleared=<optimized out>, tr=<optimized out>) at bat_storage.c:2172
4 0x00007f97c52a2a25 in log_table (tr=<optimized out>, ft=0x7f8094154230) at bat_storage.c:2217
5 0x00007f97c529279c in rollforward_changeset_updates (tr=tr@entry=0x7f8094001690, fs=fs@entry=0x7f8094110c20, ts=ts@entry=0x36419d0,
b=b@entry=0x36419a0, rollforward_updates=rollforward_updates@entry=0x7f97c5292a20 <rollforward_update_table>,
rollforward_creates=rollforward_creates@entry=0x7f97c5292db0 <rollforward_create_table>,
rollforward_deletes=rollforward_deletes@entry=0x7f97c5291b00 <rollforward_drop_table>,
fd=fd@entry=0x7f97c529df10 <conditional_table_dup>, mode=mode@entry=2) at store.c:2457
6 0x00007f97c529de6e in rollforward_update_schema (tr=tr@entry=0x7f8094001690, fs=fs@entry=0x7f8094110bf0, ts=ts@entry=0x36419a0,
mode=mode@entry=2) at store.c:2921
7 0x00007f97c529279c in rollforward_changeset_updates (tr=tr@entry=0x7f8094001690, fs=fs@entry=0x7f80940016c0, ts=<optimized out>,
b=0x32e4b90, rollforward_updates=rollforward_updates@entry=0x7f97c529dcf0 <rollforward_update_schema>,
rollforward_creates=rollforward_creates@entry=0x7f97c5292fd0 <rollforward_create_schema>,
rollforward_deletes=rollforward_deletes@entry=0x7f97c52931e0 <rollforward_drop_schema>, fd=fd@entry=0x7f97c5293e50 <schema_dup>,
mode=2) at store.c:2457
8 0x00007f97c5294899 in rollforward_trans (tr=0x7f8094001690, mode=<optimized out>) at store.c:2943
9 0x00007f97c52965cf in sql_trans_commit (tr=tr@entry=0x7f8094001690) at store.c:3390
10 0x00007f97c52457e8 in mvc_commit (m=0x7f8094211d70, chain=chain@entry=0, name=name@entry=0x0) at sql_mvc.c:258
11 0x00007f97c51b5411 in SQLtransaction (cntxt=0x7f97c5751328, mb=<optimized out>, stk=<optimized out>, pci=<optimized out>) at sql.c:268
12 0x00007f97d3f81850 in runMALsequence (cntxt=cntxt@entry=0x7f97c5751328, mb=mb@entry=0x7f809422aab0, startpc=startpc@entry=1,
stoppc=stoppc@entry=0, stk=stk@entry=0x7f809410c140, env=env@entry=0x7f809410c140, pcicaller=pcicaller@entry=0x0)
at mal_interpreter.c:631
13 0x00007f97d3f829a3 in runMAL (cntxt=cntxt@entry=0x7f97c5751328, mb=0x7f809422aab0, mbcaller=mbcaller@entry=0x0, env=0x7f809410c140)
at mal_interpreter.c:365
14 0x00007f97d3f9ac0d in MALengine (c=0x7f97c5751328) at mal_session.c:637
15 0x00007f97d3f993d7 in runPhase (phase=4, c=0x7f97c5751328) at mal_scenario.c:515
16 runScenarioBody (c=c@entry=0x7f97c5751328) at mal_scenario.c:559
17 0x00007f97d3f99add in runScenario (c=c@entry=0x7f97c5751328) at mal_scenario.c:579
18 0x00007f97d3f99f80 in MSserveClient (dummy=dummy@entry=0x7f97c5751328) at mal_session.c:439
19 0x00007f97d3f9a4d6 in MSscheduleClient (command=command@entry=0x7f80940028f0 "dd",
challenge=challenge@entry=0x7f97c29a5e70 "KQtmaxl1rpc", fin=0x7f8094203d90, fout=fout@entry=0x7f80942286d0) at mal_session.c:319
20 0x00007f97d40284dc in doChallenge (data=<optimized out>) at mal_mapi.c:184
21 0x00007f97d3b1064f in thread_starter (arg=<optimized out>) at gdk_system.c:458
22 0x00007f97d3488182 in start_thread (arg=0x7f97c29a6700) at pthread_create.c:312
23 0x00007f97d31b547d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
0 _list_find_name (l=0x4233e10, name=0x7f21c8137ee0 "event_type") at sql_catalog.c:38
1 0x00007f5fc3833c71 in sorted_col (tr=0x7f21c80016d0, col=0x7f21c8137ee0) at bat_storage.c:891
2 0x00007f5fc3826ec8 in sql_trans_is_sorted (tr=<optimized out>, col=<optimized out>) at store.c:4493
3 0x00007f5fc37d672f in mvc_is_sorted (m=m@entry=0x7f5f9824d600, col=<optimized out>) at sql_mvc.c:1227
4 0x00007f5fc3803b94 in score_gbe (sql=sql@entry=0x7f5f9824d600, rel=rel@entry=0x7f5f981109b0, e=0x7f5f98110e30) at rel_optimizer.c:4210
5 0x00007f5fc3803c8b in score_se (e=0x7f5f98110ef0, rel=0x7f5f981109b0, sql=0x7f5f9824d600) at rel_optimizer.c:5696
6 rel_select_order (changes=<optimized out>, sql=0x7f5f9824d600, rel=0x7f5f981109b0) at rel_optimizer.c:5712
7 0x00007f5fc37f6244 in rewrite (sql=0x7f5f9824d600, rel=0x7f5f981109b0, rewriter=rewriter@entry=0x7f5fc3803bb0 <rel_select_order>,
has_changes=0x7f5f7991dc28) at rel_optimizer.c:7396
8 0x00007f5fc37f627c in rewrite (sql=0x7f5f9824d600, rel=0x7f5f98112a10, rewriter=rewriter@entry=0x7f5fc3803bb0 <rel_select_order>,
has_changes=0x7f5f7991dc28) at rel_optimizer.c:7382
9 0x00007f5fc37f627c in rewrite (sql=sql@entry=0x7f5f9824d600, rel=rel@entry=0x7f5f98112b50,
rewriter=rewriter@entry=0x7f5fc3803bb0 <rel_select_order>, has_changes=has_changes@entry=0x7f5f7991dc28) at rel_optimizer.c:7382
10 0x00007f5fc380535d in _rel_optimizer (sql=sql@entry=0x7f5f9824d600, rel=0x7f5f98112b50, level=level@entry=0) at rel_optimizer.c:7581
11 0x00007f5fc3807fd7 in rel_optimizer (sql=sql@entry=0x7f5f9824d600, rel=<optimized out>) at rel_optimizer.c:7625
12 0x00007f5fc374387d in sql_symbol2relation (c=c@entry=0x7f5f9824d600, sym=<optimized out>) at sql.c:115
13 0x00007f5fc3758cac in SQLparser (c=0x7f5fc3cf2c40) at sql_scenario.c:1183
14 0x00007f5fd2528299 in runPhase (phase=1, c=0x7f5fc3cf2c40) at mal_scenario.c:515
15 runScenarioBody (c=c@entry=0x7f5fc3cf2c40) at mal_scenario.c:550
16 0x00007f5fd2528add in runScenario (c=c@entry=0x7f5fc3cf2c40) at mal_scenario.c:579
17 0x00007f5fd2528f80 in MSserveClient (dummy=dummy@entry=0x7f5fc3cf2c40) at mal_session.c:439
18 0x00007f5fd25294d6 in MSscheduleClient (command=command@entry=0x7f5f9824d600 "", challenge=challenge@entry=0x7f5f7991de70 "aZoSIXQIT",
fin=0x7f5f982143f0, fout=fout@entry=0x7f5f9825eb50) at mal_session.c:319
19 0x00007f5fd25b74dc in doChallenge (data=<optimized out>) at mal_mapi.c:184
20 0x00007f5fd209f64f in thread_starter (arg=<optimized out>) at gdk_system.c:458
21 0x00007f5fd1a17182 in start_thread (arg=0x7f5f7991e700) at pthread_create.c:312
22 0x00007f5fd174447d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
## Comment 21511
Date: 2015-11-11 10:44:40 +0100
From: @mlkersten
A hard one to assess. If you produce a GDB backtrace, you might consider looking at all threads, e.g. use 'thr apply all where'
What is precisely the parallel behavior enforced?
assume L= loading, U=update, Q=query and [] denote parallel activity then
[LQ]* loads and concurrent queries
[L*U*] parallel load/updates (be aware of transaction scheme)
[LQ*U*] single load multiple queries and updates
please be as precise as possible on the workload to get a glimps
on the direction to search for a possibly cause.
## Comment 21517
Date: 2015-11-12 23:27:29 +0100
From: John Thomas <<john>>
After lots of investigation, I believe the problems may be caused by some corrupt bats on disk. I've fixed the source of the corruption on our end, and we're going to try a fresh round of corruption-free testing soon. I know that at least one of the common stack traces I listed here was caused by the corruption issue. I suspect the others may be as well. I'll know more in a few days, and we may be able to just close this ticket entirely.
## Comment 21563
Date: 2015-11-20 18:27:55 +0100
From: John Thomas <<john>>
Created attachment 368
test case setup script
> Attached file: [setup.rb](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3848_setup.rb_368) (text/x-ruby-script, 386 bytes)
> Description: test case setup script
## Comment 21564
Date: 2015-11-20 18:28:35 +0100
From: John Thomas <<john>>
Created attachment 369
test case write thread
> Attached file: [write_thread.rb](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3848_write_thread.rb_369) (text/x-ruby-script, 196 bytes)
> Description: test case write thread
## Comment 21565
Date: 2015-11-20 18:28:52 +0100
From: John Thomas <<john>>
Created attachment 370
test case read thread
> Attached file: [read_thread.rb](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3848_read_thread.rb_370) (text/x-ruby-script, 159 bytes)
> Description: test case read thread
## Comment 21566
Date: 2015-11-20 18:40:57 +0100
From: John Thomas <<john>>
I've finally been able to narrow this down to an easily repeatable test case. Run the attached setup script, then concurrently run the attached write thread and read thread scripts.
These run simple update where and select where statements, respectively, 1000 times in a loop with a 100ms sleep between each query. On a linux test server, this resulted in 52 crashes with backtraces that all look like:
0 DELTAproject (result=0x7fa3100cb050, sub=<optimized out>, col=<optimized out>, uid=<optimized out>, uval=0x7fa3100cb010, ins=<optimized out>) at sql.c:2418
1 0x00007fa32202ea9b in runMALsequence (cntxt=cntxt@entry=0x7fa31ad7d630, mb=mb@entry=0x7fa3100cc4c0, startpc=startpc@entry=1, stoppc=stoppc@entry=0,
stk=stk@entry=0x7fa3100cac80, env=env@entry=0x0, pcicaller=pcicaller@entry=0x0) at mal_interpreter.c:655
2 0x00007fa32202fa3a in callMAL (cntxt=cntxt@entry=0x7fa31ad7d630, mb=mb@entry=0x7fa3100cc4c0, env=env@entry=0x7fa319692bf8, argv=argv@entry=0x7fa319692c00,
debug=<optimized out>) at mal_interpreter.c:447
3 0x00007fa31a7f0d7f in SQLexecutePrepared (c=0x7fa31ad7d630, be=be@entry=0x7fa3100cf650, q=0x7fa3100cf530) at sql_execute.c:328
4 0x00007fa31a7f126a in SQLengineIntern (c=0x7fa31ad7d630, be=0x7fa3100cf650) at sql_execute.c:390
5 0x00007fa322046607 in runPhase (phase=4, c=0x7fa31ad7d630) at mal_scenario.c:515
6 runScenarioBody (c=c@entry=0x7fa31ad7d630) at mal_scenario.c:559
7 0x00007fa322046d0d in runScenario (c=c@entry=0x7fa31ad7d630) at mal_scenario.c:579
8 0x00007fa3220471b0 in MSserveClient (dummy=dummy@entry=0x7fa31ad7d630) at mal_session.c:439
9 0x00007fa322047706 in MSscheduleClient (command=command@entry=0x7fa310067de0 "", challenge=challenge@entry=0x7fa319692e30 "hKvKgOXFb", fin=0x7fa310006b40,
fout=fout@entry=0x7fa3100d84d0) at mal_session.c:319
10 0x00007fa3220d5bcc in doChallenge (data=<optimized out>) at mal_mapi.c:184
11 0x00007fa321bbd64f in thread_starter (arg=<optimized out>) at gdk_system.c:458
12 0x00007fa321535182 in start_thread (arg=0x7fa319693700) at pthread_create.c:312
13 0x00007fa32126247d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
On my mac laptop, the failure mode is different. Instead of crashing, the query thread eventually hangs (usually after 10-20 queries, never made it past 40). Once that happens, mserver starts using tons of cpu. The update thread continues to run however, and the sql write ahead log just keeps growing and growing, never getting flushed. Meanwhile, I'm still able to execute queries, as long as they don't touch the column that's being updated. If I do a `monetdb stop crash_test`, it will eventually shut down, then upon restart, it slowly burns through the giant transaction log and eventually starts back up in a happy state.
This only happens with updates. Running the same process with inserts causes not trouble. I was also only able to make this fail on Jul2015 and Jul2015-SP1, all prior versions that I tested (Feb2013-SP6, Jan2014, and Oct2014-SP4) functioned correctly.
## Comment 21567
Date: 2015-11-20 21:56:03 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [61ccf71c082f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=61ccf71c082f) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=61ccf71c082f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=61ccf71c082f)
Changeset description:
BATsemijoin looks at head values, but we need to semijoin on tail values.
The code is now essentially the same as in the default branch (except
for the second argument to BATsubsemijoin which can be NULL over
there).
Part one of two of the fix for bug #3848.
## Comment 21568
Date: 2015-11-20 21:56:07 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [93ef82367cca](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=93ef82367cca) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=93ef82367cca](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=93ef82367cca)
Changeset description:
When resetting a view, also do that when only the varheap is shared.
Part two of two of the fix for bug #3848.
## Comment 21569
Date: 2015-11-20 22:00:35 +0100
From: @sjoerdmullender
Thanks for the test case. It made finding this bug so much easier.
## Comment 21570
Date: 2015-11-20 22:04:33 +0100
From: John Thomas <<john>>
Welcome. And thanks for the fix. I'll have to try things out with your patches to see if there are any other lingering issues that this test didn't expose.
## Comment 21571
Date: 2015-11-21 16:28:43 +0100
From: John Thomas <<john>>
Running with the latest code from the Jul2015 branch, the test case is still crashing very consistently (every 5-10 iterations of the loop). On linux, it's getting SIGABRT with the following stack trace:
0 0x00007fc3ad662cc9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
1 0x00007fc3ad6660d8 in __GI_abort () at abort.c:89
2 0x00007fc3ad65bb86 in __assert_fail_base (fmt=0x7fc3ad7ac830 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n",
assertion=assertion@entry=0x7fc3ae48c070 "!BBP[abs(i)>>14][abs(i)&((1 << 14)-1)].cache[(i)<0] || BBP[abs(i)>>14][abs(i)&((1 << 14)-1)].cache[(i)<0]->S->sharecnt >= releaseShare", file=file@entry=0x7fc3ae48a6a2 "gdk_bbp.c", line=line@entry=2254, function=function@entry=0x7fc3ae48cf63 <__PRETTY_FUNCTION__.9339> "decref") at assert.c:92
3 0x00007fc3ad65bc32 in __GI___assert_fail (
assertion=0x7fc3ae48c070 "!BBP[abs(i)>>14][abs(i)&((1 << 14)-1)].cache[(i)<0] || BBP[abs(i)>>14][abs(i)&((1 << 14)-1)].cache[(i)<0]->S->sharecnt >= releaseShare",
file=0x7fc3ae48a6a2 "gdk_bbp.c", line=2254, function=0x7fc3ae48cf63 <__PRETTY_FUNCTION__.9339> "decref") at assert.c:101
4 0x00007fc3ae101c22 in decref (i=713, logical=0, releaseShare=1, lock=1) at gdk_bbp.c:2254
5 0x00007fc3ae103ba8 in GDKunshare (parent=713) at gdk_bbp.c:2410
6 0x00007fc3ae106203 in BBPdestroy (b=0x7fc39c0046e0) at gdk_bbp.c:2605
7 0x00007fc3ae102ffa in decref (i=723, logical=0, releaseShare=0, lock=1) at gdk_bbp.c:2341
8 0x00007fc3ae103d00 in BBPreclaim (b=0x7fc39c0046e0) at gdk_bbp.c:2441
9 0x00007fc3ae0f1629 in VIEWreset (b=0x7fc39c003e70) at gdk_align.c:723
10 0x00007fc3ae256750 in BATsetaccess (b=0x7fc39c003e70, newmode=0) at gdk_bat.c:2599
11 0x00007fc3a6bf6d96 in setwritable (b=0x7fc39c003e70) at sql.c:2136
12 0x00007fc3a6bf88b5 in DELTAproject (result=0x7fc39c002cf0, sub=0x7fc39c002bf0, col=0x7fc39c002c50, uid=0x7fc39c002c90, uval=0x7fc39c002cb0, ins=0x7fc39c002cd0) at sql.c:2432
13 0x00007fc3ae8223a0 in malCommandCall (stk=0x7fc39c0028f0, pci=0x7fc39c0dfde0) at mal_interpreter.c:102
14 0x00007fc3ae82511a in runMALsequence (cntxt=0x7fc3a7235630, mb=0x7fc39c0d0710, startpc=1, stoppc=0, stk=0x7fc39c0028f0, env=0x0, pcicaller=0x0) at mal_interpreter.c:655
15 0x00007fc3ae823fb4 in callMAL (cntxt=0x7fc3a7235630, mb=0x7fc39c0d0710, env=0x7fc3a5a94978, argv=0x7fc3a5a94a20, debug=0 '\000') at mal_interpreter.c:447
16 0x00007fc3a6c149b7 in SQLexecutePrepared (c=0x7fc3a7235630, be=0x7fc39c0015e0, q=0x7fc39c0d1d50) at sql_execute.c:328
17 0x00007fc3a6c14ec0 in SQLengineIntern (c=0x7fc3a7235630, be=0x7fc39c0015e0) at sql_execute.c:390
18 0x00007fc3a6c13238 in SQLengine (c=0x7fc3a7235630) at sql_scenario.c:1323
19 0x00007fc3ae8505a1 in runPhase (c=0x7fc3a7235630, phase=4) at mal_scenario.c:515
20 0x00007fc3ae8507d2 in runScenarioBody (c=0x7fc3a7235630) at mal_scenario.c:559
21 0x00007fc3ae8508e7 in runScenario (c=0x7fc3a7235630) at mal_scenario.c:579
22 0x00007fc3ae85220f in MSserveClient (dummy=0x7fc3a7235630) at mal_session.c:439
23 0x00007fc3ae851c11 in MSscheduleClient (command=0x7fc39c0028f0 "\200", challenge=0x7fc3a5a94e30 "8mLh8KIXWX", fin=0x7fc39c006b40, fout=0x7fc39c0d45f0) at mal_session.c:319
24 0x00007fc3ae944061 in doChallenge (data=0x7fc398001060) at mal_mapi.c:184
25 0x00007fc3ae262a59 in thread_starter (arg=0x7fc398001350) at gdk_system.c:458
26 0x00007fc3ad9f9182 in start_thread (arg=0x7fc3a5a95700) at pthread_create.c:312
27 0x00007fc3ad72647d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
On mac, it's just hanging the entire database. Can't connect, no cpu activity.
## Comment 21580
Date: 2015-11-23 15:35:53 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [1cad4a5b5921](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1cad4a5b5921) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=1cad4a5b5921](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=1cad4a5b5921)
Changeset description:
Improve on changeset [61ccf71c082f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=61ccf71c082f)
Do an extra semijoin so that BATreplace only gets to update values
that actually exist.
This should fix bug #3848.
## Comment 21581
Date: 2015-11-23 17:18:34 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [759924c5300e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=759924c5300e) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=759924c5300e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=759924c5300e)
Changeset description:
Test for bug #3848.
Not enabled because the test takes very long.
## Comment 21582
Date: 2015-11-23 17:22:35 +0100
From: John Thomas <<john>>
With the latest version, the test case is now working fine for me on both linux and mac. Going to try this out on my mirrored production machine and see how things go. Thanks!
## Comment 21587
Date: 2015-11-25 01:22:45 +0100
From: John Thomas <<john>>
Created attachment 371
test case 2 setup script
> Attached file: [setup.rb](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3848_setup.rb_371) (text/x-ruby-script, 453 bytes)
> Description: test case 2 setup script
## Comment 21588
Date: 2015-11-25 01:23:10 +0100
From: John Thomas <<john>>
Created attachment 372
test case 2 write thread script
> Attached file: [write_thread.rb](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3848_write_thread.rb_372) (text/x-ruby-script, 749 bytes)
> Description: test case 2 write thread script
## Comment 21589
Date: 2015-11-25 01:23:30 +0100
From: John Thomas <<john>>
Created attachment 373
test case 2 read thread script
> Attached file: [read_thread.rb](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3848_read_thread.rb_373) (text/x-ruby-script, 160 bytes)
> Description: test case 2 read thread script
## Comment 21590
Date: 2015-11-25 01:31:49 +0100
From: John Thomas <<john>>
I ran with the latest from Jul2015 branch (as of http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1cad4a5b5921) on my production mirror environment for a while, and I'm still seeing lots of crashes. They're different from the ones you've fixed, and a smaller set than I was seeing before, so seems like we're making progress here.
I expanded my test case a bit to include a couple more columns, one with nulls, some inserts per iteration, and updates that modify multiple columns using different criteria in the same transaction. This more closely resembles the behavior of our actual write thread, just in a much more basic and repeatable way. The new scripts are attached.
I just ran it on a linux test box and got 194 cores over the duration of the test. I didn't have time to inspect every stack trace, but from a random sampling, they all seemed to look like the following (which I was also seeing in my production mirror testing):
0 0x00007f6562faccc9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
1 0x00007f6562fb00d8 in __GI_abort () at abort.c:89
2 0x00007f6562fa5b86 in __assert_fail_base (fmt=0x7f65630f6830 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x7f655c70d184 "b",
file=file@entry=0x7f655c70d140 "bat_storage.c", line=line@entry=55, function=function@entry=0x7f655c70df92 <__PRETTY_FUNCTION__.11465> "delta_bind_del") at assert.c:92
3 0x00007f6562fa5c32 in __GI___assert_fail (assertion=0x7f655c70d184 "b", file=0x7f655c70d140 "bat_storage.c", line=55,
function=0x7f655c70df92 <__PRETTY_FUNCTION__.11465> "delta_bind_del") at assert.c:101
4 0x00007f655c6b41d4 in delta_bind_del (bat=0x7f65441cba40, access=1) at bat_storage.c:55
5 0x00007f655c6b42a3 in bind_del (tr=0x7f6550001690, t=0x7f6550123470, access=1) at bat_storage.c:67
6 0x00007f655c54317c in SQLtid (cntxt=0x7f655cb79328, mb=0x7f65501ddda0, stk=0x7f65501a0c70, pci=0x7f65501d5630) at sql.c:2539
7 0x00007f656416ee49 in runMALsequence (cntxt=0x7f655cb79328, mb=0x7f65501ddda0, startpc=1, stoppc=0, stk=0x7f65501a0c70, env=0x0, pcicaller=0x0) at mal_interpreter.c:631
8 0x00007f656416dfb4 in callMAL (cntxt=0x7f655cb79328, mb=0x7f65501ddda0, env=0x7f655ae30978, argv=0x7f655ae30a20, debug=0 '\000') at mal_interpreter.c:447
9 0x00007f655c55ec0e in SQLexecutePrepared (c=0x7f655cb79328, be=0x7f65501dc330, q=0x7f65501d1670) at sql_execute.c:328
10 0x00007f655c55f117 in SQLengineIntern (c=0x7f655cb79328, be=0x7f65501dc330) at sql_execute.c:390
11 0x00007f655c55d48f in SQLengine (c=0x7f655cb79328) at sql_scenario.c:1323
12 0x00007f656419a5a1 in runPhase (c=0x7f655cb79328, phase=4) at mal_scenario.c:515
13 0x00007f656419a7d2 in runScenarioBody (c=0x7f655cb79328) at mal_scenario.c:559
14 0x00007f656419a8e7 in runScenario (c=0x7f655cb79328) at mal_scenario.c:579
15 0x00007f656419c20f in MSserveClient (dummy=0x7f655cb79328) at mal_session.c:439
16 0x00007f656419bc11 in MSscheduleClient (command=0x7f65501c0600 "\340\005\034Pe\177", challenge=0x7f655ae30e30 "emEUIQVkQ", fin=0x7f65501d92c0, fout=0x7f65501b4040)
at mal_session.c:319
17 0x00007f656428e061 in doChallenge (data=0x7f654c0008d0) at mal_mapi.c:184
18 0x00007f6563baca96 in thread_starter (arg=0x7f654c001020) at gdk_system.c:458
19 0x00007f6563343182 in start_thread (arg=0x7f655ae31700) at pthread_create.c:312
20 0x00007f656307047d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
0 0x00007f65a013920c in SQLtid (cntxt=0x7f65a076f328, mb=0x7f65941d4940, stk=0x7f65941ad8d0, pci=0x7f65941e3040) at sql.c:2547
1 0x00007f65a7d64e49 in runMALsequence (cntxt=0x7f65a076f328, mb=0x7f65941d4940, startpc=1, stoppc=0, stk=0x7f65941ad8d0, env=0x0, pcicaller=0x0) at mal_interpreter.c:631
2 0x00007f65a7d63fb4 in callMAL (cntxt=0x7f65a076f328, mb=0x7f65941d4940, env=0x7f659c4df978, argv=0x7f659c4dfa20, debug=0 '\000') at mal_interpreter.c:447
3 0x00007f65a0154c0e in SQLexecutePrepared (c=0x7f65a076f328, be=0x7f65941df380, q=0x7f65941d6c00) at sql_execute.c:328
4 0x00007f65a0155117 in SQLengineIntern (c=0x7f65a076f328, be=0x7f65941df380) at sql_execute.c:390
5 0x00007f65a015348f in SQLengine (c=0x7f65a076f328) at sql_scenario.c:1323
6 0x00007f65a7d905a1 in runPhase (c=0x7f65a076f328, phase=4) at mal_scenario.c:515
7 0x00007f65a7d907d2 in runScenarioBody (c=0x7f65a076f328) at mal_scenario.c:559
8 0x00007f65a7d908e7 in runScenario (c=0x7f65a076f328) at mal_scenario.c:579
9 0x00007f65a7d9220f in MSserveClient (dummy=0x7f65a076f328) at mal_session.c:439
10 0x00007f65a7d91c11 in MSscheduleClient (command=0x7f65941b4110 "\360@\033\224e\177", challenge=0x7f659c4dfe30 "Ed3Sw1RhzW", fin=0x7f65941db5c0, fout=0x7f65941d43b0)
at mal_session.c:319
11 0x00007f65a7e84061 in doChallenge (data=0x7f6590000bd0) at mal_mapi.c:184
12 0x00007f65a77a2a96 in thread_starter (arg=0x7f6590000a50) at gdk_system.c:458
13 0x00007f65a6f39182 in start_thread (arg=0x7f659c4e0700) at pthread_create.c:312
14 0x00007f65a6c6647d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
0 0x00007f43e237dcc9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
1 0x00007f43e23810d8 in __GI_abort () at abort.c:89
2 0x00007f43e2376b86 in __assert_fail_base (fmt=0x7f43e24c7830 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n",
assertion=assertion@entry=0x7f43e31b7550 "b->S->count > (id - b->H->seq)", file=file@entry=0x7f43e31b65ad "gdk_bat.c", line=line@entry=1698,
function=function@entry=0x7f43e31b8aee <__PRETTY_FUNCTION__.9210> "void_inplace") at assert.c:92
3 0x00007f43e2376c32 in __GI___assert_fail (assertion=0x7f43e31b7550 "b->S->count > (id - b->H->seq)", file=0x7f43e31b65ad "gdk_bat.c", line=1698,
function=0x7f43e31b8aee <__PRETTY_FUNCTION__.9210> "void_inplace") at assert.c:101
4 0x00007f43e2f68c20 in void_inplace (b=0x7f43c40042c0, id=1000, val=0x7f43c4204c60, force=1 '\001') at gdk_bat.c:1698
5 0x00007f43e2f692b6 in void_replace_bat (b=0x7f43c40042c0, p=0x7f43d00c6820, u=0x7f43d00c6a60, force=1 '\001') at gdk_bat.c:1723
6 0x00007f43dba8585e in delta_bind_bat (bat=0x7f43c40b0c40, access=1, temp=0) at bat_storage.c:153
7 0x00007f43dba85a6c in bind_col (tr=0x7f43d0001690, c=0x7f43d00237d0, access=1) at bat_storage.c:185
8 0x00007f43db90f2ac in mvc_bind (m=0x7f43d0004920, sname=0x7f43d00d9300 "sys", tname=0x7f43d00cf650 "test", cname=0x7f43d00d5bb0 "col2", access=1) at sql.c:1715
9 0x00007f43db90f816 in mvc_bind_wrap (cntxt=0x7f43dbf50630, mb=0x7f43d00dad80, stk=0x7f43d00ab1a0, pci=0x7f43d00cf960) at sql.c:1777
10 0x00007f43e353fe49 in runMALsequence (cntxt=0x7f43dbf50630, mb=0x7f43d00dad80, startpc=1, stoppc=0, stk=0x7f43d00ab1a0, env=0x0, pcicaller=0x0) at mal_interpreter.c:631
11 0x00007f43e353efb4 in callMAL (cntxt=0x7f43dbf50630, mb=0x7f43d00dad80, env=0x7f43d9da1978, argv=0x7f43d9da1a20, debug=0 '\000') at mal_interpreter.c:447
12 0x00007f43db92fc0e in SQLexecutePrepared (c=0x7f43dbf50630, be=0x7f43d00d6ce0, q=0x7f43d00d0f90) at sql_execute.c:328
13 0x00007f43db930117 in SQLengineIntern (c=0x7f43dbf50630, be=0x7f43d00d6ce0) at sql_execute.c:390
14 0x00007f43db92e48f in SQLengine (c=0x7f43dbf50630) at sql_scenario.c:1323
15 0x00007f43e356b5a1 in runPhase (c=0x7f43dbf50630, phase=4) at mal_scenario.c:515
16 0x00007f43e356b7d2 in runScenarioBody (c=0x7f43dbf50630) at mal_scenario.c:559
17 0x00007f43e356b8e7 in runScenario (c=0x7f43dbf50630) at mal_scenario.c:579
18 0x00007f43e356d20f in MSserveClient (dummy=0x7f43dbf50630) at mal_session.c:439
19 0x00007f43e356cc11 in MSscheduleClient (command=0x7f43d00ab1a0 "", challenge=0x7f43d9da1e30 "jGdfih6h", fin=0x7f43d0006b40, fout=0x7f43d00d35f0) at mal_session.c:319
20 0x00007f43e365f061 in doChallenge (data=0x7f43cc001360) at mal_mapi.c:184
21 0x00007f43e2f7da96 in thread_starter (arg=0x7f43cc001050) at gdk_system.c:458
22 0x00007f43e2714182 in start_thread (arg=0x7f43d9da2700) at pthread_create.c:312
23 0x00007f43e244147d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
## Comment 21690
Date: 2015-12-24 22:13:07 +0100
From: @njnes
test now runs, do you have more crashing examples
| mserver segfault during bulk loading/updating | https://api.github.com/repos/MonetDB/MonetDB/issues/3848/comments | 0 | 2020-11-30T13:19:15Z | 2024-06-27T12:09:26Z | https://github.com/MonetDB/MonetDB/issues/3848 | 753,472,045 | 3,848 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-11-03 13:49:30 +0100
From: Frédéric Jolliton <<frederic.jolliton+monetdb>>
To: SQL devs <<bugs-sql>>
Version: 11.21.11 (Jul2015-SP1)
CC: @njnes
Last updated: 2016-01-15 11:38:20 +0100
## Comment 21459
Date: 2015-11-03 13:49:30 +0100
From: Frédéric Jolliton <<frederic.jolliton+monetdb>>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:41.0) Gecko/20100101 Firefox/41.0
Build Identifier:
We tumbled on another worrying bug. When a very specific query is performed, its LIMIT seems to be applied not once everything is computed, but as if it was applied early in the processing.
It occured on a pretty big query. I tried to reduce it as much as I could.
Reproducible: Always
### Steps to Reproduce:
Create a simple table:
CREATE TABLE foo (a INT, b INT);
INSERT INTO foo VALUES (10, 3), (2, 5), (0, 8), (7, 10), (1, 1), (9, 12), (4, 1), (3, 9);
Now compare the two following queries:
SELECT *
FROM (SELECT CAST(SUM(a) AS FLOAT) / SUM(b) AS result
FROM foo
GROUP BY a) as t1
ORDER BY (1=1), result DESC
LIMIT 5;
and:
SELECT *
FROM (SELECT CAST(SUM(a) AS FLOAT) / SUM(b) AS result
FROM foo
GROUP BY a) as t1
ORDER BY (1=1), result DESC
LIMIT 10;
Only the LIMIT is different.
### Actual Results:
The respective results are:
With LIMIT 5:
+--------------------------+
| result |
+==========================+
| 3.3333333333333335 |
| 1 |
| 0.7 |
| 0.4 |
| 0 |
+--------------------------+
With LIMIT 10:
+--------------------------+
| result |
+==========================+
| 4 |
| 3.3333333333333335 |
| 1 |
| 0.75 |
| 0.7 |
| 0.4 |
| 0.3333333333333333 |
| 0 |
+--------------------------+
Notice how the second result adds values such as 4, that were not part of the first result!
Setting the severity to Major accordingly to the description of this item.. but to me, it is more like a Critical one, even if the server is not crashing or making us lose data..
With this sort of silent bug, we could totally get wrong results without noticing it! That's scary.
We do note however that the bugs are usually quickly fixed, which is pretty nice.
$ bin/mserver5 --version
MonetDB 5 server v11.21.12 (64-bit, 64-bit oids, 128-bit integers)
This is an unreleased version
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 15.6GiB available memory, 4 available cpu cores
Libraries:
libpcre: 8.36 2014-09-26 (compiled with 8.36)
openssl: OpenSSL 1.0.1g 7 Apr 2014 (compiled with OpenSSL 1.0.1g 7 Apr 2014)
libxml2: 2.9.1 (compiled with 2.9.1)
Compiled by: fjolliton@workstation (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/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64
## Comment 21483
Date: 2015-11-09 09:11:52 +0100
From: @njnes
somehow the implementation for this case (type dbl) was missing. That is now corrected.
## Comment 21484
Date: 2015-11-09 09:11:54 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [ce14fcd2ec69](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ce14fcd2ec69) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=ce14fcd2ec69](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=ce14fcd2ec69)
Changeset description:
added test for bug #3847
| Wrong SQL results for a certain combination of GROUP BY / ORDER BY / LIMIT | https://api.github.com/repos/MonetDB/MonetDB/issues/3847/comments | 0 | 2020-11-30T13:19:12Z | 2024-06-27T12:09:25Z | https://github.com/MonetDB/MonetDB/issues/3847 | 753,471,996 | 3,847 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-11-02 16:19:28 +0100
From: Anthony Damico <<ajdamico>>
To: SQL devs <<bugs-sql>>
Version: -- development
CC: ajdamico
Last updated: 2016-04-11 11:45:02 +0200
## Comment 21430
Date: 2015-11-02 16:19:28 +0100
From: Anthony Damico <<ajdamico>>
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0
Build Identifier:
no big deal if this is impossible, just a feature that would be nice to have.
the 2014 american community survey (something monetdb is good at) has started mixing fields where sometimes ",," is a NULL and other times ", ," is a NULL.
http://www2.census.gov/programs-surveys/acs/data/pums/2014/1-Year/
Reproducible: Always
here's what the first data line of that text file now looks like.
aside from the very first column, all columns are INTEGER
> readLines("ss14hak.csv",n=10)
[1] "RT,SERIALNO,DIVISION,PUMA,REGION,ST,ADJHSG,ADJINC,WGTP,NP,TYPE,ACCESS,ACR,AGS,BATH,BDSP,BLD,BROADBND,BUS,COMPOTHX,CONP,DIALUP,DSL,ELEP,FIBEROP,FS,FULP,GASP,HANDHELD,HFL,INSP,LAPTOP,MHP,MODEM,MRGI,MRGP,MRGT,MRGX,OTHSVCEX,REFR,RMSP,RNTM,RNTP,RWAT,RWATPR,SATELLITE,SINK,SMP,STOV,TEL,TEN,TOIL,VACS,VALP,VEH,WATP,YBL,FES,FFINCP,FGRNTP,FHINCP,FINCP,FPARC,FPLMPRP,FSMOCP,GRNTP,GRPIP,HHL,HHT,HINCP,HOTWAT,HUGCL,HUPAC,HUPAOC,HUPARC,KIT,LNGI,MULTG,MV,NOC,NPF,NPP,NR,NRC,OCPIP,PARTNER,PLM,PLMPRP,PSF,R18,R60,R65,RESMODE,SMOCP,SMX,SRNT,SSMC,SVAL,TAXP,WIF,WKEXREL,WORKSTAT,FACCESSP,FACRP,FAGSP,FBATHP,FBDSP,FBLDP,FBROADBNDP,FBUSP,FCOMPOTHXP,FCONP,FDIALUPP,FDSLP,FELEP,FFIBEROPP,FFSP,FFULP,FGASP,FHANDHELDP,FHFLP,FHOTWATP,FINSP,FKITP,FLAPTOPP,FMHP,FMODEMP,FMRGIP,FMRGP,FMRGTP,FMRGXP,FMVP,FOTHSVCEXP,FPLMP,FREFRP,FRMSP,FRNTMP,FRNTP,FRWATP,FRWATPRP,FSATELLITEP,FSINKP,FSMP,FSMXHP,FSMXSP,FSTOVP,FTAXP,FTELP,FTENP,FTOILP,FVACSP,FVALP,FVEHP,FWATP,FYBLP,wgtp1,wgtp2,wgtp3,wgtp4,wgtp5,wgtp6,wgtp7,wgtp8,wgtp9,wgtp10,wgtp11,wgtp12,wgtp13,wgtp14,wgtp15,wgtp16,wgtp17,wgtp18,wgtp19,wgtp20,wgtp21,wgtp22,wgtp23,wgtp24,wgtp25,wgtp26,wgtp27,wgtp28,wgtp29,wgtp30,wgtp31,wgtp32,wgtp33,wgtp34,wgtp35,wgtp36,wgtp37,wgtp38,wgtp39,wgtp40,wgtp41,wgtp42,wgtp43,wgtp44,wgtp45,wgtp46,wgtp47,wgtp48,wgtp49,wgtp50,wgtp51,wgtp52,wgtp53,wgtp54,wgtp55,wgtp56,wgtp57,wgtp58,wgtp59,wgtp60,wgtp61,wgtp62,wgtp63,wgtp64,wgtp65,wgtp66,wgtp67,wgtp68,wgtp69,wgtp70,wgtp71,wgtp72,wgtp73,wgtp74,wgtp75,wgtp76,wgtp77,wgtp78,wgtp79,wgtp80"
[2] "H,77,9,00400,4,02,1000000,1008425,00022,00,1,,1,,2,02,02,,2,, ,,, ,,, , ,,, ,, ,,, ,,,,1,03,, ,2,9,,2, ,1,,,2,7, ,, ,10,,0,0,0, ,,0,0, , ,,, ,9,,,,,2,,,, , ,,, , ,,2,9,,,,,2, ,,0,,0,,,,,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,1,00021,00009,00022,00039,00022,00025,00021,00036,00021,00039,00006,00021,00006,00023,00021,00022,00006,00009,00039,00022,00041,00021,00006,00025,00006,00006,00037,00022,00037,00021,00025,00040,00021,00040,00006,00009,00021,00025,00022,00037,00022,00006,00023,00036,00021,00021,00021,00036,00022,00038,00009,00024,00006,00021,00021,00024,00006,00006,00039,00025,00036,00022,00006,00022,00006,00009,00036,00021,00036,00021,00024,00036,00024,00036,00006,00006,00020,00022,00022,00038"
| feature request: please allow multiple NULL AS null_string values for a COPY INTO line | https://api.github.com/repos/MonetDB/MonetDB/issues/3846/comments | 0 | 2020-11-30T13:19:09Z | 2024-06-28T07:19:49Z | https://github.com/MonetDB/MonetDB/issues/3846 | 753,471,967 | 3,846 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-11-02 15:19:11 +0100
From: @hannesmuehleisen
To: SQL devs <<bugs-sql>>
Version: 11.19.3 (Oct2014)
CC: @mlkersten
Last updated: 2016-01-15 11:37:48 +0100
## Comment 21427
Date: 2015-11-02 15:19:11 +0100
From: @hannesmuehleisen
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36
Build Identifier:
The query never finishes
Reproducible: Always
### Steps to Reproduce:
1. Run test case
2. Observe issue
### Actual Results:
Second INSERT never finishes
### Expected Results:
Both INSERTs finishes in reasonable time.
## Comment 21428
Date: 2015-11-02 15:21:33 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [b56208efd402](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b56208efd402) made by Hannes Muehleisen <hannes@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b56208efd402](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b56208efd402)
Changeset description:
Test for Bug #3845
## Comment 21429
Date: 2015-11-02 15:38:15 +0100
From: @hannesmuehleisen
Also saw a crash on Linux
## Comment 21490
Date: 2015-11-09 15:30:53 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [56a7f0f475c4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=56a7f0f475c4) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=56a7f0f475c4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=56a7f0f475c4)
Changeset description:
Abort reorder optimizer if recursion too deep.
When aborting, we just stop reordering and continue the query.
This fixes bug #3845.
## Comment 21491
Date: 2015-11-09 15:34:13 +0100
From: @sjoerdmullender
Even though the bug is now fixed, it is still not recommended to use the INSERT VALUES query to insert many values.
## Comment 21493
Date: 2015-11-09 15:43:44 +0100
From: @mlkersten
To add to this comment, each insert lead also to a check of the sortedness property, which (currently) becomes prohibitively more expensive when
you insert in sort order.
Improvement in that direction would require more code in the SQL-append implementation to avoid the linear scan triggered in deriveProps()
| Too many VALUES in INSERT freeze mserver5 | https://api.github.com/repos/MonetDB/MonetDB/issues/3845/comments | 0 | 2020-11-30T13:19:06Z | 2024-06-27T12:09:23Z | https://github.com/MonetDB/MonetDB/issues/3845 | 753,471,929 | 3,845 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-10-30 19:20:10 +0100
From: John Thomas <<john>>
To: MonetDB5 devs <<bugs-monetdb5>>
Version: 11.21.5 (Jul2015)
CC: @mlkersten
Last updated: 2015-12-30 13:20:18 +0100
## Comment 21422
Date: 2015-10-30 19:20:10 +0100
From: John Thomas <<john>>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36
Build Identifier:
I'm not certain of the exact query that is causing this crash, but almost every query we run currently involves at least two ilike predicates, and we see cores generated fairly often with the following backtrace:
(gdb) bt
0 0x00007f1b34b38711 in pcre_likesubselect (bnp=bnp@entry=0x7f1b285f1a30,
b=b@entry=0x1237740, s=s@entry=0x7f1a9c119980, pat=<optimized out>,
caseignore=<optimized out>, anti=<optimized out>) at pcre.c:372
1 0x00007f1b34b3b492 in PCRElikesubselect2 (ret=0x7f1b1005a6a0,
bid=<optimized out>, sid=0x7f1b1005a200, pat=0x7f1b1005a1a0, esc=<optimized out>,
caseignore=caseignore@entry=0x7f1b285f1acf "\001\020\241\005\020\033\177",
anti=0x7f1b1005a3a0 "") at pcre.c:1329
2 0x00007f1b34b3ed17 in PCRElikesubselect1 (ret=<optimized out>,
bid=<optimized out>, cid=<optimized out>, pat=<optimized out>,
esc=<optimized out>, anti=<optimized out>) at pcre.c:1348
3 0x00007f1b34a74abb in runMALsequence (cntxt=<optimized out>, mb=<optimized out>,
startpc=<optimized out>, stoppc=<optimized out>, stk=<optimized out>,
env=env@entry=0x0, pcicaller=pcicaller@entry=0x0) at mal_interpreter.c:655
4 0x00007f1b34a76733 in DFLOWworker (T=<optimized out>) at mal_dataflow.c:376
5 0x00007f1b33f7a182 in start_thread (arg=0x7f1b285f2700) at pthread_create.c:312
6 0x00007f1b33ca747d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Reproducible: Sometimes
### Steps to Reproduce:
1. Run lots of queries involving multiple ilike predicates while a bunch of other stuff is also going on
### Actual Results:
Occasional segfaults matching the backtrace.
### Expected Results:
Zero crashes would be ideal.
Here's a printout of some of the involved variables from one of the cores:
(gdb) print v
$1 = 0x7f1b2b6e3ff8 <error: Cannot access memory at address 0x7f1b2b6e3ff8>
(gdb) print o
$2 = 139754209608592
(gdb) print q
$3 = 67027
(gdb) print p
$4 = 272
Not much to go on, I'm sure, but hopefully better than nothing. The value of `o` seems suspiciously large to me, but that's purely uninformed speculation.
All of this information comes from the Jul2015 release, but it has long been a problem and I originally noted it on Feb2013-SP6 (my first exposure to MonetDB).
## Comment 21592
Date: 2015-11-25 22:02:44 +0100
From: @mlkersten
It is questionable if the ilike is the causes of the crash.
It looks more like a collateral damage that shows up in this instruction.
The backtrace does not show all threads, i.e. use 'thr apply all where'
In the thread where a crash occurs, printing the instruction 'pci' always
helps.
## Comment 21700
Date: 2015-12-30 13:20:18 +0100
From: @mlkersten
Closed until further information becomes available.
| mserver segfault while processing ilike predicate | https://api.github.com/repos/MonetDB/MonetDB/issues/3844/comments | 0 | 2020-11-30T13:19:04Z | 2024-06-28T07:19:48Z | https://github.com/MonetDB/MonetDB/issues/3844 | 753,471,889 | 3,844 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-10-29 11:42:15 +0100
From: Robin Cijvat <<robin.cijvat>>
To: SQL devs <<bugs-sql>>
Version: 11.21.5 (Jul2015)
CC: @njnes
Last updated: 2015-10-30 22:34:19 +0100
## Comment 21420
Date: 2015-10-29 11:42:15 +0100
From: Robin Cijvat <<robin.cijvat>>
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.27 Safari/537.36
Build Identifier:
See this mclient session:
sql>prepare insert into t5 values (?);
execute prepared statement using: EXEC 9(...)
+------+--------+-------+--------+-------+--------+
| type | digits | scale | schema | table | column |
+======+========+=======+========+=======+========+
| int | 32 | 0 | null | null | null |
+------+--------+-------+--------+-------+--------+
1 tuple (1.003ms)
sql>exec 9('error');
EXEC: wrong type for argument 1 of prepared statement: char, expected int
sql>exec 9(1);
EXEC: no prepared statement with id: 9
Prepared statement should not be thrown away after a type error.
Reproducible: Always
## Comment 21424
Date: 2015-10-30 22:34:19 +0100
From: @njnes
we cleanup any statement from the cache on errors, ie also prepared statements.
| Prepared statement gets cleaned up after type error | https://api.github.com/repos/MonetDB/MonetDB/issues/3843/comments | 0 | 2020-11-30T13:19:01Z | 2024-06-28T07:19:48Z | https://github.com/MonetDB/MonetDB/issues/3843 | 753,471,862 | 3,843 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-10-29 07:58:30 +0100
From: darkbluehacker
To: SQL devs <<bugs-sql>>
Version: 11.21.11 (Jul2015-SP1)
CC: chenkaijiang, darkbluehacker, @mlkersten, @njnes
Last updated: 2016-01-15 11:38:18 +0100
## Comment 21418
Date: 2015-10-29 07:58:30 +0100
From: darkbluehacker
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0
Build Identifier:
using column of table in user defined fuction will cause execution failure and bogus error message reported.
Reproducible: Always
### Steps to Reproduce:
1) unzip the attached fn_bug.tgz
2) create tables 'test_fn' and 'chg' using tables.sql
3) import data in test_fn.out to 'test_fn' table and import data in chg.out to 'chg' table;
4) create user defined function Get_r using monetdb.udf.sql
5) select count(*) from test_fn where get_r(c1, '01', '2015-08-31 23:59:59')>1.0;
### Actual Results:
get error messages like: Function '..P*' not defined. (NOTE: the function name is bogus and keeps changing every time)
### Expected Results:
get the count of the qualified rows.
## Comment 21419
Date: 2015-10-29 08:00:57 +0100
From: darkbluehacker
Created attachment 364
sql and data to reproduce the bug
sql and data to reproduce the bug can be found in attached file.
> Attached file: [fn_bug.tgz](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3842_fn_bug.tgz_364) (application/x-compressed, 630950 bytes)
> Description: sql and data to reproduce the bug
## Comment 21477
Date: 2015-11-08 11:01:29 +0100
From: @mlkersten
CREATE INDEX "chg_t_effc_tm" ON "sys"."ods_chg" ("t_effc_tm");
is not defined in the test scripts.
For the trimmed down version (4 tuples in each table) the problem
reported is:
Function 'calc.>=' not defined
This hints at an error in the UDF, which indeed attempts to execute:
X_141:bat[:oid,:bit] := mal.multiplex("calc","<=",X_132,X_140);
X_132 and X_140 are timestamps and the system only supports mtime.<=.
The issue is that this is not properly handled during the optimizer phase,
which leads to calling the default implementation, that throws an error.
Bug added as file BugTracker-2015/Tests/missed-error.Bug-3842.sql
## Comment 21506
Date: 2015-11-11 09:22:21 +0100
From: @sjoerdmullender
(In reply to darkbluehacker from comment 0)
> get error messages like: Function '..P*' not defined. (NOTE: the function
> name is bogus and keeps changing every time)
This part of the bug has been fixed in changeset [982c835b3f2b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=982c835b3f2b)
## Comment 21601
Date: 2015-11-26 15:55:06 +0100
From: Kaijiang <<chenkaijiang>>
Is there any progress on this bug?
## Comment 21625
Date: 2015-12-02 07:36:29 +0100
From: Kaijiang <<chenkaijiang>>
According to our debugging, it requires multiplex function "<=" for timestamps. But the function MANIFOLDremapMultiplex is actually a dummy function and thus it reports a function(In reply to Martin Kersten from comment 2)
> CREATE INDEX "chg_t_effc_tm" ON "sys"."ods_chg" ("t_effc_tm");
>
> is not defined in the test scripts.
>
> For the trimmed down version (4 tuples in each table) the problem
> reported is:
>
> Function 'calc.>=' not defined
>
> This hints at an error in the UDF, which indeed attempts to execute:
> X_141:bat[:oid,:bit] := mal.multiplex("calc","<=",X_132,X_140);
>
> X_132 and X_140 are timestamps and the system only supports mtime.<=.
>
> The issue is that this is not properly handled during the optimizer phase,
> which leads to calling the default implementation, that throws an error.
>
> Bug added as file BugTracker-2015/Tests/missed-error.Bug-3842.sql
We found that MANIFOLDremapMultiplex is actually a dummy function and thus the 'calc.>=' is not found. But MANIFOLDevaluate (also in manifold.c) seems to have proper implementation of the 'calc.>='.
To fix this bug, can we just function mapping in manifold.mal as below?
pattern mal.multiplex(mod:str,fcn:str,a:any...):any...
address MANIFOLDremapMultiplex; --> address MANIFOLDevaluate
pattern batmal.multiplex(mod:str,fcn:str,a:any...):any...
address MANIFOLDremapMultiplex; --> address MANIFOLDevaluate
## Comment 21686
Date: 2015-12-23 10:17:35 +0100
From: @njnes
for sql inline functions the optimization stack wasn't run, this is now fixed.
## Comment 21689
Date: 2015-12-23 14:57:58 +0100
From: Kaijiang <<chenkaijiang>>
(In reply to Niels Nes from comment 6)
> for sql inline functions the optimization stack wasn't run, this is now
> fixed.
Can I get the version with the fix and learn from it?
More, https://www.monetdb.org/bugzilla/show_bug.cgi?id=3882 looks similar to this bug. Could you also check it?
| SQL execution fails to finish and reports bogus error messages | https://api.github.com/repos/MonetDB/MonetDB/issues/3842/comments | 0 | 2020-11-30T13:18:58Z | 2024-06-27T12:09:20Z | https://github.com/MonetDB/MonetDB/issues/3842 | 753,471,820 | 3,842 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-10-28 18:38:59 +0100
From: John Thomas <<john>>
To: clients devs <<bugs-clients>>
Version: 11.21.5 (Jul2015)
Last updated: 2016-01-15 11:38:10 +0100
## Comment 21417
Date: 2015-10-28 18:38:59 +0100
From: John Thomas <<john>>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36
Build Identifier:
Every once in a while, attempting a query through mclient will fail with the response "Challenge string is not valid". Simple workaround is to just retry. In my testing, it is happening once every thousand attempts on average.
Reproducible: Sometimes
### Steps to Reproduce:
1. In ruby: (1..10000).each { |i| result = `echo "select 1;" | mclient my_db`; puts result unless $?.success? }
### Actual Results:
Running this just now, I got 12 lines of "Challenge string is not valid".
### Expected Results:
No failures
This was noticed connecting through mclient, but I would assume the failure case is actually caused by either the mapi library or mserver itself.
## Comment 21585
Date: 2015-11-24 17:42:37 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [1c398dba145e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1c398dba145e) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=1c398dba145e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=1c398dba145e)
Changeset description:
Only connect once when getting redirected from merovingian.
This hopefully fixes bug #3841.
## Comment 21630
Date: 2015-12-02 16:17:25 +0100
From: @sjoerdmullender
Closing, since I can't reproduce the problem anymore.
## Comment 21631
Date: 2015-12-02 16:18:18 +0100
From: John Thomas <<john>>
Thanks for the fix.
| mclient fails with response "Challenge string is not valid" | https://api.github.com/repos/MonetDB/MonetDB/issues/3841/comments | 0 | 2020-11-30T13:18:54Z | 2024-06-27T12:09:19Z | https://github.com/MonetDB/MonetDB/issues/3841 | 753,471,772 | 3,841 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-10-28 17:04:36 +0100
From: Kevin Boulain <<kevin.boulain>>
To: SQL devs <<bugs-sql>>
Version: 11.21.5 (Jul2015)
CC: frederic.jolliton+monetdb, @njnes
Last updated: 2016-01-15 11:38:02 +0100
## Comment 21416
Date: 2015-10-28 17:04:36 +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:
Using a savepoint in a session may crash the database if no commit is done and another session is open thereafter.
From the merovingian.log:
[...]
2015-10-28 16:52:17 MSG db[2428]: loading sql script: 99_system.sql
2015-10-28 16:52:17 MSG merovingian[2420]: proxying client (local) for database 'db' to mapi:monetdb:///tmp/farm/db/.mapi.sock?database=db
2015-10-28 16:52:17 MSG merovingian[2420]: target connection is on local UNIX domain socket, passing on filedescriptor instead of proxying
2015-10-28 16:52:17 MSG merovingian[2420]: proxying client (local) for database 'db' to mapi:monetdb:///tmp/farm/db/.mapi.sock?database=db
2015-10-28 16:52:17 MSG merovingian[2420]: target connection is on local UNIX domain socket, passing on filedescriptor instead of proxying
2015-10-28 16:52:17 ERR db[2428]: *** Error in `/data/securactive/main/sact.nova/parts/monetdb/bin/mserver5': free(): invalid pointer: 0x00007fc70c162fd0 ***
2015-10-28 16:52:17 MSG merovingian[2420]: database 'db' (2428) was killed by signal SIGABRT
The first connection executed a simple table creation in a savepoint, the other immediately crashed the database.
Reproducible: Always
### Steps to Reproduce:
The following shell script list all the steps to reproduce:
!/bin/sh
farm=/tmp/farm
db=db
usual setup
monetdbd create "$farm"
monetdbd start "$farm"
monetdb create "$db"
monetdb release "$db"
trigger the crash
mclient -a "$db" << SQL
SAVEPOINT failsafe;
-- need to do something
create table blublu (x int);
RELEASE SAVEPOINT failsafe;
-- do not commit
SQL
mclient -a "$db" reconnect to trigger the crash
cleanup
tail "$farm/merovingian.log"
monetdbd stop "$farm"
rm -rf "$farm"
### Actual Results:
Database is crashing.
### Expected Results:
Database should not crash?
Reproduced on rel-Jul2015 (commit was: http://dev.monetdb.org/hg/MonetDB/rev/1290110df036)
## Comment 21425
Date: 2015-10-30 22:38:33 +0100
From: @njnes
I cannot reproduce this on jul2015 branch.
## Comment 21426
Date: 2015-11-02 11:01:33 +0100
From: Frédéric Jolliton <<frederic.jolliton+monetdb>>
In addition to what my coworker said, I can tell that I also get the crash (different Linux distribution -Gentoo- and tools version, so different environment.) So I'm reopening this bug. We can provide more details if necessary.
I've performed the following steps:
- took the most recent Jul2015 branch
- ./bootstrap
- ./configure --prefix=/some/where (no other flags)
- make -j8
- make install
- cd /some/where
- bin/monetdbd create /tmp/bug3840
- bin/monetdbd set port=53000 /tmp/bug3840
- bin/monetdbd start /tmp/bug3840
- bin/monetdb -p 53000 create db
- bin/monetdb -p 53000 start db
The rest produces the same thing that Kevin described:
fjolliton@workstation $ bin/mclient -p 53000 -a db
Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased)
Database: MonetDB v11.21.12 (unreleased), 'mapi:monetdb://workstation:53000/db'
Type \q to quit, \? for a list of available commands
auto commit mode: off
sql>SAVEPOINT failsafe;
auto commit mode: off
sql>create table blublu (x int);
operation successful (0.647ms)
sql>RELEASE SAVEPOINT failsafe;
auto commit mode: off
sql>^D
fjolliton@workstation $ bin/mclient -p 53000 -a db
<NOTHING - MonetDB crashed>
fjolliton@workstation $ tail /tmp/bug3840/merovagian.log
2015-11-02 09:43:10 MSG db[16208]: loading sql script: 80_udf.sql
2015-11-02 09:43:10 MSG db[16208]: loading sql script: 80_udf_hge.sql
2015-11-02 09:43:10 MSG db[16208]: loading sql script: 90_generator.sql
2015-11-02 09:43:10 MSG db[16208]: loading sql script: 90_generator_hge.sql
2015-11-02 09:43:10 MSG db[16208]: loading sql script: 99_system.sql
2015-11-02 09:43:24 MSG merovingian[16157]: proxying client (local) for database 'db' to mapi:monetdb:///tmp/bug3840/db/.mapi.sock?database=db
2015-11-02 09:43:24 MSG merovingian[16157]: target connection is on local UNIX domain socket, passing on filedescriptor instead of proxying
2015-11-02 09:43:45 MSG merovingian[16157]: proxying client (local) for database 'db' to mapi:monetdb:///tmp/bug3840/db/.mapi.sock?database=db
2015-11-02 09:43:45 MSG merovingian[16157]: target connection is on local UNIX domain socket, passing on filedescriptor instead of proxying
2015-11-02 09:43:45 MSG merovingian[16157]: database 'db' (16208) was killed by signal SIGSEGV
$ bin/mserver5 --version
MonetDB 5 server v11.21.12 (64-bit, 64-bit oids, 128-bit integers)
This is an unreleased version
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 15.6GiB available memory, 4 available cpu cores
Libraries:
libpcre: 8.36 2014-09-26 (compiled with 8.36)
openssl: OpenSSL 1.0.1g 7 Apr 2014 (compiled with OpenSSL 1.0.1g 7 Apr 2014)
libxml2: 2.9.1 (compiled with 2.9.1)
Compiled by: fjolliton@workstation (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/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64
## Comment 21535
Date: 2015-11-17 12:53:16 +0100
From: Frédéric Jolliton <<frederic.jolliton+monetdb>>
Some update on this bug.
We upgraded our test database to the latest Jul2015 (from today, november 17th) and we still have the same crash. We're building it from scratch each time to ensure that we do not rely of an unclean state.
Are you confirming that no crash occurs on your side on the latest Jul2015?
## Comment 21558
Date: 2015-11-19 17:29:06 +0100
From: @sjoerdmullender
I was able to reproduce this. Looks like a double free. Here is the stack trace, not the address given to GDKfree.
0 0x00007ffff7277bac in GDKfree (blk=0xdbdbdbdbdbdbdbdb)
at /ufs/sjoerd/src/MonetDB/stable/gdk/gdk_utils.c:724
1 0x00007fffe9088fb7 in destroy_dbat (tr=0x0, bat=0x7fffd4229b80)
at /ufs/sjoerd/src/MonetDB/stable/sql/storage/bat/bat_storage.c:1392
2 0x00007fffe908911b in destroy_del (tr=0x0, t=0x1f9e260)
at /ufs/sjoerd/src/MonetDB/stable/sql/storage/bat/bat_storage.c:1414
3 0x00007fffe9076270 in reset_table (tr=0x1eaa1e0, ft=0x1f9e260,
pft=0x1f93c70) at /ufs/sjoerd/src/MonetDB/stable/sql/storage/store.c:3162
4 0x00007fffe9075bf2 in reset_changeset (tr=0x1eaa1e0, fs=0x1f9abc0,
pfs=0x1f90670, b=0x1f9ab90, rf=0x7fffe90761d0 <reset_table>,
fd=0x7fffe90726f3 <table_dup>)
at /ufs/sjoerd/src/MonetDB/stable/sql/storage/store.c:3048
5 0x00007fffe907678a in reset_schema (tr=0x1eaa1e0, fs=0x1f9ab90,
pfs=0x1f90640) at /ufs/sjoerd/src/MonetDB/stable/sql/storage/store.c:3240
6 0x00007fffe9075bf2 in reset_changeset (tr=0x1eaa1e0, fs=0x1eaa210,
pfs=0x1eaa180, b=0x1eaa150, rf=0x7fffe90764bc <reset_schema>,
fd=0x7fffe9073282 <schema_dup>)
at /ufs/sjoerd/src/MonetDB/stable/sql/storage/store.c:3048
7 0x00007fffe907688e in reset_trans (tr=0x1eaa1e0, ptr=0x1eaa150)
at /ufs/sjoerd/src/MonetDB/stable/sql/storage/store.c:3257
8 0x00007fffe907ed27 in sql_trans_begin (s=0x7fffd41b3080)
at /ufs/sjoerd/src/MonetDB/stable/sql/storage/store.c:5187
9 0x00007fffe8fe0939 in mvc_trans (m=0x7fffd41b3570)
at /ufs/sjoerd/src/MonetDB/stable/sql/server/sql_mvc.c:169
10 0x00007fffe8f28d2c in monet5_user_set_def_schema (m=0x7fffd41b3570, user=0)
at /ufs/sjoerd/src/MonetDB/stable/sql/backends/monet5/sql_user.c:470
11 0x00007fffe8f2ab26 in SQLinitClient (c=0x7fffea70a328)
at /ufs/sjoerd/src/MonetDB/stable/sql/backends/monet5/sql_scenario.c:458
12 0x00007ffff7929254 in runPhase (c=0x7fffea70a328, phase=5)
at /ufs/sjoerd/src/MonetDB/stable/monetdb5/mal/mal_scenario.c:515
13 0x00007ffff792936e in runScenarioBody (c=0x7fffea70a328)
at /ufs/sjoerd/src/MonetDB/stable/monetdb5/mal/mal_scenario.c:542
14 0x00007ffff79295a6 in runScenario (c=0x7fffea70a328)
at /ufs/sjoerd/src/MonetDB/stable/monetdb5/mal/mal_scenario.c:579
15 0x00007ffff792b057 in MSserveClient (dummy=0x7fffea70a328)
at /ufs/sjoerd/src/MonetDB/stable/monetdb5/mal/mal_session.c:439
16 0x00007ffff792aa50 in MSscheduleClient (command=0x7fffd41994d0 "",
challenge=0x7fffdf813d70 "um3uQq5g", fin=0x7fffd413ea50,
fout=0x7fffd416faf0)
at /ufs/sjoerd/src/MonetDB/stable/monetdb5/mal/mal_session.c:319
17 0x00007ffff7a1ab1a in doChallenge (data=0x7fffd0000a60)
at /ufs/sjoerd/src/MonetDB/stable/monetdb5/modules/mal/mal_mapi.c:184
18 0x00007ffff7340fe5 in thread_starter (arg=0x7fffd0000e70)
at /ufs/sjoerd/src/MonetDB/stable/gdk/gdk_system.c:458
19 0x00007ffff4abf555 in start_thread () from /lib64/libpthread.so.0
20 0x00007ffff47fab9d in clone () from /lib64/libc.so.6
## Comment 21559
Date: 2015-11-19 17:35:25 +0100
From: @sjoerdmullender
(In reply to Sjoerd Mullender from comment 4)
> trace, not the address given to GDKfree.
s/not/note/
## Comment 21693
Date: 2015-12-25 09:54:50 +0100
From: @njnes
the crash we saw was fixed recently.
## Comment 21697
Date: 2015-12-29 15:06:19 +0100
From: Kevin Boulain <<kevin.boulain>>
Testing with the Jul2015 branch, we do not encounter the problem described here any more.
Do you know which particular commit fixed it (is there a unit test for this special case?).
## Comment 21704
Date: 2015-12-31 02:13:47 +0100
From: @sjoerdmullender
(In reply to Kevin Boulain from comment 7)
> Do you know which particular commit fixed it (is there a unit test for this
> special case?).
According to hg bisect, that was changeset [93e7f9dbca06](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=93e7f9dbca06)
| savepoints may crash the database | https://api.github.com/repos/MonetDB/MonetDB/issues/3840/comments | 0 | 2020-11-30T13:18:51Z | 2024-06-27T12:09:18Z | https://github.com/MonetDB/MonetDB/issues/3840 | 753,471,724 | 3,840 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-10-27 16:35:03 +0100
From: @yzchang
To: clients devs <<bugs-clients>>
Version: -- development
CC: @yzchang
Last updated: 2020-11-13 08:51:18 +0100
## Comment 21412
Date: 2015-10-27 16:35:03 +0100
From: @yzchang
Run the following queries in mclient:
CREATE TABLE bar (name CHAR(8) PRIMARY KEY);
CREATE TABLE foo (id INTEGER, barname CHAR(8));
ALTER TABLE foo ADD CONSTRAINT "fname" FOREIGN KEY ("barname") REFERENCES bar ("name") ON DELETE CASCADE;
\D
The final '\D' command will produce output like:
-- msqldump dump database Tue Oct 27 16:33:41 2015
-- MonetDB v11.21.10 (unreleased), 'jul2015'
START TRANSACTION;
SET SCHEMA "sys";
CREATE TABLE "sys"."bar" (
"name" CHAR(8) NOT NULL,
CONSTRAINT "bar_name_pkey" PRIMARY KEY ("name")
);
CREATE TABLE "sys"."foo" (
"id" INTEGER,
"barname" CHAR(8)
);
ALTER TABLE "sys"."foo" ADD CONSTRAINT "fname" FOREIGN KEY ("barname") REFERENCES "sys"."bar" ("name") ON DELETE CASCADE ON UPDATE (null);
COMMIT;
At the end of this output, the "ON UPDATE (null)" is of incorrect syntax. It should be "ON UPDATE SET NULL".
## Comment 21413
Date: 2015-10-27 16:38:17 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [09e0acbef025](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=09e0acbef025) made by Jennie Zhang <y.zhang@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=09e0acbef025](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=09e0acbef025)
Changeset description:
Added test for Bug #3839
## Comment 21414
Date: 2015-10-27 17:57:45 +0100
From: @yzchang
Ok, after some debugging, found why "ON UPDATE (null)" is printed: the "action" denoted in sys.keys for the column "fname" is 1:
sql>select * from sys.keys where name = 'fname';
+------+----------+------+-------+------+--------+
| id | table_id | type | name | rkey | action |
+======+==========+======+=======+======+========+
| 7380 | 7379 | 2 | fname | 7373 | 1 |
+------+----------+------+-------+------+--------+
Therefore, in dump_foreign_keys() (see dump.c), the value of the variable "action" is 1. Then, in the 'if' statement at line 380:
if (action > 0 &&
(on_update = (action >> 8) & 255) < NR_ACTIONS &&
on_update != 2 /* RESTRICT -- default */)
mnstr_printf(toConsole, " ON UPDATE %s",
actions[on_update]);
the conditions evaluate to TRUE, and on_update gets the value 0, which means the value of "actions[on_update]" is 0.
Hence, finally, a 'null' string is printed to "toConsole".
But I don't know if "action" contains correct value here, and what we should do in case of on_update == 0.
## Comment 21415
Date: 2015-10-28 09:10:49 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [191d9077e78b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=191d9077e78b) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=191d9077e78b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=191d9077e78b)
Changeset description:
Fix for bug #3839.
## Comment 21450
Date: 2015-11-03 10:18:40 +0100
From: @sjoerdmullender
Jul2015 SP1 has been released.
## Comment 21526
Date: 2015-11-16 15:59:51 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [b4182120820a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b4182120820a) made by Jennie Zhang <y.zhang@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b4182120820a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b4182120820a)
Changeset description:
Approve output of fixed Bug #3839
## Comment 28262
Date: 2020-11-13 08:51:18 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [96e4df23b1d9](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=96e4df23b1d9) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=96e4df23b1d9](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=96e4df23b1d9)
Changeset description:
Move test for bug #3839 to testdb.
| msqldump generates incorrect syntax ON UPDATE (null) | https://api.github.com/repos/MonetDB/MonetDB/issues/3839/comments | 0 | 2020-11-30T13:18:48Z | 2024-06-27T12:09:17Z | https://github.com/MonetDB/MonetDB/issues/3839 | 753,471,693 | 3,839 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-10-27 15:30:26 +0100
From: @yzchang
To: SQL devs <<bugs-sql>>
Version: 11.21.5 (Jul2015)
CC: @njnes, @yzchang
Last updated: 2016-01-15 11:37:47 +0100
## Comment 21410
Date: 2015-10-27 15:30:26 +0100
From: @yzchang
The following two query sets differ only in the use of parenthesis:
query set1: "SET (insiderange) = ("
query set2: "SET insiderange = ("
But query set1 correctly updates 1 tuple (the 2nd tuple), while query set2 incorrectly updates both tuples.
See the lined query results after each update.
This might be because, in query set 1, the assignment in the UPDATE stmt with parenthesis is a "subquery";
while in query set 2, the assignment in the UPDATE stmt without parenthesis is a "search_condition".
Only run the SELECT query in the assignment returns correct results.
-- query set 1: WITH parenthesis around "insiderange": UPDATE correctly updates one tuple
CREATE TABLE datepoint (mydate DATE, insiderange BOOLEAN DEFAULT FALSE, rangename CHAR(8));
INSERT INTO datepoint (mydate) VALUES ('2012-05-09');
INSERT INTO datepoint (mydate) VALUES ('2012-03-09');
CREATE TABLE daterange (startdate DATE, enddate DATE, name CHAR(8));
INSERT INTO daterange (startdate, enddate, name) VALUES ('2012-03-01','2012-03-31','A');
UPDATE datepoint
SET (insiderange) = (
SELECT TRUE
FROM (
SELECT startdate, enddate, name
FROM daterange
) AS B
WHERE datepoint.mydate >= B.startdate
AND datepoint.mydate <= B.enddate
);
sql>SELECT * FROM datepoint;
+------------+-------------+-----------+
| mydate | insiderange | rangename |
+============+=============+===========+
| 2012-05-09 | false | null |
| 2012-03-09 | true | null |
+------------+-------------+-----------+
2 tuples (1.442ms)
DROP TABLE datepoint;
DROP TABLE daterange;
-- query set 2: WITHOUT parenthesis around "insiderange": UPDATE updates too many tuples
CREATE TABLE datepoint (mydate DATE, insiderange BOOLEAN DEFAULT FALSE, rangename CHAR(8));
INSERT INTO datepoint (mydate) VALUES ('2012-05-09');
INSERT INTO datepoint (mydate) VALUES ('2012-03-09');
CREATE TABLE daterange (startdate DATE, enddate DATE, name CHAR(8));
INSERT INTO daterange (startdate, enddate, name) VALUES ('2012-03-01','2012-03-31','A');
UPDATE datepoint
SET insiderange = (
SELECT TRUE
FROM (
SELECT startdate, enddate, name
FROM daterange
) AS B
WHERE datepoint.mydate >= B.startdate
AND datepoint.mydate <= B.enddate
);
sql>SELECT * FROM datepoint;
+------------+-------------+-----------+
| mydate | insiderange | rangename |
+============+=============+===========+
| 2012-05-09 | true | null |
| 2012-03-09 | true | null |
+------------+-------------+-----------+
2 tuples (1.337ms)
DROP TABLE datepoint;
DROP TABLE daterange;
## Comment 21411
Date: 2015-10-27 15:32:41 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [48ad5fe96b49](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=48ad5fe96b49) made by Jennie Zhang <y.zhang@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=48ad5fe96b49](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=48ad5fe96b49)
Changeset description:
Added test for Bug #3838
## Comment 21423
Date: 2015-10-30 22:23:37 +0100
From: @njnes
both queries should always update 2 values. As there is not sub-part of the update limiting the rows. So when the select true query fails (is empty) a null
value should be 'set'. So both queries are wrong....
## Comment 21548
Date: 2015-11-17 21:05:34 +0100
From: @yzchang
Hai Niels, the subquery "(SELECT TRUE ...);" returns a single row:
sql>SELECT TRUE FROM ( SELECT startdate, enddate, name FROM daterange ) AS B, datepoint WHERE datepoint.mydate >= B.startdate AND datepoint.mydate <= B.enddate;
+--------------+
| single_value |
+==============+
| true |
+--------------+
1 tuple (3.240ms)
Then the queries are basically:
UPDATE datepoint SET (insiderange) = (SELECT TRUE);
UPDATE datepoint SET insiderange = (SELECT TRUE);
Shouldn't they update both records in DATEPOINT and set INSIDERANGE to TRUE?
## Comment 21591
Date: 2015-11-25 17:27:01 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [2153348bd11a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2153348bd11a) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=2153348bd11a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=2153348bd11a)
Changeset description:
fix bug #3838, ie handle outer joins with updates
## Comment 21598
Date: 2015-11-26 08:47:56 +0100
From: @njnes
fixed, ie added proper left joins.
| Update column with or without parenthesis produce different results | https://api.github.com/repos/MonetDB/MonetDB/issues/3838/comments | 0 | 2020-11-30T13:18:45Z | 2024-06-27T12:09:16Z | https://github.com/MonetDB/MonetDB/issues/3838 | 753,471,663 | 3,838 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-10-27 04:07:53 +0100
From: darkbluehacker
To: MonetDB5 devs <<bugs-monetdb5>>
Version: 11.21.19 (Jul2015-SP4)
CC: chenkaijiang, @mlkersten
Last updated: 2016-12-21 23:26:16 +0100
## Comment 21408
Date: 2015-10-27 04:07:53 +0100
From: darkbluehacker
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0
Build Identifier:
sql>select * from ods_ply_base left join (select * from ods_agent where business_end_date > now()) as bb on c_cmpny_agt_cde=bb.c_cha_cde;
81 T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS)
Missing separate debuginfos, use: debuginfo-install keyutils-libs-1.5.8-3.el7.x86_64 krb5-libs-1.12.2-15.el7_1.x86_64 libcom_err-1.42.9-7.el7.x86_64 libselinux-2.2.2-6.el7.x86_64 libxml2-2.9.1-5.el7_1.2.x86_64 ncurses-libs-5.9-13.20130511.el7.x86_64 openssl-libs-1.0.1e-42.el7.9.x86_64 pcre-8.32-14.el7.x86_64 readline-6.2-9.el7.x86_64 xz-libs-5.1.2-9alpha.el7.x86_64 zlib-1.2.7-13.el7.x86_64
(gdb) c
Continuing.
[New Thread 0x7f4603dfe700 (LWP 20663)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f46353e9700 (LWP 20592)]
incref (lock=<optimized out>, logical=<optimized out>, i=1567) at gdk_bbp.c:2156
2156 hp = bs->B.H->heap.parentid;
(gdb)
(gdb) bt
0 incref (lock=<optimized out>, logical=<optimized out>, i=1567) at gdk_bbp.c:2156
1 BBPincref (i=i@entry=1567, logical=logical@entry=0) at gdk_bbp.c:2221
2 0x00007f46477252a8 in BATdescriptor (i=1567) at ../../../gdk/gdk.h:2599
3 do_join (r1=0x7f37bc354d30, r2=0x7f37bc354d50, rid=<optimized out>, r2id=r2id@entry=0x0, slid=0x7f37bc207490, srid=0x7f37bc207490, op=op@entry=0, c1=c1@entry=0x0, c2=c2@entry=0x0,
li=li@entry=0, hi=hi@entry=0, nil_matches=nil_matches@entry=0x7f37bc2074b0 "", estimate=estimate@entry=0x7f37bc2074d0, joinfunc=0x7f464734cb20 <BATsubjoin>,
thetafunc=thetafunc@entry=0x0, bandfunc=bandfunc@entry=0x0, rangefunc=rangefunc@entry=0x0, funcname=funcname@entry=0x7f46477db3ef "algebra.subjoin", lid=<optimized out>)
at algebra.c:614
4 0x00007f464772808c in ALGsubjoin (r1=<optimized out>, r2=<optimized out>, lid=<optimized out>, rid=<optimized out>, slid=<optimized out>, srid=<optimized out>,
nil_matches=0x7f37bc2074b0 "", estimate=0x7f37bc2074d0) at algebra.c:681
5 0x00007f46476d6b84 in malCommandCall (stk=stk@entry=0x7f37bc207020, pci=pci@entry=0x7f46315dd260) at mal_interpreter.c:119
6 0x00007f46476d815b in runMALsequence (cntxt=<optimized out>, mb=<optimized out>, startpc=<optimized out>, stoppc=<optimized out>, stk=<optimized out>, env=env@entry=0x0,
pcicaller=pcicaller@entry=0x0) at mal_interpreter.c:655
7 0x00007f46476d9d0e in DFLOWworker (T=<optimized out>) at mal_dataflow.c:376
8 0x00007f4645481df5 in start_thread (arg=0x7f46353e9700) at pthread_create.c:308
9 0x00007f46451af1ad in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113
Reproducible: Always
### Steps to Reproduce:
1. define two table with below schema
CREATE TABLE ODS_PLY_BASE
(
C_PLY_NO text, -- VARCHAR2(30),
C_CMPNY_AGT_CDE text, -- VARCHAR2(14),
PK_PLY_BASE text, -- primary key, -- VARCHAR2(20) NOT NULL,
BUSINESS_BGN_DATE TIMESTAMP NOT NULL,
BUSINESS_END_DATE TIMESTAMP NOT NULL,
RECORD_BGN_DATE TIMESTAMP NOT NULL,
RECORD_END_DATE TIMESTAMP NOT NULL,
jkd_row_id bigserial,
C_PLY_APP_NO text NOT NULL, -- VARCHAR2(30) NOT NULL,
C_ORIG_PLY_NO text, -- VARCHAR2(30),
N_EDR_PRJ_NO NUMERIC(3) DEFAULT 0 NOT NULL,
C_PRN_TYPE text, -- VARCHAR2(20),
C_PRN_NO text, -- VARCHAR2(20),
C_PRN_END_NO text, -- VARCHAR2(20),
C_CARD_FROM text, -- VARCHAR2(20),
C_CARD_TO text, -- VARCHAR2(20),
C_PROD_NO text NOT NULL, -- VARCHAR2(4) NOT NULL,
C_DPT_CDE text NOT NULL, -- VARCHAR2(11) NOT NULL,
C_BSNS_TYP text, -- VARCHAR2(10),
C_BSNS_NEW text, -- VARCHAR2(10),
C_CMPNY_AGT_TYPE text, -- VARCHAR2(14),
-- c_cmpny_agt_cde moved up
C_BRKR_CDE text, -- VARCHAR2(14),
C_AGT_AGR_NO text, -- VARCHAR2(16),
N_SUB_CO_NO NUMERIC(2) DEFAULT 0,
C_AGT_AGR_NO1 text, -- VARCHAR2(16),
N_CMM_PROP DOUBLE,
C_SLS_CDE text, -- VARCHAR2(10),
C_SLS_TEL text, -- VARCHAR2(50),
C_CLIENT_NME text, -- VARCHAR2(100),
C_CLIENT_CDE text, -- VARCHAR2(14),
C_INDUSTRY text, -- VARCHAR2(10),
C_INDUSTRY_DETAIL text, -- VARCHAR2(10),
C_APP_NME text, -- VARCHAR2(100),
C_APP_CDE text, -- VARCHAR2(14),
C_APP_TEL text, -- VARCHAR2(50),
C_APP_CTCT_CNM text, -- VARCHAR2(50),
C_APP_ADDR text, -- VARCHAR2(100),
C_APP_ZIP text, -- VARCHAR2(6),
C_APP_CERT1 text, -- VARCHAR2(30),
C_SEX text, -- VARCHAR2(30),
N_AGE DOUBLE,
C_INSRNT_CNM text, -- VARCHAR2(100),
C_INSRNT_CDE text, -- VARCHAR2(14),
C_INSRNT_TEL text, -- VARCHAR2(50),
C_INSRNT_ADDR text, -- VARCHAR2(100),
C_INSRNT_CTCT_CNM text, -- VARCHAR2(100),
C_INSRNT_ZIP text, -- VARCHAR2(6),
C_INSRNT_CERT2 text, -- VARCHAR2(30),
C_BNFC_PRSN_NME text, -- VARCHAR2(100),
C_BNFC_CDE text, -- VARCHAR2(14),
C_BNFC_CERT3 text, -- VARCHAR2(30),
T_INSRNC_BGN_TM TIMESTAMP,
T_INSRNC_END_TM TIMESTAMP,
N_INSRNC_BETWEENDAYS NUMERIC(6),
T_NEXT_EDR_UNDR_TM TIMESTAMP,
T_EDR_BGN_TM TIMESTAMP,
T_EDR_END_TM TIMESTAMP,
T_APP_TM TIMESTAMP,
T_SIGN_TM TIMESTAMP,
C_AMT_CUR text, -- VARCHAR2(2),
N_AMT DOUBLE,
C_PRM_CUR text, -- VARCHAR2(2),
N_PRM DOUBLE,
N_EXCHANGE_RATE DOUBLE,
T_RATIO_TYPE text, -- VARCHAR2(10),
N_RATIO DOUBLE,
N_RATE DOUBLE,
N_CLM_LMT_SUM DOUBLE DEFAULT 0 NOT NULL,
N_NO_FEE DOUBLE,
N_NCLM_PROP DOUBLE,
N_KEEP_AMT DOUBLE,
C_STTL text, -- VARCHAR2(10),
C_STTL_DPT text, -- VARCHAR2(50),
C_CHE_CDE text, -- VARCHAR2(10),
C_SIGN_CDE text, -- VARCHAR2(10),
C_OPER_CDE text, -- VARCHAR2(10),
T_OPER_DATE TIMESTAMP,
C_UDR_MRK CHAR(1),
C_UDR_CDE text, -- VARCHAR2(10),
T_UDR_DATE TIMESTAMP,
C_UNDR_DPT text, -- VARCHAR2(11),
C_MAIN_PLY_APP_NO text, -- VARCHAR2(22),
C_OPR_TYP CHAR(1),
C_PRNT_TYP CHAR(1),
C_STA_PAY_FLG CHAR(1),
C_NEW_FLG CHAR(1),
C_INWARD CHAR(1),
C_GROUP_FLAG CHAR(1),
C_LISTORCOL_FLAG CHAR(1),
C_IMPOREXP_FLAG text, -- VARCHAR2(10),
C_SIGN_MRK CHAR(1) DEFAULT '0',
C_VIP_FLAG CHAR(1) DEFAULT '0',
C_BUSINESS_FLAG CHAR(1) DEFAULT '0 ' NOT NULL,
C_INTERCON_FLAG CHAR(1) DEFAULT '0',
C_BINDER_FLAG CHAR(1) DEFAULT '0',
C_UNUSED_PROD text, -- VARCHAR2(4),
C_ORIG_FLG CHAR(1),
C_REINSRC_FLG CHAR(1) DEFAULT '0',
C_COINSRNC_FLG CHAR(1),
C_CONINSRNC_CDE text, -- VARCHAR2(2),
C_DEC_FLG CHAR(1),
C_LONG_FLG CHAR(1),
C_SPLIT_MRK CHAR(1) DEFAULT '0',
C_RISK_LVL_CDE text, -- VARCHAR2(6),
C_TAX_FLAG CHAR(1) DEFAULT '0',
C_AGRI_TYPE text, -- VARCHAR2(10),
C_FININS_RETURN_MRK CHAR(1),
N_SAVE_FEE DOUBLE,
N_SALVA_FUND DOUBLE,
C_ORIG_AMT_CUR text, -- VARCHAR2(2),
N_ORIGAMT_EXCHRATE DOUBLE,
N_ORIG_AMT DOUBLE,
C_ORIG_PRM_CUR text, -- VARCHAR2(2),
N_ORIGPRM_EXCHRATE DOUBLE,
N_ORIG_PRM DOUBLE,
N_ORIG_AMTPRM_EXCH DOUBLE,
ROW_ID text, -- VARCHAR2(30),
C_APPNT text, -- VARCHAR2(3999),
C_REMARK text, -- VARCHAR2(3999),
C_CRT_CDE text DEFAULT 'USER ' NOT NULL, -- VARCHAR2(30) DEFAULT 'USER ' NOT NULL,
T_CRT_TM TIMESTAMP DEFAULT now() NOT NULL,
C_UPD_CDE text DEFAULT 'USER ' NOT NULL, -- VARCHAR2(30) DEFAULT 'USER ' NOT NULL,
T_UPD_TM TIMESTAMP DEFAULT now() NOT NULL,
-- 4 date fields moved up
SOURCE_SYSTEM_FLAG text NOT NULL, -- VARCHAR2(10) NOT NULL,
C_LCR_FLAG CHAR(1),
C_AGENCY_PROF_ID text, -- VARCHAR2(26),
C_AGENCY_NME text, -- VARCHAR2(20),
C_CLAUS_CDE text, -- VARCHAR2(10),
C_CUST_TYPE CHAR(1),
C_BIZ_NO text, -- VARCHAR2(20),
C_BIZ_CDE text, -- VARCHAR2(11),
C_BIZ_CERT_TYPE text, -- VARCHAR2(4),
C_BIZ_CERT_NO text, -- VARCHAR2(20),
C_SALEGRP_CDE text, -- VARCHAR2(11),
C_REG_FLG CHAR(1),
C_FAX_NO text, -- VARCHAR2(20),
C_REINSRNT_CDE text, -- VARCHAR2(8),
C_CNTCT_PRSN_NME text, -- VARCHAR2(20),
C_CNTCT_PRSN_TEL text, -- VARCHAR2(50),
C_EMAIL text, -- VARCHAR2(30),
N_AMT_RMB_RATE DOUBLE,
N_PRM_RMB_RATE DOUBLE,
N_RET_PROP DOUBLE,
C_ACCT_CUR text, -- VARCHAR2(2),
N_EXCHANGE_RATE2 DOUBLE,
N_RI_AMT DOUBLE,
N_RI_COMM DOUBLE,
T_RI_MDY_TM TIMESTAMP,
N_RI_KEEP_AMT DOUBLE,
C_REG_ADDR text, -- VARCHAR2(100),
N_CONT_QUOTA NUMERIC,
C_PREPAY_FLG CHAR(1)
-- CONSTRAINT PK_PLY_BASE PRIMARY KEY (PK_PLY_BASE)
);
create index ODS_PLY_BASE_PK_PLY_BASE on ODS_PLY_BASE (PK_PLY_BASE);
create index ODS_PLY_BASE_C_CMPNY_AGT_CDE on ODS_PLY_BASE (C_CMPNY_AGT_CDE);
create index ODS_PLY_BASE_BUSINESS_BGN_DATE on ODS_PLY_BASE (BUSINESS_BGN_DATE);
create index ODS_PLY_BASE_BUSINESS_END_DATE on ODS_PLY_BASE (BUSINESS_END_DATE);
create index ODS_PLY_BASE_c_dpt_cde on ODS_PLY_BASE (c_dpt_cde);
create index ODS_PLY_BASE_C_PLY_NO on ODS_PLY_BASE (C_PLY_NO);
CREATE TABLE ODS_AGENT
(
C_CHA_CDE text not null, -- VARCHAR2(14) NOT NULL,
PK_AGENT text primary key, -- VARCHAR2(20) NOT NULL,
BUSINESS_BGN_DATE TIMESTAMP NOT NULL,
BUSINESS_END_DATE TIMESTAMP NOT NULL,
RECORD_BGN_DATE TIMESTAMP NOT NULL,
RECORD_END_DATE TIMESTAMP NOT NULL,
C_CHA_NME text, -- VARCHAR2(100),
C_CHA_ABBR text, -- VARCHAR2(20),
C_ENG_NME text, -- VARCHAR2(100),
C_ENG_ABBR text, -- VARCHAR2(20),
C_CHA_CLS text, -- VARCHAR2(10),
C_CHA_TYPE text, -- VARCHAR2(10),
C_CHA_LVL text, -- VARCHAR2(10),
C_DPT_CDE text, -- VARCHAR2(20),
C_CHA_MRK char, -- CHAR(1),
C_QLFT_NO text, -- VARCHAR2(40),
C_BSNS_NO text, -- VARCHAR2(40),
T_BIRTHDAY TIMESTAMP,
C_SEX text, -- VARCHAR2(10),
C_EDU_CDE text, -- VARCHAR2(10),
C_MAJOR_CDE text, -- VARCHAR2(10),
C_TITLE_CDE text, -- VARCHAR2(20),
C_DUTY text, -- VARCHAR2(20),
C_CERTF_CLS text, -- VARCHAR2(10),
C_CERTF_NO text, -- VARCHAR2(30),
C_WORK_ADDR text, -- VARCHAR2(100),
C_WEB_ADDR text, -- VARCHAR2(100),
C_MOBILE text, -- VARCHAR2(11),
C_TEL text, -- VARCHAR2(50),
C_FAX text, -- VARCHAR2(20),
C_MAIL text, -- VARCHAR2(30),
C_ADDR text, -- VARCHAR2(100),
C_ZIP_CDE text, -- VARCHAR2(6),
C_BAD_RCRD text, -- VARCHAR2(500),
C_TRA_CDE text, -- VARCHAR2(10),
N_AGENT_NUM NUMERIC(10), -- NUMBER(10),
C_LICENSE text, -- VARCHAR2(40),
C_CHIEF text, -- VARCHAR2(32),
C_CNT_PRSN_CDE text, -- VARCHAR2(12),
C_ARA_CDE text, -- VARCHAR2(30),
C_FRONT_BACK_MRK text not null, -- VARCHAR2(10) NOT NULL,
C_AUTH_MRK char, -- CHAR(1),
C_BANK_NME text, -- VARCHAR2(50),
C_BANK_ACCOUNT text, -- VARCHAR2(30),
C_CREDIT text, -- VARCHAR2(10),
C_RGST_ADDR text, -- VARCHAR2(100),
C_CRT_CDE text default 'USER' not null, -- VARCHAR2(30) DEFAULT 'USER ' NOT NULL,
T_CRT_TM TIMESTAMP DEFAULT now() NOT NULL,
C_UPD_CDE text default 'USER' not null, -- VARCHAR2(30) DEFAULT 'USER ' NOT NULL,
T_UPD_TM TIMESTAMP DEFAULT now() NOT NULL,
T_ADB_TM TIMESTAMP,
C_REMARK text, -- VARCHAR2(500),
C_UPT_DPT_CDE text, -- VARCHAR2(20),
C_SLS_CDE text, -- VARCHAR2(10),
C_GRNT_CDE1 text, -- VARCHAR2(10),
C_GRNT_CDE2 text, -- VARCHAR2(10),
C_STOCK_BACK text, -- VARCHAR2(200),
N_EMPL_NUM NUMERIC(6), -- NUMBER(6),
C_ORG_STRU text, -- VARCHAR2(600),
N_REGIT_FUND DOUBLE, -- NUMBER(20,2),
C_STATUS char default '0', -- CHAR(1) DEFAULT '0',
T_QUALEND_TM TIMESTAMP,
-- 4 date fiels moved up
SOURCE_SYSTEM_FLAG text not null, -- VARCHAR2(10) NOT NULL,
C_REG_USBKEY text, -- VARCHAR2(50),
CHACAT text, -- VARCHAR2(10),
C_CLAIM_NAME text, -- VARCHAR2(15),
C_CLAIM_TEL text, -- VARCHAR2(15),
C_RESOURCES text, -- VARCHAR2(10),
C_CHA_COMPANY text, -- VARCHAR2(10),
C_CHA_URL text, -- VARCHAR2(255),
C_CHA_TEL text, -- VARCHAR2(50),
C_RECENAME text, -- VARCHAR2(120),
C_CORE_CHANNEL text -- VARCHAR2(10)
-- CONSTRAINT PK_AGENT PRIMARY KEY (PK_AGENT)
);
create index ODS_AGENT_c_cha_cde on ODS_AGENT(c_cha_cde);
create index ODS_AGENT_BUSINESS_BGN_DATE on ODS_AGENT (BUSINESS_BGN_DATE);
create index ODS_AGENT_BUSINESS_END_DATE on ODS_AGENT (BUSINESS_END_DATE);
2. ods_ply_base has about 50,000,000 records, ods_agent has about 10,000 records.
3. run below command after mclient connect to database. Then mserver5 exit with SIGSEGV fault.
sql>select * from ods_ply_base left join (select * from ods_agent where business_end_date > now()) as bb on c_cmpny_agt_cde=bb.c_cha_cde;
### Expected Results:
mserver5 should not exit.
sql fininsh successfully.
ods_ply_base is too big to provide data for reproduce the bug.
csv file for ods_ply_bas is about 60G, csv for ods_agent is about 60M.
## Comment 21593
Date: 2015-11-25 22:12:48 +0100
From: @mlkersten
Is this still the case? There were a number of possible critical issues solved in the SP-1.
Note, loading a 90GB textual bases could lead to a large disk footprint, unless the strings are mostly duplicates (the dictionary compression kicks in).
I would definitely try it in a few steps, e.g. 1M, 10 M, 25M, 50M rows.
## Comment 21599
Date: 2015-11-26 09:12:55 +0100
From: Kaijiang <<chenkaijiang>>
Dear Martin, it is still the case in 2015 Jul SP1.
We tried it again and its core dump file shows the call stack like this:
[Switching to Thread 0x7f289e1f0700 (LWP 47856)]
0x00007f2a1041e7fa in hashjoin (r1=0x7f285c003120, r2=0x7f285c003940, l=0x7f285c003b20, r=0x7f27f0051600, sl=0x0, sr=0x0, nil_matches=0, nil_on_miss=0, semi=0, must_match=0, maxsize=31405) at gdk_join.c:2079
2079 HASHLOOPBODY();
(gdb) bt
0 0x00007f2a1041e7fa in hashjoin (r1=0x7f285c003120, r2=0x7f285c003940, l=0x7f285c003b20, r=0x7f27f0051600, sl=0x0, sr=0x0, nil_matches=0, nil_on_miss=0, semi=0, must_match=0, maxsize=31405) at gdk_join.c:2079
1 0x00007f2a10425fa4 in BATsubjoin (r1p=0x7f289e1ef7d8, r2p=0x7f289e1ef7d0, l=0x7f285c003b20, r=0x7f27f0051600, sl=0x0, sr=0x0, nil_matches=0, estimate=9223372036854775807) at gdk_join.c:3068
2 0x00007f2a10829baa in do_join (r1=0x7f29fc6964b0, r2=0x7f29fc6964d0, lid=0x7f29fc695430, rid=0x7f29fc65dd50, r2id=0x0, slid=0x7f29fc65dd70, srid=0x7f29fc65dd70, op=0, c1=0x0, c2=0x0, li=0, hi=0, nil_matches=0x7f29fc65dd90 "",
estimate=0x7f29fc65ddb0, joinfunc=0x7f2a10425579 <BATsubjoin>, thetafunc=0x0, bandfunc=0x0, rangefunc=0x0, funcname=0x7f2a10926bb2 "algebra.subjoin") at algebra.c:636
3 0x00007f2a10829eca in ALGsubjoin (r1=0x7f29fc6964b0, r2=0x7f29fc6964d0, lid=0x7f29fc695430, rid=0x7f29fc65dd50, slid=0x7f29fc65dd70, srid=0x7f29fc65dd70, nil_matches=0x7f29fc65dd90 "", estimate=0x7f29fc65ddb0) at algebra.c:683
4 0x00007f2a107c0b22 in malCommandCall (stk=0x7f29fc65cf40, pci=0x7f29fc4c1fc0) at mal_interpreter.c:119
5 0x00007f2a107c2d92 in runMALsequence (cntxt=0x7f2a06303328, mb=0x7f29fc135c40, startpc=1571, stoppc=1572, stk=0x7f29fc65cf40, env=0x0, pcicaller=0x0) at mal_interpreter.c:655
6 0x00007f2a107c5f55 in DFLOWworker (T=0x7f2a10b5eb40 <workers+1472>) at mal_dataflow.c:376
7 0x00007f2a0e385df5 in start_thread () from /lib64/libpthread.so.0
8 0x00007f2a0e0b31ad in clone () from /lib64/libc.so.6
Since we couldn't send the data, we first try to locate the problem and fix the bug by ourselves.
## Comment 21600
Date: 2015-11-26 09:15:47 +0100
From: Kaijiang <<chenkaijiang>>
More, the server has 256G memory, which is definitely sufficient for 90G data (or else, it is another bug :-) )
## Comment 21602
Date: 2015-11-27 11:21:18 +0100
From: Kaijiang <<chenkaijiang>>
Created attachment 374
bug fix of the gdk_join.c
We fix the bug. Please compare the attached gdk_join_fix.c with the gdk/gdk_join.c on 2015 Jul SP1 (11.21.11).
The bug is that in hashjoin function, when r1 or r2 is trying to grow the size:
newcap = BATgrows(r1); \
if (newcap > maxsize) \
newcap = maxsize; \
The newcap is limited by maxsize. But maxsize is too small and thus r1 & r2 fail to grow. The consequence is buffer overrun.
My fix is:
/* limited by maxsize. BUT, make sure it really GROWS LARGER!!! */ \
if (newcap > maxsize && maxsize > BATcapacity(r1) + BATcapacity(r1) / 2) \
newcap = maxsize; \
Maybe you still need to check similar problems in other functions.
> Attached file: [gdk_join_fix.c](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3837_gdk_join_fix.c_374) (text/plain, 102590 bytes)
> Description: bug fix of the gdk_join.c
## Comment 21603
Date: 2015-11-27 11:26:12 +0100
From: Kaijiang <<chenkaijiang>>
I think the maxsize should be only an estimation. Should NOT be a size limit.
## Comment 21604
Date: 2015-11-27 13:03:07 +0100
From: @sjoerdmullender
(In reply to Kaijiang from comment 5)
> I think the maxsize should be only an estimation. Should NOT be a size limit.
No. Maxsize is supposed to be the absolute maximum size the result could possibly be. If it is too small, then the calculation of maxsize in this particular case is wrong.
So this begs the question which branches of the code is being taken in the function joininitresults that calculates maxsize.
When the crash occurs, what are the values of
*l->S
*l->H
*l->T
*r->S
*r->H
*r->T
lstart
lend
lo
nil_matches
nil_on_miss
semi
maxsize
## Comment 21605
Date: 2015-11-27 13:41:48 +0100
From: @sjoerdmullender
The problem could potentially also be earlier. If the properties of the BATs involved are incorrect, then incorrect conclusions can be drawn by the code calculating maxsize. In order to find this out, please run mserver5 with the option -d10 . This will slow down processing a little, because the server will check whether properties are set correctly.
## Comment 21606
Date: 2015-11-27 15:27:58 +0100
From: Kaijiang <<chenkaijiang>>
(In reply to Sjoerd Mullender from comment 6)
> (In reply to Kaijiang from comment 5)
> > I think the maxsize should be only an estimation. Should NOT be a size limit.
>
> No. Maxsize is supposed to be the absolute maximum size the result could
> possibly be. If it is too small, then the calculation of maxsize in this
> particular case is wrong.
>
> So this begs the question which branches of the code is being taken in the
> function joininitresults that calculates maxsize.
>
> When the crash occurs, what are the values of
> *l->S
> *l->H
> *l->T
> *r->S
> *r->H
> *r->T
> lstart
> lend
> lo
> nil_matches
> nil_on_miss
> semi
> maxsize
If the maxsize is really a limit, then the hashjoin function should throw an error when the maxsize is smaller than the necessary space.
For the above values, let me try it again and reply to you.
## Comment 21607
Date: 2015-11-27 15:43:42 +0100
From: Kaijiang <<chenkaijiang>>
(In reply to Kaijiang from comment 8)
> (In reply to Sjoerd Mullender from comment 6)
> > (In reply to Kaijiang from comment 5)
> > > I think the maxsize should be only an estimation. Should NOT be a size limit.
> >
> > No. Maxsize is supposed to be the absolute maximum size the result could
> > possibly be. If it is too small, then the calculation of maxsize in this
> > particular case is wrong.
> >
> > So this begs the question which branches of the code is being taken in the
> > function joininitresults that calculates maxsize.
> >
> > When the crash occurs, what are the values of
> > *l->S
> > *l->H
> > *l->T
> > *r->S
> > *r->H
> > *r->T
> > lstart
> > lend
> > lo
> > nil_matches
> > nil_on_miss
> > semi
> > maxsize
>
> If the maxsize is really a limit, then the hashjoin function should throw an
> error when the maxsize is smaller than the necessary space.
>
> For the above values, let me try it again and reply to you.
When crash occurs (without -d10 option), those values:
(gdb) p *l->S
$1 = {tid = 140736923117313, stamp = 1120, copiedtodisk = 0, dirty = 1, dirtyflushed = 0, descdirty = 1,
restricted = 1, persistence = 1, role = 1, unused = 0, sharecnt = 0, map_head = 0 '\000', map_tail = 0 '\000',
map_hheap = 0 '\000', map_theap = 0 '\000', deleted = 0, first = 0, inserted = 0, count = 1112116,
capacity = 1112116}
(gdb) p *l->H
$2 = {id = 0x7ffff7630e45 "h", width = 0, type = 0 '\000', shift = 0 '\000', varsized = 1, key = 1, dense = 1,
nonil = 1, nil = 0, sorted = 1, revsorted = 0, align = 0, nokey = {0, 0}, nosorted = 0, norevsorted = 1,
nodense = 0, seq = 6672696, heap = {free = 0, size = 0, base = 0x0, filename = 0x0, copied = 0, hashash = 0,
forcemap = 0, storage = STORE_MEM, newstorage = STORE_MEM, dirty = 0 '\000', farmid = 0 '\000',
parentid = 0}, vheap = 0x0, hash = 0x0, imprints = 0x0, props = 0x0}
(gdb) p *l->T
$3 = {id = 0x7ffff7630e47 "t", width = 4, type = 13 '\r', shift = 2 '\002', varsized = 1, key = 1, dense = 0,
nonil = 0, nil = 0, sorted = 0, revsorted = 0, align = 1031935, nokey = {0, 1}, nosorted = 5, norevsorted = 4,
nodense = 0, seq = 0, heap = {free = 4448464, size = 4448464, base = 0x7fff08dc44e0 "\340\033I\001p",
filename = 0x7fffe4137d40 "01/122.tail", copied = 0, hashash = 0, forcemap = 0, storage = STORE_MMAP,
newstorage = STORE_MMAP, dirty = 0 '\000', farmid = 0 '\000', parentid = -82}, vheap = 0x60c770, hash = 0x0,
imprints = 0x0, props = 0x0}
(gdb) p *r->S
$4 = {tid = 140734917203713, stamp = 1294, copiedtodisk = 0, dirty = 1, dirtyflushed = 0, descdirty = 1,
restricted = 1, persistence = 1, role = 1, unused = 0, sharecnt = 0, map_head = 0 '\000', map_tail = 0 '\000',
map_hheap = 0 '\000', map_theap = 0 '\000', deleted = 0, first = 0, inserted = 0, count = 31405,
capacity = 31488}
(gdb) p *r->H
$5 = {id = 0x7ffff7630e45 "h", width = 0, type = 0 '\000', shift = 0 '\000', varsized = 1, key = 1, dense = 1,
nonil = 1, nil = 0, sorted = 1, revsorted = 0, align = 0, nokey = {0, 0}, nosorted = 0, norevsorted = 0,
nodense = 0, seq = 0, heap = {free = 0, size = 0, base = 0x0, filename = 0x0, copied = 0, hashash = 0,
forcemap = 0, storage = STORE_MEM, newstorage = STORE_MEM, dirty = 0 '\000', farmid = 0 '\000',
parentid = 0}, vheap = 0x0, hash = 0x0, imprints = 0x0, props = 0x0}
(gdb) p *r->T
$6 = {id = 0x7ffff7630e47 "t", width = 4, type = 13 '\r', shift = 2 '\002', varsized = 1, key = 0, dense = 0,
nonil = 1, nil = 0, sorted = 0, revsorted = 0, align = 1130489, nokey = {0, 0}, nosorted = 0, norevsorted = 0,
nodense = 0, seq = 0, heap = {free = 125620, size = 125952, base = 0x7fff2c05cb50 "\020 ",
filename = 0x7fff2c05cb20 "02/244.tail", copied = 0, hashash = 0, forcemap = 0, storage = STORE_MEM,
newstorage = STORE_MEM, dirty = 0 '\000', farmid = 0 '\000', parentid = 0}, vheap = 0x6b4190,
hash = 0x7fff7807f2a0, imprints = 0x0, props = 0x0}
(gdb) p lstart
$7 = 39589
(gdb) p lend
$8 = 1112116
(gdb) p lo
$9 = 6712284
(gdb) p nil_matches
$10 = 0
(gdb) p nil_on_miss
$11 = 0
(gdb) p semi
$12 = 0
(gdb) p maxsize
$13 = 31405
More, r1 & r2 (note that r1->S->count > r1->S->capacity):
(gdb) p *r1->S
$14 = {tid = 140736935724801, stamp = 1298, copiedtodisk = 0, dirty = 1, dirtyflushed = 0, descdirty = 1,
restricted = 0, persistence = 1, role = 1, unused = 0, sharecnt = 0, map_head = 0 '\000', map_tail = 0 '\000',
map_hheap = 0 '\000', map_theap = 0 '\000', deleted = 0, first = 0, inserted = 0, count = 31495,
capacity = 31488}
(gdb) p *r1->H
$15 = {id = 0x7ffff7630e45 "h", width = 0, type = 0 '\000', shift = 0 '\000', varsized = 1, key = 1, dense = 0,
nonil = 1, nil = 0, sorted = 1, revsorted = 1, align = 0, nokey = {0, 0}, nosorted = 0, norevsorted = 0,
nodense = 0, seq = 0, heap = {free = 0, size = 0, base = 0x0, filename = 0x0, copied = 0, hashash = 0,
forcemap = 0, storage = STORE_MEM, newstorage = STORE_MEM, dirty = 0 '\000', farmid = 0 '\000',
parentid = 0}, vheap = 0x0, hash = 0x0, imprints = 0x0, props = 0x0}
(gdb) p *r1->T
$16 = {id = 0x7ffff7630e47 "t", width = 8, type = 6 '\006', shift = 3 '\003', varsized = 0, key = 0, dense = 0,
nonil = 1, nil = 0, sorted = 1, revsorted = 0, align = 1130497, nokey = {0, 0}, nosorted = 0, norevsorted = 0,
nodense = 0, seq = 0, heap = {free = 251904, size = 251904, base = 0x7fffb8003f60 "8\321e",
filename = 0x7fffb8003c30 "05/565.tail", copied = 0, hashash = 0, forcemap = 0, storage = STORE_MEM,
newstorage = STORE_MEM, dirty = 0 '\000', farmid = 0 '\000', parentid = 0}, vheap = 0x0, hash = 0x0,
imprints = 0x0, props = 0x0}
(gdb) p *r2->S
$17 = {tid = 140736935724801, stamp = 1347, copiedtodisk = 0, dirty = 1, dirtyflushed = 0, descdirty = 1,
restricted = 0, persistence = 1, role = 1, unused = 0, sharecnt = 0, map_head = 0 '\000', map_tail = 0 '\000',
map_hheap = 0 '\000', map_theap = 0 '\000', deleted = 0, first = 0, inserted = 0, count = 31495,
capacity = 31488}
(gdb) p *r2->H
$18 = {id = 0x0, width = 0, type = 0 '\000', shift = 0 '\000', varsized = 0, key = 0, dense = 0, nonil = 0,
nil = 0, sorted = 0, revsorted = 0, align = 0, nokey = {0, 7137720524754386944},
nosorted = 936749822013079543, norevsorted = 1123694286517358848, nodense = 0, seq = 0, heap = {free = 0,
size = 0, base = 0x0, filename = 0x0, copied = 0, hashash = 0, forcemap = 0, storage = STORE_MEM,
newstorage = STORE_MEM, dirty = 0 '\000', farmid = 0 '\000', parentid = 0}, vheap = 0x0, hash = 0x0,
imprints = 0x0, props = 0x0}
(gdb) p *r2->T
$19 = {id = 0x0, width = 0, type = 0 '\000', shift = 0 '\000', varsized = 0, key = 0, dense = 0, nonil = 0,
nil = 0, sorted = 0, revsorted = 0, align = 0, nokey = {0, 17826107448168022016}, nosorted = 3659178992238591,
norevsorted = 4389430806708433, nodense = 0, seq = 0, heap = {free = 0, size = 0, base = 0x0, filename = 0x0,
copied = 0, hashash = 0, forcemap = 0, storage = STORE_MEM, newstorage = STORE_MEM, dirty = 0 '\000',
farmid = 1 '\001', parentid = 0}, vheap = 0x0, hash = 0x0, imprints = 0x0, props = 0x0}
It's at night at our time. Please reply ASAP if you need more info.
## Comment 21608
Date: 2015-11-27 15:54:06 +0100
From: Kaijiang <<chenkaijiang>>
(In reply to Sjoerd Mullender from comment 7)
> The problem could potentially also be earlier. If the properties of the
> BATs involved are incorrect, then incorrect conclusions can be drawn by the
> code calculating maxsize. In order to find this out, please run mserver5
> with the option -d10 . This will slow down processing a little, because the
> server will check whether properties are set correctly.
I start the server as: mserver5 --dbpath=/home/zwtc/yul/monetdb --set mapi_port=50001 -d10
it first outputs:
builtin opt gdk_dbpath = /usr/local/var/monetdb5/dbfarm/demo
builtin opt gdk_debug = 0
builtin opt gdk_vmtrim = no
builtin opt monet_prompt = >
builtin opt monet_daemon = no
builtin opt mapi_port = 50000
builtin opt mapi_open = false
builtin opt mapi_autosense = false
builtin opt sql_optimizer = default_pipe
builtin opt sql_debug = 0
cmdline opt gdk_dbpath = /home/zwtc/yul/monetdb
cmdline opt mapi_port = 50001
cmdline opt gdk_debug = 10
!WARNING: gdk_bat.c:2958: assertion `!b->hkey' failed
then it keeps saying:
!WARNING: gdk_bat.c:2958: assertion `!b->hkey' failed
and I have to kill it before it's done.
## Comment 21609
Date: 2015-11-27 15:55:18 +0100
From: Kaijiang <<chenkaijiang>>
(In reply to Kaijiang from comment 10)
> (In reply to Sjoerd Mullender from comment 7)
> > The problem could potentially also be earlier. If the properties of the
> > BATs involved are incorrect, then incorrect conclusions can be drawn by the
> > code calculating maxsize. In order to find this out, please run mserver5
> > with the option -d10 . This will slow down processing a little, because the
> > server will check whether properties are set correctly.
>
> I start the server as: mserver5 --dbpath=/home/zwtc/yul/monetdb --set
> mapi_port=50001 -d10
>
> it first outputs:
> builtin opt gdk_dbpath = /usr/local/var/monetdb5/dbfarm/demo
> builtin opt gdk_debug = 0
> builtin opt gdk_vmtrim = no
> builtin opt monet_prompt = >
> builtin opt monet_daemon = no
> builtin opt mapi_port = 50000
> builtin opt mapi_open = false
> builtin opt mapi_autosense = false
> builtin opt sql_optimizer = default_pipe
> builtin opt sql_debug = 0
> cmdline opt gdk_dbpath = /home/zwtc/yul/monetdb
> cmdline opt mapi_port = 50001
> cmdline opt gdk_debug = 10
> !WARNING: gdk_bat.c:2958: assertion `!b->hkey' failed
>
> then it keeps saying:
> !WARNING: gdk_bat.c:2958: assertion `!b->hkey' failed
>
> and I have to kill it before it's done.
The above is output from stderr. In stdin, it is:
MonetDB 5 server v11.21.11 "Jul2015-SP1"
Serving database 'monetdb', using 48 threads
Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs and 128bit integers dynamically linked
Found 251.624 GiB available main-memory.
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
Listening for connection requests on mapi:monetdb://127.0.0.1:50001/
Start processing logs sql/sql_logs version 52200
Start reading the write-ahead log 'sql_logs/sql/log.14'
Finished reading the write-ahead log 'sql_logs/sql/log.14'
Finished processing logs sql/sql_logs
MonetDB/SQL module loaded
## Comment 21610
Date: 2015-11-27 16:22:41 +0100
From: @sjoerdmullender
(In reply to Kaijiang from comment 10)
> !WARNING: gdk_bat.c:2958: assertion `!b->hkey' failed
This is the real problem. Acoording to your comment 9, the left bat has a unique tail, but in reality it doesn't. The warning above says that the "key" property is set when it shouldn't be.
The join code just believes the property and reasons that when the left column has all unique values, then each value in the right column can only match at most one value in the left, and therefore the output cannot be larger than the right column (which is 31405, exactly what maxsize is set to).
In order to debug this further, can you recompile MonetDB with assertions enabled (configure with the --enable-assert flag). Then rerun the server with the -d10 option under gdb. When the server hits the assertion, print the stack trace.
If you can't recompile, you need to run under the debugger and set a breakpoint on line 2958 of the file gdk_bat.c (see the assert--this is in the function BATassertHeadProps) and set a condition on the breakpoint:
cond N b->H->key
where N is the breakpoint number.
When the breakpoint hits, print the stack trace.
## Comment 21611
Date: 2015-11-27 16:37:54 +0100
From: Kaijiang <<chenkaijiang>>
(In reply to Sjoerd Mullender from comment 12)
> (In reply to Kaijiang from comment 10)
> > !WARNING: gdk_bat.c:2958: assertion `!b->hkey' failed
>
> This is the real problem. Acoording to your comment 9, the left bat has a
> unique tail, but in reality it doesn't. The warning above says that the
> "key" property is set when it shouldn't be.
>
> The join code just believes the property and reasons that when the left
> column has all unique values, then each value in the right column can only
> match at most one value in the left, and therefore the output cannot be
> larger than the right column (which is 31405, exactly what maxsize is set
> to).
>
> In order to debug this further, can you recompile MonetDB with assertions
> enabled (configure with the --enable-assert flag). Then rerun the server
> with the -d10 option under gdb. When the server hits the assertion, print
> the stack trace.
>
> If you can't recompile, you need to run under the debugger and set a
> breakpoint on line 2958 of the file gdk_bat.c (see the assert--this is in
> the function BATassertHeadProps) and set a condition on the breakpoint:
> cond N b->H->key
> where N is the breakpoint number.
> When the breakpoint hits, print the stack trace.
Done with your 2nd approach. Call stack:
Breakpoint 1, BATassertHeadProps (b=0x7fff1c003800) at gdk_bat.c:2958
2958 assert(!b->hkey);
(gdb) bt
0 BATassertHeadProps (b=0x7fff1c003800) at gdk_bat.c:2958
1 0x00007ffff7463341 in BATassertProps (b=0x7fff1c0037e0) at gdk_bat.c:3034
2 0x00007ffff734a098 in BBPkeepref (i=93) at gdk_bbp.c:2392
3 0x00007fffeceee5ba in mvc_bind_wrap (cntxt=0x7fffed4cf328, mb=0x7fffe412acc0, stk=0x7fffe41d97f0,
pci=0x7fffe4186b70) at sql.c:1847
4 0x00007ffff798ed73 in runMALsequence (cntxt=0x7fffed4cf328, mb=0x7fffe412acc0, startpc=330, stoppc=331,
stk=0x7fffe41d97f0, env=0x0, pcicaller=0x0) at mal_interpreter.c:631
5 0x00007ffff7991f55 in DFLOWworker (T=0x7ffff7d2b0c0 <workers+2880>) at mal_dataflow.c:376
6 0x00007ffff5551df5 in start_thread () from /lib64/libpthread.so.0
7 0x00007ffff527f1ad in clone () from /lib64/libc.so.6
Anymore? reply ASAP. Let me take a bath first
## Comment 21612
Date: 2015-11-27 16:40:17 +0100
From: Kaijiang <<chenkaijiang>>
(In reply to Kaijiang from comment 13)
> (In reply to Sjoerd Mullender from comment 12)
> > (In reply to Kaijiang from comment 10)
> > > !WARNING: gdk_bat.c:2958: assertion `!b->hkey' failed
> >
> > This is the real problem. Acoording to your comment 9, the left bat has a
> > unique tail, but in reality it doesn't. The warning above says that the
> > "key" property is set when it shouldn't be.
> >
> > The join code just believes the property and reasons that when the left
> > column has all unique values, then each value in the right column can only
> > match at most one value in the left, and therefore the output cannot be
> > larger than the right column (which is 31405, exactly what maxsize is set
> > to).
> >
> > In order to debug this further, can you recompile MonetDB with assertions
> > enabled (configure with the --enable-assert flag). Then rerun the server
> > with the -d10 option under gdb. When the server hits the assertion, print
> > the stack trace.
> >
> > If you can't recompile, you need to run under the debugger and set a
> > breakpoint on line 2958 of the file gdk_bat.c (see the assert--this is in
> > the function BATassertHeadProps) and set a condition on the breakpoint:
> > cond N b->H->key
> > where N is the breakpoint number.
> > When the breakpoint hits, print the stack trace.
>
> Done with your 2nd approach. Call stack:
> Breakpoint 1, BATassertHeadProps (b=0x7fff1c003800) at gdk_bat.c:2958
> 2958 assert(!b->hkey);
> (gdb) bt
> 0 BATassertHeadProps (b=0x7fff1c003800) at gdk_bat.c:2958
> 1 0x00007ffff7463341 in BATassertProps (b=0x7fff1c0037e0) at gdk_bat.c:3034
> 2 0x00007ffff734a098 in BBPkeepref (i=93) at gdk_bbp.c:2392
> 3 0x00007fffeceee5ba in mvc_bind_wrap (cntxt=0x7fffed4cf328,
> mb=0x7fffe412acc0, stk=0x7fffe41d97f0,
> pci=0x7fffe4186b70) at sql.c:1847
> 4 0x00007ffff798ed73 in runMALsequence (cntxt=0x7fffed4cf328,
> mb=0x7fffe412acc0, startpc=330, stoppc=331,
> stk=0x7fffe41d97f0, env=0x0, pcicaller=0x0) at mal_interpreter.c:631
> 5 0x00007ffff7991f55 in DFLOWworker (T=0x7ffff7d2b0c0 <workers+2880>) at
> mal_dataflow.c:376
> 6 0x00007ffff5551df5 in start_thread () from /lib64/libpthread.so.0
> 7 0x00007ffff527f1ad in clone () from /lib64/libc.so.6
>
> Anymore? reply ASAP. Let me take a bath first
Some values when breakpoint hit:
(gdb) p b
$1 = (BAT *) 0x7fff1c003800
(gdb) p *b
$2 = {batCacheid = -93, H = 0x7fff1c0038c0, T = 0x7fff1c003820, S = 0x7fff1c003960}
(gdb) p *b->S
$3 = {tid = 140734908798721, stamp = 1096, copiedtodisk = 0, dirty = 0, dirtyflushed = 0, descdirty = 1,
restricted = 1, persistence = 1, role = 1, unused = 0, sharecnt = 0, map_head = 0 '\000', map_tail = 0 '\000',
map_hheap = 0 '\000', map_theap = 0 '\000', deleted = 0, first = 0, inserted = 0, count = 1112116,
capacity = 1112116}
(gdb) p *b->H
$4 = {id = 0x7ffff7630e47 "t", width = 4, type = 13 '\r', shift = 2 '\002', varsized = 1, key = 1, dense = 0,
nonil = 0, nil = 0, sorted = 0, revsorted = 0, align = 1031935, nokey = {0, 1}, nosorted = 5, norevsorted = 4,
nodense = 0, seq = 0, heap = {free = 4448464, size = 4448464,
base = 0x7fff12abc2f0 "\370\346\032\006\370\346\032\006\370\346\032\006\370\346\032\006h\340\032\006\370\346\032\006\370\346\032\006\370\346\032\006h\340\032\006h\340\032\006h\340\032\006\370\346\032\006\370\346\032\006\370\346\032\006h\340\032\006h\340\032\006\370\346\032\006\370\346\032\006h\340\032\006\370\346\032\006h\340\032\006h\340\032\006\370\346\032\006h\340\032\006\370\346\032\006h\340\032\006h\340\032\006\370\346\032\006\370\346\032\006\370\346\032\006\370\346\032\006\370\346\032\006\370\346\032\006\370\346\032\006\370\346\032\006\370\346\032\006h\340\032\006\370\346\032\006\370\346\032\006h\340\032\006\370\346\032\006\370\346\032\006h\340\032\006h\340\032\006h\340\032\006h\340\032\006\370\346\032\006h\340\032\006h\340\032\006h\340\032\006"...,
filename = 0x7fffe4137d40 "01/122.tail", copied = 0, hashash = 0, forcemap = 0, storage = STORE_MMAP,
newstorage = STORE_MMAP, dirty = 0 '\000', farmid = 0 '\000', parentid = -82}, vheap = 0x60c7c0, hash = 0x0,
imprints = 0x0, props = 0x0}
(gdb) p *b->T
$5 = {id = 0x7ffff7630e45 "h", width = 0, type = 0 '\000', shift = 0 '\000', varsized = 1, key = 1, dense = 1,
nonil = 1, nil = 0, sorted = 1, revsorted = 0, align = 0, nokey = {0, 0}, nosorted = 0, norevsorted = 1,
nodense = 0, seq = 47820988, heap = {free = 0, size = 0, base = 0x0, filename = 0x0, copied = 0, hashash = 0,
forcemap = 0, storage = STORE_MEM, newstorage = STORE_MEM, dirty = 0 '\000', farmid = 0 '\000',
parentid = 0}, vheap = 0x0, hash = 0x0, imprints = 0x0, props = 0x0}
## Comment 21613
Date: 2015-11-27 17:00:37 +0100
From: @sjoerdmullender
Can you do
grep "^93 " $farm/bat/BACKUP/BBP.dir
where $farm is the location of your database.
The troublesome BAT is the one with id 93. If the above command results in output, that BAT is persistent and it means that your database is corrupt. It'll then be hard to find out how it got that way.
If the command doesn't result in output, the BAT was created from a persistent BAT and some updates.
In any case it's interesting to see some variables in the stack frame of mvc_bind_wrap, so go up a couple of levels and print the values of:
*sname
*tname
*cname
*pci
The first three together indicate the column of the table that is causing the problem.
## Comment 21614
Date: 2015-11-27 17:18:41 +0100
From: Kaijiang <<chenkaijiang>>
(In reply to Sjoerd Mullender from comment 15)
> Can you do
> grep "^93 " $farm/bat/BACKUP/BBP.dir
> where $farm is the location of your database.
>
> The troublesome BAT is the one with id 93. If the above command results in
> output, that BAT is persistent and it means that your database is corrupt.
> It'll then be hard to find out how it got that way.
> If the command doesn't result in output, the BAT was created from a
> persistent BAT and some updates.
>
> In any case it's interesting to see some variables in the stack frame of
> mvc_bind_wrap, so go up a couple of levels and print the values of:
> *sname
> *tname
> *cname
> *pci
> The first three together indicate the column of the table that is causing
> the problem.
the grep got nothing:
grep "^93 " /home/zwtc/yul/monetdb/bat/BACKUP/BBP.dir
Some info about the file you mentioned:
ll /home/zwtc/yul/monetdb/bat/BACKUP/BBP.dir
-rw-r--r-- 1 root root 280510 11月 27 23:35 /home/zwtc/yul/monetdb/bat/BACKUP/BBP.dir
some lines of the file:
more /home/zwtc/yul/monetdb/bat/BACKUP/BBP.dir
BBP.dir, GDKversion 25112
8 8 16
1138583@0 BBPsize=3209
2 32 tmp_2 tmpr_2 2 198989 2 53381570 0 0 53381570 53395456 0 0 0 0 void 0 1 1921 0 0 0 0 0 1081552 0 0 0 str 4 3
0 0 1 5 4 0 1082048 213526280 213581824 1 106968213 107020288 1
3 64 M5system_auth_user tmpr_3 3 153 0 1 0 0 1 256 0 0 0 0 void 0 1 1409 0 0 0 0 0 1000050 0 0 0 str 1 3 1409 0 0
0 0 0 1000051 1 256 0 8216 10240 0
4 64 M5system_auth_passwd_v2 tmpr_4 4 154 0 1 0 0 1 256 0 0 0 0 void 0 1 1409 0 0 0 0 0 1000052 0 0 0 str 1 3 1409
0 0 0 0 0 1000053 1 256 0 8344 10240 0
5 64 M5system_auth_deleted tmpr_5 5 155 0 0 0 0 0 256 0 0 0 0 void 0 1 1409 0 0 0 0 0 1000054 0 0 0 oid 8 0 1153 0
0 0 0 0 1000049 0 2048 0
12 32 tmp_14 tmpr_14 14 197529 2 53381570 0 0 53381570 53395456 0 0 0 0 void 0 1 1793 0 0 0 1 0 1032290 0 0 0 str
4 3 256 0 0 1 2 0 1031933 213526280 213581824 1 1628882593 1628897280 1
22 32 tmp_26 tmpr_26 26 196813 2 6331032 0 0 6331032 6340608 0 0 0 0 void 0 1 1793 0 0 0 1 0 1031691 0 0 0 str 4 3
1280 0 0 8 1 0 1031358 25324128 25362432 1 197795529 197853184 1
38 32 tmp_46 tmpr_46 46 197712 2 53381570 0 0 53381570 53411840 0 0 0 0 void 0 1 1793 0 0 0 1 0 1032291 0 0 0 str
1 3 0 0 1 6 5 0 1032055 53381570 53411840 1 8354 10240 0
40 32 tmp_50 tmpr_50 50 197610 2 53381570 0 0 53381570 53395456 0 0 0 0 void 0 1 1793 0 0 0 1 0 1032292 0 0 0 str
4 3 0 0 1 2094881 2094880 0 1031987 213526280 213581824 1 70369500 70385664 1
44 32 tmp_54 tmpr_54 54 197604 2 53381570 0 0 53381570 53387264 0 0 0 0 void 0 1 1793 0 0 0 1 0 1032293 0 0 0 dbl
8 0 0 0 1 5 4 0 1031983 427052560 427098112 1
47 32 tmp_57 tmpr_57 57 197727 2 53381570 0 0 53381570 53387264 0 0 0 0 void 0 1 1793 0 0 0 1 0 1032294 0 0 0 dbl
8 0 0 0 0 2 1 0 1032065 427052560 427098112 1
68 32 sql_catalog_bid tmpr_104 01/104 157997 0 1790 0 0 1790 4096 0 0 0 0 void 0 1 1793 0 0 0 0 0 1000187 0 0 0 in
t 4 0 1024 0 0 0 0 0 1091115 7160 16384 0
69 32 sql_catalog_nme tmpr_105 01/105 157998 0 1790 0 0 1790 4096 0 0 0 0 void 0 1 1793 0 0 0 0 0 1000188 0 0 0 st
r 4 3 1024 0 0 0 0 0 1091116 7160 16384 0 107535 163840 0
70 32 sql_dcatalog tmpr_106 01/106 157999 0 0 0 0 0 256 0 0 0 0 void 0 1 1921 0 0 0 0 0 1000189 0 0 0 oid 8 0 1921
0 0 0 1 0 1082074 0 2048 0
74 32 sql_snapshots_bid tmpr_112 01/112 158003 0 0 0 0 0 256 0 0 0 0 void 0 1 1921 0 0 0 0 0 1000204 0 0 0 int 4 0
1409 10 11 11 1 0 1091108 0 1024 0
75 32 sql_snapshots_tid tmpr_113 01/113 158004 0 0 0 0 0 256 0 0 0 0 void 0 1 1921 0 0 0 0 0 1000205 0 0 0 int 4 0
1409 0 1 0 0 0 1091109 0 1024 0
76 32 sql_dsnapshots tmpr_114 01/114 158005 0 0 0 0 0 256 0 0 0 0 void 0 1 1921 0 0 0 0 0 1000206 0 0 0 oid 8 0 19
21 0 0 0 0 0 1000201 0 2048 0
82 32 tmp_122 tmpr_122 01/122 197532 2 53381570 0 0 53381570 53395456 0 0 0 0 void 0 1 1793 0 0 0 1 0 1032295 0 0
0 str 4 3 256 0 1 5 4 0 1031935 213526280 213581824 1 106968213 107020288 1
92 32 tmp_134 tmpr_134 01/134 196816 2 6331032 0 0 6331032 6340608 0 0 0 0 void 0 1 1793 0 0 0 1 0 1031692 0 0 0 s
tr 4 3 256 1 2 9 1 0 1031360 25324128 25362432 1 17526877 17563648 1
108 32 tmp_154 tmpr_154 01/154 197709 2 53381570 0 0 53381570 53387264 0 0 0 0 void 0 1 1793 0 0 0 1 0 1032296 0 0
0 dbl 8 0 0 0 0 1 2 0 1032053 427052560 427098112 1
114 32 tmp_162 tmpr_162 01/162 197601 2 53381570 0 0 53381570 53411840 0 0 0 0 void 0 1 1793 0 0 0 1 0 1032297 0 0
0 str 2 3 0 0 1 93991 93990 0 1031981 106763140 106823680 1 9143 10240 0
117 32 tmp_165 tmpr_165 01/165 197724 2 53381570 0 0 53381570 53387264 0 0 0 0 void 0 1 1793 0 0 0 1 0 1032298 0 0
0 dbl 8 0 0 0 0 1 2 0 1032063 427052560 427098112 1
146 32 tmp_222 tmpr_222 02/222 197535 2 53381570 0 0 53381570 53395456 0 0 0 0 void 0 1 1793 0 0 0 1 0 1032299 0 0
0 str 4 3 1280 0 0 9 1 0 1031937 213526280 213581824 1 1270151657 1270153216 1
156 32 tmp_234 tmpr_234 02/234 196819 2 6331032 0 0 6331032 6340608 0 0 0 0 void 0 1 1793 0 0 0 1 0 1031693 0 0 0
str 4 3 1280 0 0 109 1 0 1031362 25324128 25362432 1 113080888 113115136 1
172 32 tmp_254 tmpr_254 02/254 197706 2 53381570 0 0 53381570 53411840 0 0 0 0 void 0 1 1793 0 0 0 1 0 1032300 0 0
0 str 1 3 0 0 1 6 5 0 1032051 53381570 53411840 1 8354 10240 0
178 32 tmp_262 tmpr_262 02/262 197598 2 53381570 0 0 53381570 53411840 0 0 0 0 void 0 1 1793 0 0 0 1 0 1032301 0 0
values:
(gdb) p *sname
$6 = (str) 0x7fffe4180ab0 "sys"
(gdb) p *tname
$7 = (str) 0x7fffe41a48f0 "ods_ply_base"
(gdb) p *cname
$8 = (str) 0x7fffe41bed40 "c_cmpny_agt_cde"
(gdb) p *pci
$9 = {token = 54 '6', barrier = 0 '\000', typechk = 2 '\002', gc = 3 '\003', polymorphic = 0 '\000',
varargs = 0 '\000', recycle = 0, jump = 0, pc = 330, fcn = 0x7fffeceedda6 <mvc_bind_wrap>, blk = 0x1b14f30,
clock = {tv_sec = 1448638552, tv_usec = 158450}, ticks = 0, calls = 0, totticks = 0, rbytes = 0, wbytes = 0,
modname = 0x609340 "sql", fcnname = 0x6093b0 "bind", argc = 8, retc = 1, maxarg = 12, argv = 0x7fffe4186bec}
the SQL causing the problem is simple:
select c_cmpny_agt_cde from ods_ply_base left join (select c_cha_cde from ods_agent where business_end_date > now()) as bb on c_cmpny_agt_cde=bb.c_cha_cde;
## Comment 21615
Date: 2015-11-27 17:21:03 +0100
From: Kaijiang <<chenkaijiang>>
(In reply to Kaijiang from comment 16)
> (In reply to Sjoerd Mullender from comment 15)
> > Can you do
> > grep "^93 " $farm/bat/BACKUP/BBP.dir
> > where $farm is the location of your database.
> >
> > The troublesome BAT is the one with id 93. If the above command results in
> > output, that BAT is persistent and it means that your database is corrupt.
> > It'll then be hard to find out how it got that way.
> > If the command doesn't result in output, the BAT was created from a
> > persistent BAT and some updates.
> >
> > In any case it's interesting to see some variables in the stack frame of
> > mvc_bind_wrap, so go up a couple of levels and print the values of:
> > *sname
> > *tname
> > *cname
> > *pci
> > The first three together indicate the column of the table that is causing
> > the problem.
>
> the grep got nothing:
> grep "^93 " /home/zwtc/yul/monetdb/bat/BACKUP/BBP.dir
>
> Some info about the file you mentioned:
> ll /home/zwtc/yul/monetdb/bat/BACKUP/BBP.dir
> -rw-r--r-- 1 root root 280510 11月 27 23:35
> /home/zwtc/yul/monetdb/bat/BACKUP/BBP.dir
>
> some lines of the file:
> more /home/zwtc/yul/monetdb/bat/BACKUP/BBP.dir
> BBP.dir, GDKversion 25112
> 8 8 16
> 1138583@0 BBPsize=3209
> 2 32 tmp_2 tmpr_2 2 198989 2 53381570 0 0 53381570 53395456 0 0 0 0 void 0 1
> 1921 0 0 0 0 0 1081552 0 0 0 str 4 3
> 0 0 1 5 4 0 1082048 213526280 213581824 1 106968213 107020288 1
> 3 64 M5system_auth_user tmpr_3 3 153 0 1 0 0 1 256 0 0 0 0 void 0 1 1409 0 0
> 0 0 0 1000050 0 0 0 str 1 3 1409 0 0
> 0 0 0 1000051 1 256 0 8216 10240 0
> 4 64 M5system_auth_passwd_v2 tmpr_4 4 154 0 1 0 0 1 256 0 0 0 0 void 0 1
> 1409 0 0 0 0 0 1000052 0 0 0 str 1 3 1409
> 0 0 0 0 0 1000053 1 256 0 8344 10240 0
> 5 64 M5system_auth_deleted tmpr_5 5 155 0 0 0 0 0 256 0 0 0 0 void 0 1 1409
> 0 0 0 0 0 1000054 0 0 0 oid 8 0 1153 0
> 0 0 0 0 1000049 0 2048 0
> 12 32 tmp_14 tmpr_14 14 197529 2 53381570 0 0 53381570 53395456 0 0 0 0 void
> 0 1 1793 0 0 0 1 0 1032290 0 0 0 str
> 4 3 256 0 0 1 2 0 1031933 213526280 213581824 1 1628882593 1628897280 1
> 22 32 tmp_26 tmpr_26 26 196813 2 6331032 0 0 6331032 6340608 0 0 0 0 void 0
> 1 1793 0 0 0 1 0 1031691 0 0 0 str 4 3
> 1280 0 0 8 1 0 1031358 25324128 25362432 1 197795529 197853184 1
> 38 32 tmp_46 tmpr_46 46 197712 2 53381570 0 0 53381570 53411840 0 0 0 0 void
> 0 1 1793 0 0 0 1 0 1032291 0 0 0 str
> 1 3 0 0 1 6 5 0 1032055 53381570 53411840 1 8354 10240 0
> 40 32 tmp_50 tmpr_50 50 197610 2 53381570 0 0 53381570 53395456 0 0 0 0 void
> 0 1 1793 0 0 0 1 0 1032292 0 0 0 str
> 4 3 0 0 1 2094881 2094880 0 1031987 213526280 213581824 1 70369500 70385664 1
> 44 32 tmp_54 tmpr_54 54 197604 2 53381570 0 0 53381570 53387264 0 0 0 0 void
> 0 1 1793 0 0 0 1 0 1032293 0 0 0 dbl
> 8 0 0 0 1 5 4 0 1031983 427052560 427098112 1
> 47 32 tmp_57 tmpr_57 57 197727 2 53381570 0 0 53381570 53387264 0 0 0 0 void
> 0 1 1793 0 0 0 1 0 1032294 0 0 0 dbl
> 8 0 0 0 0 2 1 0 1032065 427052560 427098112 1
> 68 32 sql_catalog_bid tmpr_104 01/104 157997 0 1790 0 0 1790 4096 0 0 0 0
> void 0 1 1793 0 0 0 0 0 1000187 0 0 0 in
> t 4 0 1024 0 0 0 0 0 1091115 7160 16384 0
> 69 32 sql_catalog_nme tmpr_105 01/105 157998 0 1790 0 0 1790 4096 0 0 0 0
> void 0 1 1793 0 0 0 0 0 1000188 0 0 0 st
> r 4 3 1024 0 0 0 0 0 1091116 7160 16384 0 107535 163840 0
> 70 32 sql_dcatalog tmpr_106 01/106 157999 0 0 0 0 0 256 0 0 0 0 void 0 1
> 1921 0 0 0 0 0 1000189 0 0 0 oid 8 0 1921
> 0 0 0 1 0 1082074 0 2048 0
> 74 32 sql_snapshots_bid tmpr_112 01/112 158003 0 0 0 0 0 256 0 0 0 0 void 0
> 1 1921 0 0 0 0 0 1000204 0 0 0 int 4 0
> 1409 10 11 11 1 0 1091108 0 1024 0
> 75 32 sql_snapshots_tid tmpr_113 01/113 158004 0 0 0 0 0 256 0 0 0 0 void 0
> 1 1921 0 0 0 0 0 1000205 0 0 0 int 4 0
> 1409 0 1 0 0 0 1091109 0 1024 0
> 76 32 sql_dsnapshots tmpr_114 01/114 158005 0 0 0 0 0 256 0 0 0 0 void 0 1
> 1921 0 0 0 0 0 1000206 0 0 0 oid 8 0 19
> 21 0 0 0 0 0 1000201 0 2048 0
> 82 32 tmp_122 tmpr_122 01/122 197532 2 53381570 0 0 53381570 53395456 0 0 0
> 0 void 0 1 1793 0 0 0 1 0 1032295 0 0
> 0 str 4 3 256 0 1 5 4 0 1031935 213526280 213581824 1 106968213 107020288 1
> 92 32 tmp_134 tmpr_134 01/134 196816 2 6331032 0 0 6331032 6340608 0 0 0 0
> void 0 1 1793 0 0 0 1 0 1031692 0 0 0 s
> tr 4 3 256 1 2 9 1 0 1031360 25324128 25362432 1 17526877 17563648 1
> 108 32 tmp_154 tmpr_154 01/154 197709 2 53381570 0 0 53381570 53387264 0 0 0
> 0 void 0 1 1793 0 0 0 1 0 1032296 0 0
> 0 dbl 8 0 0 0 0 1 2 0 1032053 427052560 427098112 1
> 114 32 tmp_162 tmpr_162 01/162 197601 2 53381570 0 0 53381570 53411840 0 0 0
> 0 void 0 1 1793 0 0 0 1 0 1032297 0 0
> 0 str 2 3 0 0 1 93991 93990 0 1031981 106763140 106823680 1 9143 10240 0
> 117 32 tmp_165 tmpr_165 01/165 197724 2 53381570 0 0 53381570 53387264 0 0 0
> 0 void 0 1 1793 0 0 0 1 0 1032298 0 0
> 0 dbl 8 0 0 0 0 1 2 0 1032063 427052560 427098112 1
> 146 32 tmp_222 tmpr_222 02/222 197535 2 53381570 0 0 53381570 53395456 0 0 0
> 0 void 0 1 1793 0 0 0 1 0 1032299 0 0
> 0 str 4 3 1280 0 0 9 1 0 1031937 213526280 213581824 1 1270151657
> 1270153216 1
> 156 32 tmp_234 tmpr_234 02/234 196819 2 6331032 0 0 6331032 6340608 0 0 0 0
> void 0 1 1793 0 0 0 1 0 1031693 0 0 0
> str 4 3 1280 0 0 109 1 0 1031362 25324128 25362432 1 113080888 113115136 1
> 172 32 tmp_254 tmpr_254 02/254 197706 2 53381570 0 0 53381570 53411840 0 0 0
> 0 void 0 1 1793 0 0 0 1 0 1032300 0 0
> 0 str 1 3 0 0 1 6 5 0 1032051 53381570 53411840 1 8354 10240 0
> 178 32 tmp_262 tmpr_262 02/262 197598 2 53381570 0 0 53381570 53411840 0 0 0
> 0 void 0 1 1793 0 0 0 1 0 1032301 0 0
>
>
> values:
>
> (gdb) p *sname
> $6 = (str) 0x7fffe4180ab0 "sys"
> (gdb) p *tname
> $7 = (str) 0x7fffe41a48f0 "ods_ply_base"
> (gdb) p *cname
> $8 = (str) 0x7fffe41bed40 "c_cmpny_agt_cde"
> (gdb) p *pci
> $9 = {token = 54 '6', barrier = 0 '\000', typechk = 2 '\002', gc = 3 '\003',
> polymorphic = 0 '\000',
> varargs = 0 '\000', recycle = 0, jump = 0, pc = 330, fcn = 0x7fffeceedda6
> <mvc_bind_wrap>, blk = 0x1b14f30,
> clock = {tv_sec = 1448638552, tv_usec = 158450}, ticks = 0, calls = 0,
> totticks = 0, rbytes = 0, wbytes = 0,
> modname = 0x609340 "sql", fcnname = 0x6093b0 "bind", argc = 8, retc = 1,
> maxarg = 12, argv = 0x7fffe4186bec}
>
> the SQL causing the problem is simple:
> select c_cmpny_agt_cde from ods_ply_base left join (select c_cha_cde from
> ods_agent where business_end_date > now()) as bb on
> c_cmpny_agt_cde=bb.c_cha_cde;
When I was giving the above info, the mserver5 is still suspended by gdb at the breakpoint you asked me to set.
Can you locate the bug now?
## Comment 21632
Date: 2015-12-02 16:25:01 +0100
From: @sjoerdmullender
Can you compile MonetDB yourself?
If so, can you try out the latest version from the Mercurial repository with assertions enabled?
hg clone -u Jul2015 http://dev.monetdb.org/hg/MonetDB/
cd MonetDB
./bootstrap
configure --enable-assert (and other options at your discretion)
make
make install
Then run the just installed mserver5 with -d10. You probably want to run this under the debugger from the start. I expect that you will then get a failed assertion pretty early on, but that should then point you to a BAT whose properties are set incorrectly.
## Comment 21633
Date: 2015-12-02 16:30:37 +0100
From: @sjoerdmullender
(In reply to Sjoerd Mullender from comment 18)
> Can you compile MonetDB yourself?
> If so, can you try out the latest version from the Mercurial repository with
> assertions enabled?
>
> hg clone -u Jul2015 http://dev.monetdb.org/hg/MonetDB/
> cd MonetDB
> ./bootstrap
> configure --enable-assert (and other options at your discretion)
For good measure, add --enable-debug --disable-optimize
> make
> make install
>
> Then run the just installed mserver5 with -d10. You probably want to run
> this under the debugger from the start. I expect that you will then get a
> failed assertion pretty early on, but that should then point you to a BAT
> whose properties are set incorrectly.
## Comment 21634
Date: 2015-12-02 16:51:17 +0100
From: Kaijiang <<chenkaijiang>>
(In reply to Sjoerd Mullender from comment 19)
> (In reply to Sjoerd Mullender from comment 18)
> > Can you compile MonetDB yourself?
> > If so, can you try out the latest version from the Mercurial repository with
> > assertions enabled?
> >
> > hg clone -u Jul2015 http://dev.monetdb.org/hg/MonetDB/
> > cd MonetDB
> > ./bootstrap
> > configure --enable-assert (and other options at your discretion)
>
> For good measure, add --enable-debug --disable-optimize
>
> > make
> > make install
> >
> > Then run the just installed mserver5 with -d10. You probably want to run
> > this under the debugger from the start. I expect that you will then get a
> > failed assertion pretty early on, but that should then point you to a BAT
> > whose properties are set incorrectly.
No problem. Let me try
## Comment 21635
Date: 2015-12-02 16:55:52 +0100
From: Kaijiang <<chenkaijiang>>
(In reply to Kaijiang from comment 20)
> (In reply to Sjoerd Mullender from comment 19)
> > (In reply to Sjoerd Mullender from comment 18)
> > > Can you compile MonetDB yourself?
> > > If so, can you try out the latest version from the Mercurial repository with
> > > assertions enabled?
> > >
> > > hg clone -u Jul2015 http://dev.monetdb.org/hg/MonetDB/
> > > cd MonetDB
> > > ./bootstrap
> > > configure --enable-assert (and other options at your discretion)
> >
> > For good measure, add --enable-debug --disable-optimize
> >
> > > make
> > > make install
> > >
> > > Then run the just installed mserver5 with -d10. You probably want to run
> > > this under the debugger from the start. I expect that you will then get a
> > > failed assertion pretty early on, but that should then point you to a BAT
> > > whose properties are set incorrectly.
>
> No problem. Let me try
The server doesn't have hg. Any other way to get your latest codes?
## Comment 21636
Date: 2015-12-02 17:05:16 +0100
From: Kaijiang <<chenkaijiang>>
(In reply to Kaijiang from comment 21)
> (In reply to Kaijiang from comment 20)
> > (In reply to Sjoerd Mullender from comment 19)
> > > (In reply to Sjoerd Mullender from comment 18)
> > > > Can you compile MonetDB yourself?
> > > > If so, can you try out the latest version from the Mercurial repository with
> > > > assertions enabled?
> > > >
> > > > hg clone -u Jul2015 http://dev.monetdb.org/hg/MonetDB/
> > > > cd MonetDB
> > > > ./bootstrap
> > > > configure --enable-assert (and other options at your discretion)
> > >
> > > For good measure, add --enable-debug --disable-optimize
> > >
> > > > make
> > > > make install
> > > >
> > > > Then run the just installed mserver5 with -d10. You probably want to run
> > > > this under the debugger from the start. I expect that you will then get a
> > > > failed assertion pretty early on, but that should then point you to a BAT
> > > > whose properties are set incorrectly.
> >
> > No problem. Let me try
>
> The server doesn't have hg. Any other way to get your latest codes?
In http://dev.monetdb.org/hg/MonetDB/shortlog/Jul2015, can I get the latest codes by clicking the "gz" link? (http://dev.monetdb.org/hg/MonetDB/archive/Jul2015.tar.gz)
## Comment 21637
Date: 2015-12-02 17:15:09 +0100
From: Kaijiang <<chenkaijiang>>
(In reply to Kaijiang from comment 22)
> (In reply to Kaijiang from comment 21)
> > (In reply to Kaijiang from comment 20)
> > > (In reply to Sjoerd Mullender from comment 19)
> > > > (In reply to Sjoerd Mullender from comment 18)
> > > > > Can you compile MonetDB yourself?
> > > > > If so, can you try out the latest version from the Mercurial repository with
> > > > > assertions enabled?
> > > > >
> > > > > hg clone -u Jul2015 http://dev.monetdb.org/hg/MonetDB/
> > > > > cd MonetDB
> > > > > ./bootstrap
> > > > > configure --enable-assert (and other options at your discretion)
> > > >
> > > > For good measure, add --enable-debug --disable-optimize
> > > >
> > > > > make
> > > > > make install
> > > > >
> > > > > Then run the just installed mserver5 with -d10. You probably want to run
> > > > > this under the debugger from the start. I expect that you will then get a
> > > > > failed assertion pretty early on, but that should then point you to a BAT
> > > > > whose properties are set incorrectly.
> > >
> > > No problem. Let me try
> >
> > The server doesn't have hg. Any other way to get your latest codes?
>
> In http://dev.monetdb.org/hg/MonetDB/shortlog/Jul2015, can I get the latest
> codes by clicking the "gz" link?
> (http://dev.monetdb.org/hg/MonetDB/archive/Jul2015.tar.gz)
I downloaded http://dev.monetdb.org/hg/MonetDB/archive/Jul2015.tar.gz. And I think it is the latest by verifying the change set http://dev.monetdb.org/hg/MonetDB/rev/b45c8fe82815. Because this change set is committed just about 1 hour ago.
## Comment 21638
Date: 2015-12-02 17:19:33 +0100
From: @sjoerdmullender
You found the answer yourself. Indeed, the gz link is created on-the-fly.
## Comment 21639
Date: 2015-12-02 17:34:21 +0100
From: Kaijiang <<chenkaijiang>>
(In reply to Sjoerd Mullender from comment 24)
> You found the answer yourself. Indeed, the gz link is created on-the-fly.
Followed your instructions with the above codes and got:
mserver5: gdk_bat.c:2960: BATassertHeadProps: Assertion `!b->H->key' failed.
codes around gdk_bat.c:
(gdb) l gdk_bat.c:2960
2955 prb = HASHprobe(hs, valp);
2956 for (hb = HASHget(hs,prb);
2957 hb != HASHnil(hs);
2958 hb = HASHgetlink(hs,hb))
2959 if (cmpf(valp, BUNhead(bi, hb)) == 0)
2960 assert(!b->hkey);
2961 HASHputlink(hs,p, HASHget(hs,prb));
2962 HASHput(hs,prb,p);
2963 cmp = cmpf(valp, nilp);
2964 assert(!b->H->nonil || cmp != 0);
and call stack is:
(gdb) bt
0 0x00007ffff4fd05d7 in raise () from /lib64/libc.so.6
1 0x00007ffff4fd1cc8 in abort () from /lib64/libc.so.6
2 0x00007ffff4fc9546 in __assert_fail_base () from /lib64/libc.so.6
3 0x00007ffff4fc95f2 in __assert_fail () from /lib64/libc.so.6
4 0x00007ffff733134f in BATassertHeadProps (b=0x60d600) at gdk_bat.c:2960
5 0x00007ffff7331b4d in BATassertProps (b=0x60d5e0) at gdk_bat.c:3036
6 0x00007ffff71dbc13 in getBBPdescriptor (i=82, lock=1) at gdk_bbp.c:2510
7 0x00007ffff71dbc87 in BBPdescriptor (i=82) at gdk_bbp.c:2520
8 0x00007fffece27594 in BATdescriptor (i=82) at ../../../gdk/gdk.h:2602
9 0x00007fffece27865 in temp_descriptor (b=82) at bat_utils.c:34
10 0x00007fffece1bf2b in delta_bind_bat (bat=0x21e2430, access=0, temp=0) at bat_storage.c:165
11 0x00007fffece1c0bd in bind_col (tr=0x7fffdc001660, c=0x7fffdc06d8b0, access=0) at bat_storage.c:185
12 0x00007fffeccfa206 in SQLgetStatistics (cntxt=0x7fffed2e1328, m=0x7fffdc00ec30, mb=0x7fffdc13ad40)
at sql_optimizer.c:170
13 0x00007fffeccfa83b in addOptimizers (c=0x7fffed2e1328, mb=0x7fffdc13ad40, pipe=0x7fffdc11af40 "default_pipe")
at sql_optimizer.c:251
14 0x00007fffeccfaa7d in addQueryToCache (c=0x7fffed2e1328) at sql_optimizer.c:293
15 0x00007fffeccf85fe in backend_dumpproc (be=0x7fffdc11b010, c=0x7fffed2e1328, cq=0x7fffdc141940,
s=0x7fffdc172ed0) at sql_gencode.c:2810
16 0x00007fffeccc3e76 in SQLparser (c=0x7fffed2e1328) at sql_scenario.c:1216
17 0x00007ffff79285c2 in runPhase (c=0x7fffed2e1328, phase=1) at mal_scenario.c:515
18 0x00007ffff7928760 in runScenarioBody (c=0x7fffed2e1328) at mal_scenario.c:550
19 0x00007ffff7928908 in runScenario (c=0x7fffed2e1328) at mal_scenario.c:579
20 0x00007ffff792a231 in MSserveClient (dummy=0x7fffed2e1328) at mal_session.c:439
21 0x00007ffff7929c33 in MSscheduleClient (command=0x7fffdc0008d0 "\300\255\021\334\377\177",
challenge=0x7fffe7ffedb0 "0JmC9wP2W", fin=0x7fffdc006b40, fout=0x7fffdc0049c0) at mal_session.c:319
---Type <return> to continue, or q <return> to quit---
22 0x00007ffff7a1af53 in doChallenge (data=0x7fffe00008d0) at mal_mapi.c:184
23 0x00007ffff7339c06 in thread_starter (arg=0x7fffe0000a50) at gdk_system.c:458
24 0x00007ffff5363df5 in start_thread () from /lib64/libpthread.so.0
25 0x00007ffff50911ad in clone () from /lib64/libc.so.6
variables in BATassertHeadProps are:
(gdb) frame 4
4 0x00007ffff733134f in BATassertHeadProps (b=0x60d600) at gdk_bat.c:2960
2960 assert(!b->hkey);
(gdb) p *b
$1 = {batCacheid = -82, H = 0x60d6c0, T = 0x60d620, S = 0x60d760}
(gdb) p *b->H
$2 = {id = 0x7ffff7572c6b "t", width = 4, type = 13 '\r', shift = 2 '\002', varsized = 1, key = 1, dense = 0,
nonil = 0, nil = 0, sorted = 0, revsorted = 0, align = 1031935, nokey = {0, 1}, nosorted = 5, norevsorted = 4,
nodense = 0, seq = 0, heap = {free = 213526280, size = 213581824, base = 0x7fff0b450000 "\020 ",
filename = 0x7fffdc13e340 "01/122.tail", copied = 0, hashash = 0, forcemap = 0, storage = STORE_MMAP,
newstorage = STORE_MMAP, dirty = 0 '\000', farmid = 0 '\000', parentid = 0}, vheap = 0x60d7c0, hash = 0x0,
imprints = 0x0, props = 0x0}
(gdb) p *b->T
$3 = {id = 0x7ffff7572c69 "h", width = 0, type = 0 '\000', shift = 0 '\000', varsized = 1, key = 1, dense = 1,
nonil = 1, nil = 0, sorted = 1, revsorted = 0, align = 1032295, nokey = {0, 0}, nosorted = 0, norevsorted = 1,
nodense = 0, seq = 0, heap = {free = 0, size = 0, base = 0x0, filename = 0x0, copied = 0, hashash = 0,
forcemap = 0, storage = STORE_MEM, newstorage = STORE_MEM, dirty = 0 '\000', farmid = 0 '\000',
parentid = 0}, vheap = 0x0, hash = 0x0, imprints = 0x0, props = 0x0}
(gdb) p *b->S
$4 = {tid = 0, stamp = 0, copiedtodisk = 1, dirty = 0, dirtyflushed = 0, descdirty = 0, restricted = 1,
persistence = 0, role = 0, unused = 0, sharecnt = 0, map_head = 0 '\000', map_tail = 0 '\000',
map_hheap = 0 '\000', map_theap = 0 '\000', deleted = 0, first = 0, inserted = 53381570, count = 53381570,
capacity = 53395456}
So, yes, I got failed assertion pretty earlier.
## Comment 21640
Date: 2015-12-02 17:48:07 +0100
From: Kaijiang <<chenkaijiang>>
(In reply to Kaijiang from comment 25)
> (In reply to Sjoerd Mullender from comment 24)
> > You found the answer yourself. Indeed, the gz link is created on-the-fly.
>
> Followed your instructions with the above codes and got:
> mserver5: gdk_bat.c:2960: BATassertHeadProps: Assertion `!b->H->key' failed.
>
> codes around gdk_bat.c:
> (gdb) l gdk_bat.c:2960
> 2955 prb = HASHprobe(hs, valp);
> 2956 for (hb = HASHget(hs,prb);
> 2957 hb != HASHnil(hs);
> 2958 hb = HASHgetlink(hs,hb))
> 2959 if (cmpf(valp, BUNhead(bi, hb)) == 0)
> 2960 assert(!b->hkey);
> 2961 HASHputlink(hs,p, HASHget(hs,prb));
> 2962 HASHput(hs,prb,p);
> 2963 cmp = cmpf(valp, nilp);
> 2964 assert(!b->H->nonil || cmp != 0);
>
> and call stack is:
> (gdb) bt
> 0 0x00007ffff4fd05d7 in raise () from /lib64/libc.so.6
> 1 0x00007ffff4fd1cc8 in abort () from /lib64/libc.so.6
> 2 0x00007ffff4fc9546 in __assert_fail_base () from /lib64/libc.so.6
> 3 0x00007ffff4fc95f2 in __assert_fail () from /lib64/libc.so.6
> 4 0x00007ffff733134f in BATassertHeadProps (b=0x60d600) at gdk_bat.c:2960
> 5 0x00007ffff7331b4d in BATassertProps (b=0x60d5e0) at gdk_bat.c:3036
> 6 0x00007ffff71dbc13 in getBBPdescriptor (i=82, lock=1) at gdk_bbp.c:2510
> 7 0x00007ffff71dbc87 in BBPdescriptor (i=82) at gdk_bbp.c:2520
> 8 0x00007fffece27594 in BATdescriptor (i=82) at ../../../gdk/gdk.h:2602
> 9 0x00007fffece27865 in temp_descriptor (b=82) at bat_utils.c:34
> 10 0x00007fffece1bf2b in delta_bind_bat (bat=0x21e2430, access=0, temp=0)
> at bat_storage.c:165
> 11 0x00007fffece1c0bd in bind_col (tr=0x7fffdc001660, c=0x7fffdc06d8b0,
> access=0) at bat_storage.c:185
> 12 0x00007fffeccfa206 in SQLgetStatistics (cntxt=0x7fffed2e1328,
> m=0x7fffdc00ec30, mb=0x7fffdc13ad40)
> at sql_optimizer.c:170
> 13 0x00007fffeccfa83b in addOptimizers (c=0x7fffed2e1328,
> mb=0x7fffdc13ad40, pipe=0x7fffdc11af40 "default_pipe")
> at sql_optimizer.c:251
> 14 0x00007fffeccfaa7d in addQueryToCache (c=0x7fffed2e1328) at
> sql_optimizer.c:293
> 15 0x00007fffeccf85fe in backend_dumpproc (be=0x7fffdc11b010,
> c=0x7fffed2e1328, cq=0x7fffdc141940,
> s=0x7fffdc172ed0) at sql_gencode.c:2810
> 16 0x00007fffeccc3e76 in SQLparser (c=0x7fffed2e1328) at sql_scenario.c:1216
> 17 0x00007ffff79285c2 in runPhase (c=0x7fffed2e1328, phase=1) at
> mal_scenario.c:515
> 18 0x00007ffff7928760 in runScenarioBody (c=0x7fffed2e1328) at
> mal_scenario.c:550
> 19 0x00007ffff7928908 in runScenario (c=0x7fffed2e1328) at
> mal_scenario.c:579
> 20 0x00007ffff792a231 in MSserveClient (dummy=0x7fffed2e1328) at
> mal_session.c:439
> 21 0x00007ffff7929c33 in MSscheduleClient (command=0x7fffdc0008d0
> "\300\255\021\334\377\177",
> challenge=0x7fffe7ffedb0 "0JmC9wP2W", fin=0x7fffdc006b40,
> fout=0x7fffdc0049c0) at mal_session.c:319
> ---Type <return> to continue, or q <return> to quit---
> 22 0x00007ffff7a1af53 in doChallenge (data=0x7fffe00008d0) at mal_mapi.c:184
> 23 0x00007ffff7339c06 in thread_starter (arg=0x7fffe0000a50) at
> gdk_system.c:458
> 24 0x00007ffff5363df5 in start_thread () from /lib64/libpthread.so.0
> 25 0x00007ffff50911ad in clone () from /lib64/libc.so.6
>
> variables in BATassertHeadProps are:
>
> (gdb) frame 4
> 4 0x00007ffff733134f in BATassertHeadProps (b=0x60d600) at gdk_bat.c:2960
> 2960 assert(!b->hkey);
> (gdb) p *b
> $1 = {batCacheid = -82, H = 0x60d6c0, T = 0x60d620, S = 0x60d760}
> (gdb) p *b->H
> $2 = {id = 0x7ffff7572c6b "t", width = 4, type = 13 '\r', shift = 2 '\002',
> varsized = 1, key = 1, dense = 0,
> nonil = 0, nil = 0, sorted = 0, revsorted = 0, align = 1031935, nokey =
> {0, 1}, nosorted = 5, norevsorted = 4,
> nodense = 0, seq = 0, heap = {free = 213526280, size = 213581824, base =
> 0x7fff0b450000 "\020 ",
> filename = 0x7fffdc13e340 "01/122.tail", copied = 0, hashash = 0,
> forcemap = 0, storage = STORE_MMAP,
> newstorage = STORE_MMAP, dirty = 0 '\000', farmid = 0 '\000', parentid =
> 0}, vheap = 0x60d7c0, hash = 0x0,
> imprints = 0x0, props = 0x0}
> (gdb) p *b->T
> $3 = {id = 0x7ffff7572c69 "h", width = 0, type = 0 '\000', shift = 0 '\000',
> varsized = 1, key = 1, dense = 1,
> nonil = 1, nil = 0, sorted = 1, revsorted = 0, align = 1032295, nokey =
> {0, 0}, nosorted = 0, norevsorted = 1,
> nodense = 0, seq = 0, heap = {free = 0, size = 0, base = 0x0, filename =
> 0x0, copied = 0, hashash = 0,
> forcemap = 0, storage = STORE_MEM, newstorage = STORE_MEM, dirty = 0
> '\000', farmid = 0 '\000',
> parentid = 0}, vheap = 0x0, hash = 0x0, imprints = 0x0, props = 0x0}
> (gdb) p *b->S
> $4 = {tid = 0, stamp = 0, copiedtodisk = 1, dirty = 0, dirtyflushed = 0,
> descdirty = 0, restricted = 1,
> persistence = 0, role = 0, unused = 0, sharecnt = 0, map_head = 0 '\000',
> map_tail = 0 '\000',
> map_hheap = 0 '\000', map_theap = 0 '\000', deleted = 0, first = 0,
> inserted = 53381570, count = 53381570,
> capacity = 53395456}
>
>
> So, yes, I got failed assertion pretty earlier.
More info:
(gdb) frame 11
11 0x00007fffece1c0bd in bind_col (tr=0x7fffdc001660, c=0x7fffdc06d8b0, access=0) at bat_storage.c:185
185 return delta_bind_bat( c->data, access, isTemp(c));
(gdb) p *tr
$5 = {name = 0x0, stime = 0, wstime = 8, rtime = 0, wtime = 0, schema_number = 0, schema_updates = 0,
status = 0, dropped = 0x0, schemas = {sa = 0x7fffdc0016f0, destroy = 0x7fffecdfee53 <schema_destroy>,
set = 0x7fffdc0bd180, dset = 0x0, nelm = 0x0}, sa = 0x7fffdc0016f0, parent = 0x207e920, stk = 0}
(gdb) p *c
$6 = {base = {wtime = 0, rtime = 0, allocated = 0, flag = 0, id = 8229,
name = 0x7fffdc06d930 "c_cmpny_agt_cde"}, type = {type = 0x1f90d80, digits = 0, scale = 0}, colnr = 1,
null = 1 '\001', def = 0x0, unique = 1 '\001', drop_action = 0, storage_type = 0x0, sorted = 0, dcount = 0,
min = 0x0, max = 0x0, t = 0x7fffdc06d640, data = 0x21e2430}
(gdb) frame 10
10 0x00007fffece1bf2b in delta_bind_bat (bat=0x21e2430, access=0, temp=0) at bat_storage.c:165
165 b = temp_descriptor(bat->bid);
(gdb) p *bat
$7 = {name = 0x21e24a0 "sys_ods_ply_base_c_cmpny_agt_cde", bid = 82, ibase = 53381570, ibid = 3074,
uibid = 2797, uvbid = 3074, cnt = 53381570, ucnt = 0, cached = 0x0, wtime = 1, next = 0x0}
c_cmpny_agt_cde is the column used in the SQL. (table sys.ods_ply_base)
More: if I create a new table "large1" with only one column "c_cmpny_agt_cde" copied from sys.ods_ply_base; run the SQL again on the "large1", then it won't crash.
## Comment 21659
Date: 2015-12-11 17:39:09 +0100
From: Kaijiang <<chenkaijiang>>
Any progress?
## Comment 21730
Date: 2016-01-14 05:56:55 +0100
From: Kaijiang <<chenkaijiang>>
Any news after 1 month?
## Comment 22253
Date: 2016-07-25 20:45:25 +0200
From: @mlkersten
With several SP-s on July 2015 and a new feature release in Jun2016, is there any news on this complex case?
## Comment 24767
Date: 2016-12-11 21:11:03 +0100
From: @mlkersten
Can you check it in Jun2016 and Dec2016 branches. Thx
## Comment 24846
Date: 2016-12-21 23:26:16 +0100
From: @mlkersten
Archived this bug report until new information becomes available.
| mserver5 SIGSEGV, segmentation fault when big table join with other table. | https://api.github.com/repos/MonetDB/MonetDB/issues/3837/comments | 0 | 2020-11-30T13:18:39Z | 2024-06-27T12:09:15Z | https://github.com/MonetDB/MonetDB/issues/3837 | 753,471,611 | 3,837 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-10-26 15:23:01 +0100
From: Robin Cijvat <<robin.cijvat>>
To: MonetDB5 devs <<bugs-monetdb5>>
Version: 11.21.5 (Jul2015)
CC: @mlkersten
Last updated: 2016-01-15 11:38:22 +0100
## Comment 21407
Date: 2015-10-26 15:23:01 +0100
From: Robin Cijvat <<robin.cijvat>>
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.27 Safari/537.36
Build Identifier:
This SQL generates a column with 2 equal results, because apparently the rand() operator is considered a constant:
create table t(a int);
insert into t values (1), (1);
select a + rand() from t;
Further examples:
rand() seems to be treated a "constant" only when in an expression;
see below ...
sql>create table t (a int, b int default rand());
operation successful (8.297ms)
sql>insert into t(a) values (1);
1 affected row (5.830ms)
sql>insert into t(a) values (2);
1 affected row (5.175ms)
sql>insert into t(a) values (3);
1 affected row (5.258ms)
sql>alter table t add column c int default rand();
operation successful (11.170ms)
sql>alter table t add column d int default null;
operation successful (10.695ms)
sql>select * from t;
+------+------------+------------+------+
| a | b | c | d |
+======+============+============+======+
| 1 | 2018667017 | 1223444628 | null |
| 2 | 1184696955 | 1855771568 | null |
| 3 | 758492986 | 1856268030 | null |
+------+------------+------------+------+
3 tuples (1.891ms)
sql>update t set d = rand(); -- works as expected
3 affected rows (7.684ms)
sql>select * from t;
+------+------------+------------+------------+
| a | b | c | d |
+======+============+============+============+
| 1 | 2018667017 | 1223444628 | 2132096871 |
| 2 | 1184696955 | 1855771568 | 465839912 |
| 3 | 758492986 | 1856268030 | 1856154042 |
+------+------------+------------+------------+
3 tuples (2.123ms)
sql>update t set a = a + rand(); -- does not work as expected/supposed to
3 affected rows (7.515ms)
sql>select * from t;
+----------+------------+------------+------------+
| a | b | c | d |
+==========+============+============+============+
| 12809903 | 2018667017 | 1223444628 | 2132096871 |
| 12809904 | 1184696955 | 1855771568 | 465839912 |
| 12809905 | 758492986 | 1856268030 | 1856154042 |
+----------+------------+------------+------------+
3 tuples (3.547ms)
Reproducible: Always
### Steps to Reproduce:
See details
## Comment 21478
Date: 2015-11-08 11:10:57 +0100
From: @mlkersten
Bug added to BugTracker-2015/Tests/constant-random.Bug-3836.sql
## Comment 21702
Date: 2015-12-30 13:31:35 +0100
From: @mlkersten
Seems closed.
| rand() only gets evaluated once when used as an expression | https://api.github.com/repos/MonetDB/MonetDB/issues/3836/comments | 0 | 2020-11-30T13:18:36Z | 2024-06-27T12:09:14Z | https://github.com/MonetDB/MonetDB/issues/3836 | 753,471,572 | 3,836 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-10-23 18:40:36 +0200
From: Anthony Damico <<ajdamico>>
To: SQL devs <<bugs-sql>>
Version: 11.21.5 (Jul2015)
CC: ajdamico, @hannesmuehleisen, @njnes, @yzchang
Last updated: 2016-01-15 11:37:49 +0100
## Comment 21392
Date: 2015-10-23 18:40:36 +0200
From: Anthony Damico <<ajdamico>>
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0
Build Identifier:
i have screencasted a full walk-through available on youtube
https://youtu.be/X8fOSFplVh0
Reproducible: Always
### Steps to Reproduce:
tables can be downloaded from this website
https://www.cms.gov/Research-Statistics-Data-and-Systems/Statistics-Trends-and-Reports/BSAPUFS/BSA_PDE_PUF.html
tables can be created with this command
CREATE TABLE testA (pde_event_id STRING, bene_sex_ident_cd INTEGER, bene_age_cat_cd INTEGER, pde_drug_cd INTEGER, pde_drug_str_cd INTEGER, pde_drug_str_units_cd INTEGER, pde_drug_dose_cd INTEGER, pde_drug_class_cd INTEGER, pde_drug_qty_dis INTEGER, pde_drug_day_sply_cd INTEGER, pde_drug_cost INTEGER, pde_drug_pat_pay_cd INTEGER, pde_drug_type_cd INTEGER);
tables can be imported with this command
COPY OFFSET 2 INTO testA FROM 'C:\Users\anthonyd.KFF\Desktop\2008_BSA_PartD_Events_PUF_1\2008_BSA_PartD_Events_PUF_1.csv' USING DELIMITERS ',','\n','"' NULL as '';
### Actual Results:
mserver holds ram that it should not
### Expected Results:
mserver should hold the same amount of ram after the operation completes as it did before the operation started
## Comment 21394
Date: 2015-10-23 23:24:51 +0200
From: @yzchang
Hai Anthony,
Thanks for even creating a video for this!
Which Windows version are you using?
This looks similar to another bug: https://www.monetdb.org/bugzilla/show_bug.cgi?id=3802. Niels has already checked in some fix, but unfortunately, that doesn't seem to completely solve the problem.
I wonder if you can try updating your MonetDB installation to include Niels' fix to see if that has any effect for your use cases.
Regards,
Jennie
## Comment 21396
Date: 2015-10-24 12:40:55 +0200
From: Anthony Damico <<ajdamico>>
thanks Jennie, i am using windows 8.1 in the video but the exact same thing happens on windows 7.
how do i install an mserver with niels' fix?
i looked here http://dev.monetdb.org/hg/MonetDB/file/tip/NT/installer64
but i don't 100% understand what is going on or how to try updating my mserver version to include this fix?
sorry if i'm being silly
thank you!
## Comment 21397
Date: 2015-10-24 12:42:58 +0200
From: @hannesmuehleisen
See here: http://monetdb.cwi.nl/testweb/web/57500:91007a50e91b/ for windows installers from yesterday.
## Comment 21398
Date: 2015-10-24 12:44:15 +0200
From: Anthony Damico <<ajdamico>>
thanks!
which of these two do i want?
[ ] MonetDB5-SQL-Installer-x86_64-91007a50e91b.msi 2015-10-24 05:29 5.5M
[ ] MonetDB5-SQL-Installer-x86_64-OID32-91007a50e91b.msi 2015-10-24 04:02 5.5M
## Comment 21399
Date: 2015-10-24 13:10:04 +0200
From: Anthony Damico <<ajdamico>>
hi, i have just tried with
[ ] MonetDB5-SQL-Installer-x86_64-91007a50e91b.msi 2015-10-24 05:29 5.5M
the exact same thing happens.
the bugfix for 3802 does not solve the problem shown in the video screencast
## Comment 21404
Date: 2015-10-25 09:35:21 +0100
From: @njnes
anthony monetdb keeps the loaded tables in memory, ie your copy into's will grow
the tables and therefor requires more ram to store it. Intermediate tables / results should be freed again, ie should not lead to more used memory.
## Comment 21406
Date: 2015-10-25 09:56:16 +0100
From: Anthony Damico <<ajdamico>>
hi niels, just confirming that you see that this is not the same table? these are ten distinct tables that are being COPY INTO'd in separate operations. this is not one single table being appended to. i've reopened the issue, but apologies if i'm overlooking something. thanks for your time with this!
## Comment 21641
Date: 2015-12-07 11:47:30 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [4faed73ce142](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4faed73ce142) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=4faed73ce142](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=4faed73ce142)
Changeset description:
Unload BATs as soon as the physical reference is zero and the BAT clean.
The idea is, the O/S will keep any used pages in memory until the
memory is needed again, and if we need the BAT again before that, we
get to reuse those memory pages without the O/S having to reread from
disk.
This depends on the fact that indexes (imprints and hashes) are merely
unloaded, not destroyed, when the BAT gets unloaded, and reloaded when
operations need those indexes again.
This should fix bug #3835.
## Comment 21663
Date: 2015-12-15 14:53:17 +0100
From: Anthony Damico <<ajdamico>>
this has made monetdb on windows much better, thank you for working on this!
| windows does not release ram after operations | https://api.github.com/repos/MonetDB/MonetDB/issues/3835/comments | 0 | 2020-11-30T13:18:33Z | 2024-06-27T12:09:12Z | https://github.com/MonetDB/MonetDB/issues/3835 | 753,471,534 | 3,835 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-10-23 17:54:24 +0200
From: @yzchang
To: SQL devs <<bugs-sql>>
Version: 11.21.5 (Jul2015)
CC: @njnes, @yzchang
Last updated: 2015-11-03 10:18:28 +0100
## Comment 21389
Date: 2015-10-23 17:54:24 +0200
From: @yzchang
Run the following queries, and observe that the SELECT query returns empty result, while the tuple with "mydate" value '2012-03-09' does satisfy the WHERE condition:
CREATE TABLE datepoint (mydate DATE, insiderange BOOLEAN DEFAULT FALSE, rangename CHAR(8));
INSERT INTO datepoint (mydate) VALUES ('2012-05-09');
INSERT INTO datepoint (mydate) VALUES ('2012-03-09');
CREATE TABLE daterange (startdate DATE, enddate DATE, name CHAR(8));
INSERT INTO daterange (startdate, enddate, name) VALUES ('2012-03-01','2012-03-31','A');
-- returns empty result, which is wrong:
select * from datepoint A, daterange B where A.mydate between B.startdate and B.enddate;
This problem seems rather specific with the number of tuples inserted into "datepoint", OR the order in which they are inserted.
The only difference in the following queries is that one more tuple is inserted into "datepoint", then the SELECT query returns correct results:
CREATE TABLE datepoint (mydate DATE, insiderange BOOLEAN DEFAULT FALSE, rangename CHAR(8));
INSERT INTO datepoint (mydate) VALUES ('2012-05-09');
INSERT INTO datepoint (mydate) VALUES ('2012-03-09');
INSERT INTO datepoint (mydate) VALUES ('2012-04-09');
CREATE TABLE daterange (startdate DATE, enddate DATE, name CHAR(8));
INSERT INTO daterange (startdate, enddate, name) VALUES ('2012-03-01','2012-03-31','A');
-- returns correct result: one tuple with "mydate" value '2012-03-09'
select * from datepoint A, daterange B where A.mydate between B.startdate and B.enddate;
The only difference in the following queries (compared with the first set) is that the tuples are inserted in the reverse order, then again the SELECT query returns correct results:
CREATE TABLE datepoint (mydate DATE, insiderange BOOLEAN DEFAULT FALSE, rangename CHAR(8));
INSERT INTO datepoint (mydate) VALUES ('2012-03-09');
INSERT INTO datepoint (mydate) VALUES ('2012-05-09');
CREATE TABLE daterange (startdate DATE, enddate DATE, name CHAR(8));
INSERT INTO daterange (startdate, enddate, name) VALUES ('2012-03-01','2012-03-31','A');
-- returns correct result: one tuple with "mydate" value '2012-03-09'
select * from datepoint A, daterange B where A.mydate between B.startdate and B.enddate;
## Comment 21390
Date: 2015-10-23 18:10:14 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [91007a50e91b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=91007a50e91b) made by Jennie Zhang <y.zhang@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=91007a50e91b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=91007a50e91b)
Changeset description:
Added test for bug #3834 , and stabel out, err
## Comment 21391
Date: 2015-10-23 18:16:15 +0200
From: @yzchang
The strange thing is, when running the query with Mtest.py, the first SELECT query does return correct results. While the problem occurs with just "mclient date_comparison_incorrect_results.Bug-3834.sql" ...
## Comment 21402
Date: 2015-10-25 00:11:23 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [565c496e66c0](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=565c496e66c0) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=565c496e66c0](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=565c496e66c0)
Changeset description:
fix for bug #3834, ie handle reverse sorted bats in rangejoin
## Comment 21403
Date: 2015-10-25 00:12:02 +0200
From: @njnes
fixed. The reverse sorted case is now properly handled in the rangejoin code.
## Comment 21409
Date: 2015-10-27 15:06:10 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [54e21e04d706](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=54e21e04d706) made by Jennie Zhang <y.zhang@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=54e21e04d706](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=54e21e04d706)
Changeset description:
Extended the test for Bug #3834 to test that the original UPDATE statement also produces correct results.
## Comment 21445
Date: 2015-11-03 10:18:28 +0100
From: @sjoerdmullender
Jul2015 SP1 has been released.
| Date comparison returns incorrect results | https://api.github.com/repos/MonetDB/MonetDB/issues/3834/comments | 0 | 2020-11-30T13:18:31Z | 2024-06-27T12:09:12Z | https://github.com/MonetDB/MonetDB/issues/3834 | 753,471,498 | 3,834 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-10-23 14:32:00 +0200
From: Frédéric Jolliton <<frederic.jolliton+monetdb>>
To: SQL devs <<bugs-sql>>
Version: 11.21.5 (Jul2015)
CC: @njnes
Last updated: 2015-11-03 10:18:49 +0100
## Comment 21387
Date: 2015-10-23 14:32:00 +0200
From: Frédéric Jolliton <<frederic.jolliton+monetdb>>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:40.0) Gecko/20100101 Firefox/40.0
Build Identifier:
I'm not sure if the standard cover this, but NULL in MonetDB is recognized only on few places (I'm excluding operators whose name contains NULL, such as "IS NOT NULL").
For examples, the following queries are not parsed successfully:
SELECT (NULL); -- but SELECT NULL; is ok!
SELECT 1 WHERE NULL = 42;
SELECT (1 = NULL);
SELECT (TRUE OR NULL);
They all return the following error:
syntax error, unexpected sqlNULL [..]
(PostgreSQL accepts them all.)
While this might look suspicious to have such a NULL literal in a query, it happens when constructing query programmatically in certains case.
We could replace them with CAST(NULL AS INT) or NULLIF(0,0) for example, but we feel that MonetDB should probably handle that itself if the behavior is covered by the standard.
What do you think?
Reproducible: Always
## Comment 21400
Date: 2015-10-24 23:56:23 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [a3b38049ebec](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a3b38049ebec) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=a3b38049ebec](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=a3b38049ebec)
Changeset description:
fixes for bug #3833, we now allow NULL almost everywhere in the
queries (beware NULL != NULL semantics are always inplace)
For equality use IS NULL.
## Comment 21401
Date: 2015-10-25 00:04:57 +0200
From: @njnes
Null's are now allowed anywhere, ie were we expect a value.
## Comment 21456
Date: 2015-11-03 10:18:49 +0100
From: @sjoerdmullender
Jul2015 SP1 has been released.
| NULL literals refused at many places | https://api.github.com/repos/MonetDB/MonetDB/issues/3833/comments | 0 | 2020-11-30T13:18:28Z | 2024-06-27T12:09:10Z | https://github.com/MonetDB/MonetDB/issues/3833 | 753,471,454 | 3,833 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-10-22 09:13:12 +0200
From: Sherzod Mutalov <<shmutalov>>
To: SQL devs <<bugs-sql>>
Version: 11.21.5 (Jul2015)
CC: g.ozolins, jspeis, martin.van.dinther, @PedroTadim, @yzchang
Last updated: 2019-04-30 12:36:03 +0200
## Comment 21378
Date: 2015-10-22 09:13:12 +0200
From: Sherzod Mutalov <<shmutalov>>
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0
Build Identifier:
Cannot use SQL expressions with GROUP BY clause, which causes error. Similar query works on SQL Server, PostgreSQL and MySQL
Reproducible: Always
### Steps to Reproduce:
Execute next statements:
1. CREATE TABLE test("State" string, "Sales" double);
2. INSERT INTO test VALUES('Texas', 125);
3.
SELECT LEFT("State", 3) AS "State",
SUM("Sales") AS "Sales"
FROM test
GROUP BY LEFT("State", 3);
### Actual Results:
syntax error, unexpected LEFT in: "select left("State", 3) as "State",
sum("Sales") as "Sales"
from test
group by l"
### Expected Results:
+-------+--------------------------+
| State | Sales |
+=======+==========================+
| Tex | 450 |
+-------+--------------------------+
MonetDB version:
MonetDB 5 server v11.21.5 "Jul2015"
Serving database 'demo', using 4 threads
Compiled for x86_64-pc-winnt/64bit with 64bit OIDs dynamically linked
Found 15.916 GiB available main-memory.
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
Listening for connection requests on mapi:monetdb://127.0.0.1:50000/
MonetDB/GIS module loaded
Start processing logs sql/sql_logs version 52200
Start reading the write-ahead log 'sql_logs\sql\log.12'
Finished reading the write-ahead log 'sql_logs\sql\log.12'
Finished processing logs sql/sql_logs
MonetDB/SQL module loaded
## Comment 21379
Date: 2015-10-22 09:16:20 +0200
From: Sherzod Mutalov <<shmutalov>>
Read steps to reproduce as below:
Execute next statements:
1. CREATE TABLE test("State" string, "Sales" double);
2. INSERT INTO test VALUES('Texus', 200);
3. INSERT INTO test VALUES('Texas', 250);
4.
SELECT LEFT("State", 3) AS "State",
SUM("Sales") AS "Sales"
FROM test
GROUP BY LEFT("State", 3);
## Comment 21380
Date: 2015-10-22 11:56:42 +0200
From: @yzchang
This is not a bug, but a missing feature. A.f.a.I.k., MonetDB doesn't support expressions in GROUP BY yet. It only support references to columns. Changed this report into "enhancement".
## Comment 21381
Date: 2015-10-22 13:03:42 +0200
From: Sherzod Mutalov <<shmutalov>>
What a pity, so I have to pervert queries. Hopefully this feature will be added in the next release.
## Comment 21462
Date: 2015-11-05 12:53:49 +0100
From: Martin van Dinther <<martin.van.dinther>>
There are some workarounds for this:
-- use a subquery in the FROM-clause:
SELECT "State3", SUM("Sales") AS "Sales"
FROM (SELECT LEFT("State", 3) AS "State3", "Sales" FROM test) AS test
GROUP BY "State3";
-- use a view to extend the table with the expression colum(s) once
CREATE VIEW test_vw AS
SELECT LEFT("State", 3) AS "State3", "State", "Sales" FROM test;
-- and next query the view instead of the table
SELECT "State3", SUM("Sales") AS "Sales"
FROM test_vw
GROUP BY "State3";
Hope this helps.
## Comment 22035
Date: 2016-04-14 12:11:36 +0200
From: Martin van Dinther <<martin.van.dinther>>
You can also use the column alias in the GROUP BY (and also in HAVING).
So a simpler workaround is:
SELECT LEFT("State", 3) AS "StateFirst3chars", SUM("Sales") AS "Sales"
FROM test
GROUP BY "StateFirst3chars";
## Comment 22191
Date: 2016-06-02 15:28:03 +0200
From: Gatis Ozolins <<g.ozolins>>
This is also issue for us, where BI tools are generating SQL
## Comment 25081
Date: 2017-03-02 16:15:26 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [3d3a3776b749](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3d3a3776b749) made by Martin van Dinther <martin.van.dinther@monetdbsolutions.com> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=3d3a3776b749](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=3d3a3776b749)
Changeset description:
Adding missing test script for old bug #3832.
It would be nice if support for groupby_on_column_expressions could be implemented.
## Comment 26404
Date: 2018-04-23 22:03:11 +0200
From: jspeis
would be great to see this feature added!
## Comment 26741
Date: 2018-12-20 16:35:53 +0100
From: @PedroTadim
This feature will be available in the next feature release.
| Cannot use expressions in GROUP BY clause | https://api.github.com/repos/MonetDB/MonetDB/issues/3832/comments | 0 | 2020-11-30T13:18:25Z | 2024-06-27T12:09:09Z | https://github.com/MonetDB/MonetDB/issues/3832 | 753,471,424 | 3,832 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-10-22 08:44:28 +0200
From: Sherzod Mutalov <<shmutalov>>
To: Martin van Dinther <<martin.van.dinther>>
Version: -- development
CC: martin.van.dinther
Last updated: 2018-03-29 15:39:25 +0200
## Comment 21377
Date: 2015-10-22 08:44:28 +0200
From: Sherzod Mutalov <<shmutalov>>
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0
Build Identifier:
MonetDB doesn't support some date part formatting like quarter or iso year/weak. Popular RDBMS includes that functionality (see additional information). For now, as solution we use:
((extract(month from current_timestamp) - 1) / 3 + 1)
expression.
Reproducible: Always
### Steps to Reproduce:
1. select extract(quarter from current_timestamp)
or
2. select timestamp_to_str(current_timestamp, '%Q');
### Actual Results:
1. syntax error, unexpected IDENT in: "select extract(quarter"
2. server crash
### Expected Results:
quarter of a date (1-4)
See:
1. SQL Server: DATEPART(Q, <date>)
2. PostgreSQL: DATE_PART('quarter', <date>)
3. Oracle: TO_CHAR(<date>, 'Q')
4. MySQL: QUARTER(<date>)
## Comment 25562
Date: 2017-08-10 14:21:35 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [eb347d3c0321](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=eb347d3c0321) made by Martin van Dinther <martin.van.dinther@monetdbsolutions.com> in the MonetDB repo, refers to this bug.
For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=eb347d3c0321](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=eb347d3c0321)
Changeset description:
Addendum to changeset [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=1523b559564f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=1523b559564f)
Added the words quarter and week to the non_reserved_word list to avoid upgrade problems for users which have objects named quarter or week.
This allows me to undo some changes made in pg_regress tests where column quarter or function calls to week or quarter were made.
Also extended test extract_quarter_week_from_date.Bug-3831.sql with tests of new scalar function: quarter(x).
Also updated ODBC driver mapping for scalar function quarter(), which can now map to quarter() directly instead of the workaround using month().
Also moved ChangeLog message to the prooer sql/ChangeLog as this is related only to sql part.
## Comment 25563
Date: 2017-08-10 15:20:31 +0200
From: Martin van Dinther <<martin.van.dinther>>
Added support for SQL scalar functions:
quarter ( date_expr ),
quarter ( timestamp_expr ) and
quarter ( timestamptz_expr ).
and for extracting the quarter (number between 1 and 4) from
a date or a timestamp or a timestamp with timezone in SQL:
EXTRACT ( QUARTER FROM my_date_expr ).
Also added support for extracting the week (number between 1 and 53) from
a date or a timestamp or a timestamp with timezone in SQL:
EXTRACT ( WEEK FROM my_date_expr ).
The scalar functions week() and weekofyear() already existed.
## Comment 26327
Date: 2018-03-29 15:39:25 +0200
From: @sjoerdmullender
The Mar2018 version has been released.
| Extend date part extraction and date formating functions to support more formats like "quarter", "iso year/week" | https://api.github.com/repos/MonetDB/MonetDB/issues/3831/comments | 0 | 2020-11-30T13:18:22Z | 2024-06-27T12:09:08Z | https://github.com/MonetDB/MonetDB/issues/3831 | 753,471,398 | 3,831 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-10-21 17:26:56 +0200
From: Kevin Boulain <<kevin.boulain>>
To: SQL devs <<bugs-sql>>
Version: 11.21.5 (Jul2015)
CC: @njnes
Last updated: 2015-11-03 10:17:59 +0100
## Comment 21374
Date: 2015-10-21 17:26:56 +0200
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:
A coalesce may influence the result of the following coalesce(s).
Reproducible: Always
### Steps to Reproduce:
Execute these two queries, the order matters:
sql>select coalesce(0, false);
sql>select coalesce(null, false);
### Actual Results:
sql>select coalesce(0, false);
+---------------------+
| isnull_single_value |
+=====================+
| 0 |
+---------------------+
1 tuple (0.729ms)
sql>select coalesce(null, false);
+---------------------+
| isnull_single_value |
+=====================+
| 0 |
+---------------------+
1 tuple (0.188ms)
### Expected Results:
sql>select coalesce(0, false);
+---------------------+
| isnull_single_value |
+=====================+
| 0 |
+---------------------+
1 tuple (0.729ms)
sql>select coalesce(null, false);
+---------------------+
| isnull_single_value |
+=====================+
| false |
+---------------------+
1 tuple (0.637ms)
## Comment 21382
Date: 2015-10-22 13:29:55 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [44e70b629f50](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=44e70b629f50) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=44e70b629f50](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=44e70b629f50)
Changeset description:
Added test for bug #3830.
## Comment 21385
Date: 2015-10-23 13:27:28 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [35628f1c15c0](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=35628f1c15c0) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=35628f1c15c0](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=35628f1c15c0)
Changeset description:
fixed coalesce(null, ...) with query cache bug #3830
## Comment 21386
Date: 2015-10-23 13:30:28 +0200
From: @njnes
fixed. Was a bug in the query cache matching algo
## Comment 21431
Date: 2015-11-03 10:17:59 +0100
From: @sjoerdmullender
Jul2015 SP1 has been released.
| Coalesce typing inconsistencies | https://api.github.com/repos/MonetDB/MonetDB/issues/3830/comments | 0 | 2020-11-30T13:18:19Z | 2024-06-27T12:09:08Z | https://github.com/MonetDB/MonetDB/issues/3830 | 753,471,359 | 3,830 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-10-21 15:49:13 +0200
From: Frédéric Jolliton <<frederic.jolliton+monetdb>>
To: SQL devs <<bugs-sql>>
Version: 11.21.5 (Jul2015)
Last updated: 2015-11-03 10:18:48 +0100
## Comment 21369
Date: 2015-10-21 15:49:13 +0200
From: Frédéric Jolliton <<frederic.jolliton+monetdb>>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:41.0) Gecko/20100101 Firefox/41.0
Build Identifier:
We found yet another combination of expressions that cause MonetDB to crash without even logging a reason (except that it was due to a SIGSEGV.)
Since we're building complex queries on the fly, we're starting to get nervous, being unable to predict what could crash or not. Russian roulette.
Reproducible: Always
### Steps to Reproduce:
1. CREATE TABLE kb (value INT);
2. SELECT 1 FROM kb WHERE value=1 AND (value=2 OR value=3 AND (value=4 OR value=5));
### Actual Results:
MonetDB is crashing.
### Expected Results:
MonetDB not crashing..
$ bin/mserver5 --version
MonetDB 5 server v11.21.7 "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 15.6GiB available memory, 4 available cpu cores
Libraries:
libpcre: 8.36 2014-09-26 (compiled with 8.36)
openssl: OpenSSL 1.0.1g 7 Apr 2014 (compiled with OpenSSL 1.0.1g 7 Apr 2014)
libxml2: 2.9.1 (compiled with 2.9.1)
Compiled by: fjolliton@workstation (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/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64
## Comment 21370
Date: 2015-10-21 15:55:51 +0200
From: Frédéric Jolliton <<frederic.jolliton+monetdb>>
This also crashes with just:
SELECT 1 FROM kb WHERE value AND (value OR value AND (value OR value));
## Comment 21371
Date: 2015-10-21 16:01:25 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [907dd705fc75](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=907dd705fc75) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=907dd705fc75](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=907dd705fc75)
Changeset description:
Don't merge if there is no expression.
This fixes bug #3829.
Niels, please take a look.
## Comment 21372
Date: 2015-10-21 16:04:19 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [e5b4b54cd228](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e5b4b54cd228) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=e5b4b54cd228](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=e5b4b54cd228)
Changeset description:
Test for bug #3829.
## Comment 21373
Date: 2015-10-21 17:19:39 +0200
From: Frédéric Jolliton <<frederic.jolliton+monetdb>>
That was fast! Thanks for your reactivity. Awesome :)
## Comment 21455
Date: 2015-11-03 10:18:48 +0100
From: @sjoerdmullender
Jul2015 SP1 has been released.
| Certains simple WHERE clause cause MonetDB to segfault without explanation | https://api.github.com/repos/MonetDB/MonetDB/issues/3829/comments | 0 | 2020-11-30T13:18:15Z | 2024-06-27T12:09:07Z | https://github.com/MonetDB/MonetDB/issues/3829 | 753,471,323 | 3,829 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-10-21 13:45:22 +0200
From: @hannesmuehleisen
To: SQL devs <<bugs-sql>>
Version: 11.19.3 (Oct2014)
CC: ajdamico
Last updated: 2015-11-03 10:18:20 +0100
## Comment 21362
Date: 2015-10-21 13:45:22 +0200
From: @hannesmuehleisen
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.71 Safari/537.36
Build Identifier:
When performing fairly complex schema manipulation with many ALTER TABLE statements, the database is corrupted after a restart.
Reproducible: Always
### Steps to Reproduce:
1. run attached script
### Actual Results:
identifier not found
### Expected Results:
query results exactly the same (empty table) as before server restart
## Comment 21363
Date: 2015-10-21 13:45:46 +0200
From: @hannesmuehleisen
Created attachment 361
script that provokes the issue
> Attached file: [hmda-bug.sh](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3828_hmda-bug.sh_361) (application/octet-stream, 4458 bytes)
> Description: script that provokes the issue
## Comment 21364
Date: 2015-10-21 14:39:22 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [68db09afc566](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=68db09afc566) made by Hannes Muehleisen <hannes@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=68db09afc566](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=68db09afc566)
Changeset description:
Test for Bug #3828
## Comment 21368
Date: 2015-10-21 15:18:33 +0200
From: @sjoerdmullender
(In reply to Hannes Muehleisen from comment 0)
> Reproducible: Always
I wasn't able to reproduce this always. But I did find that when I have samtools enable, the script does not fail, but when I have samtools disabled, the script fails.
When enabled, samtools causes more catalog changes during database creation. That may have to do with the difference in behavior.
## Comment 21421
Date: 2015-10-29 16:57:19 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [834b9795aa08](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=834b9795aa08) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=834b9795aa08](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=834b9795aa08)
Changeset description:
When a candidate list is non-dense, the join result likely is too.
This fixes bug #3828.
## Comment 21440
Date: 2015-11-03 10:18:20 +0100
From: @sjoerdmullender
Jul2015 SP1 has been released.
| Schema corruption after several ALTER TABLE statements and server restart | https://api.github.com/repos/MonetDB/MonetDB/issues/3828/comments | 0 | 2020-11-30T13:18:13Z | 2024-06-27T12:09:06Z | https://github.com/MonetDB/MonetDB/issues/3828 | 753,471,288 | 3,828 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-10-20 15:46:49 +0200
From: Frédéric Jolliton <<frederic.jolliton+monetdb>>
To: SQL devs <<bugs-sql>>
Version: 11.21.5 (Jul2015)
Last updated: 2015-11-03 10:18:23 +0100
## Comment 21358
Date: 2015-10-20 15:46:49 +0200
From: Frédéric Jolliton <<frederic.jolliton+monetdb>>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:40.0) Gecko/20100101 Firefox/40.0
Build Identifier:
It seems that only equality is implemented on UUID.
We were trying to do:
SELECT * FROM some_table WHERE uuid_a <> uuid_b;
But we get:
TypeException:user.s19_1[17]:'calc.!=' undefined in: calc.!=(X_797:uuid,X_799:uuid);
program contains errors
We were expecting either an SQL error, or the test to be available.
While the following query is working fine:
SELECT * FROM some_table WHERE uuid_a = uuid_b;
unfortunately, we can't use that to workaround the limitation by doing:
SELECT * FROM some_table WHERE NOT (uuid_a = uuid_b);
because the optimization pass translate that to the query shown at the beginning.
We found an ugly workaround:
SELECT * FROM some_table WHERE NOT (uuid_a = uuid_b AND TRUE);
(Likewise for other comparison such as < or <=, but that doesn't make sense anyway on UUID, so not a problem per se.)
Reproducible: Always
## Comment 21359
Date: 2015-10-21 10:14:46 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [cba5bc5237d6](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=cba5bc5237d6) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=cba5bc5237d6](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=cba5bc5237d6)
Changeset description:
Added comparison functions for UUID type.
This fixes bug #3827.
## Comment 21441
Date: 2015-11-03 10:18:23 +0100
From: @sjoerdmullender
Jul2015 SP1 has been released.
| Certains comparisons between UUID produce a MAL error | https://api.github.com/repos/MonetDB/MonetDB/issues/3827/comments | 0 | 2020-11-30T13:18:09Z | 2024-06-27T12:09:05Z | https://github.com/MonetDB/MonetDB/issues/3827 | 753,471,243 | 3,827 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-10-19 12:12:19 +0200
From: Dieter <<mayerd>>
To: GDK devs <<bugs-common>>
Version: 11.21.19 (Jul2015-SP4)
Last updated: 2016-04-11 11:22:43 +0200
## Comment 21352
Date: 2015-10-19 12:12:19 +0200
From: Dieter <<mayerd>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.71 Safari/537.36
Build Identifier:
Schema operations like drop table and create table result in a crash of
db5server if the operations are concurrent.
After the crash the table exits more then once in the schema (sys.tables) but with no columns (sys.columns).
Reproducible: Always
### Steps to Reproduce:
1. Run the commandfile monetschema.cmd on Windows.
This command starts two concurrent processes on Windows
(WScript.exe via monetschema.vbs) which drops and creates a table
in a loop to enforce the crash immediately.
Each script works with its own table.
2. Look at errors/backtrace log on Linux.
"Program terminated with signal 11, Segmentation fault."
In the attachement backtace_1, backtrace_2 and backtrace_3 you find
tracefiles of the server at the moment of the crash of different test runs.
### Actual Results:
Server crashes.
Schema information corrupted (sys.table contains a table more than once).
### Expected Results:
Concurret schema operation should not result in server crash nor
on corrupted schema information.
## Comment 21353
Date: 2015-10-19 13:18:09 +0200
From: Dieter <<mayerd>>
Created attachment 356
Command File for test run
This command file execute 2 concurrent processes.
> Attached file: [monetSchema.cmd](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3826_monetSchema.cmd_356) (text/plain, 280 bytes)
> Description: Command File for test run
## Comment 21354
Date: 2015-10-19 13:19:21 +0200
From: Dieter <<mayerd>>
Created attachment 357
Visual Basic Script for Create/Drop Table
> Attached file: [monetSchema.vbs](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3826_monetSchema.vbs_357) (text/plain, 3809 bytes)
> Description: Visual Basic Script for Create/Drop Table
## Comment 21355
Date: 2015-10-19 13:22:41 +0200
From: Dieter <<mayerd>>
Created attachment 358
backtrace file of test run 1
> Attached file: [backtrace_1](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3826_backtrace_1_358) (text/plain, 112373 bytes)
> Description: backtrace file of test run 1
## Comment 21356
Date: 2015-10-19 13:23:14 +0200
From: Dieter <<mayerd>>
Created attachment 359
backtrace file of test run 2
> Attached file: [backtrace_2](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3826_backtrace_2_359) (text/plain, 44579 bytes)
> Description: backtrace file of test run 2
## Comment 21357
Date: 2015-10-19 13:23:53 +0200
From: Dieter <<mayerd>>
Created attachment 360
backtrace file of test run 3
> Attached file: [backtrace_3](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3826_backtrace_3_360) (text/plain, 44590 bytes)
> Description: backtrace file of test run 3
## Comment 21360
Date: 2015-10-21 10:35:31 +0200
From: @sjoerdmullender
I get this:
Assertion failed: rid != oid_nil, file .\..\..\..\sql\storage\store.c, line 3579
That line is in sys_drop_column, the assertion is
assert(rid != oid_nil);
## Comment 21375
Date: 2015-10-21 22:47:15 +0200
From: Dieter <<mayerd>>
Hi Sjoerd,
I've tested with Centos7 and a Windows 7 64bit client.
I' m not sure what you intend to say with your last comment.
What is the next step to solve this severe problem?
BTW: In the previous version of Monet there was also the same problem, that concurrent schema operations leaded to a corrupted schema. But first, the server did not crash and second, I got rid of the duplicate records in sys.tables by "drop table" and so I could "repair" the situation (See bug #3758).
In the current version I have a crash and "drop table" does nit reduce the number of records in sys.tables but reports, that the table does not exists.
## Comment 21376
Date: 2015-10-21 23:07:44 +0200
From: @sjoerdmullender
My comment was basically saying two things: I can reproduce the problem, and this is where it failed. Mostly as a reminder to ourselves of where to look.
I think the next step is that we need to figure out why the server crashes. Since we have a way to reproduce it, there is hope.
## Comment 21584
Date: 2015-11-24 00:07:57 +0100
From: Dieter <<mayerd>>
Hi Sjoerd,
is there any progress on my issue (with a little more than hope;-) ?
I've seen a new bug #3848 which seems to report a problem with similar crashes.
It would help to my struggle to make progress in using MonetDB.
## Comment 21586
Date: 2015-11-24 17:48:17 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [a3e764eb89e1](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a3e764eb89e1) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=a3e764eb89e1](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=a3e764eb89e1)
Changeset description:
Added test for bug #3826.
Not enabled yet, since it usually causes the server to crash.
| Monetdb Server crashes on concurrent schema operations | https://api.github.com/repos/MonetDB/MonetDB/issues/3826/comments | 0 | 2020-11-30T13:18:06Z | 2024-06-28T07:19:48Z | https://github.com/MonetDB/MonetDB/issues/3826 | 753,471,206 | 3,826 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-10-17 01:54:13 +0200
From: Alex <<abraun_75>>
To: SQL devs <<bugs-sql>>
Version: 11.21.5 (Jul2015)
CC: @njnes
Last updated: 2015-11-03 10:18:35 +0100
## Comment 21347
Date: 2015-10-17 01:54:13 +0200
From: Alex <<abraun_75>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0
Build Identifier:
MonetDb stores intermediate results within the bat directory and the corresponding sub directories.
Every time a query is being executed a new .tail file is being created - even if the same query is used.
These .tail files are only being deleted after restarting the server (dbfarm). Closing the connection, resultset and statment does not remove the files.
Eventually this leads to insuffient disk space and the server crashes.
I cannot share the data I was using, but I believe this behavior can be reproduced by generating a random dataset. The data I was using consists of two tables. Table A stores 10 million rows (10 columns) and Table B stores 1 Million rows (3 columns). Table A Column1 refernces Table B Column 1.
Both tables are being joined (using Column 1) and some statistical values are being calculated (QUARTILE, AVG, SUM using GROUP BY).
I tried to execute the same SQL query 1000 times sequentially and after the 60th iteration monetDB crashed because of insuffcient disk space.
I sent a request to the user mailing list and got the response that other users faced the same issue and are forced to restart the server in a nightly maintenance window.
I think this is a bug and the intermediate files should be deleted after the query has been executed.
Reproducible: Always
### Steps to Reproduce:
1. ingest a medium size data set (e.g. 10 Million rows and 1 Million rows) with at least two tables
2. Create a SQL statement like this pseudo code
SELECT
COUNT(*) AS TOTAL, SUM(VALUE_DECIMAL) AS VALUE, STRING_VALUE,
MIN(VALUE_DECIMAL) as min,
QUANTILE (VALUE_DECIMAL,0.25) AS Q25,
QUANTILE (VALUE_DECIMAL,0.5) AS Q50,
QUANTILE (VALUE_DECIMAL,0.75) AS Q75,
MAX(VALUE_DECIMAL) as max
FROM TABLE_A AS a
JOIN TABLE_B as b on (b.INT_ID = a.INT_ID)
GROUP BY STRING_VALUE
3. Execute the SQL statement several times
4. Monitor the disk usage after the execution
You should see that the used disk space increases with each iteration. Every iteration creates a new .tail file.
5. Restart the dbFarm
6. Check the disk usage
7. Now you should see that the intermediate files were deleted
### Actual Results:
New .tal file with each iteration, increasing disk usage until server crashes
### Expected Results:
.tail files are deleted after the query has been executed
## Comment 21349
Date: 2015-10-17 11:16:32 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [a2d0aed144f5](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a2d0aed144f5) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=a2d0aed144f5](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=a2d0aed144f5)
Changeset description:
unfix quantile bat fixes Bug #3825
## Comment 21350
Date: 2015-10-17 11:22:58 +0200
From: @njnes
the quantile function leaked bats.
## Comment 21448
Date: 2015-11-03 10:18:35 +0100
From: @sjoerdmullender
Jul2015 SP1 has been released.
| MonetDB not cleaning intermediate results which leads to filling up disk space and ultimately server crash | https://api.github.com/repos/MonetDB/MonetDB/issues/3825/comments | 0 | 2020-11-30T13:18:03Z | 2024-06-27T12:09:02Z | https://github.com/MonetDB/MonetDB/issues/3825 | 753,471,175 | 3,825 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-10-16 22:55:05 +0200
From: Dann Corbit <<dcorbit>>
To: clients devs <<bugs-clients>>
Version: 11.21.19 (Jul2015-SP4)
CC: martin.van.dinther
Last updated: 2018-03-29 15:39:19 +0200
## Comment 21344
Date: 2015-10-16 22:55:05 +0200
From: Dann Corbit <<dcorbit>>
User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:44.0) Gecko/20100101 Firefox/44.0
Build Identifier:
using monetdb account, I created the following table:
CREATE TABLE "sys"."all_data_types" (
"charnotnull" CHAR(10) NOT NULL,
"charnull" CHAR(10),
"varcharnotnull" VARCHAR(10) NOT NULL,
"varcharnull" VARCHAR(10),
"textnotnull" CHARACTER LARGE OBJECT NOT NULL,
"textnull" CHARACTER LARGE OBJECT,
"blobnotnull" BINARY LARGE OBJECT NOT NULL,
"blobnull" BINARY LARGE OBJECT,
"decimalnotnull" DECIMAL(18,9) NOT NULL,
"decimalnull" DECIMAL(18,9),
"tinyintnotnull" TINYINT NOT NULL,
"tinyintnull" TINYINT,
"smallintnotnull" SMALLINT NOT NULL,
"smallintnull" SMALLINT,
"intnotnull" INTEGER NOT NULL,
"intnull" INTEGER,
"bigintnotnull" BIGINT NOT NULL,
"bigintnull" BIGINT,
"realnotnull" REAL NOT NULL,
"realnull" REAL,
"doublenotnull" DOUBLE NOT NULL,
"doublenull" DOUBLE,
"booleannottnull" BOOLEAN NOT NULL,
"booleantnull" BOOLEAN,
"datenotnull" DATE NOT NULL,
"datenull" DATE,
"timenotnull" TIME(3) NOT NULL,
"timenull" TIME(3),
"timewithtimezonenotnull" TIME(3) WITH TIME ZONE NOT NULL,
"timewithtimezonenull" TIME(3) WITH TIME ZONE,
"timestampnotnull" TIMESTAMP(3) NOT NULL,
"timestampnull" TIMESTAMP(3),
"timestampwithtimezonenotnull" TIMESTAMP(3) WITH TIME ZONE NOT NULL,
"timestampwithtimezonenull" TIMESTAMP(3) WITH TIME ZONE,
"intervalnotnull" INTERVAL DAY TO SECOND NOT NULL,
"intervalnull" INTERVAL DAY TO SECOND,
"bigintnotnullauto" BIGINT NOT NULL DEFAULT next value for "sys"."seq_7877",
"jsonnotnull" JSON NOT NULL,
"jsonnull" JSON,
"urlnotnull" URL NOT NULL,
"urlnull" URL,
"uuidnotnull" UUID NOT NULL,
"uuidnull" UUID,
"inetnotnull" INET NOT NULL,
"inetnull" INET,
CONSTRAINT "all_data_types_bigintnotnullauto_pkey" PRIMARY KEY ("bigintnotnullauto")
);
When I try to access the table using ODBC, it is not visible in the list of tables.
Reproducible: Always
### Steps to Reproduce:
1.Create a table like this:
CREATE TABLE "sys"."all_data_types" (
"charnotnull" CHAR(10) NOT NULL,
"charnull" CHAR(10),
"varcharnotnull" VARCHAR(10) NOT NULL,
"varcharnull" VARCHAR(10),
"textnotnull" CHARACTER LARGE OBJECT NOT NULL,
"textnull" CHARACTER LARGE OBJECT,
"blobnotnull" BINARY LARGE OBJECT NOT NULL,
"blobnull" BINARY LARGE OBJECT,
"decimalnotnull" DECIMAL(18,9) NOT NULL,
"decimalnull" DECIMAL(18,9),
"tinyintnotnull" TINYINT NOT NULL,
"tinyintnull" TINYINT,
"smallintnotnull" SMALLINT NOT NULL,
"smallintnull" SMALLINT,
"intnotnull" INTEGER NOT NULL,
"intnull" INTEGER,
"bigintnotnull" BIGINT NOT NULL,
"bigintnull" BIGINT,
"realnotnull" REAL NOT NULL,
"realnull" REAL,
"doublenotnull" DOUBLE NOT NULL,
"doublenull" DOUBLE,
"booleannottnull" BOOLEAN NOT NULL,
"booleantnull" BOOLEAN,
"datenotnull" DATE NOT NULL,
"datenull" DATE,
"timenotnull" TIME(3) NOT NULL,
"timenull" TIME(3),
"timewithtimezonenotnull" TIME(3) WITH TIME ZONE NOT NULL,
"timewithtimezonenull" TIME(3) WITH TIME ZONE,
"timestampnotnull" TIMESTAMP(3) NOT NULL,
"timestampnull" TIMESTAMP(3),
"timestampwithtimezonenotnull" TIMESTAMP(3) WITH TIME ZONE NOT NULL,
"timestampwithtimezonenull" TIMESTAMP(3) WITH TIME ZONE,
"intervalnotnull" INTERVAL DAY TO SECOND NOT NULL,
"intervalnull" INTERVAL DAY TO SECOND,
"bigintnotnullauto" BIGINT NOT NULL DEFAULT next value for "sys"."seq_7877",
"jsonnotnull" JSON NOT NULL,
"jsonnull" JSON,
"urlnotnull" URL NOT NULL,
"urlnull" URL,
"uuidnotnull" UUID NOT NULL,
"uuidnull" UUID,
"inetnotnull" INET NOT NULL,
"inetnull" INET,
CONSTRAINT "all_data_types_bigintnotnullauto_pkey" PRIMARY KEY ("bigintnotnullauto")
);
2. Try to access the table using ODBC
### Actual Results:
The table does not show up
### Expected Results:
The table should be visible.
Perhaps not visible due to non-odbc types, the non-odbc types (such as UUID, JSON) could be mapped as varchar() for ODBC purposes.
## Comment 21345
Date: 2015-10-16 23:08:10 +0200
From: Dann Corbit <<dcorbit>>
Command to populate the table with a single row:
sql>insert into "all_data_types"
more>(
more>"charnotnull",
more>"charnull",
more>"varcharnotnull",
more>"varcharnull",
more>"textnotnull",
more>"textnull",
more>"blobnotnull",
more>"blobnull",
more>"decimalnotnull",
more>"decimalnull",
more>"tinyintnotnull",
more>"tinyintnull",
more>"smallintnotnull",
more>"smallintnull",
more>"intnotnull",
more>"intnull",
more>"bigintnotnull",
more>"bigintnull",
more>"realnotnull",
more>"realnull",
more>"doublenotnull",
more>"doublenull",
more>"booleannottnull",
more>"booleantnull",
more>"datenotnull",
more>"datenull",
more>"timenotnull",
more>"timenull",
more>"timewithtimezonenotnull",
more>"timewithtimezonenull",
more>"timestampnotnull",
more>"timestampnull",
more>"timestampwithtimezonenotnull",
more>"timestampwithtimezonenull",
more>"intervalnotnull",
more>"intervalnull",
more>"jsonnotnull",
more>"jsonnull",
more>"urlnotnull",
more>"urlnull",
more>"uuidnotnull",
more>"uuidnull",
more>"inetnotnull",
more>"inetnull"
more>)
more>values (
more>'a',
more>NULL,
more>'b',
more>NULL,
more>'c',
more>NULL,
more>'',
more>NULL,
more>123456789.123456789,
more>NULL,
more>-127,
more>NULL,
more>-32767,
more>NULL,
more>-2147483647,
more>NULL,
more>-9223372036854775807,
more>NULL,
more>-1e38,
more>NULL,
more>-1e308,
more>NULL,
more>true,
more>NULL,
more>current_date(),
more>NULL,
more>current_time(),
more>NULL,
more>current_timestamp(),
more>NULL,
more>current_timestamp(),
more>NULL,
more>current_timestamp(),
more>NULL,
more>1,
more>NULL,
more>'{"f1":1,"f2":true,"f3":"Hi I''m \\"Daisy\\""}',
more>NULL,
more>'http://www.connx.com',
more>NULL,
more>uuid(),
more>NULL,
more>'192.168.100.128/25',
more>NULL
more>);
1 affected row, last generated key: 2 (28.589ms)
## Comment 21346
Date: 2015-10-16 23:54:07 +0200
From: Dann Corbit <<dcorbit>>
I can query this table using JDBC via SQLSquirrel.
## Comment 21361
Date: 2015-10-21 12:38:21 +0200
From: @sjoerdmullender
In what sense is the table not visible through ODBC?
I've tried reproducing the problem, but when I query through ODBC, I see the table. I've tried SQLTables with "%" for the table name and table type parameters, and also "%" for the table name and "TABLE" for the table type parameter. I've also tried a call to SQLExecDirect with the query "select * from all_data_types".
## Comment 21383
Date: 2015-10-23 02:00:54 +0200
From: Dann Corbit <<dcorbit>>
Created attachment 362
Attempt to perform odbc import
Table exists
> Attached file: [monetdb-import-attempt.png](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3824_monetdb-import-attempt.png_362) (image/png, 8052 bytes)
> Description: Attempt to perform odbc import
## Comment 21384
Date: 2015-10-23 02:01:19 +0200
From: Dann Corbit <<dcorbit>>
Created attachment 363
collecting the information about the table fails
> Attached file: [monetdb-import-error.png](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3824_monetdb-import-error.png_363) (image/png, 11109 bytes)
> Description: collecting the information about the table fails
## Comment 21388
Date: 2015-10-23 15:12:30 +0200
From: @sjoerdmullender
Can you please create a log and attach it to this bug report.
To create a log, you need to start the application that uses the MonetDB ODBC driver with an extra environment variable. Probably the easiest way to do that is to start a cmd window (Start -> Run... -> cmd.exe) and in that window type
set ODBCDEBUG=C:\....\odbc.log
and then start your application from this window.
The bit after the = should be the absolute pathname of a file you can write to. After the application is done it should contain a log of the complete interaction with the driver. Before attaching the file, please make sure it doesn't contain any sensitive information.
## Comment 21500
Date: 2015-11-10 22:08:40 +0100
From: Dann Corbit <<dcorbit>>
Created attachment 365
Import from Monetdb where the only object selected was sys.all_data_types
A listing of all objects was made, and the item sys.all_data_types was selected.
> Attached file: [monetdb2.7z](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3824_monetdb2.7z_365) (application/octet-stream, 28762 bytes)
> Description: Import from Monetdb where the only object selected was sys.all_data_types
## Comment 21501
Date: 2015-11-10 22:09:32 +0100
From: Dann Corbit <<dcorbit>>
Created attachment 366
This import requested every object in the database, and has several additional import failures
> Attached file: [monetdb.7z](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3824_monetdb.7z_366) (application/octet-stream, 27530 bytes)
> Description: This import requested every object in the database, and has several additional import failures
## Comment 21518
Date: 2015-11-13 02:46:54 +0100
From: Dann Corbit <<dcorbit>>
In tracing the code, it appears that sys.all_data_types is listed as a procedure rather than as a table.
## Comment 26281
Date: 2018-03-23 22:01:56 +0100
From: Martin van Dinther <<martin.van.dinther>>
Your last attachment of the monetdb.log showed there was an SQL error:
SELECT: no such column 'p.sql'
when calling SQLProceduresW.
That was a bug in the implementation of the SQL query executed by SQLProceduresW(). It contained an old invalid SQL string part "p.sql = true and ".
It has been fixed (replaced with "p.language >= %d and ") in the upcoming Mar2018 release.
Calling SQLProceduresW() should no longer return an SQL error.
## Comment 26282
Date: 2018-03-23 22:17:42 +0100
From: Martin van Dinther <<martin.van.dinther>>
See also
[https//devmonetdborg/hg/MonetDB?cmd=changeset;node=0a1ca816b858](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=0a1ca816b858)
## Comment 26318
Date: 2018-03-29 15:39:19 +0200
From: @sjoerdmullender
The Mar2018 version has been released.
| Created table not visible from ODBC | https://api.github.com/repos/MonetDB/MonetDB/issues/3824/comments | 0 | 2020-11-30T13:18:00Z | 2024-06-27T12:09:01Z | https://github.com/MonetDB/MonetDB/issues/3824 | 753,471,126 | 3,824 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-10-16 07:46:17 +0200
From: Vijay Krishna <<vijayakrishna55>>
To: clients devs <<bugs-clients>>
Version: 11.19.15 (Oct2014-SP4)
Last updated: 2015-11-19 12:30:57 +0100
## Comment 21341
Date: 2015-10-16 07:46:17 +0200
From: Vijay Krishna <<vijayakrishna55>>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.71 Safari/537.36
Build Identifier:
I am trying to connect a schema within a database directly through JDBC with the following Java code.
Connection con = DriverManager.getConnection("jdbc:monetdb://localhost/testDB", "monetdb", "monetdb");
con.setSchema("schema1");
But this throws the following exception.
Exception in thread "main" java.sql.SQLException: syntax error, unexpected '=' in: "set schema ="
at nl.cwi.monetdb.jdbc.MonetConnection$ResponseList.executeQuery(MonetConnection.java:2525)
at nl.cwi.monetdb.jdbc.MonetConnection$ResponseList.processQuery(MonetConnection.java:2273)
at nl.cwi.monetdb.jdbc.MonetStatement.internalExecute(MonetStatement.java:497)
at nl.cwi.monetdb.jdbc.MonetStatement.execute(MonetStatement.java:338)
at nl.cwi.monetdb.jdbc.MonetStatement.executeUpdate(MonetStatement.java:533)
at nl.cwi.monetdb.jdbc.MonetConnection.setSchema(MonetConnection.java:1267)
at batcave.Monet.main(Monet.java:11)
Reproducible: Always
### Steps to Reproduce:
1.Try to connect mclient through JDBC interfaces with the above code.
2.
3.
### Actual Results:
The above mentioned exception is thrown
### Expected Results:
Successful JDBC DB Connection to the specified schema
## Comment 21343
Date: 2015-10-16 09:15:29 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [0f9c3b647c5a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0f9c3b647c5a) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=0f9c3b647c5a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=0f9c3b647c5a)
Changeset description:
Fix syntax in JDBC setSchema method.
This fixes bug #3823.
## Comment 21447
Date: 2015-11-03 10:18:34 +0100
From: @sjoerdmullender
Jul2015 SP1 has been released.
## Comment 21557
Date: 2015-11-19 12:30:57 +0100
From: Vijay Krishna <<vijayakrishna55>>
Hi, Is this issue fixed? I could reproduce the same in monetdb-jdbc-2.18.jar
Since the status was changed to Resolved before the above jar's release, I tested this with it.
If its set for next release, can we have the status changed as NEXTRELEASE ??
| JDBC Connection to a schema - setSchema() error | https://api.github.com/repos/MonetDB/MonetDB/issues/3823/comments | 0 | 2020-11-30T13:17:57Z | 2024-06-27T12:09:00Z | https://github.com/MonetDB/MonetDB/issues/3823 | 753,471,087 | 3,823 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-10-13 15:55:00 +0200
From: Guillaume Savary <<guillaume.savary>>
To: SQL devs <<bugs-sql>>
Version: 11.21.5 (Jul2015)
CC: @njnes
Last updated: 2015-11-03 10:18:18 +0100
## Comment 21326
Date: 2015-10-13 15:55:00 +0200
From: Guillaume Savary <<guillaume.savary>>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:40.0) Gecko/20100101 Firefox/40.0 Iceweasel/40.0.3
Build Identifier:
LIKE operator used with '\\_' should match the '_' char in any cases.
This works fine:
sql> select '_' like '\\_';
+-------------------+
| like_single_value |
+===================+
| true |
+-------------------+
But matching selected objects does not work as expected:
sql> select * from (select '_' as foo) AS t0 WHERE foo LIKE '\\_';
+-----+
| foo |
+=====+
+-----+
We discovered this bug by querying the catalog to find table like "<pattern1>\\_<pattern2>%" which did not return any value despite we have plenty of tables which should match.
Reproducible: Always
### Steps to Reproduce:
1. Just launch the SQL query described
Not a minor bug because it's not that easy to find a workaround and sometimes it's impossible in a single query.
Maybe there is a relation with the bug we reports some week ago about the LIKE operator and was fixed recently: https://www.monetdb.org/bugzilla/show_bug.cgi?id=3811
## Comment 21329
Date: 2015-10-14 11:23:30 +0200
From: @sjoerdmullender
I'm not sure this is a bug. What you can do to get the result you want is to add an ESCAPE clause:
sql> select * from (select '_' as foo) AS t0 WHERE foo LIKE '\\_' ESCAPE '\\';
+------+
| foo |
+======+
| _ |
+------+
## Comment 21340
Date: 2015-10-14 19:39:19 +0200
From: @njnes
The like expression by default should not use \\ as the escape character (the default is empty, ie no escaping). The first like is wrong as it should match \\ followed by any second character.
The correct usage should be
select * from (select '_' as foo) AS t0 WHERE foo LIKE '\\_' escape '\\';
## Comment 21342
Date: 2015-10-16 09:15:23 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [4aee2a208fac](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4aee2a208fac) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=4aee2a208fac](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=4aee2a208fac)
Changeset description:
Fix LIKE operator to default to empty ESCAPE.
This fixes bug #3822 (although perhaps not in the way the reported had
originally envisioned).
## Comment 21438
Date: 2015-11-03 10:18:18 +0100
From: @sjoerdmullender
Jul2015 SP1 has been released.
| Yet another LIKE operator issue | https://api.github.com/repos/MonetDB/MonetDB/issues/3822/comments | 0 | 2020-11-30T13:17:54Z | 2024-06-27T12:08:59Z | https://github.com/MonetDB/MonetDB/issues/3822 | 753,471,043 | 3,822 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-10-09 17:26:57 +0200
From: Frédéric Jolliton <<frederic.jolliton+monetdb>>
To: SQL devs <<bugs-sql>>
Version: 11.21.5 (Jul2015)
CC: @njnes
Last updated: 2015-11-03 10:18:08 +0100
## Comment 21324
Date: 2015-10-09 17:26:57 +0200
From: Frédéric Jolliton <<frederic.jolliton+monetdb>>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:41.0) Gecko/20100101 Firefox/41.0
Build Identifier:
Not an important issue, but the following query:
select case when 1 then 2 else 3 end;
outputs:
TypeException:user.s28_1[6]:'calc.ifthenelse' undefined in: calc.ifthenelse(X_7:bit,X_8:bit,X_10:bte);
program contains errors
while it should probably not even create the MAL instruction, and display an SQL error instead.
At some other place, an integer (a byte in this case) is automatically cast to a boolean without error:
select 1 where 2;
=> [1 ]
For reference, PostgreSQL in both cases throws an error of the form "argument of <...> must be type boolean, not type integer".
Reproducible: Always
## Comment 21325
Date: 2015-10-09 17:29:21 +0200
From: Frédéric Jolliton <<frederic.jolliton+monetdb>>
(Each time, it seems that the Version detail is lost when submitting a bug.)
## Comment 21327
Date: 2015-10-14 10:39:41 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [4a112fdbb971](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4a112fdbb971) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=4a112fdbb971](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=4a112fdbb971)
Changeset description:
fixed bug #3821, ie check type of condition properly
## Comment 21328
Date: 2015-10-14 10:42:29 +0200
From: @njnes
added missing type check
## Comment 21435
Date: 2015-11-03 10:18:08 +0100
From: @sjoerdmullender
Jul2015 SP1 has been released.
| Unexpected error when using a number instead of a boolean | https://api.github.com/repos/MonetDB/MonetDB/issues/3821/comments | 0 | 2020-11-30T13:17:51Z | 2024-06-27T12:08:58Z | https://github.com/MonetDB/MonetDB/issues/3821 | 753,471,006 | 3,821 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-10-09 04:35:33 +0200
From: Doug Service <<n848dg>>
To: SQL devs <<bugs-sql>>
Version: 11.21.5 (Jul2015)
CC: n848dg
Last updated: 2015-11-03 10:18:37 +0100
## Comment 21323
Date: 2015-10-09 04:35:33 +0200
From: Doug Service <<n848dg>>
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:41.0) Gecko/20100101 Firefox/41.0
Build Identifier:
It is possible to create a table using mclient which has a constraint repeated as in the sample schema provided. Performing an insert on the table will then crash the server with a SIGSEGV. See the following SQL script. Note that if one dumps the invalid database with msqldump and then tries to reload the database into an empty database using mclient, the repeated constraint will be flagged as an error.
CREATE TABLE exchange (
pk_symbol VARCHAR(16) NOT NULL,
name VARCHAR(128) NOT NULL,
CONSTRAINT exchange_pk PRIMARY KEY (pk_symbol)
);
CREATE TABLE entity (
pk_uuid UUID NOT NULL,
name VARCHAR(128) NOT NULL,
industry VARCHAR(64),
category VARCHAR(64),
subcategory VARCHAR(64),
CONSTRAINT entity_pk PRIMARY KEY (pk_uuid)
);
CREATE TABLE instrument (
pk_uuid UUID NOT NULL,
symbol VARCHAR(32) NOT NULL,
fk_exchange VARCHAR(16) NOT NULL,
fk_entity_uuid UUID NOT NULL,
CONSTRAINT instrument_pk PRIMARY KEY (pk_uuid),
-- INCORRECT DOUBLE CONSTRAINT
CONSTRAINT instrument_exchange_fk FOREIGN KEY (fk_exchange) REFERENCES exchange (pk_symbol),
CONSTRAINT instrument_exchange_fk FOREIGN KEY (fk_exchange) REFERENCES exchange (pk_symbol),
CONSTRAINT instrument_entity_fk FOREIGN KEY (fk_entity_uuid) REFERENCES entity (pk_uuid)
);
INSERT INTO exchange (pk_symbol, name) VALUES ('EXCH', 'The exchange');
INSERT INTO entity (pk_uuid, name, industry, category, subcategory) VALUES ('52aaa24f-c9cb-4421-9501-33be20d80dcc', 'NAME', 'XXX', 'YYY', 'ZZZ');
--Crash the server with SIGSEGV
INSERT INTO instrument (pk_uuid, symbol, fk_exchange, fk_entity_uuid) VALUES ('24a2a880-451c-4401-94af-93715ad0baf6', 'ABC', 'EXCH', '52aaa24f-c9cb-4421-9501-33be20d80dcc');
Reproducible: Always
### Steps to Reproduce:
1.Load the provided schema into a new database and the server will crash with a SIGSEGV on the last insert statement.
### Actual Results:
8233 2015-10-08 15:09:51 MSG dbtst[21580]: loading sql script: 80_udf.sql
8234 2015-10-08 15:09:51 MSG dbtst[21580]: loading sql script: 80_udf_hge.sql
8235 2015-10-08 15:09:51 MSG dbtst[21580]: loading sql script: 90_generator.sql
8236 2015-10-08 15:09:51 MSG dbtst[21580]: loading sql script: 90_generator_hge.sql
8237 2015-10-08 15:09:51 MSG dbtst[21580]: loading sql script: 99_system.sql
8238 2015-10-08 15:22:17 MSG merovingian[796]: database 'dbtst' (21580) was killed by signal SIGSEGV
### Expected Results:
mclient should stop processing and emit an error message when it sees the repeated constraint.
dougs@quant:~$ mserver5 --version
MonetDB 5 server v11.21.5 "Jul2015" (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 16.3GiB available memory, 12 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.2 (compiled with 2.9.2)
Compiled by: root@dev.monetdb.org (x86_64-pc-linux-gnu)
Compilation: gcc -O3 -fomit-frame-pointer -pipe -g -D_FORTIFY_SOURCE=2
Linking : /usr/bin/ld -m elf_x86_64
## Comment 21333
Date: 2015-10-14 13:09:23 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [abb0465976b8](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=abb0465976b8) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=abb0465976b8](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=abb0465976b8)
Changeset description:
Check whether foreign key was already added.
This should fix bug #3820 by making the precondition for the crash
impossible.
## Comment 21334
Date: 2015-10-14 13:10:07 +0200
From: @sjoerdmullender
Niels, can you check my fix?
## Comment 21449
Date: 2015-11-03 10:18:37 +0100
From: @sjoerdmullender
Jul2015 SP1 has been released.
| mclient accepts table with repeated constraint which causes crash on insert | https://api.github.com/repos/MonetDB/MonetDB/issues/3820/comments | 0 | 2020-11-30T13:17:49Z | 2024-06-27T12:08:57Z | https://github.com/MonetDB/MonetDB/issues/3820 | 753,470,973 | 3,820 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-10-08 16:35:57 +0200
From: Martin van Dinther <<martin.van.dinther>>
To: SQL devs <<bugs-sql>>
Version: 11.21.5 (Jul2015)
CC: @njnes
Last updated: 2015-11-03 10:18:04 +0100
## Comment 21322
Date: 2015-10-08 16:35:57 +0200
From: Martin van Dinther <<martin.van.dinther>>
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0
Build Identifier:
When changing the order of the table names in the FROM-clause, the generated plan introduces crossproduct(s) instead of (inner)join(s).
The plan generator (or optimiser) should generate the most optimal plan, so with the least number of crossproduct operations as possible.
This is an extension to the issue found in bug #3809.
I have added 5 plan queries to sql/test/BugTracker-2015/Tests/large_join.Bug-3809.sql
Reproducible: Always
### Steps to Reproduce:
1. cd sql/test/BugTracker-2015/Tests/
2. Mtest.py large_join.Bug-3809
3. Inspect the results of large_join.Bug-3809.stable.out
It shows that 3 of the 5 plan queries produce crossproducts instead of only all joins.
### Actual Results:
plan
SELECT x20,x47,x38,x18,x10,x22,x37,x3,x63,x8,x30,x43,x54,x9,x21,x25,x2,x61,x55,x32,x52,x29,x50,x12
FROM t2,t9,t20,t63,t54,t32,t22,t52,t25,t47,t29,t12,t18,t10,t21,t43,t37,t61,t55,t3,t38,t50,t30,t8
WHERE b3=a18
AND a25=b38
AND a54=b8
AND a61=b47
AND a43=b29
AND b18=a12
AND b32=a30
AND a22=b43
AND a29=b21
AND a10=b25
AND a12=4
AND b22=a32
AND a20=b55
AND b30=a9
AND a2=b61
AND a38=b52
AND a55=b9
AND a21=b50
AND a37=b54
AND b10=a3
AND a52=b2
AND a50=b63
% .plan table_name
% rel name
% clob type
% 375 length
project (
| join (
| | join (
| | | crossproduct (
| | | | crossproduct (
| | | | | crossproduct (
| | | | | | crossproduct (
| | | | | | | crossproduct (
| | | | | | | | crossproduct (
| | | | | | | | | crossproduct (
| | | | | | | | | | crossproduct (
| | | | | | | | | | | crossproduct (
| | | | | | | | | | | | crossproduct (
| | | | | | | | | | | | | join (
| | | | | | | | | | | | | | join (
| | | | | | | | | | | | | | | join (
| | | | | | | | | | | | | | | | join (
| | | | | | | | | | | | | | | | | join (
| | | | | | | | | | | | | | | | | | join (
| | | | | | | | | | | | | | | | | | | join (
| | | | | | | | | | | | | | | | | | | | join (
| | | | | | | | | | | | | | | | | | | | | join (
| | | | | | | | | | | | | | | | | | | | | | join (
| | | | | | | | | | | | | | | | | | | | | | | join (
| | | | | | | | | | | | | | | | | | | | | | | | table(sys.t18) [ t18.a18 NOT NULL HASHCOL , t18.b18, t18.x18 ] COUNT ,
| | | | | | | | | | | | | | | | | | | | | | | | select (
| | | | | | | | | | | | | | | | | | | | | | | | | table(sys.t12) [ t12.a12 NOT NULL HASHCOL , t12.x12 ] COUNT
| | | | | | | | | | | | | | | | | | | | | | | | ) [ t12.a12 NOT NULL HASHCOL = int "4" ]
| | | | | | | | | | | | | | | | | | | | | | | ) [ t18.b18 = t12.a12 NOT NULL HASHCOL ],
| | | | | | | | | | | | | | | | | | | | | | | table(sys.t3) [ t3.a3 NOT NULL HASHCOL , t3.b3, t3.x3 ] COUNT
| | | | | | | | | | | | | | | | | | | | | | ) [ t3.b3 = t18.a18 NOT NULL HASHCOL ],
| | | | | | | | | | | | | | | | | | | | | | table(sys.t10) [ t10.a10 NOT NULL HASHCOL , t10.b10, t10.x10 ] COUNT
| | | | | | | | | | | | | | | | | | | | | ) [ t10.b10 = t3.a3 NOT NULL HASHCOL ],
| | | | | | | | | | | | | | | | | | | | | table(sys.t25) [ t25.a25 NOT NULL HASHCOL , t25.b25, t25.x25 ] COUNT
| | | | | | | | | | | | | | | | | | | | ) [ t10.a10 NOT NULL HASHCOL = t25.b25 ],
| | | | | | | | | | | | | | | | | | | | table(sys.t38) [ t38.a38 NOT NULL HASHCOL , t38.b38, t38.x38 ] COUNT
| | | | | | | | | | | | | | | | | | | ) [ t25.a25 NOT NULL HASHCOL = t38.b38 ],
| | | | | | | | | | | | | | | | | | | table(sys.t52) [ t52.a52 NOT NULL HASHCOL , t52.b52, t52.x52 ] COUNT
| | | | | | | | | | | | | | | | | | ) [ t38.a38 NOT NULL HASHCOL = t52.b52 ],
| | | | | | | | | | | | | | | | | | table(sys.t2) [ t2.a2 NOT NULL HASHCOL , t2.b2, t2.x2 ] COUNT
| | | | | | | | | | | | | | | | | ) [ t52.a52 NOT NULL HASHCOL = t2.b2 ],
| | | | | | | | | | | | | | | | | table(sys.t61) [ t61.a61 NOT NULL HASHCOL , t61.b61, t61.x61 ] COUNT
| | | | | | | | | | | | | | | | ) [ t2.a2 NOT NULL HASHCOL = t61.b61 ],
| | | | | | | | | | | | | | | | table(sys.t47) [ t47.a47 NOT NULL HASHCOL , t47.b47, t47.x47 ] COUNT
| | | | | | | | | | | | | | | ) [ t61.a61 NOT NULL HASHCOL = t47.b47 ],
| | | | | | | | | | | | | | | table(sys.t37) [ t37.a37 NOT NULL HASHCOL , t37.b37, t37.x37 ] COUNT
| | | | | | | | | | | | | | ) [ t47.a47 NOT NULL HASHCOL = t37.b37 ],
| | | | | | | | | | | | | | table(sys.t54) [ t54.a54 NOT NULL HASHCOL , t54.b54, t54.x54 ] COUNT
| | | | | | | | | | | | | ) [ t37.a37 NOT NULL HASHCOL = t54.b54 ],
| | | | | | | | | | | | | table(sys.t50) [ t50.a50 NOT NULL HASHCOL , t50.b50, t50.x50 ] COUNT
| | | | | | | | | | | | ) [ ],
| | | | | | | | | | | | table(sys.t30) [ t30.a30 NOT NULL HASHCOL , t30.b30, t30.x30 ] COUNT
| | | | | | | | | | | ) [ ],
| | | | | | | | | | | table(sys.t55) [ t55.a55 NOT NULL HASHCOL , t55.b55, t55.x55 ] COUNT
| | | | | | | | | | ) [ ],
| | | | | | | | | | table(sys.t21) [ t21.a21 NOT NULL HASHCOL , t21.b21, t21.x21 ] COUNT
| | | | | | | | | ) [ ],
| | | | | | | | | table(sys.t32) [ t32.a32 NOT NULL HASHCOL , t32.b32, t32.x32 ] COUNT
| | | | | | | | ) [ ],
| | | | | | | | table(sys.t63) [ t63.a63 NOT NULL HASHCOL , t63.b63, t63.x63 ] COUNT
| | | | | | | ) [ ],
| | | | | | | table(sys.t9) [ t9.a9 NOT NULL HASHCOL , t9.b9, t9.x9 ] COUNT
| | | | | | ) [ ],
| | | | | | table(sys.t20) [ t20.a20 NOT NULL HASHCOL , t20.b20, t20.x20 ] COUNT
| | | | | ) [ ],
| | | | | table(sys.t29) [ t29.a29 NOT NULL HASHCOL , t29.b29, t29.x29 ] COUNT
| | | | ) [ ],
| | | | table(sys.t22) [ t22.a22 NOT NULL HASHCOL , t22.b22, t22.x22 ] COUNT
| | | ) [ ],
| | | table(sys.t43) [ t43.a43 NOT NULL HASHCOL , t43.b43, t43.x43 ] COUNT
| | ) [ t32.b32 = t30.a30 NOT NULL HASHCOL , t30.b30 = t9.a9 NOT NULL HASHCOL , t21.a21 NOT NULL HASHCOL = t50.b50, t50.a50 NOT NULL HASHCOL = t63.b63, t20.a20 NOT NULL HASHCOL = t55.b55, t55.a55 NOT NULL HASHCOL = t9.b9, t43.a43 NOT NULL HASHCOL = t29.b29, t22.a22 NOT NULL HASHCOL = t43.b43, t29.a29 NOT NULL HASHCOL = t21.b21, t22.b22 = t32.a32 NOT NULL HASHCOL ],
| | table(sys.t8) [ t8.a8 NOT NULL HASHCOL , t8.b8, t8.x8 ] COUNT
| ) [ t54.a54 NOT NULL HASHCOL = t8.b8, t8.a8 NOT NULL HASHCOL = t20.b20 ]
) [ t20.x20, t47.x47, t38.x38, t18.x18, t10.x10, t22.x22, t37.x37, t3.x3, t63.x63, t8.x8, t30.x30, t43.x43, t54.x54, t9.x9, t21.x21, t25.x25, t2.x2, t61.x61, t55.x55, t32.x32, t52.x52, t29.x29, t50.x50, t12.x12 ]
plan
SELECT x20,x47,x38,x18,x10,x22,x37,x3,x63,x8,x30,x43,x54,x9,x21,x25,x2,x61,x55,x32,x52,x29,x50,x12
FROM t61,t9,t20,t63,t54,t32,t22,t52,t25,t47,t29,t12,t18,t10,t21,t43,t37,t2,t55,t3,t38,t50,t30,t8
WHERE b3=a18
AND a25=b38
AND a54=b8
AND a61=b47
AND a43=b29
AND b18=a12
AND b32=a30
AND a22=b43
AND a29=b21
AND a10=b25
AND a12=4
AND b22=a32
AND a20=b55
AND b30=a9
AND a2=b61
AND a38=b52
AND a55=b9
AND a21=b50
AND a37=b54
AND b10=a3
AND a52=b2
AND a50=b63
% .plan table_name
% rel name
% clob type
% 375 length
project (
| join (
| | join (
| | | crossproduct (
| | | | crossproduct (
| | | | | crossproduct (
| | | | | | crossproduct (
| | | | | | | crossproduct (
| | | | | | | | crossproduct (
| | | | | | | | | crossproduct (
| | | | | | | | | | crossproduct (
| | | | | | | | | | | crossproduct (
| | | | | | | | | | | | crossproduct (
| | | | | | | | | | | | | join (
| | | | | | | | | | | | | | join (
| | | | | | | | | | | | | | | join (
| | | | | | | | | | | | | | | | join (
| | | | | | | | | | | | | | | | | join (
| | | | | | | | | | | | | | | | | | join (
| | | | | | | | | | | | | | | | | | | join (
| | | | | | | | | | | | | | | | | | | | join (
| | | | | | | | | | | | | | | | | | | | | join (
| | | | | | | | | | | | | | | | | | | | | | join (
| | | | | | | | | | | | | | | | | | | | | | | join (
| | | | | | | | | | | | | | | | | | | | | | | | table(sys.t18) [ t18.a18 NOT NULL HASHCOL , t18.b18, t18.x18 ] COUNT ,
| | | | | | | | | | | | | | | | | | | | | | | | select (
| | | | | | | | | | | | | | | | | | | | | | | | | table(sys.t12) [ t12.a12 NOT NULL HASHCOL , t12.x12 ] COUNT
| | | | | | | | | | | | | | | | | | | | | | | | ) [ t12.a12 NOT NULL HASHCOL = int "4" ]
| | | | | | | | | | | | | | | | | | | | | | | ) [ t18.b18 = t12.a12 NOT NULL HASHCOL ],
| | | | | | | | | | | | | | | | | | | | | | | table(sys.t3) [ t3.a3 NOT NULL HASHCOL , t3.b3, t3.x3 ] COUNT
| | | | | | | | | | | | | | | | | | | | | | ) [ t3.b3 = t18.a18 NOT NULL HASHCOL ],
| | | | | | | | | | | | | | | | | | | | | | table(sys.t10) [ t10.a10 NOT NULL HASHCOL , t10.b10, t10.x10 ] COUNT
| | | | | | | | | | | | | | | | | | | | | ) [ t10.b10 = t3.a3 NOT NULL HASHCOL ],
| | | | | | | | | | | | | | | | | | | | | table(sys.t25) [ t25.a25 NOT NULL HASHCOL , t25.b25, t25.x25 ] COUNT
| | | | | | | | | | | | | | | | | | | | ) [ t10.a10 NOT NULL HASHCOL = t25.b25 ],
| | | | | | | | | | | | | | | | | | | | table(sys.t38) [ t38.a38 NOT NULL HASHCOL , t38.b38, t38.x38 ] COUNT
| | | | | | | | | | | | | | | | | | | ) [ t25.a25 NOT NULL HASHCOL = t38.b38 ],
| | | | | | | | | | | | | | | | | | | table(sys.t52) [ t52.a52 NOT NULL HASHCOL , t52.b52, t52.x52 ] COUNT
| | | | | | | | | | | | | | | | | | ) [ t38.a38 NOT NULL HASHCOL = t52.b52 ],
| | | | | | | | | | | | | | | | | | table(sys.t2) [ t2.a2 NOT NULL HASHCOL , t2.b2, t2.x2 ] COUNT
| | | | | | | | | | | | | | | | | ) [ t52.a52 NOT NULL HASHCOL = t2.b2 ],
| | | | | | | | | | | | | | | | | table(sys.t61) [ t61.a61 NOT NULL HASHCOL , t61.b61, t61.x61 ] COUNT
| | | | | | | | | | | | | | | | ) [ t2.a2 NOT NULL HASHCOL = t61.b61 ],
| | | | | | | | | | | | | | | | table(sys.t47) [ t47.a47 NOT NULL HASHCOL , t47.b47, t47.x47 ] COUNT
| | | | | | | | | | | | | | | ) [ t61.a61 NOT NULL HASHCOL = t47.b47 ],
| | | | | | | | | | | | | | | table(sys.t37) [ t37.a37 NOT NULL HASHCOL , t37.b37, t37.x37 ] COUNT
| | | | | | | | | | | | | | ) [ t47.a47 NOT NULL HASHCOL = t37.b37 ],
| | | | | | | | | | | | | | table(sys.t54) [ t54.a54 NOT NULL HASHCOL , t54.b54, t54.x54 ] COUNT
| | | | | | | | | | | | | ) [ t37.a37 NOT NULL HASHCOL = t54.b54 ],
| | | | | | | | | | | | | table(sys.t50) [ t50.a50 NOT NULL HASHCOL , t50.b50, t50.x50 ] COUNT
| | | | | | | | | | | | ) [ ],
| | | | | | | | | | | | table(sys.t30) [ t30.a30 NOT NULL HASHCOL , t30.b30, t30.x30 ] COUNT
| | | | | | | | | | | ) [ ],
| | | | | | | | | | | table(sys.t55) [ t55.a55 NOT NULL HASHCOL , t55.b55, t55.x55 ] COUNT
| | | | | | | | | | ) [ ],
| | | | | | | | | | table(sys.t21) [ t21.a21 NOT NULL HASHCOL , t21.b21, t21.x21 ] COUNT
| | | | | | | | | ) [ ],
| | | | | | | | | table(sys.t32) [ t32.a32 NOT NULL HASHCOL , t32.b32, t32.x32 ] COUNT
| | | | | | | | ) [ ],
| | | | | | | | table(sys.t63) [ t63.a63 NOT NULL HASHCOL , t63.b63, t63.x63 ] COUNT
| | | | | | | ) [ ],
| | | | | | | table(sys.t9) [ t9.a9 NOT NULL HASHCOL , t9.b9, t9.x9 ] COUNT
| | | | | | ) [ ],
| | | | | | table(sys.t20) [ t20.a20 NOT NULL HASHCOL , t20.b20, t20.x20 ] COUNT
| | | | | ) [ ],
| | | | | table(sys.t29) [ t29.a29 NOT NULL HASHCOL , t29.b29, t29.x29 ] COUNT
| | | | ) [ ],
| | | | table(sys.t22) [ t22.a22 NOT NULL HASHCOL , t22.b22, t22.x22 ] COUNT
| | | ) [ ],
| | | table(sys.t43) [ t43.a43 NOT NULL HASHCOL , t43.b43, t43.x43 ] COUNT
| | ) [ t32.b32 = t30.a30 NOT NULL HASHCOL , t30.b30 = t9.a9 NOT NULL HASHCOL , t21.a21 NOT NULL HASHCOL = t50.b50, t50.a50 NOT NULL HASHCOL = t63.b63, t20.a20 NOT NULL HASHCOL = t55.b55, t55.a55 NOT NULL HASHCOL = t9.b9, t43.a43 NOT NULL HASHCOL = t29.b29, t22.a22 NOT NULL HASHCOL = t43.b43, t29.a29 NOT NULL HASHCOL = t21.b21, t22.b22 = t32.a32 NOT NULL HASHCOL ],
| | table(sys.t8) [ t8.a8 NOT NULL HASHCOL , t8.b8, t8.x8 ] COUNT
| ) [ t54.a54 NOT NULL HASHCOL = t8.b8, t8.a8 NOT NULL HASHCOL = t20.b20 ]
) [ t20.x20, t47.x47, t38.x38, t18.x18, t10.x10, t22.x22, t37.x37, t3.x3, t63.x63, t8.x8, t30.x30, t43.x43, t54.x54, t9.x9, t21.x21, t25.x25, t2.x2, t61.x61, t55.x55, t32.x32, t52.x52, t29.x29, t50.x50, t12.x12 ]
plan
SELECT x20,x47,x38,x18,x10,x22,x37,x3,x63,x8,x30,x43,x54,x9,x21,x25,x2,x61,x55,x32,x52,x29,x50,x12
FROM t2,t3,t8,t9,t10,t12,t18,t20,t21,t22,t25,t29,t30,t32,t37,t38,t43,t47,t50,t52,t54,t55,t61,t63
WHERE b3=a18
AND a25=b38
AND a54=b8
AND a61=b47
AND a43=b29
AND b18=a12
AND b32=a30
AND a22=b43
AND a29=b21
AND a10=b25
AND a12=4
AND b22=a32
AND a20=b55
AND b30=a9
AND a2=b61
AND a38=b52
AND a55=b9
AND a21=b50
AND a37=b54
AND b10=a3
AND a52=b2
AND a50=b63
% .plan table_name
% rel name
% clob type
% 212 length
project (
| join (
| | join (
| | | join (
| | | | join (
| | | | | join (
| | | | | | join (
| | | | | | | join (
| | | | | | | | join (
| | | | | | | | | join (
| | | | | | | | | | join (
| | | | | | | | | | | join (
| | | | | | | | | | | | join (
| | | | | | | | | | | | | join (
| | | | | | | | | | | | | | join (
| | | | | | | | | | | | | | | join (
| | | | | | | | | | | | | | | | join (
| | | | | | | | | | | | | | | | | join (
| | | | | | | | | | | | | | | | | | join (
| | | | | | | | | | | | | | | | | | | join (
| | | | | | | | | | | | | | | | | | | | join (
| | | | | | | | | | | | | | | | | | | | | join (
| | | | | | | | | | | | | | | | | | | | | | join (
| | | | | | | | | | | | | | | | | | | | | | | join (
| | | | | | | | | | | | | | | | | | | | | | | | table(sys.t18) [ t18.a18 NOT NULL HASHCOL , t18.b18, t18.x18 ] COUNT ,
| | | | | | | | | | | | | | | | | | | | | | | | select (
| | | | | | | | | | | | | | | | | | | | | | | | | table(sys.t12) [ t12.a12 NOT NULL HASHCOL , t12.x12 ] COUNT
| | | | | | | | | | | | | | | | | | | | | | | | ) [ t12.a12 NOT NULL HASHCOL = int "4" ]
| | | | | | | | | | | | | | | | | | | | | | | ) [ t18.b18 = t12.a12 NOT NULL HASHCOL ],
| | | | | | | | | | | | | | | | | | | | | | | table(sys.t3) [ t3.a3 NOT NULL HASHCOL , t3.b3, t3.x3 ] COUNT
| | | | | | | | | | | | | | | | | | | | | | ) [ t3.b3 = t18.a18 NOT NULL HASHCOL ],
| | | | | | | | | | | | | | | | | | | | | | table(sys.t10) [ t10.a10 NOT NULL HASHCOL , t10.b10, t10.x10 ] COUNT
| | | | | | | | | | | | | | | | | | | | | ) [ t10.b10 = t3.a3 NOT NULL HASHCOL ],
| | | | | | | | | | | | | | | | | | | | | table(sys.t25) [ t25.a25 NOT NULL HASHCOL , t25.b25, t25.x25 ] COUNT
| | | | | | | | | | | | | | | | | | | | ) [ t10.a10 NOT NULL HASHCOL = t25.b25 ],
| | | | | | | | | | | | | | | | | | | | table(sys.t38) [ t38.a38 NOT NULL HASHCOL , t38.b38, t38.x38 ] COUNT
| | | | | | | | | | | | | | | | | | | ) [ t25.a25 NOT NULL HASHCOL = t38.b38 ],
| | | | | | | | | | | | | | | | | | | table(sys.t52) [ t52.a52 NOT NULL HASHCOL , t52.b52, t52.x52 ] COUNT
| | | | | | | | | | | | | | | | | | ) [ t38.a38 NOT NULL HASHCOL = t52.b52 ],
| | | | | | | | | | | | | | | | | | table(sys.t2) [ t2.a2 NOT NULL HASHCOL , t2.b2, t2.x2 ] COUNT
| | | | | | | | | | | | | | | | | ) [ t52.a52 NOT NULL HASHCOL = t2.b2 ],
| | | | | | | | | | | | | | | | | table(sys.t61) [ t61.a61 NOT NULL HASHCOL , t61.b61, t61.x61 ] COUNT
| | | | | | | | | | | | | | | | ) [ t2.a2 NOT NULL HASHCOL = t61.b61 ],
| | | | | | | | | | | | | | | | table(sys.t47) [ t47.a47 NOT NULL HASHCOL , t47.b47, t47.x47 ] COUNT
| | | | | | | | | | | | | | | ) [ t61.a61 NOT NULL HASHCOL = t47.b47 ],
| | | | | | | | | | | | | | | table(sys.t37) [ t37.a37 NOT NULL HASHCOL , t37.b37, t37.x37 ] COUNT
| | | | | | | | | | | | | | ) [ t47.a47 NOT NULL HASHCOL = t37.b37 ],
| | | | | | | | | | | | | | table(sys.t54) [ t54.a54 NOT NULL HASHCOL , t54.b54, t54.x54 ] COUNT
| | | | | | | | | | | | | ) [ t37.a37 NOT NULL HASHCOL = t54.b54 ],
| | | | | | | | | | | | | table(sys.t8) [ t8.a8 NOT NULL HASHCOL , t8.b8, t8.x8 ] COUNT
| | | | | | | | | | | | ) [ t54.a54 NOT NULL HASHCOL = t8.b8 ],
| | | | | | | | | | | | table(sys.t20) [ t20.a20 NOT NULL HASHCOL , t20.b20, t20.x20 ] COUNT
| | | | | | | | | | | ) [ t8.a8 NOT NULL HASHCOL = t20.b20 ],
| | | | | | | | | | | table(sys.t55) [ t55.a55 NOT NULL HASHCOL , t55.b55, t55.x55 ] COUNT
| | | | | | | | | | ) [ t20.a20 NOT NULL HASHCOL = t55.b55 ],
| | | | | | | | | | table(sys.t9) [ t9.a9 NOT NULL HASHCOL , t9.b9, t9.x9 ] COUNT
| | | | | | | | | ) [ t55.a55 NOT NULL HASHCOL = t9.b9 ],
| | | | | | | | | table(sys.t30) [ t30.a30 NOT NULL HASHCOL , t30.b30, t30.x30 ] COUNT
| | | | | | | | ) [ t30.b30 = t9.a9 NOT NULL HASHCOL ],
| | | | | | | | table(sys.t32) [ t32.a32 NOT NULL HASHCOL , t32.b32, t32.x32 ] COUNT
| | | | | | | ) [ t32.b32 = t30.a30 NOT NULL HASHCOL ],
| | | | | | | table(sys.t22) [ t22.a22 NOT NULL HASHCOL , t22.b22, t22.x22 ] COUNT
| | | | | | ) [ t22.b22 = t32.a32 NOT NULL HASHCOL ],
| | | | | | table(sys.t43) [ t43.a43 NOT NULL HASHCOL , t43.b43, t43.x43 ] COUNT
| | | | | ) [ t22.a22 NOT NULL HASHCOL = t43.b43 ],
| | | | | table(sys.t29) [ t29.a29 NOT NULL HASHCOL , t29.b29, t29.x29 ] COUNT
| | | | ) [ t43.a43 NOT NULL HASHCOL = t29.b29 ],
| | | | table(sys.t21) [ t21.a21 NOT NULL HASHCOL , t21.b21, t21.x21 ] COUNT
| | | ) [ t29.a29 NOT NULL HASHCOL = t21.b21 ],
| | | table(sys.t50) [ t50.a50 NOT NULL HASHCOL , t50.b50, t50.x50 ] COUNT
| | ) [ t21.a21 NOT NULL HASHCOL = t50.b50 ],
| | table(sys.t63) [ t63.b63, t63.x63 ] COUNT
| ) [ t50.a50 NOT NULL HASHCOL = t63.b63 ]
) [ t20.x20, t47.x47, t38.x38, t18.x18, t10.x10, t22.x22, t37.x37, t3.x3, t63.x63, t8.x8, t30.x30, t43.x43, t54.x54, t9.x9, t21.x21, t25.x25, t2.x2, t61.x61, t55.x55, t32.x32, t52.x52, t29.x29, t50.x50, t12.x12 ]
plan
SELECT x20,x47,x38,x18,x10,x22,x37,x3,x63,x8,x30,x43,x54,x9,x21,x25,x2,x61,x55,x32,x52,x29,x50,x12
FROM t63,t61,t55,t54,t52,t50,t47,t43,t38,t37,t32,t30,t29,t25,t22,t21,t20,t18,t12,t10,t9,t8,t3,t2
WHERE b3=a18
AND a25=b38
AND a54=b8
AND a61=b47
AND a43=b29
AND b18=a12
AND b32=a30
AND a22=b43
AND a29=b21
AND a10=b25
AND a12=4
AND b22=a32
AND a20=b55
AND b30=a9
AND a2=b61
AND a38=b52
AND a55=b9
AND a21=b50
AND a37=b54
AND b10=a3
AND a52=b2
AND a50=b63
% .plan table_name
% rel name
% clob type
% 555 length
project (
| join (
| | table(sys.t2) [ t2.a2 NOT NULL HASHCOL , t2.b2, t2.x2 ] COUNT ,
| | join (
| | | crossproduct (
| | | | crossproduct (
| | | | | crossproduct (
| | | | | | crossproduct (
| | | | | | | crossproduct (
| | | | | | | | crossproduct (
| | | | | | | | | crossproduct (
| | | | | | | | | | crossproduct (
| | | | | | | | | | | crossproduct (
| | | | | | | | | | | | crossproduct (
| | | | | | | | | | | | | crossproduct (
| | | | | | | | | | | | | | crossproduct (
| | | | | | | | | | | | | | | crossproduct (
| | | | | | | | | | | | | | | | crossproduct (
| | | | | | | | | | | | | | | | | crossproduct (
| | | | | | | | | | | | | | | | | | join (
| | | | | | | | | | | | | | | | | | | join (
| | | | | | | | | | | | | | | | | | | | join (
| | | | | | | | | | | | | | | | | | | | | join (
| | | | | | | | | | | | | | | | | | | | | | join (
| | | | | | | | | | | | | | | | | | | | | | | join (
| | | | | | | | | | | | | | | | | | | | | | | | table(sys.t18) [ t18.a18 NOT NULL HASHCOL , t18.b18, t18.x18 ] COUNT ,
| | | | | | | | | | | | | | | | | | | | | | | | select (
| | | | | | | | | | | | | | | | | | | | | | | | | table(sys.t12) [ t12.a12 NOT NULL HASHCOL , t12.x12 ] COUNT
| | | | | | | | | | | | | | | | | | | | | | | | ) [ t12.a12 NOT NULL HASHCOL = int "4" ]
| | | | | | | | | | | | | | | | | | | | | | | ) [ t18.b18 = t12.a12 NOT NULL HASHCOL ],
| | | | | | | | | | | | | | | | | | | | | | | table(sys.t3) [ t3.a3 NOT NULL HASHCOL , t3.b3, t3.x3 ] COUNT
| | | | | | | | | | | | | | | | | | | | | | ) [ t3.b3 = t18.a18 NOT NULL HASHCOL ],
| | | | | | | | | | | | | | | | | | | | | | table(sys.t10) [ t10.a10 NOT NULL HASHCOL , t10.b10, t10.x10 ] COUNT
| | | | | | | | | | | | | | | | | | | | | ) [ t10.b10 = t3.a3 NOT NULL HASHCOL ],
| | | | | | | | | | | | | | | | | | | | | table(sys.t25) [ t25.a25 NOT NULL HASHCOL , t25.b25, t25.x25 ] COUNT
| | | | | | | | | | | | | | | | | | | | ) [ t10.a10 NOT NULL HASHCOL = t25.b25 ],
| | | | | | | | | | | | | | | | | | | | table(sys.t38) [ t38.a38 NOT NULL HASHCOL , t38.b38, t38.x38 ] COUNT
| | | | | | | | | | | | | | | | | | | ) [ t25.a25 NOT NULL HASHCOL = t38.b38 ],
| | | | | | | | | | | | | | | | | | | table(sys.t52) [ t52.a52 NOT NULL HASHCOL , t52.b52, t52.x52 ] COUNT
| | | | | | | | | | | | | | | | | | ) [ t38.a38 NOT NULL HASHCOL = t52.b52 ],
| | | | | | | | | | | | | | | | | | table(sys.t8) [ t8.a8 NOT NULL HASHCOL , t8.b8, t8.x8 ] COUNT
| | | | | | | | | | | | | | | | | ) [ ],
| | | | | | | | | | | | | | | | | table(sys.t9) [ t9.a9 NOT NULL HASHCOL , t9.b9, t9.x9 ] COUNT
| | | | | | | | | | | | | | | | ) [ ],
| | | | | | | | | | | | | | | | table(sys.t50) [ t50.a50 NOT NULL HASHCOL , t50.b50, t50.x50 ] COUNT
| | | | | | | | | | | | | | | ) [ ],
| | | | | | | | | | | | | | | table(sys.t63) [ t63.a63 NOT NULL HASHCOL , t63.b63, t63.x63 ] COUNT
| | | | | | | | | | | | | | ) [ ],
| | | | | | | | | | | | | | table(sys.t21) [ t21.a21 NOT NULL HASHCOL , t21.b21, t21.x21 ] COUNT
| | | | | | | | | | | | | ) [ ],
| | | | | | | | | | | | | table(sys.t29) [ t29.a29 NOT NULL HASHCOL , t29.b29, t29.x29 ] COUNT
| | | | | | | | | | | | ) [ ],
| | | | | | | | | | | | table(sys.t43) [ t43.a43 NOT NULL HASHCOL , t43.b43, t43.x43 ] COUNT
| | | | | | | | | | | ) [ ],
| | | | | | | | | | | table(sys.t22) [ t22.a22 NOT NULL HASHCOL , t22.b22, t22.x22 ] COUNT
| | | | | | | | | | ) [ ],
| | | | | | | | | | table(sys.t32) [ t32.a32 NOT NULL HASHCOL , t32.b32, t32.x32 ] COUNT
| | | | | | | | | ) [ ],
| | | | | | | | | table(sys.t30) [ t30.a30 NOT NULL HASHCOL , t30.b30, t30.x30 ] COUNT
| | | | | | | | ) [ ],
| | | | | | | | table(sys.t54) [ t54.a54 NOT NULL HASHCOL , t54.b54, t54.x54 ] COUNT
| | | | | | | ) [ ],
| | | | | | | table(sys.t55) [ t55.a55 NOT NULL HASHCOL , t55.b55, t55.x55 ] COUNT
| | | | | | ) [ ],
| | | | | | table(sys.t61) [ t61.a61 NOT NULL HASHCOL , t61.b61, t61.x61 ] COUNT
| | | | | ) [ ],
| | | | | table(sys.t47) [ t47.a47 NOT NULL HASHCOL , t47.b47, t47.x47 ] COUNT
| | | | ) [ ],
| | | | table(sys.t37) [ t37.a37 NOT NULL HASHCOL , t37.b37, t37.x37 ] COUNT
| | | ) [ ],
| | | table(sys.t20) [ t20.a20 NOT NULL HASHCOL , t20.b20, t20.x20 ] COUNT
| | ) [ t54.a54 NOT NULL HASHCOL = t8.b8, t8.a8 NOT NULL HASHCOL = t20.b20, t30.b30 = t9.a9 NOT NULL HASHCOL , t55.a55 NOT NULL HASHCOL = t9.b9, t20.a20 NOT NULL HASHCOL = t55.b55, t37.a37 NOT NULL HASHCOL = t54.b54, t47.a47 NOT NULL HASHCOL = t37.b37, t61.a61 NOT NULL HASHCOL = t47.b47, t32.b32 = t30.a30 NOT NULL HASHCOL , t22.b22 = t32.a32 NOT NULL HASHCOL , t22.a22 NOT NULL HASHCOL = t43.b43, t43.a43 NOT NULL HASHCOL = t29.b29, t29.a29 NOT NULL HASHCOL = t21.b21, t21.a21 NOT NULL HASHCOL = t50.b50, t50.a50 NOT NULL HASHCOL = t63.b63 ]
| ) [ t2.a2 NOT NULL HASHCOL = t61.b61, t52.a52 NOT NULL HASHCOL = t2.b2 ]
) [ t20.x20, t47.x47, t38.x38, t18.x18, t10.x10, t22.x22, t37.x37, t3.x3, t63.x63, t8.x8, t30.x30, t43.x43, t54.x54, t9.x9, t21.x21, t25.x25, t2.x2, t61.x61, t55.x55, t32.x32, t52.x52, t29.x29, t50.x50, t12.x12 ]
### Expected Results:
No crossproducts in the plans when only the order of the table names in the FROM-clause differ.
Once the issue has been fixed, please approve the new output of large_join.Bug-3809.stable.out
## Comment 21332
Date: 2015-10-14 13:01:13 +0200
From: @njnes
before reordering a join tree clean out the empty selects.
## Comment 21335
Date: 2015-10-14 13:16:53 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [0ef3d9bdad0c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0ef3d9bdad0c) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=0ef3d9bdad0c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=0ef3d9bdad0c)
Changeset description:
fix bug #3819, ie properly reorder joins (first cleanup the introduced
empty selects)
## Comment 21434
Date: 2015-11-03 10:18:04 +0100
From: @sjoerdmullender
Jul2015 SP1 has been released.
| order of tables in FROM-clause has negative impact on generated plan (using crossproducts instead of joins) | https://api.github.com/repos/MonetDB/MonetDB/issues/3819/comments | 0 | 2020-11-30T13:17:45Z | 2024-06-27T12:08:56Z | https://github.com/MonetDB/MonetDB/issues/3819 | 753,470,924 | 3,819 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-10-07 18:15:09 +0200
From: Frédéric Jolliton <<frederic.jolliton+monetdb>>
To: SQL devs <<bugs-sql>>
Version: 11.17.21 (Jan2014-SP3)
CC: martin.van.dinther, @njnes
Last updated: 2015-11-03 10:18:26 +0100
## Comment 21320
Date: 2015-10-07 18:15:09 +0200
From: Frédéric Jolliton <<frederic.jolliton+monetdb>>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:41.0) Gecko/20100101 Firefox/41.0
Build Identifier:
A specific combination of UNION / GROUP BY / AGGREGATES and tables definitions causes MonetDB to crash.
The server log just tell about SIGSEGV without further details.
Reproducible: Always
### Steps to Reproduce:
1. Create two tables with random names (it doesn't crash if there are duplicate names between the tables it seems)
CREATE TABLE t1 (cods int, elrik int, ether int, jaelen int, otter int, sora int);
CREATE TABLE t2 (tib0 int);
2. Query with:
SELECT cods, elrik, ether, jaelen, sora, SUM(otter)
FROM t1
GROUP BY cods, elrik, ether, jaelen, sora
UNION ALL
SELECT 0 AS cods, 0 AS elrik, 0 AS ether, 0 AS jaelen, 0 AS sora, SUM(tib0)
FROM t2
GROUP BY cods, elrik, ether, jaelen, sora;
### Actual Results:
MonetDB crashes
### Expected Results:
Something..
It is interesting to note that using fewer columns doesn't trigger this bug. It's only when about 5 or more columns are used within the GROUP BY that we see this behavior.
It was rather hard to diagnostic, because we had a very large query in the first place. It tooks hours to find the very specific query that was triggering this problem.
## Comment 21321
Date: 2015-10-08 15:26:51 +0200
From: Martin van Dinther <<martin.van.dinther>>
I found the issue is already reproducable (on Jul2015) with query:
SELECT 0 AS cods, 0 AS elrik, 0 AS ether, 0 AS jaelen, 0 AS sora, SUM(tib0)
FROM t2
GROUP BY cods, elrik, ether, jaelen, sora;
Also adding PLAN or EXPLAIN or TRACE in front of the query, also leads to a Segmentation fault in the mserver5.
No problem when grouping less than 5 columns as in query:
SELECT 0 AS elrik, 0 AS ether, 0 AS jaelen, 0 AS sora, SUM(tib0)
FROM t2
GROUP BY elrik, ether, jaelen, sora;
## Comment 21330
Date: 2015-10-14 11:40:36 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [d04a59d1b9a9](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d04a59d1b9a9) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=d04a59d1b9a9](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=d04a59d1b9a9)
Changeset description:
fixed bug #3818, ie crash n the reduce groupby optimizer
## Comment 21331
Date: 2015-10-14 11:41:39 +0200
From: @njnes
properly handle alias expressions (and no other expressions) in the reduce group by optimizer.
## Comment 21444
Date: 2015-11-03 10:18:26 +0100
From: @sjoerdmullender
Jul2015 SP1 has been released.
| Crash when performing UNION/GROUP BY over tables with different columns | https://api.github.com/repos/MonetDB/MonetDB/issues/3818/comments | 0 | 2020-11-30T13:17:42Z | 2024-06-27T12:08:55Z | https://github.com/MonetDB/MonetDB/issues/3818 | 753,470,886 | 3,818 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-10-07 17:48:33 +0200
From: @swingbit
To: SQL devs <<bugs-sql>>
Version: 11.19.9 (Oct2014-SP2)
CC: @njnes
Last updated: 2016-01-15 11:38:03 +0100
## Comment 21319
Date: 2015-10-07 17:48:33 +0200
From: @swingbit
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36
Build Identifier:
*** BACKGRUND
I have an UDF that is used to produce a table for each row in input, and concatenate the output.
- SQL signature:
create function tokenize(id integer, s string)
returns table (id integer, token string)
external name str."UTF8tokenize";
- MAL signature:
command batstr.UTF8tokenize(id:bat[:oid,:int],s:bat[:oid,:str]) (:bat[:oid,:int],:bat[:oid,:str])
address STRbat_utf8_tokenize_id;
Due to this UDF, it is not trivial to make this issue reproducible, but if this description is not enough to identify the problem, then I can share everything.
The UDF is used this way:
sql>CREATE TABLE ss (id INT, s CLOB);
operation successful (0.439ms)
sql>
sql>INSERT INTO ss VALUES (0,'one two');
1 affected row (0.377ms)
sql>INSERT INTO ss VALUES (1,'three four');
1 affected row (0.098ms)
sql>
sql>SELECT * FROM tokenize( (SELECT id, s FROM ss) );
+------+-------+
| id | token |
+======+=======+
| 0 | one |
| 0 | two |
| 1 | three |
| 1 | four |
+------+-------+
4 tuples (1.277ms)
This works.
*** ISSUE
Now, If I add a simple selection on token:
SELECT *
FROM tokenize( (SELECT id, s FROM ss) )
WHERE length(token) > 5;
then the server seems to hang indefinitely.
gdb suggests that it hangs in opt_pushselect. My wild guess is that it gets stuck while trying to push the select down the innermost selection (the input of the tokenize function). I tried with a standard table function, which takes no parameters and returns a table. No problem in that case.
The gdb session:
(gdb) thread apply all bt
Thread 12 (Thread 0x7f6b69ca9700 (LWP 20945)):
0 0x000000394ccf9063 in select () from /lib64/libc.so.6
1 0x00007f6b70ef5863 in MT_sleep_ms (ms=25) at /opt/spinque/MonetDBServer/MonetDB.Spinque_Jul2015/src/gdk/gdk_posix.c:1085
2 0x00007f6b714d43fa in profilerHeartbeat (dummy=0x0) at /opt/spinque/MonetDBServer/MonetDB.Spinque_Jul2015/src/monetdb5/mal/mal_profiler.c:980
3 0x000000394d007555 in start_thread () from /lib64/libpthread.so.0
4 0x000000394cd02b9d in clone () from /lib64/libc.so.6
Thread 11 (Thread 0x7f6b681b1700 (LWP 20946)):
0 0x000000394ccf9063 in select () from /lib64/libc.so.6
1 0x00007f6b715d8918 in SERVERlistenThread (Sock=0x279f5f0) at /opt/spinque/MonetDBServer/MonetDB.Spinque_Jul2015/src/monetdb5/modules/mal/mal_mapi.c:234
2 0x00007f6b70ef3854 in thread_starter (arg=0x279f680) at /opt/spinque/MonetDBServer/MonetDB.Spinque_Jul2015/src/gdk/gdk_system.c:458
3 0x000000394d007555 in start_thread () from /lib64/libpthread.so.0
4 0x000000394cd02b9d in clone () from /lib64/libc.so.6
Thread 10 (Thread 0x7f6b67fb0700 (LWP 20947)):
0 0x000000394ccf9063 in select () from /lib64/libc.so.6
1 0x00007f6b70ef5863 in MT_sleep_ms (ms=50) at /opt/spinque/MonetDBServer/MonetDB.Spinque_Jul2015/src/gdk/gdk_posix.c:1085
2 0x00007f6b68fcf64c in store_manager () at /opt/spinque/MonetDBServer/MonetDB.Spinque_Jul2015/src/sql/storage/store.c:1598
3 0x00007f6b68f40d2d in mvc_logmanager () at /opt/spinque/MonetDBServer/MonetDB.Spinque_Jul2015/src/sql/server/sql_mvc.c:133
4 0x00007f6b70ef3854 in thread_starter (arg=0x2980800) at /opt/spinque/MonetDBServer/MonetDB.Spinque_Jul2015/src/gdk/gdk_system.c:458
5 0x000000394d007555 in start_thread () from /lib64/libpthread.so.0
6 0x000000394cd02b9d in clone () from /lib64/libc.so.6
Thread 9 (Thread 0x7f6b67daf700 (LWP 20950)):
0 0x00007f6b716d1149 in OPTpushselectImplementation (cntxt=0x7f6b69cb0328, mb=0x7f6b581260a0, stk=0x0, pci=0x0) at /opt/spinque/MonetDBServer/MonetDB.Spinque_Jul2015/src/monetdb5/optimizer/opt_pushselect.c:220
1 0x00007f6b716d3808 in OPTwrapper (cntxt=0x7f6b69cb0328, mb=0x7f6b581260a0, stk=0x0, p=0x7f6b5815c7a0) at /opt/spinque/MonetDBServer/MonetDB.Spinque_Jul2015/src/monetdb5/optimizer/opt_wrapper.c:149
2 0x00007f6b716ce680 in optimizeMALBlock (cntxt=0x7f6b69cb0328, mb=0x7f6b581260a0) at /opt/spinque/MonetDBServer/MonetDB.Spinque_Jul2015/src/monetdb5/optimizer/opt_support.c:262
3 0x00007f6b68ec4289 in addQueryToCache (c=0x7f6b69cb0328) at /opt/spinque/MonetDBServer/MonetDB.Spinque_Jul2015/src/sql/backends/monet5/sql_optimizer.c:294
4 0x00007f6b68ec1e18 in backend_dumpproc (be=0x7f6b580eafa0, c=0x7f6b69cb0328, cq=0x7f6b5811bb30, s=0x7f6b58107960) at /opt/spinque/MonetDBServer/MonetDB.Spinque_Jul2015/src/sql/backends/monet5/sql_gencode.c:2804
5 0x00007f6b68e8e1ae in SQLparser (c=0x7f6b69cb0328) at /opt/spinque/MonetDBServer/MonetDB.Spinque_Jul2015/src/sql/backends/monet5/sql_scenario.c:1206
6 0x00007f6b714e0bb0 in runPhase (c=0x7f6b69cb0328, phase=1) at /opt/spinque/MonetDBServer/MonetDB.Spinque_Jul2015/src/monetdb5/mal/mal_scenario.c:515
7 0x00007f6b714e0d57 in runScenarioBody (c=0x7f6b69cb0328) at /opt/spinque/MonetDBServer/MonetDB.Spinque_Jul2015/src/monetdb5/mal/mal_scenario.c:550
8 0x00007f6b714e0f02 in runScenario (c=0x7f6b69cb0328) at /opt/spinque/MonetDBServer/MonetDB.Spinque_Jul2015/src/monetdb5/mal/mal_scenario.c:579
9 0x00007f6b714e283e in MSserveClient (dummy=0x7f6b69cb0328) at /opt/spinque/MonetDBServer/MonetDB.Spinque_Jul2015/src/monetdb5/mal/mal_session.c:439
10 0x00007f6b714e2237 in MSscheduleClient (command=0x7f6b580008d0 "\001", challenge=0x7f6b67daedf0 "00lSGLgI", fin=0x7f6b58006b40, fout=0x7f6b580049c0) at /opt/spinque/MonetDBServer/MonetDB.Spinque_Jul2015/src/monetdb5/mal/mal_session.c:319
11 0x00007f6b715d86e0 in doChallenge (data=0x7f6b600008d0) at /opt/spinque/MonetDBServer/MonetDB.Spinque_Jul2015/src/monetdb5/modules/mal/mal_mapi.c:184
12 0x00007f6b70ef3854 in thread_starter (arg=0x7f6b60000a50) at /opt/spinque/MonetDBServer/MonetDB.Spinque_Jul2015/src/gdk/gdk_system.c:458
13 0x000000394d007555 in start_thread () from /lib64/libpthread.so.0
14 0x000000394cd02b9d in clone () from /lib64/libc.so.6
Thread 8 (Thread 0x7f6b67aae700 (LWP 20951)):
0 0x000000394d00e829 in do_futex_wait.constprop () from /lib64/libpthread.so.0
1 0x000000394d00e8c4 in __new_sem_wait_slow.constprop.0 () from /lib64/libpthread.so.0
2 0x000000394d00e96a in sem_wait@@GLIBC_2.2.5 () from /lib64/libpthread.so.0
3 0x00007f6b714b9c30 in q_dequeue (q=0x7f6b5811bbc0, cntxt=0x0) at /opt/spinque/MonetDBServer/MonetDB.Spinque_Jul2015/src/monetdb5/mal/mal_dataflow.c:213
4 0x00007f6b714ba64b in DFLOWworker (T=0x7f6b71934880 <workers>) at /opt/spinque/MonetDBServer/MonetDB.Spinque_Jul2015/src/monetdb5/mal/mal_dataflow.c:333
5 0x000000394d007555 in start_thread () from /lib64/libpthread.so.0
6 0x000000394cd02b9d in clone () from /lib64/libc.so.6
Thread 7 (Thread 0x7f6b678ad700 (LWP 20952)):
---Type <return> to continue, or q <return> to quit---
0 0x000000394d00e829 in do_futex_wait.constprop () from /lib64/libpthread.so.0
1 0x000000394d00e8c4 in __new_sem_wait_slow.constprop.0 () from /lib64/libpthread.so.0
2 0x000000394d00e96a in sem_wait@@GLIBC_2.2.5 () from /lib64/libpthread.so.0
3 0x00007f6b714b9c30 in q_dequeue (q=0x7f6b5811bbc0, cntxt=0x0) at /opt/spinque/MonetDBServer/MonetDB.Spinque_Jul2015/src/monetdb5/mal/mal_dataflow.c:213
4 0x00007f6b714ba64b in DFLOWworker (T=0x7f6b719348c0 <workers+64>) at /opt/spinque/MonetDBServer/MonetDB.Spinque_Jul2015/src/monetdb5/mal/mal_dataflow.c:333
5 0x000000394d007555 in start_thread () from /lib64/libpthread.so.0
6 0x000000394cd02b9d in clone () from /lib64/libc.so.6
Thread 6 (Thread 0x7f6b676ac700 (LWP 20953)):
0 0x000000394d00e829 in do_futex_wait.constprop () from /lib64/libpthread.so.0
1 0x000000394d00e8c4 in __new_sem_wait_slow.constprop.0 () from /lib64/libpthread.so.0
2 0x000000394d00e96a in sem_wait@@GLIBC_2.2.5 () from /lib64/libpthread.so.0
3 0x00007f6b714b9c30 in q_dequeue (q=0x7f6b5811bbc0, cntxt=0x0) at /opt/spinque/MonetDBServer/MonetDB.Spinque_Jul2015/src/monetdb5/mal/mal_dataflow.c:213
4 0x00007f6b714ba64b in DFLOWworker (T=0x7f6b71934900 <workers+128>) at /opt/spinque/MonetDBServer/MonetDB.Spinque_Jul2015/src/monetdb5/mal/mal_dataflow.c:333
5 0x000000394d007555 in start_thread () from /lib64/libpthread.so.0
6 0x000000394cd02b9d in clone () from /lib64/libc.so.6
Thread 5 (Thread 0x7f6b674ab700 (LWP 20954)):
0 0x000000394d00e829 in do_futex_wait.constprop () from /lib64/libpthread.so.0
1 0x000000394d00e8c4 in __new_sem_wait_slow.constprop.0 () from /lib64/libpthread.so.0
2 0x000000394d00e96a in sem_wait@@GLIBC_2.2.5 () from /lib64/libpthread.so.0
3 0x00007f6b714b9c30 in q_dequeue (q=0x7f6b5811bbc0, cntxt=0x0) at /opt/spinque/MonetDBServer/MonetDB.Spinque_Jul2015/src/monetdb5/mal/mal_dataflow.c:213
4 0x00007f6b714ba64b in DFLOWworker (T=0x7f6b71934940 <workers+192>) at /opt/spinque/MonetDBServer/MonetDB.Spinque_Jul2015/src/monetdb5/mal/mal_dataflow.c:333
5 0x000000394d007555 in start_thread () from /lib64/libpthread.so.0
6 0x000000394cd02b9d in clone () from /lib64/libc.so.6
Thread 4 (Thread 0x7f6b672aa700 (LWP 20955)):
0 0x000000394d00e829 in do_futex_wait.constprop () from /lib64/libpthread.so.0
1 0x000000394d00e8c4 in __new_sem_wait_slow.constprop.0 () from /lib64/libpthread.so.0
2 0x000000394d00e96a in sem_wait@@GLIBC_2.2.5 () from /lib64/libpthread.so.0
3 0x00007f6b714b9c30 in q_dequeue (q=0x7f6b5811bbc0, cntxt=0x0) at /opt/spinque/MonetDBServer/MonetDB.Spinque_Jul2015/src/monetdb5/mal/mal_dataflow.c:213
4 0x00007f6b714ba64b in DFLOWworker (T=0x7f6b71934980 <workers+256>) at /opt/spinque/MonetDBServer/MonetDB.Spinque_Jul2015/src/monetdb5/mal/mal_dataflow.c:333
5 0x000000394d007555 in start_thread () from /lib64/libpthread.so.0
6 0x000000394cd02b9d in clone () from /lib64/libc.so.6
Thread 3 (Thread 0x7f6b670a9700 (LWP 20956)):
0 0x000000394d00e829 in do_futex_wait.constprop () from /lib64/libpthread.so.0
1 0x000000394d00e8c4 in __new_sem_wait_slow.constprop.0 () from /lib64/libpthread.so.0
2 0x000000394d00e96a in sem_wait@@GLIBC_2.2.5 () from /lib64/libpthread.so.0
3 0x00007f6b714b9c30 in q_dequeue (q=0x7f6b5811bbc0, cntxt=0x0) at /opt/spinque/MonetDBServer/MonetDB.Spinque_Jul2015/src/monetdb5/mal/mal_dataflow.c:213
4 0x00007f6b714ba64b in DFLOWworker (T=0x7f6b719349c0 <workers+320>) at /opt/spinque/MonetDBServer/MonetDB.Spinque_Jul2015/src/monetdb5/mal/mal_dataflow.c:333
5 0x000000394d007555 in start_thread () from /lib64/libpthread.so.0
6 0x000000394cd02b9d in clone () from /lib64/libc.so.6
Thread 2 (Thread 0x7f6b66ca7700 (LWP 20958)):
0 0x000000394d00e829 in do_futex_wait.constprop () from /lib64/libpthread.so.0
1 0x000000394d00e8c4 in __new_sem_wait_slow.constprop.0 () from /lib64/libpthread.so.0
2 0x000000394d00e96a in sem_wait@@GLIBC_2.2.5 () from /lib64/libpthread.so.0
3 0x00007f6b714b9c30 in q_dequeue (q=0x7f6b5811bbc0, cntxt=0x0) at /opt/spinque/MonetDBServer/MonetDB.Spinque_Jul2015/src/monetdb5/mal/mal_dataflow.c:213
4 0x00007f6b714ba64b in DFLOWworker (T=0x7f6b71934a40 <workers+448>) at /opt/spinque/MonetDBServer/MonetDB.Spinque_Jul2015/src/monetdb5/mal/mal_dataflow.c:333
5 0x000000394d007555 in start_thread () from /lib64/libpthread.so.0
---Type <return> to continue, or q <return> to quit---
6 0x000000394cd02b9d in clone () from /lib64/libc.so.6
Thread 1 (Thread 0x7f6b70678800 (LWP 20944)):
0 0x000000394ccf9063 in select () from /lib64/libc.so.6
1 0x00007f6b70ef5863 in MT_sleep_ms (ms=5000) at /opt/spinque/MonetDBServer/MonetDB.Spinque_Jul2015/src/gdk/gdk_posix.c:1085
2 0x0000000000403ec4 in main (argc=20, av=0x7ffcbaed5dc8) at /opt/spinque/MonetDBServer/MonetDB.Spinque_Jul2015/src/tools/mserver/mserver5.c:668
(gdb) thread 9
[Switching to thread 9 (Thread 0x7f6b67daf700 (LWP 20950))]
0 0x00007f6b716d1149 in OPTpushselectImplementation (cntxt=0x7f6b69cb0328, mb=0x7f6b581260a0, stk=0x0, pci=0x0) at /opt/spinque/MonetDBServer/MonetDB.Spinque_Jul2015/src/monetdb5/optimizer/opt_pushselect.c:220
220 } else if (isMapOp(q) && q->argc >= 2 && isaBatType(getArgType(mb, q, 1))) {
(gdb) l
215 InstrPtr s = old[vars[i1]];
216 if (getModuleId(s) == sqlRef && getFunctionId(s) == tidRef)
217 tid = getArg(q, 1);
218 }
219 break;
220 } else if (isMapOp(q) && q->argc >= 2 && isaBatType(getArgType(mb, q, 1))) {
221 int i1 = getArg(q, 1);
222 q = old[vars[i1]];
223 } else if (isMapOp(q) && q->argc >= 3 && isaBatType(getArgType(mb, q, 2))) {
224 int i2 = getArg(q, 2);
Reproducible: Always
$ mserver5 --version
MonetDB 5 server v11.21.6 (64-bit, 64-bit oids, 128-bit integers)
This is an unreleased version
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 15.6GiB available memory, 8 available cpu cores
Libraries:
libpcre: 8.37 2015-04-28 (compiled with 8.37)
openssl: OpenSSL 1.0.1k 8 Jan 2015 (compiled with OpenSSL 1.0.1k-fips 8 Jan 2015)
libxml2: 2.9.2 (compiled with 2.9.2)
Compiled by: roberto@photon.hq.spinque.com (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
## Comment 21691
Date: 2015-12-24 22:36:44 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [9633f26d33e6](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9633f26d33e6) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=9633f26d33e6](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=9633f26d33e6)
Changeset description:
protect against multi-output multiplex functions, solves bug #3817
## Comment 21692
Date: 2015-12-24 22:37:08 +0100
From: @njnes
fixed in Jul 2015 branch
| opt_pushselect stuck with multi-table UDF | https://api.github.com/repos/MonetDB/MonetDB/issues/3817/comments | 0 | 2020-11-30T13:17:39Z | 2024-06-27T12:08:54Z | https://github.com/MonetDB/MonetDB/issues/3817 | 753,470,841 | 3,817 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-10-01 15:25:20 +0200
From: Sherzod Mutalov <<shmutalov>>
To: SQL devs <<bugs-sql>>
Version: 11.21.5 (Jul2015)
Last updated: 2015-11-03 10:18:00 +0100
## Comment 21317
Date: 2015-10-01 15:25:20 +0200
From: Sherzod Mutalov <<shmutalov>>
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0
Build Identifier:
Server crashes when trying to convert timestamp to str with incorrect format.
This problem occurs, because strftime function implementation in msvc library have different behaviour, other than in GNU libraries.
Reproducible: Always
### Steps to Reproduce:
1. Execute following query: SELECT timestamp_to_str(current_timestamp, '%Q');
### Actual Results:
Server crashes
### Expected Results:
SQL exception
In mtime.c file, inside MTIMEtimestamp_to_str function
at the line 3610:
>> if ((sz = strftime(buf, BUFSIZ, *format, &t)) == 0)
Also, need new feature to extract QUARTER part from dates (like pgsql date_part('quarter', ...) function)
## Comment 21337
Date: 2015-10-14 19:02:06 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [e21bad0f10c1](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e21bad0f10c1) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=e21bad0f10c1](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=e21bad0f10c1)
Changeset description:
added tests for bug #3815 and bug #3816
## Comment 21365
Date: 2015-10-21 15:01:26 +0200
From: @sjoerdmullender
Fixed in changeset [e3f3f7c48a48](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e3f3f7c48a48)
## Comment 21366
Date: 2015-10-21 15:03:15 +0200
From: @sjoerdmullender
(In reply to Sherzod Mutalov from comment 0)
> Also, need new feature to extract QUARTER part from dates (like pgsql
> date_part('quarter', ...) function)
This is a feature request. Please create a separate bug report (and mark it as "enhancement").
## Comment 21432
Date: 2015-11-03 10:18:00 +0100
From: @sjoerdmullender
Jul2015 SP1 has been released.
| Server crashes when trying to convert timestamp to str with incorrect format | https://api.github.com/repos/MonetDB/MonetDB/issues/3816/comments | 0 | 2020-11-30T13:17:36Z | 2024-06-27T12:08:53Z | https://github.com/MonetDB/MonetDB/issues/3816 | 753,470,810 | 3,816 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-10-01 13:39:43 +0200
From: Sherzod Mutalov <<shmutalov>>
To: SQL devs <<bugs-sql>>
Version: 11.21.19 (Jul2015-SP4)
CC: @mlkersten, @PedroTadim, @drstmane
Last updated: 2020-10-19 11:06:21 +0200
## Comment 21314
Date: 2015-10-01 13:39:43 +0200
From: Sherzod Mutalov <<shmutalov>>
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0
Build Identifier:
When executing SQL query, which contains implicit or explicit float to integer (I mean number types, not related to their data sizes) conversions I am getting incorrect results.
Reproducible: Always
### Steps to Reproduce:
1. Execute on of the following queries:
1)
SELECT CONVERT(
CONVERT( (str_to_timestamp('2015-10-01', '%Y-%m-%d')
- str_to_timestamp('2015-09-30', '%Y-%m-%d'))
, BIGINT) /86400
, BIGINT);
2)
SELECT CONVERT( (str_to_timestamp('2015-10-01', '%Y-%m-%d')
- str_to_timestamp('2015-09-30', '%Y-%m-%d'))/86400, BIGINT);
3)
SELECT (str_to_timestamp('2015-10-01', '%Y-%m-%d')
- str_to_timestamp('2015-09-30', '%Y-%m-%d'))/86400.0;
### Actual Results:
1) and 2) produces: 1000
3) produces: 0.100
### Expected Results:
1) and 2) expected as: 1
3) expected as: 1.000
Following query generates expected result, but in floating type.
SELECT ( (str_to_timestamp('2015-10-01', '%Y-%m-%d')
- str_to_timestamp('2015-09-30', '%Y-%m-%d'))/86400);
## Comment 21315
Date: 2015-10-01 14:08:37 +0200
From: @drstmane
Apparently, conversion from sec_interval to bigint does not respect decimal point (correctly):
sql>select str_to_timestamp('2015-10-01', '%Y-%m-%d') - str_to_timestamp('2015-09-30', '%Y-%m-%d');
+-------------------------------+
| str_to_timestamp_single_value |
+===============================+
| 86400.000 |
+-------------------------------+
1 tuple (1.085ms)
sql>select convert(str_to_timestamp('2015-10-01', '%Y-%m-%d') - str_to_timestamp('2015-09-30', '%Y-%m-%d'), bigint);
+----------+
| L1 |
+==========+
| 86400000 |
+----------+
1 tuple (0.549ms)
sql>\fraw
sql>select str_to_timestamp('2015-10-01', '%Y-%m-%d') - str_to_timestamp('2015-09-30', '%Y-%m-%d');
% .L table_name
% str_to_timestamp_single_value name
% sec_interval type
% 9 length
[ 86400.000 ]
sql>select convert(str_to_timestamp('2015-10-01', '%Y-%m-%d') - str_to_timestamp('2015-09-30', '%Y-%m-%d'), bigint);
% .L1 table_name
% L1 name
% bigint type
% 8 length
[ 86400000 ]
sql>select (str_to_timestamp('2015-10-01', '%Y-%m-%d') - str_to_timestamp('2015-09-30', '%Y-%m-%d')) / 86400;
% .L table_name
% str_to_timestamp_single_value name
% sec_interval type
% 5 length
[ 1.000 ]
sql>select convert((str_to_timestamp('2015-10-01', '%Y-%m-%d') - str_to_timestamp('2015-09-30', '%Y-%m-%d')) / 86400,bigint);
% .L1 table_name
% L1 name
% bigint type
% 4 length
[ 1000 ]
## Comment 21338
Date: 2015-10-14 19:02:09 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [e21bad0f10c1](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e21bad0f10c1) made by Niels Nes <niels@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=e21bad0f10c1](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=e21bad0f10c1)
Changeset description:
added tests for bug #3815 and bug #3816
## Comment 27598
Date: 2020-03-15 11:18:51 +0100
From: @mlkersten
This bug report can be closed?
## Comment 27602
Date: 2020-03-16 19:19:11 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [a43148c12457](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a43148c12457) made by Pedro Ferreira <pedro.ferreira@monetdbsolutions.com> in the MonetDB repo, refers to this bug.
For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=a43148c12457](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=a43148c12457)
Changeset description:
Bug #3815 has not been fixed yet
## Comment 27609
Date: 2020-03-18 17:07:19 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [7c564d9f9562](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7c564d9f9562) made by Pedro Ferreira <pedro.ferreira@monetdbsolutions.com> in the MonetDB repo, refers to this bug.
For complete details, see [https//devmonetdborg/hg/MonetDB?cmd=changeset;node=7c564d9f9562](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=7c564d9f9562)
Changeset description:
Bug #3815 is known to fail
| Incorrect results when expression contains implicit float/integer conversions | https://api.github.com/repos/MonetDB/MonetDB/issues/3815/comments | 0 | 2020-11-30T13:17:34Z | 2024-06-27T12:08:52Z | https://github.com/MonetDB/MonetDB/issues/3815 | 753,470,775 | 3,815 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-10-01 13:26:04 +0200
From: Sherzod Mutalov <<shmutalov>>
To: SQL devs <<bugs-sql>>
Version: 11.21.5 (Jul2015)
Last updated: 2015-11-03 10:18:46 +0100
## Comment 21313
Date: 2015-10-01 13:26:04 +0200
From: Sherzod Mutalov <<shmutalov>>
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0
Build Identifier:
Server crashes when trying to execute(parse) SQL query, which contains bitwise NOT operation. After crash server can started up.
Reproducible: Always
### Steps to Reproduce:
1. Execute SQL query: SELECT ~0;
### Actual Results:
mserver5 unexpectedly crashes
### Expected Results:
-1
mserver5 --version
MonetDB 5 server v11.21.5 "Jul2015" (64-bit, 64-bit oids)
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 15.9GiB available memory, 4 available cpu cores
Libraries:
libpcre: 8.33 2013-05-28
openssl: OpenSSL 1.0.2c 12 Jun 2015
libxml2: 2.9.2
Compiled by: %USER%@SHMUTALOV (x86_64-pc-winnt)
Compilation: cl -GF -W3 -MD -nologo -Ox -Zi -Oi
Linking : cl -GF -W3 -MD -nologo -Ox -Zi -Oi
## Comment 21316
Date: 2015-10-01 14:21:38 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [33b08c60a45e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=33b08c60a45e) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=33b08c60a45e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=33b08c60a45e)
Changeset description:
~ is a unary operator, not a binary one.
This fixes bug #3814.
## Comment 21454
Date: 2015-11-03 10:18:46 +0100
From: @sjoerdmullender
Jul2015 SP1 has been released.
| Server crash when using bitwise NOT operation in SQL query | https://api.github.com/repos/MonetDB/MonetDB/issues/3814/comments | 0 | 2020-11-30T13:17:30Z | 2024-06-27T12:08:51Z | https://github.com/MonetDB/MonetDB/issues/3814 | 753,470,732 | 3,814 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-09-28 11:15:56 +0200
From: @hannesmuehleisen
To: SQL devs <<bugs-sql>>
Version: 11.19.3 (Oct2014)
CC: @drstmane
Last updated: 2015-11-03 10:18:30 +0100
## Comment 21285
Date: 2015-09-28 11:15:56 +0200
From: @hannesmuehleisen
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.99 Safari/537.36
Build Identifier:
See below
Reproducible: Always
### Steps to Reproduce:
START TRANSACTION;
CREATE TABLE "Batting" ("playerID" STRING, "yearID" INTEGER, stint INTEGER, "teamID" STRING, "lgID" STRING, "G" INTEGER, "AB" INTEGER, "R" INTEGER, "H" INTEGER, "X2B" INTEGER, "X3B" INTEGER, "HR" INTEGER, "RBI" INTEGER, "SB" INTEGER, "CS" INTEGER, "BB" INTEGER, "SO" INTEGER, "IBB" INTEGER, "HBP" INTEGER, "SH" INTEGER, "SF" INTEGER, "GIDP" INTEGER);
COPY INTO "Batting" FROM '/whatever/batting.csv.gz' USING DELIMITERS ',','\n','"' NULL AS '';
SELECT COUNT(*) FROM "Batting";
ROLLBACK;
### Actual Results:
Failed to import table line 50859 field 22 'int' expected in '0,0,0'
Yet, line 50859 looks like this:
"abbotgl01",1973,1,"OAK","AL",5,,,,,,,,,,,,,,,,
So the error message is also wrong.
File imports fine when splitting in any two parts. I'd call this erratic. The issue breaks the clients/R/Tests/dplyr.R test case.
### Expected Results:
Rows are imported
## Comment 21286
Date: 2015-09-28 11:16:43 +0200
From: @hannesmuehleisen
CSV can be downloaded from http://homepages.cwi.nl/~hannes/batting.csv.gz
## Comment 21287
Date: 2015-09-28 11:27:55 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [012f913760c9](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=012f913760c9) made by Hannes Muehleisen <hannes@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=012f913760c9](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=012f913760c9)
Changeset description:
Test for Bug #3813
## Comment 21292
Date: 2015-09-28 15:37:24 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [f15a56550f53](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f15a56550f53) made by Stefan Manegold <Stefan.Manegold@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=f15a56550f53](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=f15a56550f53)
Changeset description:
added "canonical" stable output for tests schemadiff.Bug-3778 & copy_into.Bug-3813;
correct / expected output still needs to be approved / provided !
## Comment 21294
Date: 2015-09-28 15:37:31 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [0b830207930c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0b830207930c) made by Stefan Manegold <Stefan.Manegold@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=0b830207930c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=0b830207930c)
Changeset description:
BugTracker-2015: activate "dormand(?)" / new tests schemadiff.Bug-3778 & copy_into.Bug-3813
## Comment 21295
Date: 2015-09-28 16:24:20 +0200
From: @drstmane
`hg bisect`
(plus (quite) some manual work due to too much head-merging instead of re-basing)
reveals that this checkin appears to break the CSV load as reported:
http://dev.monetdb.org/hg/MonetDB/rev/33cfedf29e90
i.e., with the previous checkin
http://dev.monetdb.org/hg/MonetDB/rev/1e216af13eec
it still works fine,
but as to the above checkin it fails as reported.
## Comment 21296
Date: 2015-09-29 13:23:49 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [5408eb05e544](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5408eb05e544) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=5408eb05e544](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=5408eb05e544)
Changeset description:
Fix for bug #3813: also deal with empty last column.
## Comment 21297
Date: 2015-09-29 13:31:22 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [6309126cf8a6](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6309126cf8a6) made by Hannes Muehleisen <hannes@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=6309126cf8a6](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=6309126cf8a6)
Changeset description:
Test for Bug #3813
(grafted from 012f913760c99d88f4698610c7cd6e783e00598c)
## Comment 21446
Date: 2015-11-03 10:18:30 +0100
From: @sjoerdmullender
Jul2015 SP1 has been released.
| COPY INTO fails on perfectly clean CSV file | https://api.github.com/repos/MonetDB/MonetDB/issues/3813/comments | 0 | 2020-11-30T13:17:27Z | 2024-06-27T12:08:50Z | https://github.com/MonetDB/MonetDB/issues/3813 | 753,470,698 | 3,813 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-09-25 15:19:43 +0200
From: Andy Barlow <<andy.barlow>>
To: clients devs <<bugs-clients>>
Version: 11.21.19 (Jul2015-SP4)
Last updated: 2016-04-11 11:18:43 +0200
## Comment 21283
Date: 2015-09-25 15:19:43 +0200
From: Andy Barlow <<andy.barlow>>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/601.2.4 (KHTML, like Gecko) Version/9.0.1 Safari/601.2.4
Build Identifier:
If your import file contains a number of character combinations, such as \560, \561, \700 and probably lots of others, the copy into fails with a message like:
Failed to import table line 5 field 1 'varchar(20)' expected in 'FIVE\700'
Reproducible: Always
### Steps to Reproduce:
1. create table test (test varchar(20));
2. create a load file test.txt with the following:
ONE
TWO
THREE
FOUR
FIVE\700
3. copy into test from 'test.txt' using delimiters '\t','\n';
4. fails with message:
Failed to import table line 5 field 1 'varchar(20)' expected in 'FIVE\700'
### Actual Results:
Failed to import table line 5 field 1 'varchar(20)' expected in 'FIVE\700'
### Expected Results:
should import OK, the character combinations are valid
## Comment 21284
Date: 2015-09-25 16:04:00 +0200
From: Andy Barlow <<andy.barlow>>
it appears that the copy command is treating the input as octal.
If you convert the backslash \ into its octal equivalent, \134 then it “works”.
In some cases, such as \700 an error is thrown.
With an import file test.txt:
ONE\101
ONE\134101
When imported into table test (test varchar(20)), you get:
ONEA
ONE\101
So the copy command is converting octal to UTF-8,ASCII equivalent.
## Comment 21514
Date: 2015-11-11 12:11:28 +0100
From: Andy Barlow <<andy.barlow>>
Does anyone read these?
## Comment 21515
Date: 2015-11-11 12:32:37 +0100
From: @sjoerdmullender
(In reply to Andy Barlow from comment 2)
> Does anyone read these?
Yes.
This is a known problem (also without this report), but we don't have a solution yet. Backslashes are treated basically the same as in C. This is something that is not always appropriate, but the database dump relies on the feature, so it's not entirely trivial to change. (Presumably you want to be able to load your dumped database.)
In the mean time, you can double your backslashes.
| Using copy into to import data fails if data contains \560, \561 and several other combinations of characters | https://api.github.com/repos/MonetDB/MonetDB/issues/3812/comments | 0 | 2020-11-30T13:17:24Z | 2024-06-28T07:19:48Z | https://github.com/MonetDB/MonetDB/issues/3812 | 753,470,673 | 3,812 |
[
"MonetDB",
"MonetDB"
] | Date: 2015-09-24 15:01:38 +0200
From: Frédéric Jolliton <<frederic.jolliton+monetdb>>
To: SQL devs <<bugs-sql>>
Version: 11.19.15 (Oct2014-SP4)
Last updated: 2015-11-03 10:18:41 +0100
## Comment 21282
Date: 2015-09-24 15:01:38 +0200
From: Frédéric Jolliton <<frederic.jolliton+monetdb>>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:41.0) Gecko/20100101 Firefox/41.0
Build Identifier:
We found that "NOT LIKE" with a pattern WITHOUT any wildcards ('%' or '_')
is behaving as "LIKE"!
Further remarks:
- "NOT ILIKE" works ok
- attempting to TRACE the query fails (looks like it is crashing, but
it do not seems to trigger any assert on the way)
- extending the query with LIMIT, GROUP BY, or prepending DISTINCT can
make it work as expected.
Reproducible: Always
### Actual Results:
sql>create table test (id int, value text);
operation successful (39.621ms)
sql>insert into test values (1, 'Alice'), (2, 'Bob'), (3, 'Carol');
3 affected rows (15.252ms)
sql>select * from test;
+------+-------+
| id | value |
+======+=======+
| 1 | Alice |
| 2 | Bob |
| 3 | Carol |
+------+-------+
3 tuples (0.411ms)
sql>select * from test where value not like 'Bob';
+------+-------+
| id | value |
+======+=======+
| 2 | Bob |
+------+-------+
1 tuple (0.892ms)
sql>select * from test where value not ilike 'Bob';
+------+-------+
| id | value |
+======+=======+
| 1 | Alice |
| 3 | Carol |
+------+-------+
2 tuples (2.356ms)
## Comment 21298
Date: 2015-09-29 14:04:31 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [0e6e5e0540bb](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0e6e5e0540bb) made by Sjoerd Mullender <sjoerd@acm.org> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=0e6e5e0540bb](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=0e6e5e0540bb)
Changeset description:
Fix bug #3811: do not rewrite like select without wildcard if anti flag is set.
## Comment 21451
Date: 2015-11-03 10:18:41 +0100
From: @sjoerdmullender
Jul2015 SP1 has been released.
| NOT LIKE not working if the operand doesn't contains wildcards. | https://api.github.com/repos/MonetDB/MonetDB/issues/3811/comments | 0 | 2020-11-30T13:17:22Z | 2024-06-27T12:08:48Z | https://github.com/MonetDB/MonetDB/issues/3811 | 753,470,638 | 3,811 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.