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" ]
# Deleted Bugzilla Bug Date: 2020-11-30T13:33:45Z This bug was created during the import from Bugzilla. GitHub Issues Tracker allows to assign consecutive ids only. So this dummy issue was created in place of a deleted Bugzilla Bug. Please ignore this report.
Deleted Bugzilla Bug
https://api.github.com/repos/MonetDB/MonetDB/issues/4110/comments
0
2020-11-30T13:37:47Z
2020-11-30T13:37:48Z
https://github.com/MonetDB/MonetDB/issues/4110
753,485,943
4,110
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T13:33:45Z This bug was created during the import from Bugzilla. GitHub Issues Tracker allows to assign consecutive ids only. So this dummy issue was created in place of a deleted Bugzilla Bug. Please ignore this report.
Deleted Bugzilla Bug
https://api.github.com/repos/MonetDB/MonetDB/issues/4109/comments
0
2020-11-30T13:37:45Z
2020-11-30T13:37:46Z
https://github.com/MonetDB/MonetDB/issues/4109
753,485,906
4,109
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T13:33:45Z This bug was created during the import from Bugzilla. GitHub Issues Tracker allows to assign consecutive ids only. So this dummy issue was created in place of a deleted Bugzilla Bug. Please ignore this report.
Deleted Bugzilla Bug
https://api.github.com/repos/MonetDB/MonetDB/issues/4108/comments
0
2020-11-30T13:37:43Z
2020-11-30T13:37:45Z
https://github.com/MonetDB/MonetDB/issues/4108
753,485,879
4,108
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T13:33:45Z This bug was created during the import from Bugzilla. GitHub Issues Tracker allows to assign consecutive ids only. So this dummy issue was created in place of a deleted Bugzilla Bug. Please ignore this report.
Deleted Bugzilla Bug
https://api.github.com/repos/MonetDB/MonetDB/issues/4107/comments
0
2020-11-30T13:37:42Z
2020-11-30T13:37:43Z
https://github.com/MonetDB/MonetDB/issues/4107
753,485,854
4,107
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T13:33:45Z This bug was created during the import from Bugzilla. GitHub Issues Tracker allows to assign consecutive ids only. So this dummy issue was created in place of a deleted Bugzilla Bug. Please ignore this report.
Deleted Bugzilla Bug
https://api.github.com/repos/MonetDB/MonetDB/issues/4106/comments
0
2020-11-30T13:37:40Z
2020-11-30T13:37:41Z
https://github.com/MonetDB/MonetDB/issues/4106
753,485,826
4,106
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T13:33:45Z This bug was created during the import from Bugzilla. GitHub Issues Tracker allows to assign consecutive ids only. So this dummy issue was created in place of a deleted Bugzilla Bug. Please ignore this report.
Deleted Bugzilla Bug
https://api.github.com/repos/MonetDB/MonetDB/issues/4105/comments
0
2020-11-30T13:37:38Z
2020-11-30T13:37:39Z
https://github.com/MonetDB/MonetDB/issues/4105
753,485,803
4,105
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T13:33:45Z This bug was created during the import from Bugzilla. GitHub Issues Tracker allows to assign consecutive ids only. So this dummy issue was created in place of a deleted Bugzilla Bug. Please ignore this report.
Deleted Bugzilla Bug
https://api.github.com/repos/MonetDB/MonetDB/issues/4104/comments
0
2020-11-30T13:37:36Z
2020-11-30T13:37:37Z
https://github.com/MonetDB/MonetDB/issues/4104
753,485,772
4,104
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T13:33:45Z This bug was created during the import from Bugzilla. GitHub Issues Tracker allows to assign consecutive ids only. So this dummy issue was created in place of a deleted Bugzilla Bug. Please ignore this report.
Deleted Bugzilla Bug
https://api.github.com/repos/MonetDB/MonetDB/issues/4103/comments
0
2020-11-30T13:37:34Z
2020-11-30T13:37:35Z
https://github.com/MonetDB/MonetDB/issues/4103
753,485,753
4,103
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T13:33:45Z This bug was created during the import from Bugzilla. GitHub Issues Tracker allows to assign consecutive ids only. So this dummy issue was created in place of a deleted Bugzilla Bug. Please ignore this report.
Deleted Bugzilla Bug
https://api.github.com/repos/MonetDB/MonetDB/issues/4102/comments
0
2020-11-30T13:37:32Z
2020-11-30T13:37:33Z
https://github.com/MonetDB/MonetDB/issues/4102
753,485,734
4,102
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T13:33:45Z This bug was created during the import from Bugzilla. GitHub Issues Tracker allows to assign consecutive ids only. So this dummy issue was created in place of a deleted Bugzilla Bug. Please ignore this report.
Deleted Bugzilla Bug
https://api.github.com/repos/MonetDB/MonetDB/issues/4101/comments
0
2020-11-30T13:37:31Z
2020-11-30T13:37:32Z
https://github.com/MonetDB/MonetDB/issues/4101
753,485,708
4,101
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T13:33:45Z This bug was created during the import from Bugzilla. GitHub Issues Tracker allows to assign consecutive ids only. So this dummy issue was created in place of a deleted Bugzilla Bug. Please ignore this report.
Deleted Bugzilla Bug
https://api.github.com/repos/MonetDB/MonetDB/issues/4100/comments
0
2020-11-30T13:37:29Z
2020-11-30T13:37:30Z
https://github.com/MonetDB/MonetDB/issues/4100
753,485,675
4,100
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T13:33:45Z This bug was created during the import from Bugzilla. GitHub Issues Tracker allows to assign consecutive ids only. So this dummy issue was created in place of a deleted Bugzilla Bug. Please ignore this report.
Deleted Bugzilla Bug
https://api.github.com/repos/MonetDB/MonetDB/issues/4099/comments
0
2020-11-30T13:37:27Z
2020-11-30T13:37:28Z
https://github.com/MonetDB/MonetDB/issues/4099
753,485,660
4,099
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T13:33:45Z This bug was created during the import from Bugzilla. GitHub Issues Tracker allows to assign consecutive ids only. So this dummy issue was created in place of a deleted Bugzilla Bug. Please ignore this report.
Deleted Bugzilla Bug
https://api.github.com/repos/MonetDB/MonetDB/issues/4098/comments
0
2020-11-30T13:37:25Z
2020-11-30T13:37:26Z
https://github.com/MonetDB/MonetDB/issues/4098
753,485,641
4,098
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T13:33:45Z This bug was created during the import from Bugzilla. GitHub Issues Tracker allows to assign consecutive ids only. So this dummy issue was created in place of a deleted Bugzilla Bug. Please ignore this report.
Deleted Bugzilla Bug
https://api.github.com/repos/MonetDB/MonetDB/issues/4097/comments
0
2020-11-30T13:37:24Z
2020-11-30T13:37:25Z
https://github.com/MonetDB/MonetDB/issues/4097
753,485,625
4,097
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T13:33:45Z This bug was created during the import from Bugzilla. GitHub Issues Tracker allows to assign consecutive ids only. So this dummy issue was created in place of a deleted Bugzilla Bug. Please ignore this report.
Deleted Bugzilla Bug
https://api.github.com/repos/MonetDB/MonetDB/issues/4096/comments
0
2020-11-30T13:37:22Z
2020-11-30T13:37:23Z
https://github.com/MonetDB/MonetDB/issues/4096
753,485,596
4,096
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T13:33:45Z This bug was created during the import from Bugzilla. GitHub Issues Tracker allows to assign consecutive ids only. So this dummy issue was created in place of a deleted Bugzilla Bug. Please ignore this report.
Deleted Bugzilla Bug
https://api.github.com/repos/MonetDB/MonetDB/issues/4095/comments
0
2020-11-30T13:37:20Z
2020-11-30T13:37:21Z
https://github.com/MonetDB/MonetDB/issues/4095
753,485,575
4,095
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T13:33:45Z This bug was created during the import from Bugzilla. GitHub Issues Tracker allows to assign consecutive ids only. So this dummy issue was created in place of a deleted Bugzilla Bug. Please ignore this report.
Deleted Bugzilla Bug
https://api.github.com/repos/MonetDB/MonetDB/issues/4094/comments
0
2020-11-30T13:37:18Z
2020-11-30T13:37:20Z
https://github.com/MonetDB/MonetDB/issues/4094
753,485,558
4,094
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T13:33:45Z This bug was created during the import from Bugzilla. GitHub Issues Tracker allows to assign consecutive ids only. So this dummy issue was created in place of a deleted Bugzilla Bug. Please ignore this report.
Deleted Bugzilla Bug
https://api.github.com/repos/MonetDB/MonetDB/issues/4093/comments
0
2020-11-30T13:37:17Z
2020-11-30T13:37:18Z
https://github.com/MonetDB/MonetDB/issues/4093
753,485,533
4,093
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T13:33:45Z This bug was created during the import from Bugzilla. GitHub Issues Tracker allows to assign consecutive ids only. So this dummy issue was created in place of a deleted Bugzilla Bug. Please ignore this report.
Deleted Bugzilla Bug
https://api.github.com/repos/MonetDB/MonetDB/issues/4092/comments
0
2020-11-30T13:37:15Z
2020-11-30T13:37:16Z
https://github.com/MonetDB/MonetDB/issues/4092
753,485,511
4,092
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T13:33:45Z This bug was created during the import from Bugzilla. GitHub Issues Tracker allows to assign consecutive ids only. So this dummy issue was created in place of a deleted Bugzilla Bug. Please ignore this report.
Deleted Bugzilla Bug
https://api.github.com/repos/MonetDB/MonetDB/issues/4091/comments
0
2020-11-30T13:37:13Z
2020-11-30T13:37:14Z
https://github.com/MonetDB/MonetDB/issues/4091
753,485,484
4,091
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T13:33:45Z This bug was created during the import from Bugzilla. GitHub Issues Tracker allows to assign consecutive ids only. So this dummy issue was created in place of a deleted Bugzilla Bug. Please ignore this report.
Deleted Bugzilla Bug
https://api.github.com/repos/MonetDB/MonetDB/issues/4090/comments
0
2020-11-30T13:37:11Z
2020-11-30T13:37:12Z
https://github.com/MonetDB/MonetDB/issues/4090
753,485,460
4,090
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T13:33:45Z This bug was created during the import from Bugzilla. GitHub Issues Tracker allows to assign consecutive ids only. So this dummy issue was created in place of a deleted Bugzilla Bug. Please ignore this report.
Deleted Bugzilla Bug
https://api.github.com/repos/MonetDB/MonetDB/issues/4089/comments
0
2020-11-30T13:37:10Z
2020-11-30T13:37:11Z
https://github.com/MonetDB/MonetDB/issues/4089
753,485,435
4,089
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T13:33:45Z This bug was created during the import from Bugzilla. GitHub Issues Tracker allows to assign consecutive ids only. So this dummy issue was created in place of a deleted Bugzilla Bug. Please ignore this report.
Deleted Bugzilla Bug
https://api.github.com/repos/MonetDB/MonetDB/issues/4088/comments
0
2020-11-30T13:37:08Z
2020-11-30T13:37:09Z
https://github.com/MonetDB/MonetDB/issues/4088
753,485,412
4,088
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T13:33:45Z This bug was created during the import from Bugzilla. GitHub Issues Tracker allows to assign consecutive ids only. So this dummy issue was created in place of a deleted Bugzilla Bug. Please ignore this report.
Deleted Bugzilla Bug
https://api.github.com/repos/MonetDB/MonetDB/issues/4087/comments
0
2020-11-30T13:37:06Z
2020-11-30T13:37:07Z
https://github.com/MonetDB/MonetDB/issues/4087
753,485,389
4,087
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T13:33:45Z This bug was created during the import from Bugzilla. GitHub Issues Tracker allows to assign consecutive ids only. So this dummy issue was created in place of a deleted Bugzilla Bug. Please ignore this report.
Deleted Bugzilla Bug
https://api.github.com/repos/MonetDB/MonetDB/issues/4086/comments
0
2020-11-30T13:37:04Z
2020-11-30T13:37:05Z
https://github.com/MonetDB/MonetDB/issues/4086
753,485,358
4,086
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T13:33:45Z This bug was created during the import from Bugzilla. GitHub Issues Tracker allows to assign consecutive ids only. So this dummy issue was created in place of a deleted Bugzilla Bug. Please ignore this report.
Deleted Bugzilla Bug
https://api.github.com/repos/MonetDB/MonetDB/issues/4085/comments
0
2020-11-30T13:37:02Z
2020-11-30T13:37:03Z
https://github.com/MonetDB/MonetDB/issues/4085
753,485,331
4,085
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T13:33:45Z This bug was created during the import from Bugzilla. GitHub Issues Tracker allows to assign consecutive ids only. So this dummy issue was created in place of a deleted Bugzilla Bug. Please ignore this report.
Deleted Bugzilla Bug
https://api.github.com/repos/MonetDB/MonetDB/issues/4084/comments
0
2020-11-30T13:37:00Z
2020-11-30T13:37:01Z
https://github.com/MonetDB/MonetDB/issues/4084
753,485,301
4,084
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T13:33:45Z This bug was created during the import from Bugzilla. GitHub Issues Tracker allows to assign consecutive ids only. So this dummy issue was created in place of a deleted Bugzilla Bug. Please ignore this report.
Deleted Bugzilla Bug
https://api.github.com/repos/MonetDB/MonetDB/issues/4083/comments
0
2020-11-30T13:36:58Z
2020-11-30T13:36:59Z
https://github.com/MonetDB/MonetDB/issues/4083
753,485,262
4,083
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T13:33:45Z This bug was created during the import from Bugzilla. GitHub Issues Tracker allows to assign consecutive ids only. So this dummy issue was created in place of a deleted Bugzilla Bug. Please ignore this report.
Deleted Bugzilla Bug
https://api.github.com/repos/MonetDB/MonetDB/issues/4082/comments
0
2020-11-30T13:36:56Z
2020-11-30T13:36:57Z
https://github.com/MonetDB/MonetDB/issues/4082
753,485,239
4,082
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T13:33:45Z This bug was created during the import from Bugzilla. GitHub Issues Tracker allows to assign consecutive ids only. So this dummy issue was created in place of a deleted Bugzilla Bug. Please ignore this report.
Deleted Bugzilla Bug
https://api.github.com/repos/MonetDB/MonetDB/issues/4081/comments
0
2020-11-30T13:36:55Z
2020-11-30T13:36:56Z
https://github.com/MonetDB/MonetDB/issues/4081
753,485,218
4,081
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T13:33:45Z This bug was created during the import from Bugzilla. GitHub Issues Tracker allows to assign consecutive ids only. So this dummy issue was created in place of a deleted Bugzilla Bug. Please ignore this report.
Deleted Bugzilla Bug
https://api.github.com/repos/MonetDB/MonetDB/issues/4080/comments
0
2020-11-30T13:36:53Z
2020-11-30T13:36:54Z
https://github.com/MonetDB/MonetDB/issues/4080
753,485,195
4,080
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T13:33:45Z This bug was created during the import from Bugzilla. GitHub Issues Tracker allows to assign consecutive ids only. So this dummy issue was created in place of a deleted Bugzilla Bug. Please ignore this report.
Deleted Bugzilla Bug
https://api.github.com/repos/MonetDB/MonetDB/issues/4079/comments
0
2020-11-30T13:36:50Z
2020-11-30T13:36:52Z
https://github.com/MonetDB/MonetDB/issues/4079
753,485,161
4,079
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T13:33:45Z This bug was created during the import from Bugzilla. GitHub Issues Tracker allows to assign consecutive ids only. So this dummy issue was created in place of a deleted Bugzilla Bug. Please ignore this report.
Deleted Bugzilla Bug
https://api.github.com/repos/MonetDB/MonetDB/issues/4078/comments
0
2020-11-30T13:36:49Z
2020-11-30T13:36:50Z
https://github.com/MonetDB/MonetDB/issues/4078
753,485,139
4,078
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T13:33:45Z This bug was created during the import from Bugzilla. GitHub Issues Tracker allows to assign consecutive ids only. So this dummy issue was created in place of a deleted Bugzilla Bug. Please ignore this report.
Deleted Bugzilla Bug
https://api.github.com/repos/MonetDB/MonetDB/issues/4077/comments
0
2020-11-30T13:36:47Z
2020-11-30T13:36:48Z
https://github.com/MonetDB/MonetDB/issues/4077
753,485,123
4,077
[ "MonetDB", "MonetDB" ]
Date: 2016-09-30 12:47:50 +0200 From: @swingbit To: SQL devs &lt;<bugs-sql>&gt; Version: 11.23.7 (Jun2016-SP1) CC: @njnes Last updated: 2016-10-05 17:25:19 +0200 ## Comment 22400 Date: 2016-09-30 12:47:50 +0200 From: @swingbit User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36 Build Identifier: On latest Jun2016 from mercurial: sql>set schema spinque; auto commit mode: on sql>create table x(value double); operation successful (5.165ms) sql>insert into x values (0.5),(0.4); 2 affected rows (2.280ms) sql>select median(value) from x; MEDIAN: no such operator 'median(double)' sql>select sys.median(value) from x; +--------------------------+ | L1 | +==========================+ | 0.4 | +--------------------------+ The same for quantile, stddev_samp, etc. Reproducible: Always ## Comment 24459 Date: 2016-10-05 17:19:33 +0200 From: @njnes the median (and other analytical functions) are indeed created via sql start up scripts and loaded into the sys schema. Once you are switched to the spinque schema you should use full qualified naming. ## Comment 24460 Date: 2016-10-05 17:25:19 +0200 From: @swingbit Mmh. OK, the decision is yours. As a user, I find this rather non-intutive. I understand the underlying reasons, but I would expect whatever function in sys to be directly visible, no matter how it is loaded. At them moment it seems to me pretty confusing what should be visible from another schema and what not.
Statistics functions only in sys schema
https://api.github.com/repos/MonetDB/MonetDB/issues/4076/comments
0
2020-11-30T13:36:45Z
2024-06-28T07:20:00Z
https://github.com/MonetDB/MonetDB/issues/4076
753,485,087
4,076
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T13:33:45Z This bug was created during the import from Bugzilla. GitHub Issues Tracker allows to assign consecutive ids only. So this dummy issue was created in place of a deleted Bugzilla Bug. Please ignore this report.
Deleted Bugzilla Bug
https://api.github.com/repos/MonetDB/MonetDB/issues/4075/comments
0
2020-11-30T13:36:43Z
2020-11-30T13:36:44Z
https://github.com/MonetDB/MonetDB/issues/4075
753,485,069
4,075
[ "MonetDB", "MonetDB" ]
Date: 2016-09-23 18:31:01 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.23.7 (Jun2016-SP1) CC: @njnes Last updated: 2016-10-13 10:04:18 +0200 ## Comment 22386 Date: 2016-09-23 18:31:01 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; Build is Jun2016 [f32bf50af59a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f32bf50af59a) To reproduce: sql>set cache=0; sql>prepare select 1; Expected: execute prepared statement using: EXEC 3(...) +---------+--------+-------+--------+-------+--------+ | type | digits | scale | schema | table | column | +=========+========+=======+========+=======+========+ | tinyint | 8 | 0 | | L | | +---------+--------+-------+--------+-------+--------+ Actual: [no output] This seems to fix it: diff -r c94cdb95264d sql/backends/monet5/sql_scenario.c --- a/sql/backends/monet5/sql_scenario.c Thu Sep 15 11:09:35 2016 +0100 +++ b/sql/backends/monet5/sql_scenario.c Fri Sep 23 16:52:35 2016 +0100 @@ -1241,7 +1241,7 @@ SQLsetTrace(be, c, TRUE); if (m->emod & mod_debug) SQLsetDebugger(c, m, TRUE); - if (!caching(m) || !cachable(m, s)) { + if ((!caching(m) || !cachable(m, s)) && m->emode != m_prepare) { scanner_query_processed(&(m->scanner)); if (backend_callinline(be, c, s, 0) == 0) { opt = 1; Background: As part of my research in to other memory leaks, my eye fell on the space consumed by the query plan cache. I instrumented it a bit and found that the hit rate for our usage was not worth the hundreds of MB occupied by the cache, so have disabled it entirely in some of our clients. We have one query in one client for which plan caching would be useful, so I was trying to use a prepared statement to selectively cache just that one case. ## Comment 22390 Date: 2016-09-29 12:48:51 +0200 From: @njnes added the patch. Thanks for looking so deeply into the code. ## Comment 22391 Date: 2016-09-29 12:50:08 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [4f8d5096c98a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4f8d5096c98a) 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=4f8d5096c98a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=4f8d5096c98a) Changeset description: even without caching, prepare statements need to be 'cached'. See bug #4074 ## Comment 24496 Date: 2016-10-13 10:04:18 +0200 From: @sjoerdmullender Jun2016-SP2 has been released.
Cannot use prepared statements when caching disabled
https://api.github.com/repos/MonetDB/MonetDB/issues/4074/comments
0
2020-11-30T13:36:40Z
2024-06-27T12:38:42Z
https://github.com/MonetDB/MonetDB/issues/4074
753,485,041
4,074
[ "MonetDB", "MonetDB" ]
Date: 2016-09-23 11:15:51 +0200 From: Roel &lt;<hogervorst.rm>&gt; To: Documentation maintainers &lt;<bugs-docs>&gt; Version: unspecified Last updated: 2016-09-23 11:15:51 +0200 ## Comment 22385 Date: 2016-09-23 11:15:51 +0200 From: Roel &lt;<hogervorst.rm>&gt; User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:48.0) Gecko/20100101 Firefox/48.0 Build Identifier: Using R on a windows 64 bit computer I can't get the tutorial to work. there is some serious trouble with the R connection to MonetDB. I would really like it if some of you would follow the tutorial word for word because it is filled with depreciated and not working parts - monetdbR does not automatically load DBI and digest - dbTransaction(conn) is depcricated. use dbBegin() from now - I had to search for the DBI commands, beacuse they do not match what it says in the tutorial - monetdb.read.csv(conn, temp, "craftsmen", 2350, delim="\t", nrow.check=1474) does not work. It seem to create wrong file paths. (throwing away \ characters. ) - When I did manage to open the tsv files (using rio package) : output: [1] TRUE Warning message: In fread(input = file, sep = sep, sep2 = sep2, header = header, : Bumped column 2 to type character on data row 1473, field contains 'A'. Coercing previously read values in this column from logical, integer or numeric back to character which may not be lossless; e.g., if '00' and '000' occurred before they will now be just '0', and there may be inconsistencies with treatment of ',,' and ',NA,' too (if they occurred in this column before the bump). If this matters please rerun and set 'colClasses' to 'character' for this column. Please note that column type detection uses the first 5 rows, the middle 5 rows and the last 5 rows, so hopefully this message should be very rare. If reporting to datatable-help, please rerun and include the output from verbose=TRUE. so it does create tables, except the voyages table dbWriteTable(conn, "voyages", rio::import("files/voc_voyages.tsv")) werkt niet Error in .local(conn, statement, ...) : Unable to execute statement 'INSERT INTO voyages VALUES (1, '', 1, '', 'AMSTERDAM', 'Jan Jakobsz. Schellinger', 260, '', '1594', ...'. Server says 'syntax error, unexpected sqlINT, expecting ')' or ',' in: "insert into voyages values (1, '', 1, '', 'AMSTERDAM', 'Jan Jakobsz. Schellinger"' [42000]. In addition: Warning messages: 1: In fread(input = file, sep = sep, sep2 = sep2, header = header, : Bumped column 10 to type character on data row 13, field contains 'Amsterdam'. Coercing previously read values in this column from logical, integer or numeric back to character which may not be lossless; e.g., if '00' and '000' occurred before they will now be just '0', and there may be inconsistencies with treatment of ',,' and ',NA,' too (if they occurred in this column before the bump). If this matters please rerun and set 'colClasses' to 'character' for this column. Please note that column type detection uses the first 5 rows, the middle 5 rows and the last 5 rows, so hopefully this message should be very rare. If reporting to datatable-help, please rerun and include the output from verbose=TRUE. 2: In fread(input = file, sep = sep, sep2 = sep2, header = header, : Bumped column 4 to type character on data row 804, field contains 'A'. Coercing previously read values in this column from logical, integer or numeric back to character which may not be lossless; e.g., if '00' and '000' occurred before they will now be just '0', and there may be inconsistencies with treatment of ',,' and ',NA,' too (if they occurred in this column before the bump). If this matters please rerun and set 'colClasses' to 'character' for this column. Please note that column type detection uses the first 5 rows, the middle 5 rows and the last 5 rows, so hopefully this message should be very rare. If reporting to datatable-help, please rerun and include the output from verbose=TRUE. 3: In fread(input = file, sep = sep, sep2 = sep2, header = header, : Bumped column 9 to type character on data row 967, field contains '1661?'. Coercing previously read values in this column from logical, integer or numeric back to character which may not be lossless; e.g., if '00' and '000' occurred before they will now be just '0', and there may be inconsistencies with treatment of ',,' and ',NA,' too (if they occurred in this column before the bump). If this matters please rerun and set 'colClasses' to 'character' for this column. Please note that column type detection uses the first 5 rows, the middle 5 rows and the last 5 rows, so hopefully this message should be very rare. If reporting to datatable-help, please rerun and include the output from verbose=TRUE. 4: In fread(input = file, sep = sep, sep2 = sep2, header = header, : Bumped column 11 to type character on data row 1034, field contains '1664/5'. Coercing previously read values in this column from logical, integer or numeric back to character which may not be lossless; e.g., if '00' and '000' occurred before they will now be just '0', and there may be inconsistencies with treatment of ',,' and ',NA,' too (if they occurred in this column before the bump). If this matters please rerun and set 'colClasses' to 'character' for this column. Please note that column type detection uses the first 5 rows, the middle 5 rows and the last 5 rows, so hopefully this message should be very rare. If reporting to datatable-help, please rerun and include the output from verbose=TRUE. 5: In fread(input = file, sep = sep, sep2 = sep2, header = header, : Bumped column 2 to type character on data row 4799, field contains 'A'. Coercing previously read values in this column from logical, integer or numeric back to character which may not be lossless; e.g., if '00' and '000' occurred before they will now be just '0', and there may be inconsistencies with treatment of ',,' and ',NA,' too (if they occurred in this column before the bump). If this matters please rerun and set 'colClasses' to 'character' for this column. Please note that column type detection uses the first 5 rows, the middle 5 rows and the last 5 rows, so hopefully this message should be very rare. If reporting to datatable - I can read the files in R. With erros of course. but it works. - dplyr connection doesn't work entirely to satisfaction either dim(total) [1] NA 10 So the tables are empty I guess? Another try with a dataset that should work: dbWriteTable(conn, "mtcars", mtcars) mtcars2 <- tbl(monetdb_conn, "mtcars") dim(mtcars2) leeg! > head(mtcars2) Source: query [?? x 11] Database: MonetDB 11.23.7 (Jun2016-SP1) Error in monetdb_check_subquery(sql) : SELECT * FROM "mtcars" LIMIT 6 contains ORDER BY, LIMIT or OFFSET keywords, which are not supported. Reproducible: Always ### Steps to Reproduce: 1. See massive dump above 2. 3. ### Actual Results: Bags full of errors ### Expected Results: I expected the tutorual at least to work. This is your intro guys, the intro should work.... I'm sure the database stuff is really cool, but I wanted to use R and dplyr to do some magic. When I started the server program on my computer I got the following results in CMD: 'MySQL' is not recognized as an internal or external command, operable program or batch file. 'MySQL' is not recognized as an internal or external command, operable program or batch file. MonetDB 5 server v11.23.7 "Jun2016-SP1" Serving database 'demo', using 4 threads Compiled for x86_64-pc-winnt/64bit with 64bit OIDs dynamically linked Found 3.925 GiB available main-memory. Copyright (c) 1993-July 2008 CWI. Copyright (c) August 2008-2016 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/SQL module loaded >mclient -u monetdb -d voc !SyntaxException:parseError:mclient -u monetdb -d voc !SyntaxException:parseError: ^';' expected >mclient !SyntaxException:parseError: !';' expected >mclient -u monetdb -d voc !SyntaxException:parseError:mclient -u monetdb -d voc !SyntaxException:parseError: ^';' expected > Could it be a that the SQL connection is not working right? If you give me the right commands and steps I'm sure I could rewrite the documentation.
Tutorial doesn't work at all. R connection fails in execution. Unusable for non database people right now.
https://api.github.com/repos/MonetDB/MonetDB/issues/4073/comments
0
2020-11-30T13:36:38Z
2024-06-28T07:08:56Z
https://github.com/MonetDB/MonetDB/issues/4073
753,485,013
4,073
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T13:33:45Z This bug was created during the import from Bugzilla. GitHub Issues Tracker allows to assign consecutive ids only. So this dummy issue was created in place of a deleted Bugzilla Bug. Please ignore this report.
Deleted Bugzilla Bug
https://api.github.com/repos/MonetDB/MonetDB/issues/4072/comments
0
2020-11-30T13:36:36Z
2020-11-30T13:36:37Z
https://github.com/MonetDB/MonetDB/issues/4072
753,484,993
4,072
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T13:33:45Z This bug was created during the import from Bugzilla. GitHub Issues Tracker allows to assign consecutive ids only. So this dummy issue was created in place of a deleted Bugzilla Bug. Please ignore this report.
Deleted Bugzilla Bug
https://api.github.com/repos/MonetDB/MonetDB/issues/4071/comments
0
2020-11-30T13:36:34Z
2020-11-30T13:36:36Z
https://github.com/MonetDB/MonetDB/issues/4071
753,484,969
4,071
[ "MonetDB", "MonetDB" ]
Date: 2016-09-21 19:45:39 +0200 From: muesli4 To: SQL devs &lt;<bugs-sql>&gt; Version: 11.23.7 (Jun2016-SP1) CC: @njnes Last updated: 2016-10-13 10:04:16 +0200 ## Comment 22380 Date: 2016-09-21 19:45:39 +0200 From: muesli4 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:48.0) Gecko/20100101 Firefox/48.0 Build Identifier: The following SQL snippet goes through the SQL code generator and fails within the MAL-Backend: SELECT 1 FROM orders LEFT OUTER JOIN customer ON (1 = 1 AND o_custkey = c_custkey); Exact error message: TypeException:user.s2_1[14]:'algebra.projection' undefined in: algebra.projection(X_5:bit,X_21:bat[:oid]); Reproducible: Always Compiled from Mercurial version (but also exists in the last release version): [1db157d67d26](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1db157d67d26) MonetDB 5 server v11.24.0 (64-bit, 128-bit integers) This is an unreleased version Copyright (c) 1993-July 2008 CWI Copyright (c) August 2008-2016 MonetDB B.V., all rights reserved Visit http://www.monetdb.org/ for further information Found 4.8GiB available memory, 2 available cpu cores Libraries: libpcre: 8.39 2016-06-14 (compiled with 8.39) openssl: OpenSSL 1.0.2h 3 May 2016 (compiled with OpenSSL 1.0.2h 3 May 2016) libxml2: 2.9.4 (compiled with 2.9.4) Compiled by: ...@phi (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 22381 Date: 2016-09-21 19:46:19 +0200 From: muesli4 Created attachment 403 The SQL snippet. > Attached file: [bug.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_4070_bug.sql_403) (application/sql, 93 bytes) > Description: The SQL snippet. ## Comment 22396 Date: 2016-09-29 18:29:30 +0200 From: @njnes fixed problem with constant compare expressions in the join expression list (normaly they get pushed down, but not with outer joins) ## Comment 22397 Date: 2016-09-29 19:57:00 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [9ad21eacf724](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9ad21eacf724) 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=9ad21eacf724](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=9ad21eacf724) Changeset description: fixed bug #4070, ie handle constant expressions in a outer join ## Comment 24495 Date: 2016-10-13 10:04:16 +0200 From: @sjoerdmullender Jun2016-SP2 has been released.
Extra condition in join predicate of explicit join produces wrong MAL code
https://api.github.com/repos/MonetDB/MonetDB/issues/4070/comments
0
2020-11-30T13:36:32Z
2024-06-27T12:38:39Z
https://github.com/MonetDB/MonetDB/issues/4070
753,484,940
4,070
[ "MonetDB", "MonetDB" ]
Date: 2016-09-19 14:29:19 +0200 From: fioravanzos To: SQL devs &lt;<bugs-sql>&gt; Version: 11.23.7 (Jun2016-SP1) CC: martin.van.dinther Last updated: 2016-09-22 11:58:10 +0200 ## Comment 22379 Date: 2016-09-19 14:29:19 +0200 From: fioravanzos User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36 Build Identifier: Any query with a cast(element AS VARCHAR) fils the parsing process. I have to replace it with cast(element AS TEXT) Reproducible: Always ## Comment 22382 Date: 2016-09-22 11:58:10 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; The query will return error msg: CHARACTER VARYING needs a mandatory length specification in: "select cast(element as varchar)" You will need to include the maximum length for the VARCHAR like: cast( element AS VARCHAR(123) ) Idem for data types CHAR, CHARACTER and CHARACTER VARYING. See https://www.monetdb.org/Documentation/Manuals/SQLreference/BuiltinTypes The datatypes TEXT, CLOB and STRING do not have/allow a maximum length specifier, hence for those it works without a length specifier.
cast(x as VARCHAR) does not work
https://api.github.com/repos/MonetDB/MonetDB/issues/4069/comments
0
2020-11-30T13:36:30Z
2024-06-28T07:20:00Z
https://github.com/MonetDB/MonetDB/issues/4069
753,484,910
4,069
[ "MonetDB", "MonetDB" ]
Date: 2016-09-19 00:13:54 +0200 From: dev.bdtenom.6918 To: SQL devs &lt;<bugs-sql>&gt; Version: 11.23.7 (Jun2016-SP1) CC: antoine.jouanjean, @hannesmuehleisen, martin.van.dinther, @njnes Last updated: 2017-11-26 18:42:35 +0100 ## Comment 22377 Date: 2016-09-19 00:13:54 +0200 From: dev.bdtenom.6918 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/600.5.17 (KHTML, like Gecko) Version/8.0.5 Safari/600.5.17 Build Identifier: mclient and jdbc driver returns message 'program contains errors' on query from any of my tables `lineitem` (750GB) and `partsupp` (120GB). There is no problem on other tables like `orders` (176GB). (Tables from TPC-H 1000GB benchmark.) Query like "SELECT * from lineitem limit 10;" fails. Query like "SELECT * from lineitem where 1 limit 10;" succeeded. Reproducible: Always ### Steps to Reproduce: 1. Generate TPC-H 1000GB benchmark data and load it to MonetDB 2. Try query "SELECT * from lineitem limit 10;" ### Actual Results: Message 'program contains errors' ### Expected Results: Real data from table. MonetDB 5 server v11.23.7 "Jun2016-SP1" (64-bit, 64-bit oids, 128-bit integers) Copyright (c) 1993-July 2008 CWI Copyright (c) August 2008-2016 MonetDB B.V., all rights reserved Visit http://www.monetdb.org/ for further information Found 125.8GiB available memory, 40 available cpu cores Libraries: libpcre: 8.31 2012-07-06 (compiled with 8.38) openssl: OpenSSL 1.0.2g 1 Mar 2016 (compiled with OpenSSL 1.0.2g-fips 1 Mar 2016) libxml2: 2.9.3 (compiled with 2.9.3) Compiled by: pbuilder@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 24769 Date: 2016-12-13 11:50:41 +0100 From: Antoine Jouanjean &lt;<antoine.jouanjean>&gt; Same problem apply here on a smaller WIN machine and smaller table, on mclient or SQLWorkbench (JDBC) Trying to "expand" the "*" with field list also throws the same error, whether it is double-quoted or not. Some columns/tables/namespace names were changed for confidentiality. Server version MonetDB 5 server v11.23.7 "Jun2016-SP1" (64-bit, 64-bit oids) Copyright (c) 1993-July 2008 CWI Copyright (c) August 2008-2016 MonetDB B.V., all rights reserved Visit http://www.monetdb.org/ for further information Found 7.9GiB available memory, 4 available cpu cores Libraries: libpcre: 8.37 2015-04-28 openssl: OpenSSL 1.0.2d 9 Jul 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 mclient Welcome to mclient, the MonetDB/SQL interactive terminal (Jun2016-SP1) Database: MonetDB v11.23.7 (Jun2016-SP1), 'demo' Type \q to quit, \? for a list of available commands auto commit mode: on sql>\d vente_propre CREATE TABLE "client_ns"."vente_propre" ( "nlclientid" INTEGER NOT NULL, "poscode" VARCHAR(32) NOT NULL, "souche" VARCHAR(8) NOT NULL, "transactionno" INTEGER NOT NULL, "transactiondate" DATE NOT NULL, "lineno" INTEGER NOT NULL, "sku" VARCHAR(32) NOT NULL, "qte" DOUBLE NOT NULL, "localsalesamountincltax" DOUBLE NOT NULL, "localsalesamountexcltax" DOUBLE NOT NULL, "ca" DOUBLE NOT NULL, "productnature" VARCHAR(8) NOT NULL, "countrycode" VARCHAR(3) NOT NULL, "currencycode" VARCHAR(3) NOT NULL, "pdt_range" VARCHAR(8), "range_lib" VARCHAR(64), "segment_lib" VARCHAR(64), "subsegment_lib" VARCHAR(64), "subrange" VARCHAR(32), "subrange_lib" VARCHAR(64), "ligne" VARCHAR(64) NOT NULL ); sql>SELECT COUNT(*) FROM vente_propre; +-----------+ | L1 | +===========+ | 113580458 | +-----------+ 1 tuple (26.883ms) sql>SELECT * FROM vente_propre LIMIT 10; program contains errors sql>SELECT * FROM vente_propre WHERE 1 LIMIT 10; [...] [table displayed OK, although query seems to be rather slow?] 10 tuples (477.307ms) expanding * throws same error sql>SELECT nlclientid, poscode, souche, transactionno, transactiondate, lineno, sku, qte, localsalesamountincltax, localsalesamountexcltax, ca, productnature, countrycode, currencycode, pdt_range, range_lib, segment_lib, subsegment_lib, subrange, subrange_lib, ligne from vente_propre LIMIT 10; program contains errors ## Comment 25464 Date: 2017-07-13 18:41:13 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; Changed Product category as issue is not caused by the client programs/interfaces but on the SQL server side. ## Comment 25917 Date: 2017-11-26 18:42:35 +0100 From: @njnes is this still a problem on the current release (2017 sp2)
mclient and JDBC error on `SELECT * from t1 limit X;` from bigger tables (100GB, 750GB)
https://api.github.com/repos/MonetDB/MonetDB/issues/4068/comments
0
2020-11-30T13:36:27Z
2024-06-27T12:38:37Z
https://github.com/MonetDB/MonetDB/issues/4068
753,484,872
4,068
[ "MonetDB", "MonetDB" ]
Date: 2016-09-16 10:28:16 +0200 From: @eyalroz To: SQL devs &lt;<bugs-sql>&gt; Version: 11.23.7 (Jun2016-SP1) CC: @njnes Last updated: 2016-10-24 23:35:08 +0200 ## Comment 22374 Date: 2016-09-16 10:28:16 +0200 From: @eyalroz User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0 Build Identifier: When you COPY INTO from a CSV file, using mclient, and the parsing of a certain field fails, you get a message saying something like: "Failed to import table line 1 field 13 'smallint' expected in '1247801'" This could be improved in more than one way, but the most significant drawback is the lack of a column name. At this point, clearly the server knows/can know which column the value should go into (otherwise it would not know the type); it would be very helpful for the user to print the column name as well as the index (especially since it's not trivial to determine whether the field index is 1-based or 0-based), and columns in MonetDB are not typically identified using indices. Reproducible: Always ## Comment 22375 Date: 2016-09-16 11:05:25 +0200 From: @sjoerdmullender This has nothing to do with the client. ## Comment 22376 Date: 2016-09-16 11:06:25 +0200 From: @sjoerdmullender Please don't add my name to the cc list. I get the notifications by other means already. ## Comment 22394 Date: 2016-09-29 14:54:36 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [4654b49d2101](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4654b49d2101) 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=4654b49d2101](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=4654b49d2101) Changeset description: approved output for new copy into error message. Fixes bug #4067 ## Comment 22395 Date: 2016-09-29 14:54:51 +0200 From: @njnes we now include the name of the field ## Comment 24494 Date: 2016-10-13 10:04:14 +0200 From: @sjoerdmullender Jun2016-SP2 has been released. ## Comment 24618 Date: 2016-10-24 23:35:08 +0200 From: @eyalroz Sorry for not making this comment earlier, but - why not print both?
Relevant column name not printed when a CSV parsing error occurs
https://api.github.com/repos/MonetDB/MonetDB/issues/4067/comments
0
2020-11-30T13:36:25Z
2024-06-27T12:38:36Z
https://github.com/MonetDB/MonetDB/issues/4067
753,484,844
4,067
[ "MonetDB", "MonetDB" ]
Date: 2016-09-12 15:38:13 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; To: Merovingian devs &lt;<bugs-merovingian>&gt; Version: 11.21.19 (Jul2015-SP4) Last updated: 2016-12-21 13:08:36 +0100 ## Comment 22361 Date: 2016-09-12 15:38:13 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; Created attachment 402 tail of merovingian.log Build is Jul2015 [b9cb28d6243b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b9cb28d6243b) I can't see any significant changes between that and the current code. The observed external behaviour was that monetdbd stopped responding to all external requests (i.e. via 'monetdb'). The fundamental problem was that _mero_topdp_lock was owned by: Thread 1 (Thread 0x7f33f3ab9700 (LWP 1397)): 0 0x00007f33f85dbadd in read () at ../sysdeps/unix/syscall-template.S:81 1 0x00000000004073a1 in read (__nbytes=<optimized out>, __buf=<optimized out>, __fd=<optimized out>) at /usr/include/x86_64-linux-gnu/bits/unistd.h:44 2 logFD (fd=111, type=0x7f33f3ab6e30 " MonetDB/SQL module loaded", type@entry=0x41971a "MSG", dbname=0x1f9f <error: Cannot access memory at address 0x1f9f>, pid=-1, stream=0x1f40580) at merovingian.c:141 3 0x0000000000407662 in logListener (x=<optimized out>) at merovingian.c:221 4 0x00007f33f85d50a4 in start_thread (arg=0x7f33f3ab9700) at pthread_create.c:309 5 0x00007f33f830a87d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111 (gdb) f 3 3 0x0000000000407662 in logListener (x=<optimized out>) at merovingian.c:221 221 logFD(w->out, "MSG", w->dbname, (gdb) p *w $1 = { out = 111, err = 250, type = MERODB, pid = 26785, dbname = 0x7f3264004e10 "fifthdb", next = 0x0 } I've attached the tail of merovingian.log. You may (probably) ignore the "mallopt(M_ARENA_MAX,6) fails" lines - that's an unrelated experiment on mine with reducing mserver5's memory usage. Notice in that log the line saying "seconddb[16760]: arguments: /usr/bin/mserver5 --dbpath=/var/lib/monetdb/fifthdb". That's happened because _mero_topdp contains a duplicate fd: $114 = { out = 111, err = 237, type = MERODB, pid = 16760, dbname = 0x7f330c004ad0 "seconddb", next = 0x7f3348004920 } [...skip a few linked list entries...] $120 = { out = 111, err = 250, type = MERODB, pid = 26785, dbname = 0x7f3264004e10 "fifthdb", next = 0x0 } ...which explains the proximate cause of logFD() being called twice by logListener() and having nothing to read the second time. I'm having a lot of difficulty figuring out how it got in to that state originally, however here's the list of interesting observations I've made so far: 1) logListener() contains a race which could cause the same deadlock: if both a child is stopped and a new child is started after select() returns but before _mero_topdp_lock gets relocked then that new child could get the same fd which has already been marked as ready but is not ready. 2) logFD() could deadlock in the same way as observed if the output to be read is an exact multiple of 8095 bytes. 3) childhandler() is doing a lot of work for a signal handler. This, combined with the fact that _mero_topdp_lock is a recursive mutex, is my least-worst guess for how I got in to the situation I am in: if forkMserver() is currently manipulating the _mero_topdp linked list (and hence has _mero_topdp_lock locked) and takes a SIGCHLD while doing so then there's nothing to stop the linked list getting corrupted. I don't like any of these theories - they all seem too far-fetched. Do you have any better ideas? > Attached file: [merovingian.log](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_4066_merovingian.log_402) (application/octet-stream, 10224 bytes) > Description: tail of merovingian.log ## Comment 22362 Date: 2016-09-12 16:36:15 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; Observation 4) I think terminateProcess() can result in a use-after-free bug because it reads the values pointed-to by _mero_topdp items without holding a mutex, when they can become freed at any time by SIGCHLD. ## Comment 22364 Date: 2016-09-14 12:05:37 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; Observation 5) If SIGCHLD happens between fork() and adding the entry to _mero_topdp in forkMserver() (i.e. the new child exits immediately after starting), then childhandler() will not remove anything from _mero_topdp but forkMserver() will add it. This will result in a nonexistent child being left on the linked list, potentially setting up future confusion due to pid reuse. This isn't what happened in my case because "received SIGCHLD from unknown child" was not logged. ## Comment 22365 Date: 2016-09-14 13:58:22 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [8ed49c02f14a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8ed49c02f14a) 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=8ed49c02f14a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=8ed49c02f14a) Changeset description: Block SIGCHLD signal when doing administration around fork(). Also see bug #4066. ## Comment 24534 Date: 2016-10-18 14:59:58 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; It happened again, on a build which included [8ed49c02f14a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8ed49c02f14a) (grafted into Jul2015): $55 = { out = 60, err = 115, type = MERODB, pid = 25278, dbname = 0x7f19c0004ee0 "fourthdb", next = 0x7f19c8004e00 } $56 = { out = 115, err = 130, type = MERODB, pid = 25370, dbname = 0x7f19c8004b20 "fifthdb", next = 0x7f19bc004f50 } I started looking at all the fd closures in the whole application, guessing that it's a double-free somewhere. I found the following (all line numbers have been translated to the default branch 9adbe1674a73): 1) controlrunner.c:249 "close(msgsock);" is also closed again by the caller of ctl_handle_client(). 2) controlrunner.c:1000 "close(usock);" is also closed by main() when the thread is joined at shutdown. 3) multiplexAddClient() and related functions close their sockets repeatedly (once directly and once via stream_close()). I didn't look too much further into this because we don't run that code. 4) startProxy() forgets that its first three parameters are all the same socket, so lines 184 & 185 close the same socket twice. 5) proxyThread() is run twice and both of them call mnstr_close() on the same streams, causing a double close. I also found what I think is an fd leak in handleClient() if mydoproxy == 0. Again, I didn't look too closely at this because it wasn't related to my problem. I think (4) is the best candidate for the root cause of this bug. ## Comment 24535 Date: 2016-10-18 15:33:12 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; Unrelatedly, handleClient()'s return value goes nowhere (it's a thread function) therefore if it returns an error then that's a memory leak (introduced by 312dc4e64454). ## Comment 24537 Date: 2016-10-18 17:05:33 +0200 From: @sjoerdmullender (In reply to Richard Hughes from comment 5) > Unrelatedly, handleClient()'s return value goes nowhere (it's a thread > function) therefore if it returns an error then that's a memory leak > (introduced by 312dc4e64454). You're right, of course. ## Comment 24538 Date: 2016-10-18 17:14:05 +0200 From: @sjoerdmullender (In reply to Sjoerd Mullender from comment 6) > (In reply to Richard Hughes from comment 5) > > Unrelatedly, handleClient()'s return value goes nowhere (it's a thread > > function) therefore if it returns an error then that's a memory leak > > (introduced by 312dc4e64454). > > You're right, of course. Actually, you're wrong, and I was too initially. In acceptConnections, a call is made to pthread_join to join the handleClient threads. That pthread_join returns in its second argument the return value of handleClient. It is there that the value is freed. At least, that is the intention. If in actuality something else happens, I'd like to know. ## Comment 24539 Date: 2016-10-18 22:48:00 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [ff4801e15f2e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ff4801e15f2e) 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=ff4801e15f2e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=ff4801e15f2e) Changeset description: Avoid closing the same file descriptor twice. In a multi-threaded application that is a race condition waiting to happen. Also see bug #4066. ## Comment 24540 Date: 2016-10-18 22:56:26 +0200 From: @sjoerdmullender (In reply to Richard Hughes from comment 4) > 4) startProxy() forgets that its first three parameters are all the same > socket, so lines 184 & 185 close the same socket twice. I have fixed this problem (changeset ff4801e15f2e). We now close the socket once, and destroy (free) the streams. I hope this finally puts this bug to rest. ## Comment 24541 Date: 2016-10-19 13:02:23 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; Created attachment 482 Test script Wow, that's a lot of patches. Thanks! Now I have more knowledge of the root cause, I thought I might be able to write a script to reproduce it. The attached Python requires you to pre-create 19 empty databases named db1..db19. By running 'merorace.py random' I can consistently deadlock monetdbd Jun2016 tip (i.e. the one with all your patches). It looks to me like the failure mode here is my original hypothesis (1) from comment 0. The mode 'merorace.py pulse' was my attempt to avoid that condition while still reproducing the behaviour I originally observed. That doesn't happen - I've run it for ages on both old and new builds and it works fine. I suspect there's too much serialization in that test to provoke it. You may also be interested in a couple of other errors which that test script occasionally causes: 1) monetdb.exceptions.DatabaseError: monetdbd: an internal error has occurred 'could not receive initial byte: Interrupted system call' 2) socket.error: Server closed connection I haven't researched either of these in detail yet. I see (1) more often in 'random' mode and (2) more often in 'pulse' mode. > Attached file: [merorace.py](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_4066_merorace.py_482) (text/plain, 1147 bytes) > Description: Test script ## Comment 24542 Date: 2016-10-19 13:42:46 +0200 From: @sjoerdmullender When I run your script, I eventually get messages socket.error: [Errno 99] Cannot assign requested address and no errors in the merovingian log file. Note that changeset [981dae2de572](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=981dae2de572) fixes your hypothesis (1) from comment 0. ## Comment 24543 Date: 2016-10-19 14:16:21 +0200 From: @sjoerdmullender I tried again. I now traced the monetdbd system calls, in particular the close system call to see whether there were (still) any closes of already closed file descriptors. I didn't see any. What I did see was messages mentioning SIGABRT (bad!) and in the log also about segmentation fault (also bad!). I'll investigate further. ## Comment 24550 Date: 2016-10-19 14:29:30 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; (In reply to Sjoerd Mullender from comment 11) > When I run your script, I eventually get messages > socket.error: [Errno 99] Cannot assign requested address > and no errors in the merovingian log file. Hmm. Sounds like TCP ephemeral port exhaustion? Try putting a time.sleep(.001) or so in the 'conn' loop, maybe. Or increasing your kernel's ephemeral port range. In 'random' mode it deadlocks for me after less than a minute (with or without that sleep), on a 4 core VM whose disk is mounted such that fsync doesn't actually sync. > Note that changeset [981dae2de572](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=981dae2de572) fixes your hypothesis (1) from comment 0. I shouldn't have used the same numbers twice. [981dae2de572](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=981dae2de572) fixes (1) from comment 4. I can add another couple of errors to the list of things I've seen spat out by that script: 3) monetdb.exceptions.DatabaseError: monetdbd: an internal error has occurred 'could not send initial byte: Bad file descriptor' 4) monetdb.exceptions.DatabaseError: monetdbd: internal error while starting mserver 'database 'db5' appears to shut itself down after starting, check monetdbd's logfile for possible hints', please refer to the logs [...which says "!FATAL: GDKlockHome: Database lock '.gdk_lock' denied"] ## Comment 24552 Date: 2016-10-19 16:40:16 +0200 From: @sjoerdmullender (In reply to Richard Hughes from comment 13) > I shouldn't have used the same numbers twice. [981dae2de572](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=981dae2de572) fixes (1) from > comment 4. You're right. I have a hypothesis and have implemented (but not yet committed, let alone pushed) a fix. When a server exits, monetdbd gets a SIGCHLD signal. In the signal handler, the record for that child is removed from the linked list of children. This happens with the appropriate lock being held. However, the locks are initialized so that if a thread tries to lock a lock that it already holds, the second attempt succeeds. So, if the thread executing the signal handler happens to already hold the lock, say in logListener, the signal handler blithely ignores this lock and manipulates the linked list that the thread (logListener) thinks it is the sole owner of. Chaos ensues. With your script I got a crash that is consistent with this hypothesis. The pointer w in logListener had a weird value, but the complete linked list was ok. My fix is to not use a signal handler for SIGCHLD, but instead at regular intervals poll for exited children. This seems to work on Linux, now I'm going to try some other OSes that I have lying around. ## Comment 24553 Date: 2016-10-19 16:45:13 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [20ba6d492b51](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=20ba6d492b51) 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=20ba6d492b51](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=20ba6d492b51) Changeset description: Do not manipulate a shared linked list in a signal handler. When a server exits, monetdbd gets a SIGCHLD signal. In the signal handler, the record for that child is removed from the linked list of children. This happens with the appropriate lock being held. However, the locks are initialized so that if a thread tries to lock a lock that it already holds, the second attempt succeeds. So, if the thread executing the signal handler happens to already hold the lock, say in logListener, the signal handler blithely ignores this lock and manipulates the linked list that the thread (logListener) thinks it is the sole owner of. Chaos ensues. This hopefully finally fixed bug #4066. ## Comment 24554 Date: 2016-10-19 17:31:06 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; I pulled up to [20ba6d492b51](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=20ba6d492b51) and ran 'merorace.py random' for a while, then got bored and applied the following patch: diff -r c51c368fcab9 tools/merovingian/daemon/forkmserver.c --- a/tools/merovingian/daemon/forkmserver.c Wed Oct 19 15:57:17 2016 +0100 +++ b/tools/merovingian/daemon/forkmserver.c Wed Oct 19 16:17:23 2016 +0100 @@ -453,7 +453,7 @@ * completely kill the functionality of monetdbd too */ do { /* give the database a break */ - sleep_ms(500); + sleep_ms(5); /* in the meanwhile, if the server has stopped, it will * have been removed from the dpair list, so che ck if diff -r c51c368fcab9 tools/merovingian/daemon/merovingian.c --- a/tools/merovingian/daemon/merovingian.c Wed Oct 19 15:57:17 2016 +0100 +++ b/tools/merovingian/daemon/merovingian.c Wed Oct 19 16:17:23 2016 +0100 @@ -317,7 +317,7 @@ for (i = 0; i < atoi(kv->val) * 2; i++) { if (stats != NULL) msab_freeStatus(&stats); - sleep_ms(500); + sleep_ms(5); er = msab_getStatus(&stats, dbname); if (er != NULL) { Mfprintf(stderr, "unexpected problem: %s\n", er); With that, every one of the 'merorace.py ss' children had thrown an exception of one kind or another within 3 minutes. I've got a mixture of "Database lock '.gdk_lock' denied", "did not initialise the sql scenario" and "timeout of 60 seconds expired, sending process 32556 (database 'db9') the KILL signal". Removing the signal handler has certainly made the code much easier to reason about, but I still suspect that some races between childhandler() and other threads exist. I'm still working on it - my current theory is that a new mserver5 is being started before the previous (of the same database) has stopped. ## Comment 24555 Date: 2016-10-19 22:32:26 +0200 From: @sjoerdmullender I'm not getting the errors that you describe with those changes. I still only get the error about running out of sockets. However, I did do yet more looking at the code and I noticed something else. When starting a new server in forkMserver, a lock is used, called fork_lock. The lock is held while a new server is being started, until it is actually up and running (internal status is SABdbRunning). I was thinking, given what you wrote, that this lock should also be held while the server is being terminated, so that a subsequent start must wait until the server is truly gone. I've implemented that, and the merorace program still works. I still don't get any other errors than the ones about running out of sockets. I'll push my changes shortly. ## Comment 24556 Date: 2016-10-19 22:37:15 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [3551b30d82fe](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3551b30d82fe) 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=3551b30d82fe](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=3551b30d82fe) Changeset description: Move terminateProcess to same file as formMserver, and use fork_lock. fork_lock is held while a new server is being started so that multiple starts of the same server don't interfere with each other. We should then also hold the same lock while stopping a server. Part of the ongoing quest to quash bug #4066. ## Comment 24559 Date: 2016-10-20 12:34:14 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; The "Database lock '.gdk_lock' denied" is happening because msab_getSingleStatus() (via msab_getStatus()) tests whether mserver5 owns the lock file by actually acquiring the lock for a brief period. If monetdbd does this while mserver5's GDKlockHome() is supposed to be acquiring it for itself then mserver5 will fail incorrectly. This seems to be working well: diff -r c51c368fcab9 common/utils/msabaoth.c --- a/common/utils/msabaoth.c Wed Oct 19 15:57:17 2016 +0100 +++ b/common/utils/msabaoth.c Thu Oct 20 11:27:04 2016 +0100 @@ -675,7 +675,7 @@ (void)fclose(f); } } else if ((snprintf(buf, sizeof(buf), "%s/%s/%s", pathbuf, dbname, ".gdk_lock") > 0) & /* no typo */ - ((fd = MT_lockf(buf, F_TLOCK, 4, 1)) == -2)) { + ((fd = MT_lockf(buf, F_TEST, 4, 1)) == -2)) { /* Locking failed; this can be because the lockfile couldn't * be created. Probably there is no Mserver running for * that case also. A real fix will require the Win32 implementation of MT_lockf() to implement F_TEST. ## Comment 24562 Date: 2016-10-20 12:41:29 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; Actually, I'm not happy with that patch any more now that I've read the rest of the msab_getSingleStatus() implementation. After it opens the lock file (into 'fd') it then does: /* locking succeed, check for a crash in the uplog */ snprintf(log, sizeof(log), "%s/%s/%s", pathbuf, dbname, UPLOGFILE); if ((f = fdopen(fd, "r+")) != NULL) { ... fd will be zero with my patch, so that's obviously wrong, but now I'm confused about what that code is supposed to do, given that the comment doesn't match the implementation at all. Also the 'log' string is never used. Help! ## Comment 24563 Date: 2016-10-20 13:16:43 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; My previous comment is still full of lies (fd won't be zero), but since my attempts to correct myself haven't been going well today, I'm going to stop here. The "internal error while starting mserver 'database 'db3' did not initialise the sql scenario'" is caused by order-of-initialization issues. msab_getSingleStatus() reads the .scen file first, then checks whether the server is actually up. mserver5 populates .scen in mal_init() at mserver5.c:664 then creates the .started file at mserver5.c:691. This means there's time for the following race: monetdbd: fopen(".scen"), fread, fclose [reads an empty file] mserver5: mal_init() mserver5: msab_registerStarted() monetdbd: stat(".started") == 0 monetdbd: msab_getStatus() returns Running monetdbd: "did not initialise the sql scenario" The fix would seem to be to reorder msab_getSingleStatus() to ensure that it only reads the dependent files after it's looked for .started. ## Comment 24564 Date: 2016-10-20 14:28:46 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; "starting a proxy failed: could not receive initial byte: connection reset by peer" comes from proxy.c:179, where the synchronization between monetdbd and mserver5 is for mserver5 simply to close the socket to indicate that it's ready (SERVERlistenThread() at mal_mapi.c:350). There's no call to shutdown(), so it's entirely up to the kernel whether the recv() returns 0 (as expected by the code) or ECONNRESET. I did this: diff -r c51c368fcab9 tools/merovingian/daemon/proxy.c --- a/tools/merovingian/daemon/proxy.c Wed Oct 19 15:57:17 2016 +0100 +++ b/tools/merovingian/daemon/proxy.c Thu Oct 20 13:22:09 2016 +0100 @@ -176,7 +176,7 @@ } /* block until the server acknowledges that it has psock * connected with itself */ - if (recv(ssock, buf, 1, 0) == -1) { + if (recv(ssock, buf, 1, 0) == -1 && errno != ECONNRESET) { closesocket(ssock); return(newErr("could not receive initial byte: %s", strerror(errno))); } That's not the neatest fix, but it does work. ...and with that, I've been able to run 'merorace.py random' for 15 minutes without any errors. Yay! Once you've had time to digest all my ramblings for today, I'll write up a summary comment of the current state of affairs. ## Comment 24566 Date: 2016-10-20 15:16:26 +0200 From: @sjoerdmullender I'm still trying to understand what's happening regarding comments 19 through 21. I see that when a client tries to connect through monetdbd, the latter uses msab_getSingleStatus which tries to get the lock on .gdk_lock. I believe it first does that without the internal fork_lock being held, and if it determines that the server isn't running, it does it again, this time with the fork_lock held. I can imagine that if during this first attempt the server is started up (because of a concurrent client perhaps) the server might not be able to get the .gdk_lock. You suggested F_TEST, and that might work, but the code then needs change since it then doesn't return a file descriptor (and of course the case needs to be implemented for Windows). But I think that it might work. I think the msab_getSingleStatus function is not interested in actually locking out a server, only in determining whether one is running. I think for Windows it's probably good enough to actually try to lock the file and immediately release the lock if locking was successful. There is no monetdbd on Windows, so this scenario is not very likely. ## Comment 24567 Date: 2016-10-20 15:24:31 +0200 From: @sjoerdmullender (In reply to Richard Hughes from comment 22) > "starting a proxy failed: could not receive initial byte: connection reset > by peer" comes from proxy.c:179, where the synchronization between monetdbd > and mserver5 is for mserver5 simply to close the socket to indicate that > it's ready (SERVERlistenThread() at mal_mapi.c:350). There's no call to > shutdown(), so it's entirely up to the kernel whether the recv() returns 0 > (as expected by the code) or ECONNRESET. I did this: > > diff -r c51c368fcab9 tools/merovingian/daemon/proxy.c > --- a/tools/merovingian/daemon/proxy.c Wed Oct 19 15:57:17 2016 +0100 > +++ b/tools/merovingian/daemon/proxy.c Thu Oct 20 13:22:09 2016 +0100 > @@ -176,7 +176,7 @@ > } > /* block until the server acknowledges that it has psock > * connected with itself */ > - if (recv(ssock, buf, 1, 0) == -1) { > + if (recv(ssock, buf, 1, 0) == -1 && errno != ECONNRESET) { > closesocket(ssock); > return(newErr("could not receive initial byte: %s", > strerror(errno))); > } > > That's not the neatest fix, but it does work. > > ...and with that, I've been able to run 'merorace.py random' for 15 minutes > without any errors. Yay! Once you've had time to digest all my ramblings for > today, I'll write up a summary comment of the current state of affairs. ECONNRESET is not mentioned in my Linux manual for recv, but it is in my FreeBSD manual (and indicates what you imply). What system are you running this on? Would using shutdown(msgsock, SHUT_RDWR); on the server side just before the closesocket work? ## Comment 24569 Date: 2016-10-20 16:10:06 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; (In reply to Sjoerd Mullender from comment 23) > I see that when a client tries to connect through monetdbd, the latter uses > msab_getSingleStatus which tries to get the lock on .gdk_lock. I believe it > first does that without the internal fork_lock being held, and if it > determines that the server isn't running, it does it again, this time with > the fork_lock held. The race locking .gdk_lock is between monetdbd and mserver5, so the fork_lock doesn't apply: monetdbd owns it and mserver5 doesn't care. I'm still running the same merorace.py, where all accesses to the same database are serialized within a single subprocess. > I can imagine that if during this first attempt the server is started up > (because of a concurrent client perhaps) the server might not be able to get > the .gdk_lock. You suggested F_TEST, and that might work, but the code then > needs change since it then doesn't return a file descriptor (and of course > the case needs to be implemented for Windows). > But I think that it might work. I think the msab_getSingleStatus function > is not interested in actually locking out a server, only in determining > whether one is running. That was my conclusion too. MT_lockf(F_TEST) does return an opened fd (this was the mistake I realized in comment 21), however I then got worried that the subsequent fread()s weren't safe against the file being concurrently written - it could decide that mserver5 has crashed because it races with GDKlockHome() actively populating the file. I still haven't thought of a solution for this. I strongly suspect that it won't happen in the real world because the writes are small enough that they'll be a single kernel call, but there's nothing requiring that. (In reply to Sjoerd Mullender from comment 24) > ECONNRESET is not mentioned in my Linux manual for recv, but it is in my > FreeBSD manual (and indicates what you imply). What system are you running > this on? Linux 3.16. ECONNRESET definitely does happen for all kinds of socket calls, and it's in the POSIX docs. Here's some discussion specifically for AF_UNIX on Linux: http://stackoverflow.com/a/2979806 > Would using shutdown(msgsock, SHUT_RDWR); on the server side just before the > closesocket work? Almost certainly yes, although I think technically it's supposed to be SHUT_WR. This change seems to work just as well as my patch from comment 22: diff -r c51c368fcab9 monetdb5/modules/mal/mal_mapi.c --- a/monetdb5/modules/mal/mal_mapi.c Wed Oct 19 15:57:17 2016 +0100 +++ b/monetdb5/modules/mal/mal_mapi.c Thu Oct 20 15:01:59 2016 +0100 @@ -347,6 +347,7 @@ { int *c_d; /* filedescriptor, put it in place of msgsock */ cmsg = CMSG_FIRSTHDR(&msgh); + shutdown(msgsock, SHUT_WR); closesocket(msgsock); if (!cmsg || cmsg->cmsg_type != SCM_RIGHTS) { fprintf(stderr, "!mal_mapi.listen: " ## Comment 24570 Date: 2016-10-20 16:46:28 +0200 From: @sjoerdmullender I I have two changeset ready to push (right after I finish writing this message). The first is a fix to msab_getStatus to read the correct file. It needs to read the .uplog file, not the .gdk_lock file after it locks .gdk_lock. The second fixes the race that I realized exists between mserver5 starting and monetdbd seeing whether it has already started (forkMserver). Exactly what you described. I think I will also need to add shutdown calls in various places. That seems to be the right thing to do. Unfortunately, adding those calls doesn't allow your merorace.py to run any longer on my system. ## Comment 24571 Date: 2016-10-20 16:46:46 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [8207b6567c1b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8207b6567c1b) 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=8207b6567c1b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=8207b6567c1b) Changeset description: In msab_getStatus, only test for a lock, don't actually lock. There is a race condition in merovingian's forkMserver otherwise. After forking, the client goes off and executes mserver5 which tries to obtain the lock for the farm (.gdk_lock file). In the mean time, the parent of the fork calls msab_getStatus repeatedly until the server has started. If msab_getStatus actually locks the file at the wrong moment, it can prevent mserver5 from locking the file (it only tries once) and mserver5 will exit. See bug #4066. ## Comment 24572 Date: 2016-10-20 17:30:21 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [3db080863222](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3db080863222) 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=3db080863222](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=3db080863222) Changeset description: Shutdown sockets before closing them normally. Not when an error occurred. See bug #4066, comment 25. ## Comment 24575 Date: 2016-10-21 14:44:11 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; With today's build I'm still tripping over the race in comment 21 occasionally. My fix simply moves msabaoth.c lines 597-640 all the way to the end of the function (immediately above the return) and seems to work. Note also that [3551b30d82fe](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3551b30d82fe) introduced a new deadlock which is provoked in this case: terminateProcess() is called from within forkMserver() (at lines 639 and 646) and tries to re-acquire fork_lock when it's already owned by itself. fork_lock is non-recursive. Finally, I have a proven case of hypothesis (1) from comment 0. I did this: diff -r 0aca99a43552 tools/merovingian/daemon/merovingian.c --- a/tools/merovingian/daemon/merovingian.c Fri Oct 21 10:24:14 2016 +0100 +++ b/tools/merovingian/daemon/merovingian.c Fri Oct 21 13:18:22 2016 +0100 @@ -172,6 +172,9 @@ struct timeval tv; fd_set readfds; int nfds; + int owner_pids[256][3]; + int num_owner_pids = 0; + (void)owner_pids; (void)x; @@ -192,7 +195,12 @@ pthread_mutex_lock(&_mero_topdp_lock); w = d; + num_owner_pids = 0; while (w != NULL) { + owner_pids[num_owner_pids][0] = w->pid; + owner_pids[num_owner_pids][1] = w->out; + owner_pids[num_owner_pids][2] = w->err; + ++num_owner_pids; FD_SET(w->out, &readfds); if (nfds < w->out) nfds = w->out; Then, when 'merorace.py random' stopped doing anything (after about 25 minutes this time), I attached via gdb and saw: (gdb) up 1 0x000000000040508f in logFD (fd=43, type=0x423223 "ERR", dbname=0x7feab4004d30 "db15", pid=4426, stream=0x66a960) at merovingian.c:140 140 merovingian.c: No such file or directory. (gdb) p num_owner_pids $1 = 21 (gdb) p owner_pids $2 = {{24268, 7, 8}, {24268, 9, 12}, {24268, 14, 16}, {24317, 25, 27}, { 24536, 45, 48}, {26536, 30, 55}, {29432, 33, 43}, {29957, 28, 54}, { 30294, 40, 44}, {30590, 42, 59}, {31846, 51, 61}, {32083, 37, 58}, { 32609, 49, 60}, {471, 62, 65}, {1138, 31, 50}, {1439, 29, 36}, {1923, 38, 53}, {2260, 34, 41}, {2850, 32, 63}, {3364, 26, 46}, {3861, 23, 35}, { 3861, 23, 35}, {25367, 66, 68}, {0, 0, 0} <repeats 177 times> Notice that owner_pids says that pid 29432 owned fd 43, but right now it's pid 4426. To expand on my original comment, I think the sequence of events is: - logListener populates readfds, unlocks _mero_topdp_lock, enters select() - childhandler() discovers the old dead pid 29432, locks _mero_topdp_lock, closes the fds - forkMserver() is called, allocates the same fd again (for stderr), locks _mero_topdp_lock, adds the new info to _mero_topdp - logListener leaves select() finding that the fd is ready for reading (because it's closed), locks _mero_topdp_lock, tries to read from the new fd but there's nothing there The smallest change that would fix this would be to change the pipes to nonblocking (which would also fix hypothesis (2) from comment 0). A possibly-neater fix would be to move all of logListener() into acceptConnections() so it cannot race with the close()s in childhandler(). ## Comment 24581 Date: 2016-10-24 10:20:26 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [5b1038e7ec5c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5b1038e7ec5c) 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=5b1038e7ec5c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=5b1038e7ec5c) Changeset description: Fix race. Move checking for scenario and connection until *after* establishing that the server is actully up and running. See bug #4066, comment 29. ## Comment 24582 Date: 2016-10-24 10:20:41 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [48fec04bccd1](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=48fec04bccd1) 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=48fec04bccd1](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=48fec04bccd1) Changeset description: Fix race. In logListener, only read from file descriptors that we added to the list of file descriptors to read. If during the wait in select a file descriptor is closed and the corresponding link in the list is freed, and then a new link is added that happens to contain the same file descriptor, we don't want to read from that one. We do this by setting a flag that we're interested in the file descriptor, and only reading from file descriptors whose flag is set. See bug #4066, comment 29. ## Comment 24583 Date: 2016-10-24 11:32:50 +0200 From: @sjoerdmullender I hope I fixed the latest two races, but I've found yet another race waiting to happen: The SIGHUP signal handler does too much. Among other things, it tries to grab the lock _mero_topdp_lock. If this handler is called in a thread that has already locked this lock, chaos will happen (since it is a recursive lock, if it weren't, there'd be deadlock). ## Comment 24584 Date: 2016-10-24 14:25:13 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; I've been running this morning's build (48fec04bccd1) for a couple of hours now and it's still going. Great! Here's a summary of the problems which I think still exist as of [12d0e5f4974e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=12d0e5f4974e) These are all theoretical, based on code review only, so you may treat them as low priority if you wish: a) like huphandler(), handler() is also technically unsafe because Mfprintf() may call malloc() which is famously not signal-safe b) Recursive lock of non-recursive fork_lock from my comment 29 second paragraph. Coverity may spot this one too. c) Potential use-after-free in terminateProcess() from my comment 1 d) Deadlock if mserver5 logs exactly 8095 bytes from my comment 0 item 2 ## Comment 24585 Date: 2016-10-24 14:48:23 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [255a382c6742](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=255a382c6742) 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=255a382c6742](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=255a382c6742) Changeset description: Avoid attempting to recursively lock a non-recursive lock. See bug #4066, comment 29 and 33. ## Comment 24586 Date: 2016-10-24 15:45:37 +0200 From: @sjoerdmullender (In reply to Richard Hughes from comment 33) > I've been running this morning's build (48fec04bccd1) for a couple of hours > now and it's still going. Great! > > Here's a summary of the problems which I think still exist as of > [12d0e5f4974e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=12d0e5f4974e) These are all theoretical, based on code review only, so you > may treat them as low priority if you wish: > > a) like huphandler(), handler() is also technically unsafe because > Mfprintf() may call malloc() which is famously not signal-safe > > b) Recursive lock of non-recursive fork_lock from my comment 29 second > paragraph. Coverity may spot this one too. > > c) Potential use-after-free in terminateProcess() from my comment 1 > > d) Deadlock if mserver5 logs exactly 8095 bytes from my comment 0 item 2 All have been fixed. ## Comment 24589 Date: 2016-10-24 17:23:48 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; Thanks. I'm not sure that [79ce5a8417ef](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=79ce5a8417ef) (terminateProcess use-after-free) changes anything, however. The dpair is still dereferenced outside of _mero_topdp_lock and hence I think the following is possible (but very unlikely): t1: mserver5 spontaneously exits itself (e.g. SEGV) t2: incoming stop control request to monetdbd t2: ctl_handle_client enters _mero_topdp_lock, finds the right dpair, exits _mero_topdp_lock t1: acceptConnections() calls childhandler() t1: childhandler() sees the SEGV, locks _mero_topdp_lock, finds the dpair, frees it, unlocks _mero_topdp_lock t2: dereferences the dpair freed in the previous step at controlrunner.c:343 ## Comment 24590 Date: 2016-10-24 18:21:12 +0200 From: @sjoerdmullender See [8e66f1150ddc](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8e66f1150ddc) ## Comment 24622 Date: 2016-10-25 14:13:33 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; That works. Quick! Close this bug before either of us finds any more problems. ## Comment 24762 Date: 2016-12-08 10:15:09 +0100 From: @sjoerdmullender Seems to be fixed.(In reply to Richard Hughes from comment 38) > That works. > > Quick! Close this bug before either of us finds any more problems.
Deadlocked monetdbd
https://api.github.com/repos/MonetDB/MonetDB/issues/4066/comments
0
2020-11-30T13:36:21Z
2024-06-27T12:38:35Z
https://github.com/MonetDB/MonetDB/issues/4066
753,484,795
4,066
[ "MonetDB", "MonetDB" ]
# Deleted Bugzilla Bug Date: 2020-11-30T13:33:45Z This bug was created during the import from Bugzilla. GitHub Issues Tracker allows to assign consecutive ids only. So this dummy issue was created in place of a deleted Bugzilla Bug. Please ignore this report.
Deleted Bugzilla Bug
https://api.github.com/repos/MonetDB/MonetDB/issues/4065/comments
0
2020-11-30T13:36:19Z
2020-11-30T13:36:21Z
https://github.com/MonetDB/MonetDB/issues/4065
753,484,774
4,065
[ "MonetDB", "MonetDB" ]
Date: 2016-09-06 11:04:52 +0200 From: @swingbit To: SQL devs &lt;<bugs-sql>&gt; Version: 11.23.7 (Jun2016-SP1) CC: martin.van.dinther Last updated: 2016-10-13 10:03:55 +0200 ## Comment 22356 Date: 2016-09-06 11:04:52 +0200 From: @swingbit User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 Build Identifier: The following query gives: 2016-09-06 10:52:05 ERR trec2[8169]: could not find xy.a1 2016-09-06 10:52:05 ERR trec2[8169]: mserver5: <...>/src/sql/backends/monet5/rel_bin.c:2390: rel2bin_project: Assertion `0' failed. It looks like a push-down of the LIMIT clause is the cause, as removing the LIMIT altogether makes the query work. create table x (a1 int, prob double); create table y (a1 int, prob double); create table z (a1 int, prob double); with xy as ( SELECT x.a1 as a1, x.prob + y.prob as prob FROM x, y WHERE x.a1=y.a1 UNION ALL SELECT x.a1 as a1, x.prob as prob FROM x WHERE x.a1 NOT IN (select a1 from y) UNION ALL SELECT y.a1 as a1, y.prob as prob FROM y WHERE y.a1 NOT IN (select a1 from x) ) SELECT xy.a1 as a1, xy.prob + z.prob as prob FROM xy, z WHERE xy.a1=z.a1 UNION ALL SELECT xy.a1 as a1, xy.prob as prob FROM xy WHERE xy.a1 NOT IN (select a1 from z) UNION ALL SELECT z.a1 as a1, z.prob as prob FROM z WHERE z.a1 NOT IN (select a1 from xy) LIMIT 5; Reproducible: Always ## Comment 22357 Date: 2016-09-06 14:21:56 +0200 From: @swingbit Actually, it may not be the limit. The following query has no limit but some more joins in the subqueries instead), fails as well: with xy as ( SELECT x.a1 as a1, x.prob + y.prob as prob FROM x, y WHERE x.a1=y.a1 UNION ALL SELECT x.a1 as a1, x.prob as prob FROM x WHERE x.a1 NOT IN (SELECT x.a1 FROM x, y WHERE x.a1=y.a1) UNION ALL SELECT y.a1 as a1, y.prob as prob FROM y WHERE y.a1 NOT IN (SELECT x.a1 FROM x, y WHERE x.a1=y.a1) ) SELECT xy.a1 as a1, xy.prob + z.prob as prob FROM xy, z WHERE xy.a1=z.a1 UNION ALL SELECT xy.a1 as a1, xy.prob as prob FROM xy WHERE xy.a1 NOT IN (SELECT xy.a1 FROM xy, z WHERE xy.a1=z.a1) UNION ALL SELECT z.a1 as a1, z.prob as prob FROM z WHERE z.a1 NOT IN (SELECT xy.a1 FROM xy, z WHERE xy.a1=z.a1); ## Comment 22372 Date: 2016-09-15 13:30:08 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [f740287a7755](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f740287a7755) 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=f740287a7755](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=f740287a7755) Changeset description: Add test for Bug #4064. ## Comment 22373 Date: 2016-09-15 13:33:17 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; It appears that the LIMIT 5 is causing the problem, see test case results. Without it both queries run okay. ## Comment 22388 Date: 2016-09-23 22:31:29 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [cb072f9b954e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=cb072f9b954e) 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=cb072f9b954e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=cb072f9b954e) Changeset description: fixes for both bug #4058 and bug #4064 In both cases the same expression (pointer) was used, which isn't correct. Because with rewrites both uses change. They are now correctly referencing a single projection column ## Comment 24489 Date: 2016-10-13 10:03:55 +0200 From: @sjoerdmullender Jun2016-SP2 has been released.
Assertion: column not found
https://api.github.com/repos/MonetDB/MonetDB/issues/4064/comments
0
2020-11-30T13:36:17Z
2024-06-27T12:38:33Z
https://github.com/MonetDB/MonetDB/issues/4064
753,484,747
4,064
[ "MonetDB", "MonetDB" ]
Date: 2016-09-05 08:57:18 +0200 From: @mlkersten To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.13 (Jan2014-SP1) CC: @njnes Last updated: 2016-09-29 12:59:41 +0200 ## Comment 22355 Date: 2016-09-05 08:57:18 +0200 From: @mlkersten User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:48.0) Gecko/20100101 Firefox/48.0 Build Identifier: Consider a file 'x' with the following statements in the mosaic branch: alter table sys.nation set read only; alter table sys.nation alter column n_nationkey set storage 'delta'; select compressed from storage() where "table"='nation'; alter table sys.nation alter column n_nationkey set storage NULL; select compressed from storage() where "table"='nation'; If we run the same in two ways we get compression or not. Changeset [dbb1745111cd](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=dbb1745111cd) introduced the difference in behavior between the two ways of calling the script. It is a merge with default before it included the jit. mclient -d mosaic_sf1 x mk@vienna::/export/scratch2/mk/tpch> mclient -d mosaic_sf1 x operation successful operation successful +------------+ | compressed | +============+ | true | | false | | false | | false | | false | | false | +------------+ 6 tuples operation successful +------------+ | compressed | +============+ | false | | false | | false | | false | | false | | false | +------------+ Now run the same program as follows: mk@vienna::/export/scratch2/mk/tpch> mclient -d mosaic_sf1 -s "alter table sys.nation set read only; alter table sys.nation alter column n_nationkey set storage 'delta'; select compressed from storage() where \"table\"='nation'; alter table sys.nation alter column n_nationkey set storage NULL; select compressed from storage() where \"table\"='nation'"; operation successful operation successful +------------+ | compressed | +============+ | false | | false | | false | | false | | false | | false | +------------+ 6 tuples operation successful +------------+ | compressed | +============+ | false | | false | | false | | false | | false | | false | +------------+ Reproducible: Always ## Comment 22366 Date: 2016-09-14 23:33:18 +0200 From: @njnes when put into a file and enclosed by start transaction /commit the behaviour of -s equals the one of the file. So the difference is trigger because its one big transaction (-s single autocommit block of statements) ## Comment 22367 Date: 2016-09-15 09:16:35 +0200 From: @sjoerdmullender Could this blurb in sql_scenario.c be the cause of the difference? if (m->scanner.mode == LINE_N && !commit_done) { go = SQLautocommit(c, m); commit_done = TRUE; }
Incompatible use of -s option
https://api.github.com/repos/MonetDB/MonetDB/issues/4063/comments
0
2020-11-30T13:36:15Z
2024-06-28T07:19:59Z
https://github.com/MonetDB/MonetDB/issues/4063
753,484,717
4,063
[ "MonetDB", "MonetDB" ]
Date: 2016-09-01 15:13:51 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: -- development CC: @njnes Last updated: 2016-10-13 11:43:22 +0200 ## Comment 22344 Date: 2016-09-01 15:13:51 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0 Build Identifier: like produces error when you execute a query in a schema other than sys and the like operator is used in the select-list. Reproducible: Always ### Steps to Reproduce: 1. Start mserver5 () 2. Start mclient 3. run SQL commands: set schema sys; SELECT cast(CASE WHEN "columns"."default" IS NOT NULL AND "columns"."default" LIKE 'next value for %' THEN 'YES' ELSE 'NO' END AS varchar(3)) AS "IS_AUTOINCREMENT" FROM "sys"."columns" WHERE "columns"."default" LIKE 'next value for %'; set schema tmp; SELECT cast(CASE WHEN "columns"."default" IS NOT NULL AND "columns"."default" LIKE 'next value for %' THEN 'YES' ELSE 'NO' END AS varchar(3)) AS "IS_AUTOINCREMENT" FROM "sys"."columns" WHERE "columns"."default" LIKE 'next value for %'; set schema profiler; SELECT cast(CASE WHEN "columns"."default" IS NOT NULL AND "columns"."default" LIKE 'next value for %' THEN 'YES' ELSE 'NO' END AS varchar(3)) AS "IS_AUTOINCREMENT" FROM "sys"."columns" WHERE "columns"."default" LIKE 'next value for %'; ### Actual Results: sql>set schema sys; auto commit mode: on sql> sql>SELECT cast(CASE WHEN "columns"."default" IS NOT NULL AND "columns"."default" LIKE 'next value for %' THEN 'YES' ELSE 'NO' END AS varchar(3)) AS "IS_AUTOINCREMENT" more>FROM "sys"."columns" more>WHERE "columns"."default" LIKE 'next value for %'; +------------------+ | IS_AUTOINCREMENT | +==================+ +------------------+ 0 tuples (2.503ms) sql> sql>set schema tmp; auto commit mode: on sql> sql>SELECT cast(CASE WHEN "columns"."default" IS NOT NULL AND "columns"."default" LIKE 'next value for %' THEN 'YES' ELSE 'NO' END AS varchar(3)) AS "IS_AUTOINCREMENT" more>FROM "sys"."columns" more>WHERE "columns"."default" LIKE 'next value for %'; SELECT: no such binary operator 'like(varchar,varchar)' sql> sql>set schema profiler; auto commit mode: on sql> sql>SELECT cast(CASE WHEN "columns"."default" IS NOT NULL AND "columns"."default" LIKE 'next value for %' THEN 'YES' ELSE 'NO' END AS varchar(3)) AS "IS_AUTOINCREMENT" more>FROM "sys"."columns" more>WHERE "columns"."default" LIKE 'next value for %'; SELECT: no such binary operator 'like(varchar,varchar)' sql> ### Expected Results: sql>set schema sys; auto commit mode: on sql> sql>SELECT cast(CASE WHEN "columns"."default" IS NOT NULL AND "columns"."default" LIKE 'next value for %' THEN 'YES' ELSE 'NO' END AS varchar(3)) AS "IS_AUTOINCREMENT" more>FROM "sys"."columns" more>WHERE "columns"."default" LIKE 'next value for %'; +------------------+ | IS_AUTOINCREMENT | +==================+ +------------------+ 0 tuples (2.503ms) sql> sql>set schema tmp; auto commit mode: on sql> sql>SELECT cast(CASE WHEN "columns"."default" IS NOT NULL AND "columns"."default" LIKE 'next value for %' THEN 'YES' ELSE 'NO' END AS varchar(3)) AS "IS_AUTOINCREMENT" more>FROM "sys"."columns" more>WHERE "columns"."default" LIKE 'next value for %'; +------------------+ | IS_AUTOINCREMENT | +==================+ +------------------+ 0 tuples (2.503ms) sql> sql>set schema profiler; auto commit mode: on sql> sql>SELECT cast(CASE WHEN "columns"."default" IS NOT NULL AND "columns"."default" LIKE 'next value for %' THEN 'YES' ELSE 'NO' END AS varchar(3)) AS "IS_AUTOINCREMENT" more>FROM "sys"."columns" more>WHERE "columns"."default" LIKE 'next value for %'; +------------------+ | IS_AUTOINCREMENT | +==================+ +------------------+ 0 tuples (2.503ms) sql> The issue is introduced recently in default branch. 3 weeks ago (and in Jun2016 release) this SQL syntax worked. This query scenario is used in in MonetDB JDBC driver getColumns() implementation, so it is important this is fixed asap. ## Comment 22345 Date: 2016-09-01 15:20:48 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [5e2066630c3f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5e2066630c3f) 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=5e2066630c3f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=5e2066630c3f) Changeset description: Add test for Bug #4062 ## Comment 22353 Date: 2016-09-04 17:14:54 +0200 From: @njnes fixed, we now use the proper sys schema when we lookup the (i)like functions ## Comment 24502 Date: 2016-10-13 10:04:48 +0200 From: @sjoerdmullender Jun2016-SP2 has been released.
Error: SELECT: no such binary operator 'like(varchar,varchar)' when used in query running in other schema than sys
https://api.github.com/repos/MonetDB/MonetDB/issues/4062/comments
0
2020-11-30T13:36:13Z
2024-06-27T12:38:31Z
https://github.com/MonetDB/MonetDB/issues/4062
753,484,685
4,062
[ "MonetDB", "MonetDB" ]
Date: 2016-09-01 12:43:38 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; To: GDK devs &lt;<bugs-common>&gt; Version: 11.21.19 (Jul2015-SP4) CC: @lsidir Last updated: 2016-12-21 13:07:24 +0100 ## Comment 22342 Date: 2016-09-01 12:43:38 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; I've got this core dump (from Jul2015 b9cb28d6243b): 0 0x00007f1523ef1b6e in candscan_lng (b=<optimized out>, s=<optimized out>, bn=<optimized out>, tl=0x7f11be28fcd0, th=0x7f151b13ca20, equi=<optimized out>, anti=0, r=0, q=131071, cnt=1, off=42133790, dst=0x7f11bdfdd000, candlist=0x7f11bdfcd000, maximum=131071, use_imprints=1, hval=<optimized out>, lval=<optimized out>, hi=<optimized out>, li=<optimized out>) at gdk_select.c:868 1 0x00007f1523f4bf8c in BAT_scanselect (use_imprints=<optimized out>, maximum=<optimized out>, hval=<optimized out>, lval=<optimized out>, anti=<optimized out>, equi=<optimized out>, hi=<optimized out>, li=<optimized out>, th=<optimized out>, tl=<optimized out>, bn=<optimized out>, s=<optimized out>, b=<optimized out>) at gdk_select.c:952 2 BATsubselect (b=0x32fe3e0, s=0x7f11bb91e7b0, tl=0x7f11be28fcd0, th=0x2ca6a50, li=1, hi=1, anti=0) at gdk_select.c:1733 3 0x00007f15245cb6a4 in ALGsubselect2 (result=0x7f11be381cd0, bid=0x0, sid=0x7f11c7cefba8, low=0x7f11be28fcd0, high=0x2ca6a50, li=0x2ca6a50 "", hi=0x7f11be28fe90 "", anti=0x7f11be28fe90 "") at algebra.c:343 4 0x00007f152456a751 in malCommandCall (stk=<optimized out>, pci=<optimized out>) at mal_interpreter.c:119 5 0x00007f152456ba9b in runMALsequence (cntxt=0x7f11bdfcd008, mb=0x7f150402b480, startpc=-942736472, stoppc=46819920, stk=0x7f11be27d020, env=0x2ca6a50, pcicaller=0x0) at mal_interpreter.c:655 6 0x00007f152456d9d8 in DFLOWworker (T=0x7f11bdfcd008) at mal_dataflow.c:378 7 0x00007f1522c6e0a4 in start_thread (arg=0x7f151b13d700) at pthread_create.c:309 8 0x00007f15229a387d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111 (gdb) i loc icnt = 193400 limit = <optimized out> i = <optimized out> e = 46819920 dcnt = 154966 l = <optimized out> d = 0x7f11c7c58650 rpp = 3 '\003' im = 0x7f11c4c20820 mask = 72057594037927936 tpe = <optimized out> innermask = 0 lbin = <optimized out> hbin = <optimized out> vl = 3163513996443648 vh = 3163518291410943 imp_min = <optimized out> imp_max = <optimized out> v = <optimized out> nil = <optimized out> src = 0x7f132e8448f0 basesrc = <optimized out> o = 0 w = 46219307 p = 131072 pr_off = 42133790 imprints = 0x7f150c03f5e0 The address is specifically this bit of code from near the end of the impscheck macro: while (p <= q && o < e) { p++; CAND; // expands to: o = *candlist++ } Notice that in my core dump p == q+1. The crash is in dereferencing candlist. Before I launch in to a big debugging session, can I ask somebody to review that piece of code? I don't understand the high-level picture, but it looks different to the other two while loops in the impscheck macro and hence may be subject to off-by-one bugs. This is an especially attractive theory because the candlist has a nice round length. See also [83a3b3fc61a9](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=83a3b3fc61a9) which modified the other two while loops but not that one. If you tell me that the code is correct then I'll start looking elsewhere (I can't reproduce it now, probably because the underlying data has long since changed), but I can save myself a huge amount of time if my guess is right. ## Comment 22343 Date: 2016-09-01 14:03:32 +0200 From: @lsidir Hi Richard, there is a good chance that if you add "if (p <= q)" before CAND; the problem will be solved. That is p++; + if (p <= q) CAND; The border cases of imprints have always been tricky and since I understand that you cannot reproduce the problem, we can add this small sanity check. Is there any way to reproduce the bug so we can solve it in a more "scientific" way? ## Comment 22346 Date: 2016-09-01 16:29:29 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; Reproducing will not be easy. The query which was executing at the time had 30418 MAL statements. I assume I would need to reverse-engineer all statements preceeding the one which crashed so that I can construct an original data set which causes a candlist of exactly the right length in order to put the last element right at the end of a page (and then hope that mmap positions it such that the next page really is absent). I can think of a couple of possibly-easier alternatives: 1) Write a small application directly against the GDK library which calls BATsubselect() with some carefully-chosen parameters? I can get all the BAT attributes out of the core dump, but not the data itself (my coredump_filter doesn't write the contents of mmaped files). 2) Put several slow, paranoid bounds-checking asserts in the body of candscan and thence try to reproduce it without needing a candlist of exactly the right size (although I'd still have to figure out how to create an imprint with the correct pattern). Do you have a recommendation (or any other ideas)? ## Comment 22347 Date: 2016-09-01 16:58:17 +0200 From: @lsidir I am trying to reason why that specific line is p<=q and not p<q. This is the case where imprints mask is empty and we have to advance until either a new imprint, or the column has reached the end, or the candidate lists has reached the end. From your core dump I see that p > q (p = 131072 and q = 131071), so candlist should not be advanced by one. I still think that adding the check line 301: p++; + if(p<=q) line 302: CAND++; should solve the problem. Can you add that line, recompile, and test with your data for a few days and see if you get again a core dump? I can do this change to our default branch and test but most likely I will not see the problem since we have not seen it before. Reproducing the exact conditions will be a pain that is why I am trying to reason about it:) ## Comment 22348 Date: 2016-09-01 17:26:38 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; Is it possible that it's off-by-two? (gdb) p *s->S $1 = {tid = 139728631629569, stamp = 269762, 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 = 131071, capacity = 131072} Given count=131071, it presumably shouldn't be reading the previous element either. That would make the fix something like: while (p < q - 1 && o < e) { p++; CAND; } if (p < q && o < e) p++; (I hoisted the duplicate p < q check out of the inner loop) I can certainly test with any patch you like, however bear in mind that this system has been running for about a year now without my having seen this crash before - a few days testing is unlikely to convince me that the problem is no longer present. ## Comment 22349 Date: 2016-09-01 17:46:25 +0200 From: @lsidir If that is the case, then give me a few days to reason about it and try to reproduce it before we do any code change. ## Comment 22351 Date: 2016-09-01 18:28:27 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; OK. Thanks, and good luck! ## Comment 22378 Date: 2016-09-19 14:19:58 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; I had a bit of time, so started looking at this again. I have a small test case, which doesn't crash but can be observed in the debugger to overrun the array: create table foo (a bigint,b bigint,c bigint); insert into foo (a,b,c) select value,(value*16777219)%5059,(value*20000033)%5099 from generate_series(cast(1 as bigint),10000); select * from foo where b=1888 and c between 1234 and 1240; The resultant MAL (with a few annotations added by me) is: function user.s3_1(A0:lng,A1:lng,A2:lng):void; X_60:void := querylog.define("explain select * from foo where b=1888 and c between 1234 and 1240;","default_pipe",46); X_34 := bat.new(nil:oid,nil:str); X_42 := bat.append(X_34,"sys.foo"); X_50 := bat.append(X_42,"sys.foo"); X_55 := bat.append(X_50,"sys.foo"); X_37 := bat.new(nil:oid,nil:str); X_44 := bat.append(X_37,"a"); X_51 := bat.append(X_44,"b"); X_56 := bat.append(X_51,"c"); X_38 := bat.new(nil:oid,nil:str); X_45 := bat.append(X_38,"bigint"); X_52 := bat.append(X_45,"bigint"); X_57 := bat.append(X_52,"bigint"); X_39 := bat.new(nil:oid,nil:int); X_47 := bat.append(X_39,64); X_53 := bat.append(X_47,64); X_58 := bat.append(X_53,64); X_41 := bat.new(nil:oid,nil:int); X_49 := bat.append(X_41,0); X_54 := bat.append(X_49,0); X_59 := bat.append(X_54,0); X_4 := sql.mvc(); X_8:bat[:lng] := sql.bind(X_4,"sys","foo","c",0); X_16:bat[:lng] := sql.bind(X_4,"sys","foo","b",0); C_5:bat[:oid] := sql.tid(X_4,"sys","foo"); C_71 := algebra.subselect(X_16,C_5,A0,A0,true,false,false); (C_18,r1_22) := sql.bind(X_4,"sys","foo","b",2); C_72 := algebra.subselect(r1_22,nil:bat[:oid],A0,A0,true,false,false); X_20:bat[:lng] := sql.bind(X_4,"sys","foo","b",1); C_74 := algebra.subselect(X_20,C_5,A0,A0,true,false,false); C_21 := sql.subdelta(C_71,C_5,C_18<n=0>,C_72,C_74); C_18=[4314,9373] C_75 := algebra.subselect(X_8<n=9999>,C_21<n=2>,A1=1234,A2=1240,true,true,false); HERE (C_11,r1_11) := sql.bind(X_4,"sys","foo","c",2); C_76 := algebra.subselect(r1_11,nil:bat[:oid],A1,A2,true,true,false); X_14:bat[:lng] := sql.bind(X_4,"sys","foo","c",1); C_77 := algebra.subselect(X_14,C_21,A1,A2,true,true,false); C_24 := sql.subdelta(C_75,C_21,C_11,C_76,C_77); X_25:bat[:lng] := sql.bind(X_4,"sys","foo","a",0); (C_27,r1_35) := sql.bind(X_4,"sys","foo","a",2); X_29:bat[:lng] := sql.bind(X_4,"sys","foo","a",1); X_30 := sql.projectdelta(C_24,X_25,C_27,r1_35,X_29); X_31 := sql.projectdelta(C_24,X_16,C_18,r1_22,X_20); X_32 := sql.projectdelta(C_24,X_8,C_11,r1_11,X_14); sql.resultSet(X_55,X_56,X_57,X_58,X_59,X_30,X_31,X_32); end user.s3_1; I put a breakpoint on the "while (p <= q && o < e)" line and here's some of my gdb session. [Note that all line numbers are bogus because I've expanded-out all the macros in order to be able to step through]. Breakpoint 1, candscan_lng (b=0x64d400, s=0x7fffe416b480, bn=0x7fffe410fec0, tl=0x7fffe41d23c0, th=0x7fffe41d23e0, li=1, hi=1, equi=0, anti=0, lval=1, hval=1, r=0, q=2, cnt=0, off=0, dst=0x7fffe41d95a0, candlist=0x7fffe420f588, maximum=2, use_imprints=1) at gdk_select.c:739 739 while (p <= q && o < e) { (gdb) i loc icnt = 539 limit = 8 i = 4312 e = 4320 dcnt = 0 l = 1250 d = 0x7fffe4190e28 rpp = 3 '\003' im = 0x7fffe418e710 mask = 16384 tpe = 11 innermask = 0 lbin = 14 hbin = 14 vl = 1234 vh = 1240 imp_min = 0 imp_max = 5098 v = 12096 nil = -9223372036854775808 minval = -9223372036854775807 maxval = 9223372036854775807 src = 0x7fffe40d8340 basesrc = 0x7fffe40d8340 o = 4314 w = 9374 p = 0 pr_off = 0 imprints = 0x7fffe419cf50 __PRETTY_FUNCTION__ = "candscan_lng" (gdb) x/3g candlist 0x7fffe420f588: 9373 9998 0x7fffe420f598: -2604246222170760229 (gdb) up 1 0x00007ffff7291532 in BAT_scanselect (b=0x64d400, s=0x7fffe416b480, bn=0x7fffe410fec0, tl=0x7fffe41d23c0, th=0x7fffe41d23e0, li=1, hi=1, equi=0, anti=0, lval=1, hval=1, maximum=2, use_imprints=1) at gdk_select.c:1166 1166 cnt = candscan_lng(scanargs); (gdb) p *s->S $1 = {tid = 140737189574401, stamp = 2104, copiedtodisk = 0, dirty = 1, dirtyflushed = 0, descdirty = 1, restricted = 1, persistence = 1, role = 1, unused = 0, sharecnt = 0, deleted = 0, first = 0, inserted = 0, count = 2, capacity = 10240} (gdb) p *s->T $2 = {id = 0x7ffff75c914b "t", width = 8, type = 6 '\006', shift = 3 '\003', varsized = 0, key = 1, dense = 0, nonil = 1, nil = 0, sorted = 1, revsorted = 0, align = 1045647, nokey = {0, 0}, nosorted = 0, norevsorted = 0, nodense = 0, seq = 0, heap = {free = 16, size = 81920, base = 0x7fffe420f580 "\332\020", filename = 0x7fffe41a28f0 "44.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) x/4g s->T.heap.base 0x7fffe420f580: 4314 9373 0x7fffe420f590: 9998 -2604246222170760229 ...skip a few hundred iterations of the for(icnt) loop... Breakpoint 1, candscan_lng (b=0x64d400, s=0x7fffe416b480, bn=0x7fffe410fec0, tl=0x7fffe41d23c0, th=0x7fffe41d23e0, li=1, hi=1, equi=0, anti=0, lval=1, hval=1, r=0, q=2, cnt=0, off=0, dst=0x7fffe41d95a0, candlist=0x7fffe420f590, maximum=2, use_imprints=1) at gdk_select.c:739 739 while (p <= q && o < e) { (gdb) i loc icnt = 1171 limit = 8 i = 9368 e = 9376 dcnt = 0 l = 1250 d = 0x7fffe4190e28 rpp = 3 '\003' im = 0x7fffe418e710 mask = 16384 tpe = 11 innermask = 0 lbin = 14 hbin = 14 vl = 1234 vh = 1240 imp_min = 0 imp_max = 5098 v = 12096 nil = -9223372036854775808 minval = -9223372036854775807 maxval = 9223372036854775807 src = 0x7fffe40d8340 basesrc = 0x7fffe40d8340 o = 9373 w = 9374 p = 1 pr_off = 0 imprints = 0x7fffe419cf50 __PRETTY_FUNCTION__ = "candscan_lng" At this point p<=q && o<e and candlist is already at the end of the BAT (==s->T.heap.base+s->T.width*s->S.count). It is only the fluke that the element off the end of the array happens to be larger that stops the while loop going round twice. This is certainly good experimental evidence of a bug. I still need you to think about why the code was (clearly intentionally) written that way. Is it possible that o<e was expected always to be false at the end of the loop? ## Comment 24533 Date: 2016-10-18 14:15:45 +0200 From: @sjoerdmullender Looks like changeset [84a66f61f8fe](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=84a66f61f8fe) wasn't complete. I think the <= should indeed be <. Running tests now. ## Comment 24536 Date: 2016-10-18 15:44:41 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [f7194ce0de47](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f7194ce0de47) 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=f7194ce0de47](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=f7194ce0de47) Changeset description: Off-by-one error, completing changeset [84a66f61f8fe](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=84a66f61f8fe) This (hopefully) fixes bug #4061.
SIGSEGV in candscan_lng
https://api.github.com/repos/MonetDB/MonetDB/issues/4061/comments
0
2020-11-30T13:36:10Z
2024-06-27T12:38:30Z
https://github.com/MonetDB/MonetDB/issues/4061
753,484,644
4,061
[ "MonetDB", "MonetDB" ]
Date: 2016-08-26 17:21:12 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; To: MonetDB5 devs &lt;<bugs-monetdb5>&gt; Version: 11.23.7 (Jun2016-SP1) Last updated: 2016-10-13 10:04:40 +0200 ## Comment 22326 Date: 2016-08-26 17:21:12 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; [NB: I'm using Jul2015 [7766a2274ca7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7766a2274ca7) but the code in question hasn't change in trunk so I'm guessing the bug is still present] To reproduce from a blank database: create table a (id int); create table b (id int); select count(*) from (select * from a union all select * from b) z; Each time that last statement is executed, one BAT is leaked, as measured by "select count(*) from sys.bbp() where kind='transient';" Explain is: function user.s2_1{autoCommit=true}():void; X_39:void := querylog.define("explain select count(*) from (select * from a union all select * from b) z;","default_pipe",26); barrier X_52 := language.dataflow(); X_3:bat[:oid,:wrd] := bat.new(nil:oid,nil:wrd); X_2 := sql.mvc(); X_6:bat[:oid,:oid] := sql.tid(X_2,"sys","a"); X_9:bat[:oid,:int] := sql.bind(X_2,"sys","a","id",0); (X_12,r1_12) := sql.bind(X_2,"sys","a","id",2); X_15:bat[:oid,:int] := sql.bind(X_2,"sys","a","id",1); X_17 := sql.delta(X_9,X_12,r1_12,X_15); X_18 := algebra.leftfetchjoin(X_6,X_17); X_19 := aggr.count(X_18); X_20 := sql.single(X_19); X_21 := bat.append(X_3,X_20,true); X_22:bat[:oid,:oid] := sql.tid(X_2,"sys","b"); X_24:bat[:oid,:int] := sql.bind(X_2,"sys","b","id",0); (X_25,r1_25) := sql.bind(X_2,"sys","b","id",2); X_27:bat[:oid,:int] := sql.bind(X_2,"sys","b","id",1); X_28 := sql.delta(X_24,X_25,r1_25,X_27); X_29 := algebra.leftfetchjoin(X_22,X_28); X_30 := aggr.count(X_29); X_31 := bat.append(X_21,X_30,true); X_32:wrd := aggr.sum(X_31); exit X_52; sql.resultSet(".L1","L1","wrd",64,0,7,X_32); end user.s2_1; This change seems to fix the problem for me: diff -r e35315c7959d monetdb5/modules/mal/batExtensions.c --- a/monetdb5/modules/mal/batExtensions.c Fri Aug 26 15:53:42 2016 +0100 +++ b/monetdb5/modules/mal/batExtensions.c Fri Aug 26 16:18:20 2016 +0100 @@ -175,7 +175,7 @@ CMDBATsingle(Client cntxt, MalBlkPtr mb, if (ATOMextern(b->ttype)) u = (ptr) *(str *)u; BUNappend(b, u, FALSE); - BBPincref(*ret = b->batCacheid, TRUE); + BBPkeepref(*ret = b->batCacheid); return MAL_SUCCEED; } ## Comment 22331 Date: 2016-08-29 15:07:04 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [3894797fbda7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3894797fbda7) 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=3894797fbda7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=3894797fbda7) Changeset description: Fix reference counting. This fixes bug #4060. ## Comment 24500 Date: 2016-10-13 10:04:40 +0200 From: @sjoerdmullender Jun2016-SP2 has been released.
BAT leak in some aggregate queries
https://api.github.com/repos/MonetDB/MonetDB/issues/4060/comments
0
2020-11-30T13:36:07Z
2024-06-27T12:38:29Z
https://github.com/MonetDB/MonetDB/issues/4060
753,484,613
4,060
[ "MonetDB", "MonetDB" ]
Date: 2016-08-25 16:56:48 +0200 From: @swingbit To: SQL devs &lt;<bugs-sql>&gt; Version: 11.23.7 (Jun2016-SP1) CC: @njnes Last updated: 2016-10-13 10:03:37 +0200 ## Comment 22325 Date: 2016-08-25 16:56:48 +0200 From: @swingbit User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 Build Identifier: Geom with user 'monetdb' $ bin/mclient test user(roberto):monetdb password: Welcome to mclient, the MonetDB/SQL interactive terminal (Jun2016-SP1) Database: MonetDB v11.23.7 (Jun2016-SP1), 'mapi:monetdb://photon.hq.spinque.com:50000/test' Type \q to quit, \? for a list of available commands auto commit mode: on sql>\f tab sql>select st_point(1,1); POINT (1 1) -- Create user 'roberto' sql>CREATE USER "roberto" WITH UNENCRYPTED PASSWORD 'roberto' NAME 'roberto' SCHEMA "sys"; operation successful (28.601ms) Geom with user 'roberto' (still in 'sys' schema) $ bin/mclient test user(roberto):roberto password: Welcome to mclient, the MonetDB/SQL interactive terminal (Jun2016-SP1) Database: MonetDB v11.23.7 (Jun2016-SP1), 'mapi:monetdb://photon.hq.spinque.com:50000/test' Type \q to quit, \? for a list of available commands auto commit mode: on sql>\f tab sql>select st_point(1,1); MAPI = (roberto) /tmp/.s.monetdb.50000 QUERY = select st_point(1,1); ERROR = !SELECT: no such binary operator 'st_point(tinyint,tinyint)' Reproducible: Always ## Comment 22336 Date: 2016-08-30 13:16:49 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [d9f855efe1f6](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d9f855efe1f6) 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=d9f855efe1f6](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=d9f855efe1f6) Changeset description: Grant access to all geom functions and tables to public. This fixes bug #4059. ## Comment 22337 Date: 2016-08-30 13:56:41 +0200 From: @sjoerdmullender Work around for the problem until the next release is published: get the source of MonetDB [1], then execute: grep '^GRANT' geom/sql/40_geom.sql | mclient -d $DBNAME where $DBNAME is the name of the database. [1] hg clone -u Jun2016 http://dev.monetdb.org/hg/MonetDB/; cd MonetDB ## Comment 24486 Date: 2016-10-13 10:03:37 +0200 From: @sjoerdmullender Jun2016-SP2 has been released.
Geom functions only visible by user monetdb
https://api.github.com/repos/MonetDB/MonetDB/issues/4059/comments
0
2020-11-30T13:36:05Z
2024-06-27T12:38:28Z
https://github.com/MonetDB/MonetDB/issues/4059
753,484,587
4,059
[ "MonetDB", "MonetDB" ]
Date: 2016-08-24 17:01:20 +0200 From: fioravanzos To: SQL devs &lt;<bugs-sql>&gt; Version: 11.23.7 (Jun2016-SP1) CC: martin.van.dinther Last updated: 2016-10-13 10:04:00 +0200 ## Comment 22320 Date: 2016-08-24 17:01:20 +0200 From: fioravanzos User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 Build Identifier: The server crashes with assert 0 doing the steps below. I'm using the default branch, node id: [7fda0b907c50](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7fda0b907c50) Reproducible: Always ### Steps to Reproduce: 1.CREATE TABLE "sys"."test_bug" ( "f1" INTEGER NOT NULL, "f2" INTEGER NOT NULL, "f3" CHARACTER LARGE OBJECT NOT NULL, "f4" BOOLEAN NOT NULL ); 2. Insert the following data into the defined table: 81,1310,V,true 303,1205,V,true 601,1502,V,true 839,1312,A,true 408,1302,G,false 665,1410,V,true 267,1604,A,true 556,1208,G,false 386,1409,G,false 831,1606,A,true 681,1509,G,false 784,1511,A,true 777,1503,A,true 781,1407,V,true 682,1402,V,true 796,1507,V,true 743,1505,V,true 715,1409,G,false 769,1402,A,true 760,1511,A,true 3. the create another table with: create table tmp as ( select * from test_bug limit 10); 4. Check the execution of the following queries: select * from (select * from test_bug where f3='V' AND f4=true) as tmp where f1||f2 NOT IN (select f1||f2 from tmp) -- WORKS select * from (select * from test_bug where f1||f2 NOT IN (select f1||f2 from tmp)) as tmp where f3='V' AND f4=true -- DOES NOT WORK select * from test_bug where f3='V' AND f4=true AND f1||f2 NOT IN (select f1||f2 from tmp) -- DOES NOT WORK In the merovingian.log file I can see the following messages when the query fails: 2016-08-24 13:41:24 ERR unifarm[20416]: mserver5: rel_bin.c:705: exp_bin: Assertion `0' failed. 2016-08-24 13:41:24 MSG merovingian[30070]: database 'unifarm' (20416) was killed by signal SIGABRT ## Comment 22370 Date: 2016-09-15 13:09:21 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [7a7be64856c0](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7a7be64856c0) 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=7a7be64856c0](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=7a7be64856c0) Changeset description: Add test for Bug #4058. ## Comment 22371 Date: 2016-09-15 13:14:41 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; Issue is reproducable. It causes an assertion failure: dev/sql/backends/monet5/rel_bin.c:702: exp_bin: Assertion `0' failed. ## Comment 22389 Date: 2016-09-23 22:31:33 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [cb072f9b954e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=cb072f9b954e) 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=cb072f9b954e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=cb072f9b954e) Changeset description: fixes for both bug #4058 and bug #4064 In both cases the same expression (pointer) was used, which isn't correct. Because with rewrites both uses change. They are now correctly referencing a single projection column ## Comment 24490 Date: 2016-10-13 10:04:00 +0200 From: @sjoerdmullender Jun2016-SP2 has been released.
Server crashes with a particular conditional query
https://api.github.com/repos/MonetDB/MonetDB/issues/4058/comments
0
2020-11-30T13:36:02Z
2024-06-27T12:38:27Z
https://github.com/MonetDB/MonetDB/issues/4058
753,484,542
4,058
[ "MonetDB", "MonetDB" ]
Date: 2016-08-23 14:44:40 +0200 From: @swingbit To: SQL devs &lt;<bugs-sql>&gt; Version: 11.23.7 (Jun2016-SP1) CC: @njnes Last updated: 2016-12-21 13:08:32 +0100 ## Comment 22319 Date: 2016-08-23 14:44:40 +0200 From: @swingbit User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 Build Identifier: create table t(i int); explain select sql_max(2,i) from t; The MAL plan produced uses a loop on t. Reproducible: Always ## Comment 22321 Date: 2016-08-25 13:24:31 +0200 From: @njnes there is a problem with the sql type checking and calc.max is a pattern, ie cannot be automatically used in a manifold operator. This indeed means additional batcalc.max/min etc needs to be added. ## Comment 22398 Date: 2016-09-30 10:40:42 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [5e84ba611fc7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5e84ba611fc7) 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=5e84ba611fc7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=5e84ba611fc7) Changeset description: Implemented batcalc.min and batcalc.max for when one argument is scalar. This fixes bug #4057. ## Comment 22399 Date: 2016-09-30 10:41:26 +0200 From: @sjoerdmullender The fix should appear in the next feature release.
missing bulk operations between constant and bat
https://api.github.com/repos/MonetDB/MonetDB/issues/4057/comments
0
2020-11-30T13:36:00Z
2024-06-27T12:38:26Z
https://github.com/MonetDB/MonetDB/issues/4057
753,484,510
4,057
[ "MonetDB", "MonetDB" ]
Date: 2016-08-23 12:39:59 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; To: clients devs &lt;<bugs-clients>&gt; Version: 11.21.19 (Jul2015-SP4) Last updated: 2019-04-30 12:36:01 +0200 ## Comment 22318 Date: 2016-08-23 12:39:59 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; Created attachment 401 Implement mapi_settimeout Here's a patch to implement it. Note that this changes the semantics of mnstr_settimeout in libstream based on the documentation in the changelog comment "a callback function (no arguments, int result) that should return TRUE if the timeout should cause the function to abort or continue what it was doing". The previous code would act on the callback function even if the timeout hadn't expired. The only existing user of that feature (monetdb5/mal/mal_session.c) looks like it would be happy with either semantic. > Attached file: [monetdb-mapi_settimeout.diff](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_4056_monetdb-mapi_settimeout.diff_401) (text/plain, 1861 bytes) > Description: Implement mapi_settimeout ## Comment 26835 Date: 2019-01-22 14:41:28 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [771a2d5a9079](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=771a2d5a9079) 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=771a2d5a9079](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=771a2d5a9079) Changeset description: Check for timeout after check for error and only if no data. Also, implement the check for the timeout function in accordance with the comment (no function is equivalent to a function returning true). This does the same as what the patch in bug #4056 does. ## Comment 26836 Date: 2019-01-22 15:02:40 +0100 From: @sjoerdmullender The essence of the patch has been taken over. However, this does not mean that mapi_settimeout now causes the query to be stopped when it takes too long, only that the library stop listening for an answer. The application using this can cause the query to (eventually) stop by closing the connection after the timeout triggered (and then opening a new connection if it wants to do more). The closed connection will be noticed in the server and cause the query to be aborted. Still closing since the patch was incorporated.
mapi_timeout is not implemented
https://api.github.com/repos/MonetDB/MonetDB/issues/4056/comments
0
2020-11-30T13:35:58Z
2024-06-27T12:38:25Z
https://github.com/MonetDB/MonetDB/issues/4056
753,484,474
4,056
[ "MonetDB", "MonetDB" ]
Date: 2016-08-22 14:12:09 +0200 From: Guillaume Savary &lt;<guillaume.savary>&gt; To: clients devs &lt;<bugs-clients>&gt; Version: -- development Last updated: 2016-08-22 14:14:27 +0200 ## Comment 22316 Date: 2016-08-22 14:12:09 +0200 From: Guillaume Savary &lt;<guillaume.savary>&gt; User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:48.0) Gecko/20100101 Firefox/48.0 Build Identifier: The connection API does not allow to set a timeout before any socket.connect(). So the connecting timeout is the default one in the socket module, which is infinite (at least on linux / x86). Reproducible: Always ## Comment 22317 Date: 2016-08-22 14:14:27 +0200 From: Guillaume Savary &lt;<guillaume.savary>&gt; Created attachment 400 API proposal add a "connect_timeout" optional argument in the Connection class > Attached file: [diff](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_4055_diff_400) (text/plain, 3592 bytes) > Description: API proposal
Cannot set a connection timeout
https://api.github.com/repos/MonetDB/MonetDB/issues/4055/comments
0
2020-11-30T13:35:56Z
2024-06-28T07:08:56Z
https://github.com/MonetDB/MonetDB/issues/4055
753,484,449
4,055
[ "MonetDB", "MonetDB" ]
Date: 2016-08-22 13:44:30 +0200 From: @skinkie To: SQL devs &lt;<bugs-sql>&gt; Version: -- development CC: @njnes Last updated: 2016-10-13 10:04:45 +0200 ## Comment 22315 Date: 2016-08-22 13:44:30 +0200 From: @skinkie User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/51.0.2704.79 Chrome/51.0.2704.79 Safari/537.36 Build Identifier: skinkie@chamechaude ~ $ /opt/monetdb-aug2016/bin/mclient -d htm create table test (test text); insert into test values ('123:456:789'); select split_part(test, ':', 2) from test; +----------------+ | splitpart_test | +================+ | 456 | +----------------+ 1 tuple (4.606ms) Now with copy into: copy (select split_part(test, ':', 2) from test) into '/tmp/export/htm/test.csv' DELIMITERS ',' NULL AS ''; 1 affected row (3.772ms) cat /tmp/export/htm/test.csv "123:456:789","456" The input for the function is duplicated in the output. Reproducible: Always MonetDB 5 server v11.24.0 (64-bit, 128-bit integers) This is an unreleased version Copyright (c) 1993-July 2008 CWI Copyright (c) August 2008-2016 MonetDB B.V., all rights reserved Visit http://www.monetdb.org/ for further information Found 62.8GiB available memory, 8 available cpu cores Libraries: libpcre: 8.38 2015-11-23 (compiled with 8.38) openssl: OpenSSL 1.0.2h 3 May 2016 (compiled with OpenSSL 1.0.2h 3 May 2016) libxml2: 2.9.4 (compiled with 2.9.4) Compiled by: skinkie@chamechaude (x86_64-pc-linux-gnu) Compilation: gcc -O3 -pipe -march=broadwell -mabm -mavx256-split-unaligned-load -mavx256-split-unaligned-store -mclflushopt -mrtm -mxsavec -mxsaves -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 22322 Date: 2016-08-25 14:04:42 +0200 From: @njnes Is this already fixed? I could not repeat the problem on the Jun2016 branch ## Comment 22323 Date: 2016-08-25 15:02:27 +0200 From: @skinkie I reported it on the default branch, I'll test later today. ## Comment 22324 Date: 2016-08-25 15:17:54 +0200 From: @skinkie This still happens in default. ## Comment 22330 Date: 2016-08-29 14:56:41 +0200 From: @sjoerdmullender Regression in default branch. ## Comment 22354 Date: 2016-09-04 20:09:23 +0200 From: @njnes this is caused by the split_project optimizer. Now we handle this exception. ## Comment 24501 Date: 2016-10-13 10:04:45 +0200 From: @sjoerdmullender Jun2016-SP2 has been released.
copy into file wrongly exports functions
https://api.github.com/repos/MonetDB/MonetDB/issues/4054/comments
0
2020-11-30T13:35:54Z
2024-06-27T12:38:23Z
https://github.com/MonetDB/MonetDB/issues/4054
753,484,424
4,054
[ "MonetDB", "MonetDB" ]
Date: 2016-08-19 14:50:30 +0200 From: fioravanzos To: GDK devs &lt;<bugs-common>&gt; Version: 11.23.7 (Jun2016-SP1) CC: martin.van.dinther Last updated: 2016-09-15 12:45:17 +0200 ## Comment 22303 Date: 2016-08-19 14:50:30 +0200 From: fioravanzos User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 Build Identifier: ————————————————————————— System: Linux Ubuntu 16.04 MonetDB Version: Tested both on stable version Jun2016 SP1 AND dev version, default branch - node id [7fda0b907c50](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7fda0b907c50) [19/08/16] ————————————————————————— With the CREATE TABLE statement of the problematic table, I had three CREATE INDEX statements on three different columns. I know that monetdb handles indexes by itself and that the CREATE INDEX statement is just used as a suggestion to monet, but I left them anyway, thinking that it wouldn’t do any harm. Well, it seems that the indexed columns where broken someway. In fact, any query involving those columns would break the server. Moreover, a query like select count(distinct indexed_field) from big_table, would return the number of rows of the table, not the actual number of distinct values of the field. After removing the CREATE INDEX statements and recreating the table, everything went back to normal. Reproducible: Always ### Steps to Reproduce: 1.Create table CREATE TABLE "sys"."farmap_movimento" ( "id" SERIAL, "articolo_id" BIGINT NOT NULL, "farmacia_id" INTEGER NOT NULL, "causale_id" INTEGER NOT NULL, "ts" TIMESTAMP NOT NULL, "anno" SMALLINT NOT NULL, "mese" SMALLINT NOT NULL, "data" CHARACTER LARGE OBJECT NOT NULL, "ora" CHARACTER LARGE OBJECT NOT NULL, "tipo_doc" CHARACTER LARGE OBJECT NOT NULL, "num_doc" CHARACTER LARGE OBJECT NOT NULL, "num_riga" INTEGER NOT NULL, "flag_flusso" CHARACTER LARGE OBJECT, "tessera" CHARACTER LARGE OBJECT, "cassa" CHARACTER LARGE OBJECT, "operatore" CHARACTER LARGE OBJECT, "tipo_sconto" CHARACTER LARGE OBJECT, "tipo_vend" CHARACTER LARGE OBJECT, "ricetta_numero" CHARACTER LARGE OBJECT, "barcode_reg_asl" CHARACTER LARGE OBJECT, "barcode_ricettario" CHARACTER LARGE OBJECT, "anomalia_dominio" CHARACTER LARGE OBJECT, "anomalia_integrita" CHARACTER LARGE OBJECT, "anomalia_quadratura" CHARACTER LARGE OBJECT, "anomalia_congruenza" CHARACTER LARGE OBJECT, "offerta" CHARACTER LARGE OBJECT, "flag_ricetta" CHARACTER LARGE OBJECT, "flag_costo" CHARACTER LARGE OBJECT, "pagamento" CHARACTER LARGE OBJECT, "pagamento_modalita" CHARACTER LARGE OBJECT, "regola_prezzo" CHARACTER LARGE OBJECT, "regola_costo" CHARACTER LARGE OBJECT, "flag_sconto" CHARACTER LARGE OBJECT, "uscito_qta" DOUBLE, "uscito_val" DOUBLE, "uscito_val_n_iva" DOUBLE, "uscito_listino" DOUBLE, "uscito_listino_n_iva" DOUBLE, "uscito_costo" DOUBLE, "uscito_sconto_riga" DOUBLE, "uscito_sconto_doc" DOUBLE, "uscito_sconto_asl" DOUBLE, "uscito_sconto_listino" DOUBLE, "uscito_ricetta" DOUBLE, "uscito_ticket" DOUBLE, "uscito_ricetta_quota" DOUBLE, "periodo" INTEGER NOT NULL DEFAULT 0, "flag_promo" BOOLEAN NOT NULL DEFAULT FALSE, "scontrino" BIGINT DEFAULT 0, "class_interna" INTEGER NOT NULL DEFAULT 0, "anno_mese" INTEGER, "anno_periodo" INTEGER ); 2. create indexes: CREATE INDEX "annomese_idx" ON "sys"."farmap_movimento" ("anno_mese"); CREATE INDEX "articolo_idx" ON "sys"."farmap_movimento" ("articolo_id"); CREATE INDEX "farmacia_idx" ON "sys"."farmap_movimento" ("farmacia_id"); 3. load data from csv with \copy ### Actual Results: Queries with select * (so on all fields) and maybe involving conditional statement on the indexed fields break the server with errors like: - Segmentation fault - *** Error in `mserver5': corrupted double-linked list: 0x00007feb1c20aec0 *** - !WARNING: gdk_bat.c:2083: assertion `b->batCount <= b->batCapacity' failed !WARNING: gdk_bat.c:2084: assertion `b->T->heap.size >= b->T->heap.free' failed !WARNING: gdk_bat.c:2083: assertion `b->batCount <= b->batCapacity' failed !WARNING: gdk_bat.c:2084: assertion `b->T->heap.size >= b->T->heap.free' failed - mserver5: gdk_select.c:867: fullscan_int: Assertion `cnt < (bn)->S.capacity' failed. After removing the indices everything worked as expected. Not yet been able to reproduce with tqgen mserver5 --version: MonetDB 5 server v11.24.0 (64-bit, 128-bit integers) This is an unreleased version Copyright (c) 1993-July 2008 CWI Copyright (c) August 2008-2016 MonetDB B.V., all rights reserved Visit http://www.monetdb.org/ for further information Found 60.0GiB available memory, 8 available cpu cores Libraries: libpcre: 8.38 2015-11-23 (compiled with 8.38) openssl: OpenSSL 1.0.2g 1 Mar 2016 (compiled with OpenSSL 1.0.2g-fips 1 Mar 2016) libxml2: 2.9.3 (compiled with 2.9.3) Compiled by: ubuntu@ip-172-31-5-149 (x86_64-pc-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 22304 Date: 2016-08-19 14:52:44 +0200 From: fioravanzos Also a peculiar behaviour, with the indexes, is this: a query like: select count(distinct indexed_field) from indexed_table return the number of rows in the table, not the actual number of distinct values of the field, that is how I realized what was the source of the problems. ## Comment 22368 Date: 2016-09-15 12:39:43 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [d78392aca3b6](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d78392aca3b6) 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=d78392aca3b6](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=d78392aca3b6) Changeset description: Add test for Bug #4053 ## Comment 22369 Date: 2016-09-15 12:45:17 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; We added a test case to reproduce the problem in Jun2016-SP1 release. It appears the issue is not reproducable without data. Could you please supply a data file (see your step 3) which allows us to reproduce this problem?
CREATE INDEX stmt breaks table column, every query fails
https://api.github.com/repos/MonetDB/MonetDB/issues/4053/comments
0
2020-11-30T13:35:52Z
2024-06-28T07:19:59Z
https://github.com/MonetDB/MonetDB/issues/4053
753,484,396
4,053
[ "MonetDB", "MonetDB" ]
Date: 2016-08-17 08:00:33 +0200 From: @mlkersten To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.13 (Jan2014-SP1) Last updated: 2016-10-13 10:04:04 +0200 ## Comment 22296 Date: 2016-08-17 08:00:33 +0200 From: @mlkersten User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:48.0) Gecko/20100101 Firefox/48.0 Build Identifier: In the experimental branch IOT bug6.sql triggers a hanging server in rel_select. Reproducible: Always ## Comment 22297 Date: 2016-08-17 08:12:23 +0200 From: @mlkersten It can be fixed by moving the prev = f lines up in the code. The root cause may be incorrect handling of CREATE SCHEMA iot; SET SCHEMA iot; within same script, as extending the call with the schema name 'solved' it. ## Comment 22298 Date: 2016-08-17 08:21:44 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [80dc72446c9b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=80dc72446c9b) made by Martin Kersten <mk@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=80dc72446c9b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=80dc72446c9b) Changeset description: Avoid infinite loop This solves bug #4052 ## Comment 22299 Date: 2016-08-17 08:23:22 +0200 From: @mlkersten solved bug #4052 ## Comment 24491 Date: 2016-10-13 10:04:04 +0200 From: @sjoerdmullender Jun2016-SP2 has been released.
Infinite loop in rel_select
https://api.github.com/repos/MonetDB/MonetDB/issues/4052/comments
0
2020-11-30T13:35:49Z
2024-06-27T12:38:21Z
https://github.com/MonetDB/MonetDB/issues/4052
753,484,383
4,052
[ "MonetDB", "MonetDB" ]
Date: 2016-08-08 16:24:57 +0200 From: @PedroTadim To: SQL devs &lt;<bugs-sql>&gt; Version: 11.23.7 (Jun2016-SP1) CC: @mlkersten Last updated: 2016-08-08 18:14:06 +0200 ## Comment 22288 Date: 2016-08-08 16:24:57 +0200 From: @PedroTadim User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 Build Identifier: Can't use either OFFSET or LIMIT clauses in sub-queries. Please check the example in the steps to reproduce. Reproducible: Always ### Steps to Reproduce: 1. CREATE TABLE temperature (t TIMESTAMP, sensor INT, val DECIMAL); 2. CREATE TABLE results (minimum DECIMAL, tuples INT, average DECIMAL); 3. INSERT INTO results SELECT MIN(temp.val), COUNT(*), AVG(temp.val) FROM (SELECT val FROM temperature LIMIT 6) AS temp; ### Actual Results: Gives the following error message: syntax error, unexpected LIMIT, expecting UNION or EXCEPT or INTERSECT or ')' in: "insert into results select min(temp.val), count(*), avg(temp.val) from (select v" ### Expected Results: Insert a tuple in the results table. There is no relevant messages in the merovingian.log file. ## Comment 22289 Date: 2016-08-08 18:14:06 +0200 From: @mlkersten Correct. That is not supported by the SQL standard. You can 'circumvent' this by putting the sub-selection into a table producing function.
Using LIMIT and OFFSET in sub-queries
https://api.github.com/repos/MonetDB/MonetDB/issues/4051/comments
0
2020-11-30T13:35:47Z
2024-06-28T07:19:59Z
https://github.com/MonetDB/MonetDB/issues/4051
753,484,350
4,051
[ "MonetDB", "MonetDB" ]
Date: 2016-08-03 14:10:44 +0200 From: anthonin.bonnefoy To: SQL devs &lt;<bugs-sql>&gt; Version: 11.23.7 (Jun2016-SP1) CC: frederic.jolliton+monetdb, @njnes, richard.monetdb Last updated: 2016-12-21 13:08:05 +0100 ## Comment 22279 Date: 2016-08-03 14:10:44 +0200 From: anthonin.bonnefoy User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0 Build Identifier: When running low on inode, the wal logging fail !ERROR: bm_subcommit: commit failed !ERROR: logger_exit: logger_commit failed !FATAL: write-ahead logging failure, disk full? However, on the next start, mserver will fail while processing log Finished processing logs sql/sql_logs !ERROR: bm_subcommit: commit failed !ERROR: logger_exit: logger_commit failed !ERROR: logger_cleanup: cannot open file sql_logs/sql/log.bak-4 !mvc_init: unable to create system tables sending process 5448 (database 'nova') the TERM signal !SQLException:SQLinit:Catalogue initialization failed And from now on, the database will be unusable. Freeing inodes before starting the second time will not trigger the corruption. Reproducible: Always ### Steps to Reproduce: 1. Launch this script ------------------------- !/bin/bash set -eu FARM="/tmp/farm" NUM_INODE=100000 init_farm() { pkill -e -9 mserver || true pkill -e -9 monetdbd || true while pgrep -f monetdbd; do sleep 1 done sudo umount "$FARM" || true rm -rf "$FARM" mkdir -p "$FARM" sudo mount -t tmpfs -o nr_inodes=$NUM_INODE,size=10G tmpfs "$FARM" monetdbd create "$FARM" monetdbd start "$FARM" while ! pgrep -f monetdbd; do sleep 1 done monetdb create nova monetdb release nova mclient nova -s "create schema sact;" 2> /dev/null || true } init_farm mserver_pid=$(pidof mserver5) rm -rf "$FARM/filler" mkdir "$FARM/filler" for (( i = 0; i < $((NUM_INODE - 10000)); i++ )); do echo "" > "$FARM/filler/$i" done line="9GJ3152\t1467287703373954\t1467287703759937\t3\t3\t10\t<NULL>\t62438190489824\t116350668306\t3\t0\t3232238295\t<NULL>\t3223098188\t<NULL>\t<NULL>\t<NULL>\t55460\t443\t0\t0\t0\t0\t52\t52\t<NULL>\t46\tEthernet/IPv4/TCP\t21ae5e54-637e-405f-99f5-41b93d9d769a\t258\t132\t4\t2\t0\t0\t1\t1\t0\t0\t0\t0\t0\t1\t1\t0\t0\t0\t1\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t1\t274\t75076\t1\t150529\t22658979841\t0\t0\t0\t0\t0\t0\t0\t0\t0\t1\t605119\t366169004161\t<NULL>\n" rm -f /tmp/data for (( i = 0; i < 10; i++ )); do echo -e -n $line >> /tmp/data done create_query="" for (( i = 0; i < 10000; i++ )); do table="sact.test_$i" create_query="$create_query CREATE TABLE $table (toto1 TEXT, toto2 BIGINT, toto3 BIGINT, toto4 SMALLINT, toto5 SMALLINT, toto6 INT, toto7 INT, toto8 BIGINT, toto9 BIGINT, toto10 INT, toto11 INT, toto12 BIGINT, toto13 HUGEINT, toto14 BIGINT, toto15 HUGEINT, toto16 BIGINT, toto17 HUGEINT, toto18 INT, toto19 INT, toto20 SMALLINT, toto21 SMALLINT, toto22 SMALLINT, toto23 SMALLINT, toto24 INT, toto25 INT, toto26 TEXT, toto27 INT, toto28 TEXT, toto29 UUID, toto30 BIGINT, toto31 BIGINT, toto32 BIGINT, toto33 BIGINT, toto34 BIGINT, toto35 BIGINT, toto36 BIGINT, toto37 BIGINT, toto38 BIGINT, toto39 BIGINT, toto40 BIGINT, toto41 BIGINT, toto42 BIGINT, toto43 BIGINT, toto44 BIGINT, toto45 BIGINT, toto46 BIGINT, toto47 BIGINT, toto48 BIGINT, toto49 BIGINT, toto50 BIGINT, toto51 INT, toto52 INT, toto53 BIGINT, toto54 BIGINT, toto55 HUGEINT, toto56 BIGINT, toto57 BIGINT, toto58 HUGEINT, toto59 BIGINT, toto60 BIGINT, toto61 HUGEINT, toto62 BIGINT, toto63 BIGINT, toto64 HUGEINT, toto65 BIGINT, toto66 BIGINT, toto67 HUGEINT, toto68 BIGINT, toto69 BIGINT, toto70 HUGEINT, toto71 BIGINT, toto72 BIGINT, toto73 HUGEINT, toto74 BIGINT, toto75 BIGINT, toto76 HUGEINT, toto77 UUID);" create_query="$create_query COPY INTO $table FROM '/tmp/data' DELIMITERS '\t','\n','\"' NULL AS '<NULL>';" if [[ $mserver_pid != $(pidof mserver5) ]]; then echo "Got a crash" exit 1 fi if [[ $((i % 4)) == 0 ]]; then echo "Launching create at $i" mclient nova -s "$create_query" > /dev/null create_query="" fi done ------------------------- 2. Once the script exit on commit failure, a launch of mclient nova will corrupt the database. ## Comment 22314 Date: 2016-08-19 17:14:40 +0200 From: @njnes seems fixed in the jun2016 version. Could you verify ## Comment 22328 Date: 2016-08-29 14:30:22 +0200 From: Frédéric Jolliton &lt;<frederic.jolliton+monetdb>&gt; I've reproduced the steps given by Anthonin, and the Jun2016 shows the same behavior, i.e. the database no longer starts and the log contains: 2016-08-29 12:27:23 MSG merovingian[18388]: database 'nova' (21357) has exited with exit status 1 2016-08-29 12:27:23 ERR control[18388]: !monetdbd: an internal error has occurred 'database 'nova' appears to shut itself down after starting, check monetdbd's logfile for possible hints' The compiled version: MonetDB 5 server v11.23.8 (64-bit, 64-bit oids, 128-bit integers) This is an unreleased version Copyright (c) 1993-July 2008 CWI Copyright (c) August 2008-2016 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.39 2016-06-14 (compiled with 8.38) openssl: OpenSSL 1.0.2h 3 May 2016 (compiled with OpenSSL 1.0.2h 3 May 2016) libxml2: 2.9.4 (compiled with 2.9.4) Compiled by: fjolliton@localhost (x86_64-pc-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 22334 Date: 2016-08-29 15:16:03 +0200 From: Frédéric Jolliton &lt;<frederic.jolliton+monetdb>&gt; Changing version. ## Comment 24623 Date: 2016-10-25 15:13:45 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [2c63e1fc405d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2c63e1fc405d) 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=2c63e1fc405d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=2c63e1fc405d) Changeset description: We need an extra logical reference to the catalog bats. This should fix bug #4050. ## Comment 24625 Date: 2016-10-25 15:16:35 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; *** Bug #3988 has been marked as a duplicate of this bug. *** ## Comment 24626 Date: 2016-10-25 15:26:59 +0200 From: @sjoerdmullender I (hopefully) fixed this bug in the Jun2016 branch. Can you test? ## Comment 24763 Date: 2016-12-08 10:18:40 +0100 From: @sjoerdmullender I'm assuming this was fixed.
Database corruption when running low on inode
https://api.github.com/repos/MonetDB/MonetDB/issues/4050/comments
0
2020-11-30T13:35:45Z
2024-06-27T12:38:19Z
https://github.com/MonetDB/MonetDB/issues/4050
753,484,319
4,050
[ "MonetDB", "MonetDB" ]
Date: 2016-08-02 07:10:35 +0200 From: Roman &lt;<kislenok.roman>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.23.7 (Jun2016-SP1) CC: @njnes Last updated: 2016-10-13 10:04:32 +0200 ## Comment 22276 Date: 2016-08-02 07:10:35 +0200 From: Roman &lt;<kislenok.roman>&gt; User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.63 Safari/537.36 Build Identifier: Just updated to new release and catch a bug within a query with "OR". Reproducible: Always ### Steps to Reproduce: 1. create table test1 (a int, b int, d int); 2. create table test_dic1 (a int, c int); 3. insert into test_dic1 values (1, 1), (1, 2); 4. insert into test1 values (1, 2, 1), (1, 3, 2), (2, 2, 1), (2, 3, 2) 5. select dd.* from test_dic1 as dd inner join test1 as d1 on d1.a = dd.a and d1.d = 1 left join test1 as d2 on d2.a = dd.a and d2.d = 2 where dd.c = 1 Get 1 row as expected 6. select dd.* from test_dic1 as dd inner join test1 as d1 on d1.a = dd.a and d1.d = 1 left join test1 as d2 on d2.a = dd.a and d2.d = 2 where dd.c = 1 or dd.c = 3 Got 2 rows! But there are no dd.c = 3 ### Actual Results: 2 rows ### Expected Results: 1 row ## Comment 22277 Date: 2016-08-02 07:22:36 +0200 From: Roman &lt;<kislenok.roman>&gt; If I replace "left join" with "inner join" the result would be ok: "select * from test_dic1 as dd inner join test1 as d1 on d1.a = dd.a and d1.d = 1 inner join test1 as d2 on d2.a = dd.a and d2.d = 2 where dd.c = 1 or dd.c = 3" prodeces 1 row. But: "select * from test_dic1 as dd inner join test1 as d1 on d1.a = dd.a and d1.d = 1 left join test1 as d2 on d2.a = dd.a and d2.d = 2 where dd.c in (1, 3)" also produces 1 expected row ## Comment 22278 Date: 2016-08-02 07:57:21 +0200 From: Roman &lt;<kislenok.roman>&gt; Actualy by some Mumbo-Jumbo you could get expected results: "select * from test_dic1 as dd inner join test1 as d1 on d1.a = dd.a left join test1 as d2 on d2.a = dd.a and d2.d = 2 where dd.c = 1 or dd.c = 3 and d1.d = 1 and (((dd.c = 1 or dd.c = 3) and d2.d is null) or ((dd.c = 1 or dd.c = 3) and d2.d = 2))" ## Comment 22290 Date: 2016-08-11 12:50:39 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [16c01c543cab](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=16c01c543cab) 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=16c01c543cab](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=16c01c543cab) Changeset description: Add test innerjoin-leftjoin-or.Bug-4049 ## Comment 22293 Date: 2016-08-11 21:29:22 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [0d2c55c221c2](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0d2c55c221c2) 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=0d2c55c221c2](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=0d2c55c221c2) Changeset description: fixed leftjoin problem / bug #4049 ## Comment 22294 Date: 2016-08-11 21:30:03 +0200 From: @njnes fixed by marking the end of the outerjoin properly ## Comment 24499 Date: 2016-10-13 10:04:32 +0200 From: @sjoerdmullender Jun2016-SP2 has been released.
Wrong results for queries with "OR" and "LEFT JOIN"
https://api.github.com/repos/MonetDB/MonetDB/issues/4049/comments
0
2020-11-30T13:35:42Z
2024-06-27T12:38:18Z
https://github.com/MonetDB/MonetDB/issues/4049
753,484,289
4,049
[ "MonetDB", "MonetDB" ]
Date: 2016-08-01 15:24:06 +0200 From: anthonin.bonnefoy To: SQL devs &lt;<bugs-sql>&gt; Version: 11.23.7 (Jun2016-SP1) CC: frederic.jolliton+monetdb, @njnes, richard.monetdb, @yzchang Last updated: 2017-01-26 14:56:27 +0100 ## Comment 22275 Date: 2016-08-01 15:24:06 +0200 From: anthonin.bonnefoy User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0 Build Identifier: Calling vacuum with to segfault and even corrupt database (depending on which table is vacuumed) Reproducible: Always ### Steps to Reproduce: Launch the given script: ------------------- !/bin/bash set -e mclient nova -s "create schema sact;" 2> /dev/null || true line="9GJ3152\t1467287703373954\t1467287703759937\t3\t3\t10\t<NULL>\t62438190489824\t116350668306\t3\t0\t3232238295\t<NULL>\t3223098188\t<NULL>\t<NULL>\t<NULL>\t55460\t443\t0\t0\t0\t0\t52\t52\t<NULL>\t46\tEthernet/IPv4/TCP\t21ae5e54-637e-405f-99f5-41b93d9d769a\t258\t132\t4\t2\t0\t0\t1\t1\t0\t0\t0\t0\t0\t1\t1\t0\t0\t0\t1\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t1\t274\t75076\t1\t150529\t22658979841\t0\t0\t0\t0\t0\t0\t0\t0\t0\t1\t605119\t366169004161\t<NULL>\n" rm -f /tmp/data for (( i = 0; i < 10; i++ )); do echo -e -n $line >> /tmp/data done function drop_tables() { echo "Launch drop of tables" tables=$(mclient nova -f csv -s "select name from _tables where schema_id > 5000 ;") drop_query="" local i=0 for table in $tables ; do drop_query="$drop_query drop table sact.$table;" i=$((i + 1)) if [[ $i == 25 ]]; then break fi done mclient nova -a -s "$drop_query; commit; rollback;" > /dev/null } function update_tables() { echo "Launch update" tables=$(mclient nova -f csv -s "select name from _tables where schema_id > 5000 order by id desc;") local i=0 for table in $tables ; do mclient nova -s "update sact.$table set toto1 = 'C8CCF6D5-A7B7-449E-911E-5D9082D73640' where toto1 = '9GJ3152';" > /dev/null if [[ $i == 10 ]]; then break fi i=$((i + 1)) done echo "Update finished" } drop_tables for (( i = 0; i < 10000; i++ )); do table="sact.test_$i" create_query="$create_query CREATE TABLE $table (toto1 TEXT, toto2 BIGINT, toto3 BIGINT, toto4 SMALLINT, toto5 SMALLINT, toto6 INT, toto7 INT, toto8 BIGINT, toto9 BIGINT, toto10 INT, toto11 INT, toto12 BIGINT, toto13 HUGEINT, toto14 BIGINT, toto15 HUGEINT, toto16 BIGINT, toto17 HUGEINT, toto18 INT, toto19 INT, toto20 SMALLINT, toto21 SMALLINT, toto22 SMALLINT, toto23 SMALLINT, toto24 INT, toto25 INT, toto26 TEXT, toto27 INT, toto28 TEXT, toto29 UUID, toto30 BIGINT, toto31 BIGINT, toto32 BIGINT, toto33 BIGINT, toto34 BIGINT, toto35 BIGINT, toto36 BIGINT, toto37 BIGINT, toto38 BIGINT, toto39 BIGINT, toto40 BIGINT, toto41 BIGINT, toto42 BIGINT, toto43 BIGINT, toto44 BIGINT, toto45 BIGINT, toto46 BIGINT, toto47 BIGINT, toto48 BIGINT, toto49 BIGINT, toto50 BIGINT, toto51 INT, toto52 INT, toto53 BIGINT, toto54 BIGINT, toto55 HUGEINT, toto56 BIGINT, toto57 BIGINT, toto58 HUGEINT, toto59 BIGINT, toto60 BIGINT, toto61 HUGEINT, toto62 BIGINT, toto63 BIGINT, toto64 HUGEINT, toto65 BIGINT, toto66 BIGINT, toto67 HUGEINT, toto68 BIGINT, toto69 BIGINT, toto70 HUGEINT, toto71 BIGINT, toto72 BIGINT, toto73 HUGEINT, toto74 BIGINT, toto75 BIGINT, toto76 HUGEINT, toto77 UUID);" create_query="$create_query COPY INTO $table FROM '/tmp/data' DELIMITERS '\t','\n','\"' NULL AS '<NULL>';" if [[ $((i % 4)) == 0 ]]; then echo "Launching create at $i" mclient nova -a -s "$create_query; commit; rollback;" > /dev/null create_query="" fi if [[ $((i % 10)) == 0 ]]; then update_tables & fi if [[ $((i % 20)) == 0 ]]; then drop_tables fi if [[ $((i % 30)) == 0 ]]; then mclient nova -s "call sys.vacuum('sys', '_tables');" 2> /dev/null || true mclient nova -s "call sys.vacuum('sys', '_columns');" 2> /dev/null || true fi done ------------------- ### Actual Results: With only _columns vacuumed, i had a double free occurring: 0 0x00007fa9248ad067 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 1 0x00007fa9248ae448 in __GI_abort () at abort.c:89 2 0x00007fa9248eb1b4 in __libc_message (do_abort=do_abort@entry=1, fmt=fmt@entry=0x7fa9249e0530 "*** Error in `%s': %s: 0x%s ***\n") at ../sysdeps/posix/libc_fatal.c:175 3 0x00007fa9248f098e in malloc_printerr (action=1, str=0x7fa9249e0638 "double free or corruption (!prev)", ptr=<optimized out>) at malloc.c:4996 4 0x00007fa9248f1696 in _int_free (av=<optimized out>, p=<optimized out>, have_lock=0) at malloc.c:3840 5 0x00007fa926082860 in GDKfree (blk=0x7fa904497980) at gdk_utils.c:748 6 0x00007fa9260194b9 in HEAPfree (h=0x7fa9044fb7a8, remove=1) at gdk_heap.c:564 7 0x00007fa9261196f7 in BATdelete (b=0x7fa9044fb680) at gdk_storage.c:963 8 0x00007fa926011ca0 in BBPdestroy (b=0x7fa9044fb680) at gdk_bbp.c:2637 9 0x00007fa92600faed in decref (i=9647, logical=1, releaseShare=0, lock=1) at gdk_bbp.c:2381 10 0x00007fa92600fcc2 in BBPdecref (i=9647, logical=1) at gdk_bbp.c:2412 11 0x00007fa91f7e059a in vacuum (cntxt=0x7fa91fdd0330, mb=0x7fa9046d5690, stk=0x7fa904248e00, pci=0x7fa9042d6c10, func=0x7fa9267251dd <BKCreuseBAT>, name=0x7fa91f939488 "sql.reuse") at sql.c:4549 12 0x00007fa91f7e0692 in SQLreuse (cntxt=0x7fa91fdd0330, mb=0x7fa9046d5690, stk=0x7fa904248e00, pci=0x7fa9042d6c10) at sql.c:4564 13 0x00007fa91f7e0aaf in SQLvacuum (cntxt=0x7fa91fdd0330, mb=0x7fa9046d5690, stk=0x7fa904248e00, pci=0x7fa9042d6c10) at sql.c:4629 14 0x00007fa9266a57eb in runMALsequence (cntxt=0x7fa91fdd0330, mb=0x7fa9046d5690, startpc=1, stoppc=0, stk=0x7fa904248e00, env=0x0, pcicaller=0x0) at mal_interpreter.c:631 15 0x00007fa9266a4c8b in callMAL (cntxt=0x7fa91fdd0330, mb=0x7fa9046d5690, env=0x7fa91de6cae8, argv=0x7fa91de6cb40, debug=0 '\000') at mal_interpreter.c:447 16 0x00007fa91f7ea8fe in SQLexecutePrepared (c=0x7fa91fdd0330, be=0x7fa9041805b0, q=0x7fa9042c7f80) at sql_execute.c:328 17 0x00007fa91f7ead54 in SQLengineIntern (c=0x7fa91fdd0330, be=0x7fa9041805b0) at sql_execute.c:390 18 0x00007fa91f7e98f6 in SQLengine (c=0x7fa91fdd0330) at sql_scenario.c:1323 19 0x00007fa9266c63b6 in runPhase (c=0x7fa91fdd0330, phase=4) at mal_scenario.c:515 20 0x00007fa9266c6594 in runScenarioBody (c=0x7fa91fdd0330) at mal_scenario.c:559 21 0x00007fa9266c66a4 in runScenario (c=0x7fa91fdd0330) at mal_scenario.c:579 22 0x00007fa9266c777a in MSserveClient (dummy=0x7fa91fdd0330) at mal_session.c:439 23 0x00007fa9266c72e9 in MSscheduleClient (command=0x7fa90426d850 "", challenge=0x7fa91de6ce70 "0FK6fYQkzIq", fin=0x7fa904282c30, fout=0x7fa904922810) at mal_session.c:319 24 0x00007fa926784f52 in doChallenge (data=0x7fa9100008d0) at mal_mapi.c:184 25 0x00007fa92613ce85 in thread_starter (arg=0x7fa910000d20) at gdk_system.c:459 26 0x00007fa924c2b0a4 in start_thread (arg=0x7fa91de6d700) at pthread_create.c:309 27 0x00007fa92496087d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111 With only _tables vacuumed, i have the segfault from 4047 0 0x00007f2d28983498 in count_col (tr=0x23bf3b0, c=0x7f2cf528a2d0, all=1) at bat_storage.c:826 1 0x00007f2d2887e57b in SQLgetStatistics (cntxt=0x7f2d28e3a640, m=0x7f2cf8d46490, mb=0x7f2cf8a72f70) at sql_optimizer.c:168 2 0x00007f2d2887eabd in addOptimizers (c=0x7f2d28e3a640, mb=0x7f2cf8a72f70, pipe=0x7f2cf8192eb0 "default_pipe") at sql_optimizer.c:251 3 0x00007f2d2887ec78 in addQueryToCache (c=0x7f2d28e3a640) at sql_optimizer.c:293 4 0x00007f2d2887ccff in backend_dumpproc (be=0x7f2cf93dde20, c=0x7f2d28e3a640, cq=0x7f2cf8e53e10, s=0x7f2cf8a5b060) at sql_gencode.c:2815 5 0x00007f2d2884d2fa in SQLparser (c=0x7f2d28e3a640) at sql_scenario.c:1216 6 0x00007f2d2f72a3b6 in runPhase (c=0x7f2d28e3a640, phase=1) at mal_scenario.c:515 7 0x00007f2d2f72a501 in runScenarioBody (c=0x7f2d28e3a640) at mal_scenario.c:550 8 0x00007f2d2f72a6a4 in runScenario (c=0x7f2d28e3a640) at mal_scenario.c:579 9 0x00007f2d2f72b77a in MSserveClient (dummy=0x7f2d28e3a640) at mal_session.c:439 10 0x00007f2d2f72b2e9 in MSscheduleClient (command=0x7f2cf817cfd0 "", challenge=0x7f2d26ed0e70 "cF8qOyXd", fin=0x7f2cf8a7ce10, fout=0x7f2cf90554b0) at mal_session.c:319 11 0x00007f2d2f7e8f52 in doChallenge (data=0x7f2d18000a60) at mal_mapi.c:184 12 0x00007f2d2f1a0e85 in thread_starter (arg=0x7f2d18000d50) at gdk_system.c:459 13 0x00007f2d2dc8f0a4 in start_thread (arg=0x7f2d26ed1700) at pthread_create.c:309 14 0x00007f2d2d9c487d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111 And mclient will crash with the given message CREATE FILTER FUNCTION: name 'like' (clob, clob, clob) already in use ParseException:SQLparser:CREATE FILTER FUNCTION: name 'like' (clob, clob, clob) already in use CREATE FILTER FUNCTION: name 'like' (clob, clob, clob) already in use ParseException:SQLparser:CREATE FILTER FUNCTION: name 'like' (clob, clob, clob) already in use When inspecting manually sys._tables name content, i find: sys._tables name Tail: 06/655.tail -------------------------- h t name void str type -------------------------- [ 0@0, "schemas" ] [ 1@0, "types" ] [ 2@0, "functions" ] [ 3@0, "args" ] [ 4@0, "sequences" ] [ 5@0, "dependencies" ] [ 6@0, "connections" ] [ 7@0, "_tables" ] [ 8@0, "_columns" ] [ 9@0, "keys" ] [ 10@0, "idxs" ] [ 11@0, "triggers" ] [ 12@0, "objects" ] [ 13@0, "_tables" ] [ 14@0, "_columns" ] [ 15@0, "keys" ] [ 16@0, "idxs" ] [ 17@0, "triggers" ] [ 18@0, "objects" ] [ 19@0, "tables" ] [ 20@0, "columns" ] [ 21@0, "db_user_info" ] [ 22@0, "users" ] [ 23@0, "user_role" ] [ 24@0, "auths" ] [ 25@0, "privileges" ] [ 26@0, "querylog_catalog" ] [ 27@0, "querylog_calls" ] [ 28@0, "querylog_history" ] [ 29@0, "tracelog" ] [ 30@0, "sessions" ] [ 31@0, "optimizers" ] [ 32@0, "environment" ] [ 33@0, "queue" ] [ 34@0, "rejects" ] [ 35@0, "keywords" ] [ 36@0, "table_types" ] [ 37@0, "dependency_types" ] [ 38@0, "storage" ] [ 39@0, "storagemodelinput" ] [ 40@0, "test_568" ] [ 41@0, "test_567" ] [ 42@0, "test_566" ] [ 43@0, "test_565" ] [ 44@0, "test_564" ] Tables storagemodel, tablestoragemodel, statistics and systemfunctions are missing. ## Comment 22313 Date: 2016-08-19 17:02:06 +0200 From: @njnes Is this also the case on Jun2016 ## Comment 22329 Date: 2016-08-29 14:48:39 +0200 From: Frédéric Jolliton &lt;<frederic.jolliton+monetdb>&gt; Jun2016 shows the exact same stacktrace, pretty quickly, using the script. The tested version: MonetDB 5 server v11.23.8 (64-bit, 64-bit oids, 128-bit integers) This is an unreleased version Copyright (c) 1993-July 2008 CWI Copyright (c) August 2008-2016 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.39 2016-06-14 (compiled with 8.39) openssl: OpenSSL 1.0.2h 3 May 2016 (compiled with OpenSSL 1.0.2h 3 May 2016) libxml2: 2.9.4 (compiled with 2.9.4) Compiled by: fjolliton@localhost (x86_64-pc-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 22335 Date: 2016-08-29 15:16:29 +0200 From: Frédéric Jolliton &lt;<frederic.jolliton+monetdb>&gt; Changing version. ## Comment 24811 Date: 2016-12-18 21:04:40 +0100 From: @njnes we now disallow vacuum on system tables. The vacuum function isn't safe enough for these tables. A better vacuum solution for the system tables is needed. ## Comment 24813 Date: 2016-12-19 12:26:24 +0100 From: Richard Hughes &lt;<richard.monetdb>&gt; Did [4e604f0989bc](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4e604f0989bc) introduce a new bug? If ordered and 0 < BATcount(del) <= cnt/20 then BBPunfix(del->batCacheid) will get called twice. Is this a double-free or is there some other protection in place that I don't know about? [This is from reading the patch - I haven't tried executing it]. ## Comment 24814 Date: 2016-12-19 12:43:54 +0100 From: @sjoerdmullender (In reply to Richard Hughes from comment 5) > Did [4e604f0989bc](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4e604f0989bc) introduce a new bug? > > If ordered and 0 < BATcount(del) <= cnt/20 then BBPunfix(del->batCacheid) > will get called twice. Is this a double-free or is there some other > protection in place that I don't know about? > > [This is from reading the patch - I haven't tried executing it]. Looks like you're right. And also del is dereferenced after the unfix. ## Comment 24838 Date: 2016-12-20 10:59:39 +0100 From: @yzchang (In reply to Sjoerd Mullender from comment 6) > (In reply to Richard Hughes from comment 5) > > Did [4e604f0989bc](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4e604f0989bc) introduce a new bug? > > > > If ordered and 0 < BATcount(del) <= cnt/20 then BBPunfix(del->batCacheid) > > will get called twice. Is this a double-free or is there some other > > protection in place that I don't know about? > > > > [This is from reading the patch - I haven't tried executing it]. > > Looks like you're right. And also del is dereferenced after the unfix. Just to keep the record, this is fixed in Changeset: [9931514f6477](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9931514f6477) (In reply to the original bug report) One problem with the current vacuum function, is that after vacuuming, it doesn't update the foreign keys accordingly. So, it's a particularly dangerous action to apply vacuum on the system tables. With Changeset: [8f3ba20b071e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8f3ba20b071e) we now automatically vacuum the SQL catalogue tables in the background, when the DB is idle. ## Comment 24916 Date: 2017-01-26 14:56:27 +0100 From: @kutsurak Fixed in version Dec2016-SP1.
Segfault on vacuum with parallel updates
https://api.github.com/repos/MonetDB/MonetDB/issues/4048/comments
0
2020-11-30T13:35:40Z
2024-06-27T12:38:17Z
https://github.com/MonetDB/MonetDB/issues/4048
753,484,248
4,048
[ "MonetDB", "MonetDB" ]
Date: 2016-08-01 14:20:17 +0200 From: anthonin.bonnefoy To: SQL devs &lt;<bugs-sql>&gt; Version: 11.23.7 (Jun2016-SP1) CC: frederic.jolliton+monetdb, @njnes Last updated: 2016-12-21 13:07:38 +0100 ## Comment 22272 Date: 2016-08-01 14:20:17 +0200 From: anthonin.bonnefoy User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0 Build Identifier: On parallel drop and update of tables, a segfault can occur with the given traceback 0 0x00007ffa546934b8 in count_col (tr=0x1ee7330, c=0xf7db730, all=1) at bat_storage.c:826 1 0x00007ffa5458e59b in SQLgetStatistics (cntxt=0x20cc320, m=0xf7eac10, mb=0x3989c10) at sql_optimizer.c:168 2 0x00007ffa5458eadd in addOptimizers (c=0x20cc320, mb=0x3989c10, pipe=0xecfd930 "default_pipe") at sql_optimizer.c:251 3 0x00007ffa5458ec98 in addQueryToCache (c=0x20cc320) at sql_optimizer.c:293 4 0x00007ffa5458cd1f in backend_dumpproc (be=0x8a69190, c=0x20cc320, cq=0x4434390, s=0xbf35940) at sql_gencode.c:2815 5 0x00007ffa5455d31a in SQLparser (c=0x20cc320) at sql_scenario.c:1216 6 0x00007ffa5b9e33d6 in runPhase (c=0x20cc320, phase=1) at mal_scenario.c:515 7 0x00007ffa5b9e3521 in runScenarioBody (c=0x20cc320) at mal_scenario.c:550 8 0x00007ffa5b9e36c4 in runScenario (c=0x20cc320) at mal_scenario.c:579 9 0x00007ffa5b9e479a in MSserveClient (dummy=0x20cc320) at mal_session.c:439 10 0x00007ffa5b9e4309 in MSscheduleClient (command=0xf7eac10 "", challenge=0x7ffa52ee1e30 "LBlKWgIa", fin=0x43f3080, fout=0x1ee7a70) at mal_session.c:319 11 0x00007ffa5baa1f72 in doChallenge (data=0x43f3090) at mal_mapi.c:184 12 0x00007ffa5b459ea5 in thread_starter (arg=0xcfa3f00) at gdk_system.c:459 13 0x00007ffa59f480a4 in start_thread (arg=0x7ffa52ee2700) at pthread_create.c:309 14 0x00007ffa59c7d87d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111 Reproducible: Always ### Steps to Reproduce: Start a database (preferably on a tmpfs) Launch the given script: ---------------- !/bin/bash set -e mclient nova -s "create schema sact;" 2> /dev/null || true mserver_pid=$(pidof mserver5) line="9GJ3152\t1467287703373954\n1467287703759937\t3\t3\t10\t<NULL>\t62438190489824\t116350668306\t3\t0\t3232238295\t<NULL>\t3223098188\t<NULL>\t<NULL>\t<NULL>\t55460\t443\t0\t0\t0\t0\t52\t52\t<NULL>\t46\tEthernet/IPv4/TCP\t21ae5e54-637e-405f-99f5-41b93d9d769a\t258\t132\t4\t2\t0\t0\t1\t1\t0\t0\t0\t0\t0\t1\t1\t0\t0\t0\t1\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t1\t274\t75076\t1\t150529\t22658979841\t0\t0\t0\t0\t0\t0\t0\t0\t0\t1\t605119\t366169004161\t<NULL>\n" rm -f /tmp/data for (( i = 0; i < 10; i++ )); do echo -e -n $line >> /tmp/data done function drop_tables() { echo "Launch drop of tables" tables=$(mclient nova -f csv -s "select name from _tables where schema_id > 5000 ;") drop_query="" local i=0 for table in $tables ; do drop_query="$drop_query drop table sact.$table;" i=$((i + 1)) if [[ $i == 25 ]]; then break fi done mclient nova -a -s "$drop_query; commit; rollback;" > /dev/null } function update_tables() { echo "Launch update" tables=$(mclient nova -f csv -s "select name from _tables where schema_id > 5000 order by id desc;") local i=0 for table in $tables ; do mclient nova -s "update sact.$table set toto1 = 'C8CCF6D5-A7B7-449E-911E-5D9082D73640' where toto1 = '9GJ3152';" > /dev/null if [[ $i == 10 ]]; then break fi i=$((i + 1)) done echo "Update finished" } drop_tables for (( i = 0; i < 10000; i++ )); do table="sact.test_$i" create_query="$create_query CREATE TABLE $table (toto1 TEXT, toto2 BIGINT, toto3 BIGINT, toto4 SMALLINT, toto5 SMALLINT, toto6 INT, toto7 INT, toto8 BIGINT, toto9 BIGINT, toto10 INT, toto11 INT, toto12 BIGINT, toto13 HUGEINT, toto14 BIGINT, toto15 HUGEINT, toto16 BIGINT, toto17 HUGEINT, toto18 INT, toto19 INT, toto20 SMALLINT, toto21 SMALLINT, toto22 SMALLINT, toto23 SMALLINT, toto24 INT, toto25 INT, toto26 TEXT, toto27 INT, toto28 TEXT, toto29 UUID, toto30 BIGINT, toto31 BIGINT, toto32 BIGINT, toto33 BIGINT, toto34 BIGINT, toto35 BIGINT, toto36 BIGINT, toto37 BIGINT, toto38 BIGINT, toto39 BIGINT, toto40 BIGINT, toto41 BIGINT, toto42 BIGINT, toto43 BIGINT, toto44 BIGINT, toto45 BIGINT, toto46 BIGINT, toto47 BIGINT, toto48 BIGINT, toto49 BIGINT, toto50 BIGINT, toto51 INT, toto52 INT, toto53 BIGINT, toto54 BIGINT, toto55 HUGEINT, toto56 BIGINT, toto57 BIGINT, toto58 HUGEINT, toto59 BIGINT, toto60 BIGINT, toto61 HUGEINT, toto62 BIGINT, toto63 BIGINT, toto64 HUGEINT, toto65 BIGINT, toto66 BIGINT, toto67 HUGEINT, toto68 BIGINT, toto69 BIGINT, toto70 HUGEINT, toto71 BIGINT, toto72 BIGINT, toto73 HUGEINT, toto74 BIGINT, toto75 BIGINT, toto76 HUGEINT, toto77 UUID);" create_query="$create_query COPY INTO $table FROM '/home/sora/notes/monet/schema_absent/reproduce/lite_tcp_v29.csv' DELIMITERS '\t','\n','\"' NULL AS '<NULL>';" if [[ $mserver_pid != $(pidof mserver5) ]]; then echo "Got a crash" exit 1 fi if [[ $((i % 4)) == 0 ]]; then echo "Launching create at $i" mclient nova -a -s "$create_query; commit; rollback;" > /dev/null create_query="" fi if [[ $((i % 10)) == 0 ]]; then update_tables & fi if [[ $((i % 20)) == 0 ]]; then drop_tables fi done ---------------- ### Actual Results: I usually get the segfault near test_600 table creation. ## Comment 22273 Date: 2016-08-01 14:22:51 +0200 From: anthonin.bonnefoy Can't edit comment, the 'COPY INTO' in the script should be: create_query="$create_query COPY INTO $table FROM '/tmp/data' DELIMITERS '\t','\n','\"' NULL AS '<NULL>';" ## Comment 22274 Date: 2016-08-01 14:40:10 +0200 From: anthonin.bonnefoy And line="9GJ3152\t1467287703373954\n1467287703759937... should be line="9GJ3152\t1467287703373954\t1467287703759937... ## Comment 22312 Date: 2016-08-19 17:01:15 +0200 From: @njnes is this still the case on Jun2016? ## Comment 22332 Date: 2016-08-29 15:14:30 +0200 From: Frédéric Jolliton &lt;<frederic.jolliton+monetdb>&gt; Running the provided script, with the two changes indicated by Anthonin, we see that the Jun2016 version also crashes with a SIGSEGV at some point, at the exact same place (in count_col). The version tested: MonetDB 5 server v11.23.8 (64-bit, 64-bit oids, 128-bit integers) This is an unreleased version Copyright (c) 1993-July 2008 CWI Copyright (c) August 2008-2016 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.39 2016-06-14 (compiled with 8.39) openssl: OpenSSL 1.0.2h 3 May 2016 (compiled with OpenSSL 1.0.2h 3 May 2016) libxml2: 2.9.4 (compiled with 2.9.4) Compiled by: fjolliton@localhost (x86_64-pc-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 22333 Date: 2016-08-29 15:15:20 +0200 From: Frédéric Jolliton &lt;<frederic.jolliton+monetdb>&gt; Changing version. ## Comment 22359 Date: 2016-09-08 08:12:00 +0200 From: @njnes on both the jun branch and jun sp1 I had a successfull run of 10K creates. They both use about 12G of memory. The bigger difference is in the used virtual memory, the branch is down to 15G, while sp1 take 45G. This was run on 2 16G machines. ## Comment 22363 Date: 2016-09-12 20:06:17 +0200 From: @njnes also with the mount -t tmfs I'm unable to reproduce the problem. We run on a plain fedora (24) system. ## Comment 22392 Date: 2016-09-29 12:57:40 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [975111071fcb](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=975111071fcb) 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=975111071fcb](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=975111071fcb) Changeset description: added test for bug #4047 ## Comment 24764 Date: 2016-12-08 10:48:40 +0100 From: @sjoerdmullender This was apparently fixed.
Segfault when updating a dropped table
https://api.github.com/repos/MonetDB/MonetDB/issues/4047/comments
0
2020-11-30T13:35:37Z
2024-06-27T12:38:16Z
https://github.com/MonetDB/MonetDB/issues/4047
753,484,215
4,047
[ "MonetDB", "MonetDB" ]
Date: 2016-07-31 05:56:33 +0200 From: desparanto To: SQL devs &lt;<bugs-sql>&gt; Version: 11.23.7 (Jun2016-SP1) CC: @njnes Last updated: 2016-10-22 16:50:03 +0200 ## Comment 22270 Date: 2016-07-31 05:56:33 +0200 From: desparanto User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0 Build Identifier: in the MonetDB docs there is a simple "AFTER UPDATE" trigger example: https://www.monetdb.org/Documentation/SQLreference/Triggers That one works, but I tried to change this to a BEFORE INSERT, and FOR EACH ROW: create the table: CREATE TABLE t1 (id INT, name VARCHAR(1024)); Insert some values: INSERT INTO t1 VALUES(10, 'monetdb'); INSERT INTO t1 VALUES(20, 'monet'); create the trigger: CREATE TRIGGER test5 BEFORE INSERT ON t1 FOR EACH ROW INSERT INTO t1 VALUES(4, 'update_when_statement_true'); Insert some stuff to check the trigger functionality: INSERT INTO t1 SELECT * FROM t1; Select some stuff to see what happened: SELECT * FROM t1; Results: +------+---------+ | id | name | +======+=========+ | 10 | monetdb | | 20 | monet | | 10 | monetdb | | 20 | monet | +------+---------+ So basically nothing happened that I can tell with the trigger. I have tried all kinds of things in the trigger like BEGIN ATOMIC...END, calling a procedure that inserts that row, using functions and nothing I find has worked. Reproducible: Always ### Steps to Reproduce: 1.CREATE TABLE t1 (id INT, name VARCHAR(1024)); 2.INSERT INTO t1 VALUES(10, 'monetdb'); 3.INSERT INTO t1 VALUES(20, 'monet'); 4. CREATE TRIGGER test5 BEFORE INSERT ON t1 FOR EACH ROW INSERT INTO t1 VALUES(4, 'update_when_statement_true'); 4.INSERT INTO t1 SELECT * FROM t1; 5. SELECT * FROM t1; 6. Results do not reflect a trigger activating results: ### Actual Results: +------+---------+ | id | name | +======+=========+ | 10 | monetdb | | 20 | monet | | 10 | monetdb | | 20 | monet | +------+---------+ ### Expected Results: +------+-------------------------------+ | id | name | +======+===============================+ | 10 | monetdb | | 20 | monet | | 10 | monetdb | | 20 | monet | | 4 | 'update_when_statement_true' | | 4 | 'update_when_statement_true' | +------+-------------------------------+ output of mserver5 --version: MonetDB 5 server v11.23.3 "Jun2016" (64-bit, 64-bit oids) Copyright (c) 1993-July 2008 CWI Copyright (c) August 2008-2016 MonetDB B.V., all rights reserved Visit http://www.monetdb.org/ for further information Found 9.9GiB available memory, 4 available cpu cores Libraries: libpcre: 8.37 2015-04-28 openssl: OpenSSL 1.0.2d 9 Jul 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 ## Comment 24579 Date: 2016-10-22 16:50:03 +0200 From: @njnes this trigger will cause an endless loop as the trigger triggers on an insert on t1 and it will insert again on t1.
Before Insert triggers not working
https://api.github.com/repos/MonetDB/MonetDB/issues/4046/comments
0
2020-11-30T13:35:35Z
2024-06-27T12:38:15Z
https://github.com/MonetDB/MonetDB/issues/4046
753,484,180
4,046
[ "MonetDB", "MonetDB" ]
Date: 2016-07-30 09:06:04 +0200 From: @mlkersten To: SQL devs &lt;<bugs-sql>&gt; Version: 11.17.13 (Jan2014-SP1) CC: @njnes Last updated: 2020-05-27 09:43:13 +0200 ## Comment 22268 Date: 2016-07-30 09:06:04 +0200 From: @mlkersten User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:47.0) Gecko/20100101 Firefox/47.0 Build Identifier: A test has been added for the failing trigger activation on bullk insert CREATE TABLE t111 (id INT, name VARCHAR(1024)); INSERT INTO t111 VALUES(10, 'monetdb'); INSERT INTO t111 VALUES(20, 'monet'); CREATE TRIGGER test5 BEFORE INSERT ON t111 FOR EACH ROW INSERT INTO t111 VALUES(4, 'update_when_statement_true'); INSERT INTO t111 SELECT * FROM t111; Reproducible: Always ## Comment 22269 Date: 2016-07-30 09:15:13 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [811f7bf559d4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=811f7bf559d4) made by Martin Kersten <mk@cwi.nl> in the MonetDB repo, refers to this bug. For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=811f7bf559d4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=811f7bf559d4) Changeset description: Trigger functionality bug test case for Bug #4045 ## Comment 24580 Date: 2016-10-22 16:51:45 +0200 From: @njnes this trigger will cause an endless loop... ## Comment 27733 Date: 2020-05-27 09:43:13 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [d701f4fbebea](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d701f4fbebea) 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=d701f4fbebea](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=https//devmonetdborg/hg/MonetDB?cmd=changeset;node=d701f4fbebea) Changeset description: Missing stack overflow checks (required for Bug #4045 test)
Trigger not fired under bulk insert
https://api.github.com/repos/MonetDB/MonetDB/issues/4045/comments
0
2020-11-30T13:35:33Z
2024-06-27T12:38:14Z
https://github.com/MonetDB/MonetDB/issues/4045
753,484,153
4,045
[ "MonetDB", "MonetDB" ]
Date: 2016-07-29 23:44:53 +0200 From: desparanto To: SQL devs &lt;<bugs-sql>&gt; Version: 11.23.7 (Jun2016-SP1) CC: @njnes Last updated: 2016-10-13 10:03:41 +0200 ## Comment 22267 Date: 2016-07-29 23:44:53 +0200 From: desparanto User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0.1 Waterfox/47.0.1 Build Identifier: when I do the following set of statements the server window closes and the client exits. sql>create table joe1 (id int); operation successful (72.127ms) sql>create table joe2 (id int); operation successful (57.130ms) sql>create merge table joe3 (id int); operation successful (93.939ms) sql>alter table joe3 add table joe1; operation successful (51.210ms) sql>alter table joe3 add table joe2; operation successful (41.280ms) sql>drop table joe1 cascade; Connection terminated during read line Press any key to continue . . . Reproducible: Always ### Steps to Reproduce: create table joe1 (id int); create table joe2 (id int); create merge table joe3 (id int); alter table joe3 add table joe1; alter table joe3 add table joe2; drop table joe1 cascade; ### Actual Results: server window closes and client exits with: Connection terminated during read line Press any key to continue . . . ### Expected Results: some error maybe that says dropping a table that is part of a merge table is bad - or maybe give an option to drop the table and not the merge table. MonetDB 5 server v11.23.3 "Jun2016" (64-bit, 64-bit oids) Copyright (c) 1993-July 2008 CWI Copyright (c) August 2008-2016 MonetDB B.V., all rights reserved Visit http://www.monetdb.org/ for further information Found 9.9GiB available memory, 4 available cpu cores Libraries: libpcre: 8.37 2015-04-28 openssl: OpenSSL 1.0.2d 9 Jul 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 ## Comment 22291 Date: 2016-08-11 18:39:27 +0200 From: @njnes this bug was fixed in the jun2016 version ## Comment 22295 Date: 2016-08-12 21:12:32 +0200 From: desparanto Perhapse there are two Jun2016 versions? I was using a version labled Jun2016. The original post had : "MonetDB 5 server v11.23.3 "Jun2016" (64-bit, 64-bit oids) Copyright (c) 1993-July 2008 CWI Copyright (c) August 2008-2016 MonetDB B.V., all rights reserved" In it which indicates the version. ## Comment 24487 Date: 2016-10-13 10:03:41 +0200 From: @sjoerdmullender Jun2016-SP2 has been released.
Server crash when trying to delete a table has been added to a merge table with "cascade" at the end
https://api.github.com/repos/MonetDB/MonetDB/issues/4044/comments
0
2020-11-30T13:35:31Z
2024-06-27T12:38:13Z
https://github.com/MonetDB/MonetDB/issues/4044
753,484,129
4,044
[ "MonetDB", "MonetDB" ]
Date: 2016-07-29 19:53:53 +0200 From: Gatis Ozolins &lt;<g.ozolins>&gt; To: clients devs &lt;<bugs-clients>&gt; Version: 11.23.7 (Jun2016-SP1) CC: martin.van.dinther Last updated: 2016-09-01 18:51:02 +0200 ## Comment 22265 Date: 2016-07-29 19:53:53 +0200 From: Gatis Ozolins &lt;<g.ozolins>&gt; If I execute query with mclient then it it finishes in ~1.1sec But with jdbc client it finishes in 2-3sec depending on which jdbc client is used. In querylog_calls it shows opposite: for mclient: run ship cpu io 1124810 4 59 0 for jdbc: run ship cpu io 684264 5 63 0 With jdbcclient.jar I didn't see this but with every other jdbc client I saw that MonetDatabaseMetaData getColumns is executed for every ResultSet column, even if it is aggregate or expression. This difference doesn't seem much, but with 26 queries. mclient finishes in 7sec, while jdbc finishes in 25sec. ## Comment 22280 Date: 2016-08-04 13:42:21 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; What "other jdbc client" are you using? It is known that generic SQL JDBC client programs (i.c. SQuirreL) do a lot of DatabaseMetaData calls, e.g. for each column of a table or resultset do a getColumns() to retrieve some specific resultcolumn meta data information. This is expensive as it generates many additional queries for each user SELECT query. As these are external (non-MonetDB) JDBC programs we cannot fix those. The JdbClient.jar query performance has been improved, see Bug #3711. Hence its performance is now more in line with mclient (which does not do metadata / data dictionary calls at all). JdbcClient.jar uses the JDBC API to communicate to mserver, so there is some overhead when compared to mclient. The performance problem is potentially not the JDBC driver but the JDBC program you are using. If it is the JDBC driver please tell us which method(s) and provide a small JDBC program to reproduce/show the problem. ## Comment 22283 Date: 2016-08-05 10:54:35 +0200 From: Gatis Ozolins &lt;<g.ozolins>&gt; Here are runtimes I get for 26 queries. JDBC is nowhere close to mclient. JDBC using jdbcclient.jar real 0m18.581s user 0m22.447s sys 0m2.577s mclient real 0m6.759s user 0m2.047s sys 0m0.288s My bash script: run_sql() { mclient -d DWH $1 > /dev/null && echo $f java -jar jdbcclient.jar -d DWH -f $1 > /dev/null && echo $f } for f in *.sql; do run_sql $f done querylog shows that same queries are executed - no additional queries for jdbcclient.jar As for JDBC programs which are requesting getColumns on resultset - DBeaver, DBVisualizer. ## Comment 22284 Date: 2016-08-05 11:12:15 +0200 From: @sjoerdmullender You're comparing the startup time of the Java interpreter with that of a small C program. You're not comparing the efficiency (or lack thereof) of the JDBC connection versus the C implementation. ## Comment 22285 Date: 2016-08-05 11:19:50 +0200 From: Gatis Ozolins &lt;<g.ozolins>&gt; Sorry. Here are time when I put all queries in one file: time java -jar jdbcclient.jar -d DWH -f all.sql > /dev/null real 0m7.915s user 0m6.720s sys 0m0.196s time mclient -d DWH all.sql > /dev/null real 0m5.946s user 0m1.867s sys 0m0.016s ## Comment 22350 Date: 2016-09-01 18:14:24 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [4f12e6815c2c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4f12e6815c2c) 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=4f12e6815c2c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=4f12e6815c2c) Changeset description: Improved fetching and output speed of JdbcClient program for query results. See also Bug #4043. Added also timing information for JdbcClient query results (like in mclient). ## Comment 22352 Date: 2016-09-01 18:51:02 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; Timings should be improved with the changeset. Please let us know if this improves your usage case. Note that mclient outputs query results data which contains newlines or many columns differently than JdbcClient. In mclient it uses a more optimal and readable formatting and limits the number of output columns to the available screen width. JdbcClient doesn't have this optimised formatting or truncation of output results and may add many additional spaces which leads to much more output data which takes longer to print to console, in comparison with mclient.
JDBC is much slower than mclient
https://api.github.com/repos/MonetDB/MonetDB/issues/4043/comments
0
2020-11-30T13:35:28Z
2024-06-27T12:38:12Z
https://github.com/MonetDB/MonetDB/issues/4043
753,484,096
4,043
[ "MonetDB", "MonetDB" ]
Date: 2016-07-27 19:02:33 +0200 From: l.beischer To: clients devs &lt;<bugs-clients>&gt; Version: 11.23.7 (Jun2016-SP1) Last updated: 2016-07-27 19:02:33 +0200 ## Comment 22264 Date: 2016-07-27 19:02:33 +0200 From: l.beischer User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36 Build Identifier: When trying to connect to the latest version of MonetDB programs that use the ODBC drivers to connect cannot find the server - even if running locally (i.e. localhost:50000) A default message that the ODBC driver cannot find the server specified is given. This problem crashes BOTH: Alteryx (10.6) and Tableau (9.3). However when connecting via dBVisualizer (via java driver) this worked as expected and queries execute. Un-installing all components of MonetDB and installing Jun2015-SP2 fixes the issue (connections can now be made). Reproducible: Always ### Steps to Reproduce: 1.Install Jun2016-SP1 MonetDB Server + Drivers (Geo doesn't have to be installed but also is part of issue) 2.Can create tables etc. but not necessary 3.Install Tableau/Alteryx if necessary 4.Connect via ODBC Drivers - either using MonetDB DSN (system-created) or via user-defined 5.Usually crashes Tableau/Alteryx but also gives the error that server cannot be found. ### Actual Results: Usually crashes Tableau/Alteryx but also gives the error that server cannot be found. ### Expected Results: Connected to the database and allowed queries of tables
Cannot connect to local or networked server with this version - Tableau/Alteryx - but can via earlier version
https://api.github.com/repos/MonetDB/MonetDB/issues/4042/comments
0
2020-11-30T13:35:26Z
2024-06-28T07:08:56Z
https://github.com/MonetDB/MonetDB/issues/4042
753,484,076
4,042
[ "MonetDB", "MonetDB" ]
Date: 2016-07-27 15:56:16 +0200 From: desparanto To: SQL devs &lt;<bugs-sql>&gt; Version: 11.23.7 (Jun2016-SP1) CC: @njnes Last updated: 2016-08-19 15:44:27 +0200 ## Comment 22263 Date: 2016-07-27 15:56:16 +0200 From: desparanto User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0 Build Identifier: I want to create a merge table with the same layout as another table, and create table my_table like my_other table doesn't work so I tried something different "create merge table my_table as select * from my_other table limit 1;" Server crashes and mclient abrupt exits when I execute that statement. What ever the true method is for what I am trying to do I cannot tell you, but but that is not why I am submitting the bug. I don't think any statement should cause a server crash, so this bug is that a query caused a crash - not that my query cannot be executed. Reproducible: Always ### Steps to Reproduce: 1.From start menu on windows(7) start mserver 2.from start menu on windows(7) start mclient 3.create a schema perhaps (ironically) called my_shcema 4.execute "set schema my_schema;" 5.create a table called "my_other_table" with 9 fields (not sure if fields maters in this problem but my table had 8 int fields and one timestamp) 6. populate at least one record in the "my_other_table" table 7. execute "create merge table my_table as select * from my_other table limit 1;" ### Actual Results: 8. With in a second the server will crash (window will close) and the client will exit to a prompt that prompts you to press any key to continue, and when you do that window closes as well. ### Expected Results: I wasn't expecting the query to work, because I don't know the proper syntax, so I was expecting one of two things: 1. My syntax was correct and the statement executes with-out issue 2. My syntax was wrong and some sql error will display and tell me where or around where I messed up There is a table in this schema that has 60 million records. I was attempting to create a merge table structure for partitioning the data in this table - however I was not operating on that table in any way so it probably superfluous to this issue, but I cannot know that. When I was selecting from "my_other_table" with a limit of one it was not on the table that had 60 million records. output of mserver5 --version: MonetDB 5 server v11.23.3 "Jun2016" (64-bit, 64-bit oids) Copyright (c) 1993-July 2008 CWI Copyright (c) August 2008-2016 MonetDB B.V., all rights reserved Visit http://www.monetdb.org/ for further information Found 9.9GiB available memory, 4 available cpu cores Libraries: libpcre: 8.37 2015-04-28 openssl: OpenSSL 1.0.2d 9 Jul 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 ## Comment 22266 Date: 2016-07-29 23:34:51 +0200 From: desparanto This was on Windows 7 x64 by the way ## Comment 22302 Date: 2016-08-19 14:40:29 +0200 From: @njnes seems fixed on the current (19/8/2016) Jun2016 branch. ## Comment 22305 Date: 2016-08-19 15:05:09 +0200 From: @njnes the create ... as has a default 'with data'. This now triggers an exception for the merge,remote,replica tables. ## Comment 22306 Date: 2016-08-19 15:44:27 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [82d2e9e4ba98](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=82d2e9e4ba98) 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=82d2e9e4ba98](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=82d2e9e4ba98) Changeset description: added test for bug #4041
Server crashes and mclient abrupt exit when I execute "create merge table my_table as select * from my_other table limit 1;"
https://api.github.com/repos/MonetDB/MonetDB/issues/4041/comments
0
2020-11-30T13:35:24Z
2024-06-27T12:38:10Z
https://github.com/MonetDB/MonetDB/issues/4041
753,484,033
4,041
[ "MonetDB", "MonetDB" ]
Date: 2016-07-26 16:18:44 +0200 From: anthonin.bonnefoy To: SQL devs &lt;<bugs-sql>&gt; Version: 11.23.7 (Jun2016-SP1) CC: frederic.jolliton+monetdb, @mlkersten, @njnes Last updated: 2016-12-21 13:08:28 +0100 ## Comment 22261 Date: 2016-07-26 16:18:44 +0200 From: anthonin.bonnefoy User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0 Build Identifier: On database with a lot of tables with few datas, a sys.storage call can take a lot of time (from 10 minutes to 1 hour). Reproducible: Always ### Steps to Reproduce: 1.Fill a database with the given script !/bin/bash set -e data="TOTO 1467287718762007 1467287721544850 7 <NULL> 250 <NULL> 149825120988417 198620281134081 0 0 3241196578 <NULL> 3227017985 <NULL> <NULL> <NULL> 64483 57837 0 0 0 0 92 0 <NULL> 0 Ethernet/IPv4/IPv6/TCP be9dccdb-61ed-40e4-96d9-c958ec421096 314 0 3 0 0 0 3 0 314 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 144936151 20211589026057001 0 0 0 0 0 0 0 0 0 <NULL>" rm -f /tmp/data for (( i = 0; i < 100; i++ )); do echo "$data" >> /tmp/data done for (( i = 0; i < 10000; i++ )); do table="test_$i" query="$query CREATE TABLE $table ( a1 TEXT, a2 BIGINT, a3 BIGINT, a4 SMALLINT, a5 SMALLINT, a6 INT, a7 INT, a8 BIGINT, a9 BIGINT, a10 INT, a11 INT, a12 BIGINT, a13 HUGEINT, a14 BIGINT, a15 HUGEINT, a16 BIGINT, a17 HUGEINT, a18 INT, a19 INT, a20 SMALLINT, a21 SMALLINT, a22 SMALLINT, a23 SMALLINT, a24 INT, a25 INT, a26 TEXT, a27 INT, a28 TEXT, a29 UUID, a30 BIGINT, a31 BIGINT, a32 BIGINT, a33 BIGINT, a34 BIGINT, a35 BIGINT, a36 BIGINT, a37 BIGINT, a38 BIGINT, a39 BIGINT, a40 BIGINT, a41 BIGINT, a42 BIGINT, a43 BIGINT, a44 BIGINT, a45 BIGINT, a46 BIGINT, a47 BIGINT, a48 BIGINT, a49 BIGINT, a50 BIGINT, a51 INT, a52 INT, a53 BIGINT, a54 BIGINT, a55 HUGEINT, a56 BIGINT, a57 BIGINT, a58 HUGEINT, a59 BIGINT, a60 BIGINT, a61 HUGEINT, a62 BIGINT, a63 BIGINT, a64 HUGEINT, a65 BIGINT, a66 BIGINT, a67 HUGEINT, a68 BIGINT, a69 BIGINT, a70 HUGEINT, a71 BIGINT, a72 BIGINT, a73 HUGEINT, a74 BIGINT, a75 BIGINT, a76 HUGEINT, a77 UUID);" query="$query COPY INTO $table FROM '/tmp/data' DELIMITERS ' ','\n','\"' NULL AS '<NULL>';" if [[ $((i % 100)) == 0 ]]; then SECONDS=0 mclient nova -s "$query" > /dev/null echo "Took $SECONDS seconds to insert" query="" fi if [[ $((i % 1000)) == 0 ]]; then time mclient nova -s "select * from storage;" > /dev/null fi done A backtrace during "select count(*) from sys.storage;" query gives most of the time Thread 2 (Thread 0x7f84964f2700 (LWP 17652)): 0 0x00007f84fb8c9add in read () at ../sysdeps/unix/syscall-template.S:81 1 0x00007f84fca0ab01 in read (__nbytes=<optimized out>, __buf=<optimized out>, __fd=<optimized out>) at /usr/include/x86_64-linux-gnu/bits/unistd.h:44 2 GDKload (farmid=23, nme=0x7f8160b12070 "", ext=0x7f84fcbd52ab "theap", size=8760, maxsize=0x7f8160b12070, mode=1622220912) at gdk_storage.c:480 3 0x00007f84fc94c5cc in HEAPload_intern (trunc=<optimized out>, suffix=<optimized out>, ext=<optimized out>, nme=<optimized out>, h=<optimized out>) at gdk_heap.c:668 4 HEAPload (h=0x1874a50, nme=0x1874b10 "05/00/50020", ext=0x7f84fcbd52ab "theap", trunc=1618412448) at gdk_heap.c:678 5 0x00007f84fca0bdb7 in BATload_intern (i=i@entry=20496, lock=lock@entry=1) at gdk_storage.c:889 6 0x00007f84fc94011f in getBBPdescriptor (i=<optimized out>, lock=<optimized out>) at gdk_bbp.c:2527 7 0x00007f84fc9452cb in BBPdescriptor (i=<optimized out>) at gdk_bbp.c:2543 8 0x00007f84f8a904a6 in BATdescriptor (i=<optimized out>) at ../../../gdk/gdk.h:2673 9 temp_descriptor (b=<optimized out>) at bat_utils.c:35 10 0x00007f84f8a8d7e7 in delta_bind_bat (temp=0, access=<optimized out>, bat=0x7f84964f1770) at bat_storage.c:172 11 bind_col (tr=0x194cfe0, c=0x1ff, access=<optimized out>) at bat_storage.c:192 12 0x00007f84f8979572 in sql_storage (cntxt=<optimized out>, mb=<optimized out>, stk=0x7f81866792d0, pci=<optimized out>) at sql.c:4828 13 0x00007f84fcf4f1a0 in runMALsequence (cntxt=0x17, mb=0x7f8161f9efb0, startpc=8760, stoppc=-1, stk=0x7f81866792d0, env=0x28021, pcicaller=0x0) at mal_interpreter.c:631 14 0x00007f84fcf506bb in callMAL (cntxt=0x17, cntxt@entry=0x7f84f8f4a950, mb=0x7f8160b12070, mb@entry=0x7f8161f9efb0, env=0x7f84964f1bc8, argv=0x7f84964f1bd0, debug=111 'o') at mal_interpreter.c:447 15 0x00007f84f898022c in SQLexecutePrepared (c=0x7f84f8f4a950, be=be@entry=0x7f8177311370, q=0x7f8160f00d20) at sql_execute.c:328 16 0x00007f84f89807e9 in SQLengineIntern (c=0x7f84f8f4a950, be=0x7f8177311370) at sql_execute.c:390 17 0x00007f84fcf6c6f7 in runPhase (phase=4, c=0x7f84f8f4a950) at mal_scenario.c:515 18 runScenarioBody (c=c@entry=0x7f84f8f4a950) at mal_scenario.c:559 19 0x00007f84fcf6d43d in runScenario (c=c@entry=0x7f84f8f4a950) at mal_scenario.c:579 20 0x00007f84fcf6d968 in MSserveClient (dummy=dummy@entry=0x7f84f8f4a950) at mal_session.c:439 21 0x00007f84fcf6dfcf in MSscheduleClient (command=command@entry=0x7f84c086a770 "", challenge=challenge@entry=0x7f84964f1e60 "3eh7JgdWm", fin=0x7f8161c3d250, fout=fout@entry=0x7f81778d4cd0) at mal_session.c:319 22 0x00007f84fd01f336 in doChallenge (data=<optimized out>) at mal_mapi.c:184 23 0x00007f84fca24513 in thread_starter (arg=<optimized out>) at gdk_system.c:459 24 0x00007f84fb8c30a4 in start_thread (arg=0x7f84964f2700) at pthread_create.c:309 25 0x00007f84fb5f887d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111 Since most bat are small, they have a storage mode of STORE_MEM, so they are loaded in memory. So, most of the tail files of the database are read. Moreover, the loaded base is never used for sys.storage. ## Comment 22311 Date: 2016-08-19 17:00:11 +0200 From: @njnes Is this still the case on the Jun2016 version? ## Comment 22338 Date: 2016-08-30 17:28:13 +0200 From: Frédéric Jolliton &lt;<frederic.jolliton+monetdb>&gt; Are you referring to the time it takes for querying storage()? Yes, it is still extremely slow with Jun2016. After the script given in this issue is started and about 300-600 tables are created, the "select * from storage" query take a huge amount of time (while for fewer tables, the response was below 1s). After 30 minutes without a response, I gave up and stopped the process. I was unable to run gdb due to some limitation I haven't figured, but however I checked some stats with strace for a few minutes range and I get: $ strace -p <pid> -f -c % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- 78.81 5.165505 71 73075 select 21.18 1.388000 1236 1123 fdatasync 0.01 0.000387 0 1243 close 0.01 0.000337 0 1260 17 open 0.00 0.000159 0 1110 write 0.00 0.000000 0 119 fstat 0.00 0.000000 0 136 119 mkdir ------ ----------- ----------- --------- --------- ---------------- 100.00 6.554388 78066 136 total It seems that MonetDB perform lot and lot of fdatasync at this point, which slow the process enormously. I assume the ~79% of select are for all threads waiting on some locks hold by the thread performing the fdatasync. The version tested: MonetDB 5 server v11.23.8 (64-bit, 64-bit oids, 128-bit integers) This is an unreleased version Copyright (c) 1993-July 2008 CWI Copyright (c) August 2008-2016 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.39 2016-06-14 (compiled with 8.39) openssl: OpenSSL 1.0.2h 3 May 2016 (compiled with OpenSSL 1.0.2h 3 May 2016) libxml2: 2.9.4 (compiled with 2.9.4) Compiled by: fjolliton@localhost (x86_64-pc-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 22339 Date: 2016-08-30 17:28:27 +0200 From: Frédéric Jolliton &lt;<frederic.jolliton+monetdb>&gt; Version changed. ## Comment 22340 Date: 2016-08-30 21:16:35 +0200 From: @mlkersten FYI the storage() function has to access all columns of all tables. So multiply your number of tables 600 with say 77 and you have 46200 store_funcs.bind_col(tr, c, RDONLY) calls effectively searching and opening a file. Storage is not an internally maintained table, because it reflects the actual state of the column. ## Comment 22341 Date: 2016-08-30 22:06:31 +0200 From: Frédéric Jolliton &lt;<frederic.jolliton+monetdb>&gt; To give more data about what we observe, here is the pattern we got, using a modified version of the provided script (only the "echo" are changed): Tables creation: 3 s Total tables: 100 Querying sys.storage(): 1 s Tables creation: 4 s Total tables: 200 Querying sys.storage(): 0 s Tables creation: 4 s Total tables: 300 Querying sys.storage(): 843 s Tables creation: 5 s Total tables: 400 Querying sys.storage(): 0 s Tables creation: 5 s Total tables: 500 Querying sys.storage(): 0 s Tables creation: 4 s Total tables: 600 Querying sys.storage(): 1 s Tables creation: 4 s Total tables: 700 Querying sys.storage(): 1 s Tables creation: 4 s Total tables: 800 Querying sys.storage(): 1 s Tables creation: 5 s Total tables: 900 Querying sys.storage(): 1693 s [..] Usually it is very fast to query the whole storage table (under a second for ~900 tables and up to 6s for ~6000 tables). But sometimes, it take up to 20 minutes (in my last run). Now, maybe it is not sys.storage() by itself, but the fact that the journal might be played at the same time (seeing all theses fdatasync) or something like that. It you think it's a normal behavior, feel free to close the issue. ## Comment 24463 Date: 2016-10-06 08:25:09 +0200 From: @njnes the peaks are caused by the persistent log flush. Indeed in that case many fdatasyncs are done (which is needed to make sure the data reached the disk). I do think however that we have some problem, because in your described case, there are no changes, ie no costly flush should be done. ## Comment 24464 Date: 2016-10-06 08:28:58 +0200 From: @mlkersten Just to be sure, running the script should include the result of uptime to assess if there is no external process running on your box that causes resource fights. Think for example about backup-scripts running in the background. ## Comment 24471 Date: 2016-10-10 08:18:55 +0200 From: @njnes Frédéric I think we should close this bug report. The observed behaviour is indeed caused by the log flushes. These give all these fdatasyncs. Once all tables are created and flushed, I don't see (extreem) times spend in the storage query.
sys.storage call can take a long time
https://api.github.com/repos/MonetDB/MonetDB/issues/4040/comments
0
2020-11-30T13:35:21Z
2024-06-27T12:38:09Z
https://github.com/MonetDB/MonetDB/issues/4040
753,483,997
4,040
[ "MonetDB", "MonetDB" ]
Date: 2016-07-25 16:29:50 +0200 From: anthonin.bonnefoy To: SQL devs &lt;<bugs-sql>&gt; Version: 11.21.11 (Jul2015-SP1) CC: @njnes Last updated: 2017-01-26 14:56:47 +0100 ## Comment 22251 Date: 2016-07-25 16:29:50 +0200 From: anthonin.bonnefoy User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0 Build Identifier: After a lot of drop occurred on a database, mserver5 can take more than 1 hour to start. Reproducible: Always ### Steps to Reproduce: 1. Fill a database with given script, relaunch it for slower time !/bin/bash set -e tables=$(echo "\d test_*" | mclient -i nova | cut -f3 -d" ") for table in $tables; do mclient nova -s "drop table $table;" > /dev/null done drop_query="" create_query="" NUM_OP=100000 SECONDS=0 for (( i = 0; i < NUM_OP; i++ )); do num=$((i % 400)) table="test_$num" create_query="$create_query CREATE TABLE $table (poller TEXT);" drop_query="$drop_query; drop table $table;" if [[ $((i % 100)) == 0 ]]; then mclient nova -s "$create_query" > /dev/null create_query="" fi if [[ $((i % 400)) == 0 ]]; then mclient nova -s "$drop_query" > /dev/null drop_query="" fi if [[ $((i % 10000)) == 0 ]]; then echo "At $i/$NUM_OP, took $SECONDS seconds" SECONDS=0 fi done mclient nova -s "$create_query" > /dev/null mclient nova -s "$drop_query" > /dev/null create_query="" for (( i = 0; i < 100000; i++ )); do table="test_$i" create_query="$create_query CREATE TABLE $table (poller TEXT);" if [[ $((i % 100)) == 0 ]]; then mclient nova -s "$create_query" > /dev/null create_query="" fi done 2. Check necessary time used to start mserver5 with pkill mserver5; while pgrep mserver5; do sleep 1; done; time mclient nova -s "" Here is the stacktrace on startup. 0 0x00007f9c6092f32d in BAThash (b=0x3a01df0, masksize=0) at gdk_search.c:488 1 0x00007f9c60a60dd0 in BUNfnd (b=0x3a01df0, v=0x7ffd75ae4738) at gdk_bat.c:1893 2 0x00007f9c59ca7155 in column_lookup_row (tr=0x27da1c0, c=0x3a7da6e0, value=0x7ffd75ae48fc) at bat_table.c:164 3 0x00007f9c59ca73bb in column_find_row (tr=0x27da1c0, c=0x3a7da6e0, value=0x7ffd75ae48fc) at bat_table.c:186 4 0x00007f9c59c925b2 in load_table (tr=0x27da1c0, s=0x3a7d6d30, tid=5689, nrs=0x9246010) at store.c:598 5 0x00007f9c59c94732 in load_schema (tr=0x27da1c0, id=2155, rid=9223372036854775808) at store.c:920 6 0x00007f9c59c94db4 in load_trans (tr=0x27da1c0, id=2155) at store.c:993 7 0x00007f9c59c976df in store_init (debug=0, store=store_bat, readonly=0, singleuser=0, logdir=0x7f9c59cd7820 "sql_logs", stk=0) at store.c:1558 8 0x00007f9c59c0f056 in mvc_init (debug=0, store=store_bat, ro=0, su=0, stk=0) at sql_mvc.c:36 9 0x00007f9c59b72d56 in SQLinit () at sql_scenario.c:251 10 0x00007f9c59b72a50 in SQLprelude (ret=0x7e60220) at sql_scenario.c:178 11 0x00007f9c60fd8f69 in malCommandCall (stk=0x7e60010, pci=0x9200270) at mal_interpreter.c:77 12 0x00007f9c60fdb830 in runMALsequence (cntxt=0x79d0010, mb=0x7b88010, startpc=1, stoppc=0, stk=0x7e60010, env=0x0, pcicaller=0x0) at mal_interpreter.c:655 13 0x00007f9c60fda91c in runMAL (cntxt=0x79d0010, mb=0x7b88010, mbcaller=0x0, env=0x0) at mal_interpreter.c:365 14 0x00007f9c60ffe480 in MALengine (c=0x79d0010) at mal_session.c:637 15 0x00007f9c60ffc8c8 in malBootstrap () at mal_session.c:57 16 0x00007f9c60fbbf09 in mal_init () at mal.c:95 17 0x0000000000403a49 in main (argc=20, av=0x7ffd75ae5dd8) at mserver5.c:650 For each non deleted tables (store.c:920), it searches the rid in _tables.id. While looking up the row in _tables.id, BUNfnd is called on deleted elements of _tables.id. Since hash is not present, it is computed and destroyed at bat_destroy (bat_table.c:171) So, at startup, it computes the hash on deleted _tables.id on each table. On my test database, it took more than 10 minutes with 100K tables and 700K deleted tables. The same problem happen for function drop: Given the script !/bin/bash set -e SECONDS=0 NUM_OP=500000 drop_query="" create_query="" for (( i = 0; i < NUM_OP; i++ )); do fun="toto_$((i % 400))" create_query="$create_query create function $fun(value bigint) returns hugeint begin return 0; end;;" drop_query="$drop_query DROP function $fun;" if [[ $((i % 100)) == 0 ]]; then mclient nova -s "$create_query" > /dev/null mclient nova -s "$drop_query" > /dev/null create_query="" drop_query="" fi if [[ $((i % 10000)) == 0 ]]; then echo "At $i/$NUM_OP, took $SECONDS seconds" SECONDS=0 fi done The drop take more and more times with most times spend in 0 0x00007f8aafc717b4 in BATins_kdiff (bn=0x445dc10, l=0x44f21d0, r=0x445da50) at gdk_setop.c:428 1 0x00007f8aafc877e6 in diff_intersect (l=0x44f21d0, r=0x445da50, diff=1) at gdk_setop.c:473 2 0x00007f8aafc87d03 in BATkdiff (l=0x44f21d0, r=0x445da50) at gdk_setop.c:514 3 0x00007f8aa8f798a6 in _delta_cands (tr=0x248efd0, t=0x43d1cd0) at bat_table.c:37 4 0x00007f8aa8f799e4 in delta_cands (tr=0x248efd0, t=0x43d1cd0) at bat_table.c:62 5 0x00007f8aa8f7ae00 in rids_select (tr=0x248efd0, key=0x43d1f30, key_value_low=0xe964b64, key_value_high=0xe964b64) at bat_table.c:347 6 0x00007f8aa8f72998 in sys_drop_func (tr=0x248efd0, func=0xe964b50, drop_action=1) at store.c:3802 7 0x00007f8aa8f73727 in sql_trans_drop_func (tr=0x248efd0, s=0x43d0010, id=416883, drop_action=0) at store.c:3994 8 0x00007f8aa8ee48e0 in mvc_drop_func (m=0x4488410, s=0x43d0010, f=0xe964b50, drop_action=0) at sql_mvc.c:830 9 0x00007f8aa8e2d3f8 in drop_func (sql=0x4488410, sname=0x3f4ceb0 "sys", name=0x4490a60 "toto_131", fid=416883, type=1, action=0) at sql.c:808 10 0x00007f8aa8e2fc75 in SQLcatalog (cntxt=0x2678320, mb=0x3f31ff0, stk=0x4443610, pci=0x3efe4d0) at sql.c:1340 11 0x00007f8ab02ae80b in runMALsequence (cntxt=0x2678320, mb=0x3f31ff0, startpc=1, stoppc=0, stk=0x4443610, env=0x0, pcicaller=0x0) at mal_interpreter.c:631 12 0x00007f8ab02adcab in callMAL (cntxt=0x2678320, mb=0x3f31ff0, env=0x7f8aa7fd1aa8, argv=0x7f8aa7fd1b00, debug=0 '\000') at mal_interpreter.c:447 13 0x00007f8aa8e4a91e in SQLexecutePrepared (c=0x2678320, be=0x41f9f50, q=0x3f2f410) at sql_execute.c:328 14 0x00007f8aa8e4ad74 in SQLengineIntern (c=0x2678320, be=0x41f9f50) at sql_execute.c:390 15 0x00007f8aa8e49916 in SQLengine (c=0x2678320) at sql_scenario.c:1323 16 0x00007f8ab02cf3d6 in runPhase (c=0x2678320, phase=4) at mal_scenario.c:515 17 0x00007f8ab02cf5b4 in runScenarioBody (c=0x2678320) at mal_scenario.c:559 18 0x00007f8ab02cf6c4 in runScenario (c=0x2678320) at mal_scenario.c:579 19 0x00007f8ab02d079a in MSserveClient (dummy=0x2678320) at mal_session.c:439 20 0x00007f8ab02d0309 in MSscheduleClient (command=0x4488410 "", challenge=0x7f8aa7fd1e30 "qkFs6TfH", fin=0x44935d0, fout=0x2491ba0) at mal_session.c:319 21 0x00007f8ab038df72 in doChallenge (data=0x44935e0) at mal_mapi.c:184 22 0x00007f8aafd45ea5 in thread_starter (arg=0x44934e0) at gdk_system.c:459 23 0x00007f8aae8340a4 in start_thread (arg=0x7f8aa7fd2700) at pthread_create.c:309 24 0x00007f8aae56987d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111 ## Comment 22310 Date: 2016-08-19 16:59:00 +0200 From: @njnes this should be solved on the Jun2016 release. ## Comment 24765 Date: 2016-12-08 14:59:23 +0100 From: anthonin.bonnefoy Same problem with June2016 (it's segfaulting on the current rel-Dec2016) I changed the script to try to trigger the problem more easily. The main changes is to create table with more columns, you can remove the perf record if you're not interested in it. ------------------------ !/bin/bash set -eu FARM="/tmp/farm" init_farm() { pkill -e -9 mserver5 || true pkill -e -9 monetdbd || true while pgrep -f monetdbd; do sleep 1 done sudo umount "$FARM" || true rm -rf "$FARM" mkdir -p "$FARM" sudo mount -t tmpfs -o size=6G tmpfs "$FARM" monetdbd create "$FARM" monetdbd start "$FARM" while ! pgrep -f monetdbd; do sleep 1 done monetdb create nova monetdb release nova perf record -g mserver5 --dbpath="$FARM/nova" \ --set merovingian_uri=mapi:monetdb://octonion:50000/nova \ --set mapi_open=false --set mapi_port=0 \ --set mapi_usock="$FARM/nova/.mapi.sock" \ --set monet_vault_key="$FARM/nova/.vaultkey" \ --set gdk_nr_threads=4 --set max_clients=64 \ --set sql_optimizer=default_pipe --set monet_daemon=yes & mserver5_pid=$! sleep 1 } init_farm drop_query="" create_query="" NUM_OP=20000 DROP_FREQUENCY=5000 SECONDS=0 for (( i = 0; i <= NUM_OP; i++ )); do num=$((i % DROP_FREQUENCY)) table="test_$num" create_query="$create_query CREATE TABLE $table (a1 INT, a2 INT, a3 INT, \ a4 INT, a5 INT, a6 INT, a7 INT, a8 INT, a9 INT, a10 INT, a11 INT, \ a12 INT, a13 INT, a14 INT, a15 INT, a16 INT, a17 INT, a18 INT, a19 INT, \ a20 INT, a21 INT, a22 INT, a23 INT, a24 INT, a25 INT, a26 INT, a27 INT, \ a28 INT, a29 INT, a30 INT, a31 INT, a32 INT, a33 INT, a34 INT, a35 INT, \ a36 INT, a37 INT, a38 INT, a39 INT, a40 INT, a41 INT, a42 INT, a43 INT, \ a44 INT, a45 INT, a46 INT, a47 INT, a48 INT, a49 INT, a50 INT, a51 INT, \ a52 INT, a53 INT, a54 INT, a55 INT, a56 INT, a57 INT, a58 INT, a59 INT, \ a60 INT, a61 INT, a62 INT, a63 INT, a64 INT, a65 INT, a66 INT, a67 INT, \ a68 INT, a69 INT, a70 INT, a71 INT, a72 INT, a73 INT, a74 INT, a75 INT);" drop_query="$drop_query; drop table $table;" if [[ $((i % 100)) == 0 ]]; then mclient nova -s "$create_query" > /dev/null create_query="" fi if [[ $((i % DROP_FREQUENCY)) == 0 ]]; then echo "Creations at $i/$NUM_OP, took $SECONDS seconds, starting drop" SECONDS=0 mclient nova -s "$drop_query" > /dev/null drop_query="" echo "Drop at $i/$NUM_OP, took $SECONDS seconds" SECONDS=0 fi done kill "$mserver5_pid" ------------- Creations at 0/20000, took 0 seconds, starting drop Drop at 0/20000, took 0 seconds Creations at 5000/20000, took 23 seconds, starting drop Drop at 5000/20000, took 18 seconds Creations at 10000/20000, took 19 seconds, starting drop Drop at 10000/20000, took 39 seconds Creations at 15000/20000, took 19 seconds, starting drop Drop at 15000/20000, took 47 seconds Creations at 20000/20000, took 19 seconds, starting drop ^C[ perf record: Woken up 8039 times to write data ] I had to interrupt it since it was taking more than 30 minutes on the last batch of drop. The perf report -i perf.data --no-children gives + 58.63% mserver5 libbat.so.13.0.6 [.] BAThash as the function using the most samples. Thoses samples are taken without io overhead since we are on a tmpfs. ## Comment 24812 Date: 2016-12-18 21:05:52 +0100 From: @njnes the slow startup because of the drop tables has been fixed in the Dec2016 version. A vacuum solution for system tables is pending. ## Comment 24920 Date: 2017-01-26 14:56:47 +0100 From: @kutsurak Fixed in version Dec2016-SP1.
Slow mserver5 start after drop of tables (> 1 hour)
https://api.github.com/repos/MonetDB/MonetDB/issues/4039/comments
0
2020-11-30T13:35:19Z
2024-06-27T12:38:08Z
https://github.com/MonetDB/MonetDB/issues/4039
753,483,969
4,039
[ "MonetDB", "MonetDB" ]
Date: 2016-07-21 12:38:57 +0200 From: Gatis Ozolins &lt;<g.ozolins>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.23.3 (Jun2016) CC: martin.van.dinther Last updated: 2016-10-13 10:03:49 +0200 ## Comment 22249 Date: 2016-07-21 12:38:57 +0200 From: Gatis Ozolins &lt;<g.ozolins>&gt; User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0 Build Identifier: I had to grant access to sys.environment and sys.table_types: grant select on sys.environment to public; grant select on sys.table_types to public; Otherwise I couldn't get to list all tables in DBeaver as I was getting: java.lang.NullPointerException at java.lang.String.compareTo(Unknown Source) at nl.cwi.monetdb.jdbc.MonetDatabaseMetaData.getTables(MonetDatabaseMetaData.java:1933) I traced it down to this line: boolean preJul2015 = ("11.19.15".compareTo(getDatabaseProductVersion()) >= 0); Did I had to do additional steps after DB upgrade? Reproducible: Always ## Comment 22250 Date: 2016-07-21 12:49:23 +0200 From: @sjoerdmullender In the upcoming Jun2016-SP1 release, the function sys.env() will be granted public execution privileges, so that should fix this problem. You can test this by trying out the relase candidate which is already available at http://dev.monetdb.org/downloads/testing/ ## Comment 22393 Date: 2016-09-29 13:02:27 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset b3ca1157be73, made by Martin van Dinther <martin.van.dinther@monetdbsolutions.com> in the monetdb-java repo, refers to this bug. For complete details, see http://dev.monetdb.org/hg/monetdb-java?cmd=changeset;node=b3ca1157be73 Changeset description: Improve DatabaseMetaData.getDatabaseProductVersion() to never return a null String. This prevents runtime NullPointerException in getTables() and getTableTypes(). Also improved error reporting when JDBC driver failed to fetch the value of environment variable monet_version as reported in bug #4038. It will now throw an SQLException with the error message. ## Comment 24488 Date: 2016-10-13 10:03:49 +0200 From: @sjoerdmullender Jun2016-SP2 has been released.
After upgrade from 11.21.19, jdbc couldn't list tables for non sys users
https://api.github.com/repos/MonetDB/MonetDB/issues/4038/comments
0
2020-11-30T13:35:16Z
2024-06-27T12:38:07Z
https://github.com/MonetDB/MonetDB/issues/4038
753,483,930
4,038
[ "MonetDB", "MonetDB" ]
Date: 2016-07-12 14:19:56 +0200 From: binayb &lt;<binayb>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.23.3 (Jun2016) CC: martin.van.dinther, @njnes Last updated: 2016-08-11 21:34:03 +0200 ## Comment 22245 Date: 2016-07-12 14:19:56 +0200 From: binayb &lt;<binayb>&gt; User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36 Build Identifier: My java application send multiple queries to fetch data from the db, some of the query is getting failed as it is not able to connect to monetdb. On checking the merovingian.log i could see the following error: 2016-06-22 11:53:09 ERR appdb[31229]: !mal_mapi.listen: expected filedescriptor, but received something else 2016-06-22 11:53:09 MSG merovingian[30953]: starting a proxy failed: could not send initial byte: Bad file descriptor 2016-06-22 11:53:14 ERR merovingian[30953]: client error: could not send initial byte: Bad file descriptor The catalina logs have the following error: ERROR, 2016-06-22 11:53:09,406 - Exception Thrown ,could not connect to the database ERROR, 2016-06-22 11:53:09,406 - Error: java.sql.SQLException: monetdbd: an internal error has occurred, refer to the logs for details, please try again later at nl.cwi.monetdb.jdbc.MonetConnection.<init>(MonetConnection.java:249) at nl.cwi.monetdb.jdbc.MonetDriver.connect(MonetDriver.java:160) at org.apache.tomcat.dbcp.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38) at org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582) at org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1185) at org.apache.tomcat.dbcp.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool.java:79) at org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:106) Reproducible: Sometimes ### Steps to Reproduce: No specific steps to reproduce it but it come when you query the database frequently for a prolonged duration. Earlier we were using Jan 2014 SP2 build with monetdb-jdbc-2.19.jar jdbc driver, we were not getting this error. We have upgraded to Jun2016 and monetdb-jdbc-2.21.jar driver and started facing this issue. ## Comment 22247 Date: 2016-07-14 16:27:08 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; This could be due to a socket communication timeout during connection. You could try to increase the socket timeout. This can be specified in the JDBC URL as: jdbc:monetdb://localhost:50000/demo?so_timeout=12345 or disable the timeout (set to 0): jdbc:monetdb://localhost:50000/demo?so_timeout=0 Please also ensure the monetdb-jdbc-2.21.jar is really loaded and used by Tomcat, as the line numbers: at nl.cwi.monetdb.jdbc.MonetConnection.<init>(MonetConnection.java:249) at nl.cwi.monetdb.jdbc.MonetDriver.connect(MonetDriver.java:160) do not match the code from monetdb-jdbc-2.21.jar. Best is to shutdown Tomcat, remove older monetdb-jdbc-2.19.jar from the path(s) and restart Tomcat. To further analyse the root cause we need a reproduction path, preferably a small Java test program.
client error: could not send initial byte: Bad file descriptor
https://api.github.com/repos/MonetDB/MonetDB/issues/4037/comments
0
2020-11-30T13:35:14Z
2024-06-27T12:38:05Z
https://github.com/MonetDB/MonetDB/issues/4037
753,483,903
4,037
[ "MonetDB", "MonetDB" ]
Date: 2016-07-07 14:46:13 +0200 From: anthonin.bonnefoy To: GDK devs &lt;<bugs-common>&gt; Version: 11.21.5 (Jul2015) Last updated: 2016-07-22 09:56:12 +0200 ## Comment 22240 Date: 2016-07-07 14:46:13 +0200 From: anthonin.bonnefoy User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0 Build Identifier: sql_catalog_nme and sql_catalog_bid can be backuped du to a GDKupgradevarheap. On commit, they can be moved (with logger_switch_bat bm_subcommit), however, the backuped tail is never cleaned. After enough commit, they can grab an old bat id which have an old backup. If a restart occur at this moment, the backup will be restored and a discrepancy will (probably) occur between BBP.dir and the real size. Reproducible: Always ### Steps to Reproduce: 1. Start a farm, preferably on a tmpfs mkdir /tmp/farm sudo mount -t tmpfs -o size=10G tmpfs /tmp/farm monetdbd create /tmp/farm monetdbd start /tmp/farm monetdb create toto monetdb release toto 2. Lower commit time for faster testing in sql/storage/store.c - for (t = 30000; t > 0 && !need_flush; t -= timeout) { + for (t = 2000; t > 0 && !need_flush; t -= timeout) { 3. Run this script ------------ !/bin/bash set -e seq 5000 | awk 'BEGIN { OFS = "\t" } ; { print $1,$1,$1,$1,$1,$1,$1,$1,$1,$1 }' > /tmp/data.csv base="/tmp/farm/toto/" mclient toto -s "create schema sact;" 2> /dev/null || true check_bat() { local name="$1" local bid="$(grep "$name" "$base/bat/BACKUP/BBP.dir" | awk '{print $5}' | xargs basename)" if [[ -f $base/bat/BACKUP/${bid}.tail ]]; then echo "Got $bid for $name" pkill mserver5 exit 0 fi } for (( i = 0; i < 100000; i++ )); do table="sact.table_${i}" create_query="CREATE TABLE $table (toto TEXT, toto2 TEXT, toto3 TEXT, toto4 TEXT, toto5 TEXT, toto6 TEXT, toto7 TEXT, toto8 TEXT, toto9 TEXT, toto10 TEXT);" mclient toto -s "$create_query" > /dev/null mclient toto -s "COPY INTO $table FROM '/tmp/data.csv' DELIMITERS '\t','\n','\"' NULL AS '<NULL>';" > /dev/null mclient toto -s "drop table $table;" > /dev/null check_bat "sql_catalog_bid" check_bat "sql_catalog_nme" done ------------ mserver5 should be killed while an invalid backup is present. On restart, mserver will crash with "!FATAL: logger_load: inconsistent database, catalog does not exist" It might be necessary to launch the script several times (I usually got the problem after 2 or 3 times). ## Comment 22241 Date: 2016-07-08 15:51:29 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [5ea6939edb61](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5ea6939edb61) 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=5ea6939edb61](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=5ea6939edb61) Changeset description: Fix for bug #4036. GDKupgradevarheap creates a backup for persistent BATs in the BACKUP directory. If the BAT is then made transient in the same transaction, the subcommit that does the work ignored the BACKUP file for the BAT, so it remained, causing havoc later when the BAT ID was reused. Now, subcommit will move the file to the SUBCOMMIT directory which gets renamed and then deleted when the transaction commits. ## Comment 22242 Date: 2016-07-08 15:52:35 +0200 From: @sjoerdmullender This was a great bug report. Thanks! It took me a while, but I was able to nail the problem and implement a fix.
Possible sql_catalog corruption due to unclean backuped tail
https://api.github.com/repos/MonetDB/MonetDB/issues/4036/comments
0
2020-11-30T13:35:12Z
2024-06-27T12:38:04Z
https://github.com/MonetDB/MonetDB/issues/4036
753,483,876
4,036
[ "MonetDB", "MonetDB" ]
Date: 2016-07-06 15:22:33 +0200 From: @PedroTadim To: SQL devs &lt;<bugs-sql>&gt; Version: 11.23.3 (Jun2016) Last updated: 2016-07-22 09:56:16 +0200 ## Comment 22238 Date: 2016-07-06 15:22:33 +0200 From: @PedroTadim User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.106 Safari/537.36 Build Identifier: Created a SQL function that uses geospatial extension to make a geographic to Cartesian coordinates conversion. Reproducible: Always ### Steps to Reproduce: 1. CREATE FUNCTION geographic_to_cartesian(lat FLOAT, lon FLOAT) RETURNS POINT /* convert geographic coordinates to Cartesian while creating a point */ BEGIN DECLARE deg_to_rad FLOAT, lat_rad FLOAT, lon_rad FLOAT, aux1 FLOAT, aux2 FLOAT; SET deg_to_rad = pi() / 180; SET lat_rad = lat * deg_to_rad; SET lon_rad = lon * deg_to_rad; SET aux1 = sys.cos(lat_rad); SET aux2 = 6371 * aux1; RETURN sys.st_makepoint(aux2 * sys.cos(lon_rad), aux2 * sys.sin(lon_rad), 6371 * sys.sin(lat_rad)); END; 2. CREATE TABLE test_table (lat FLOAT, lon FLOAT); 3. SELECT geographic_to_cartesian(lat, lon) AS calc_point FROM test_table; ### Actual Results: The client crashes. ### Expected Results: The query result, a table with a single column showing the results of the function call. The client breaks after performing the select query, and the log message: 2016-07-06 13:54:35 ERR iotdb[15513]: mserver5: ../../gdk/gdk.h:2494: BBPcheck: Assertion `x > 0' failed. I reproduced it on the default branch, and it happens whatever the table has rows on it or not. ## Comment 22239 Date: 2016-07-06 16:47:34 +0200 From: @sjoerdmullender It looks like the geom.MakePoint implementation is called but interpreted as if it is batgeom.MakePoint. This means that the return value is interpreted incorrectly as BAT id, and that causes the crash. ## Comment 22243 Date: 2016-07-11 16:46:58 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [ae042233e063](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ae042233e063) 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=ae042233e063](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=ae042233e063) Changeset description: Fix and test for bug #4035. When testing whether a bulk version exists of a MAL function, the MAL function body needs to be zapped. ## Comment 22244 Date: 2016-07-11 17:36:49 +0200 From: @sjoerdmullender Should be fixed now.
SQL Function call bug
https://api.github.com/repos/MonetDB/MonetDB/issues/4035/comments
0
2020-11-30T13:35:10Z
2024-06-27T12:38:03Z
https://github.com/MonetDB/MonetDB/issues/4035
753,483,851
4,035
[ "MonetDB", "MonetDB" ]
Date: 2016-07-05 16:27:59 +0200 From: Willem Ligtenberg &lt;<willem.ligtenberg>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.21.19 (Jul2015-SP4) Last updated: 2017-03-03 10:24:19 +0100 ## Comment 22231 Date: 2016-07-05 16:27:59 +0200 From: Willem Ligtenberg &lt;<willem.ligtenberg>&gt; For one of my functions, I need to add all columns of a table with ~1000 columns. This was impossible without changing the source to increase the length of the argnames array. As mentioned on the mailing list, the real solution would be to not have an arbitrary limit, but allocate memory as needed. ## Comment 24968 Date: 2017-02-03 16:55:40 +0100 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [9832790b17a3](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9832790b17a3) 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=9832790b17a3](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=9832790b17a3) Changeset description: Dynamically allocate space for R command in rapi.eval. This fixes bug #4034. ## Comment 24969 Date: 2017-02-03 16:56:11 +0100 From: @sjoerdmullender This should be fixed now. ## Comment 25113 Date: 2017-03-03 10:24:19 +0100 From: @sjoerdmullender Dec2016-SP2 has been released, incorporating the fix.
argnames array in rapi.c has fixed length (that was too short)
https://api.github.com/repos/MonetDB/MonetDB/issues/4034/comments
0
2020-11-30T13:35:07Z
2024-06-27T12:38:02Z
https://github.com/MonetDB/MonetDB/issues/4034
753,483,828
4,034
[ "MonetDB", "MonetDB" ]
Date: 2016-07-05 16:23:00 +0200 From: Willem Ligtenberg &lt;<willem.ligtenberg>&gt; To: Embedded devs &lt;<bugs-embedded>&gt; Version: unspecified CC: @njnes Last updated: 2020-07-10 21:31:04 +0200 ## Comment 22230 Date: 2016-07-05 16:23:00 +0200 From: Willem Ligtenberg &lt;<willem.ligtenberg>&gt; The error messages that are thrown in an R process are truncated. This makes debugging more difficult. Another great option would be, that it would automatically perform a traceback() and report this information back as well. ## Comment 27901 Date: 2020-07-10 21:31:04 +0200 From: @sjoerdmullender The old MonetDB-Light was impossible to maintain. There is now a new monetdbe (MonetDB-Embedded) in the works.
R error messages are truncated
https://api.github.com/repos/MonetDB/MonetDB/issues/4033/comments
0
2020-11-30T13:35:05Z
2024-06-28T07:19:59Z
https://github.com/MonetDB/MonetDB/issues/4033
753,483,792
4,033
[ "MonetDB", "MonetDB" ]
Date: 2016-07-01 12:06:34 +0200 From: homner To: SQL devs &lt;<bugs-sql>&gt; Version: 11.23.3 (Jun2016) Last updated: 2016-07-22 09:56:08 +0200 ## Comment 22223 Date: 2016-07-01 12:06:34 +0200 From: homner User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36 Build Identifier: After update to the latest version, the odbc driver show no decimal places but with the montdb user the decimal places are shown. With mclient, in both cases (monetdb, myuser) the decimal places are shown Reproducible: Always ### Steps to Reproduce: 1. CREATE TABLE eis.test5(turnover numeric(18,6)); 2. INSERT into eis.test5 VALUES(1234.56); 3. SELECT turnover from eis.test5 3. ### Actual Results: 1234 ### Expected Results: 1234.560000 ## Comment 22224 Date: 2016-07-04 17:36:46 +0200 From: @sjoerdmullender I can't reproduce this. What program are you using to interact through ODBC with the MonetDB server? Is this a program you wrote? If so, can you share the source? ## Comment 22225 Date: 2016-07-05 09:42:44 +0200 From: homner OK, here a simple VBScript dim cn, rs set cn = CreateObject("ADODB.Connection") set rs = CreateObject("ADODB.Recordset") cn.connectionstring = "DSN=mydb;Uid=monetdb;Pwd=monetdb" cn.open rs.open "SELECT freight FROM myschema.orders LIMIT 1", cn, 3 wscript.echo "MonetDB User" while not rs.eof wscript.echo rs(0) rs.MoveNext wend cn.close wscript.echo "" cn.connectionstring = "DSN=mydb;Uid=myuser;Pwd=*********" cn.open rs.open "SELECT freight FROM myschema.orders LIMIT 1", cn, 3 wscript.echo "Other User" while not rs.eof wscript.echo rs(0) rs.MoveNext wend cn.close Here the output: Microsoft (R) Windows Script Host, Version 5.8 Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten. MonetDB User 32,38 Other User 32 Additional information: There is a different in the tcp stream, the monetdb user received in the meta data part: 18 6 typesizes ----------------------------MonetDB User-------------------------------------------- ..!.Xreply_size 100 ..e.sSET TIME ZONE INTERVAL '+01:00' HOUR TO MINUTE ; ..&3 ..sselect name, value from sys.env() where name in ('monet_version', 'gdk_dbname') ; 9.&1 0 2 2 2 % .L, .L table_name % name, value name % varchar, varchar type % 13, 7 length [ "gdk_dbname", "mydb" ] [ "monet_version", "11.23.3" ] ..Xsizeheader 1 ..!.Xreply_size 100 ..U.sSELECT freight FROM myschema.orders LIMIT 1 ; ..&1 1 1 1 1 % myschema.orders table_name % freight name % decimal type % 20 length % 18 6 typesizes [ 32.380000 ] ----------------------------Other User ------------------------------------ ..!.Xreply_size 100 ..e.sSET TIME ZONE INTERVAL '+01:00' HOUR TO MINUTE ; ..&3 ..sselect name, value from sys.env() where name in ('monet_version', 'gdk_dbname') ; A.!SELECT: no such operator 'env' !.Xreply_size 100 ..U.sSELECT freight FROM myschema.orders LIMIT 1 ; ..&1 0 1 1 1 % myschema.orders table_name % freight name % decimal type % 20 length [ 32.380000 ] ## Comment 22226 Date: 2016-07-05 12:41:28 +0200 From: @sjoerdmullender I now understand what the cause is. We added permissions (grants) to functions, and there is a grant missing for calling sys.env() by users other than the administrator (monetdb). The ODBC driver calls this function to find out the version of the server which it needs to decide whether the server is new enough so that it understands the request to send the typesizes header. Since the introduction of that request is so long ago, we can remove that check, but the driver still needs the version number for other, more recent changes in the server. Whether a fix for this will be in the SP1, I don't know yet. I have just created a release candidate, but I could decide to create a second release candidate after this is fixed. ## Comment 22227 Date: 2016-07-05 13:21:00 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [0e52ba88168c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0e52ba88168c) 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=0e52ba88168c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=0e52ba88168c) Changeset description: Don't check for server version number when we can work around it. The check in SQLConnect was for such an old version that we can remove it, the check in SQLTables we could work around in the SQL query. This (actually the SQLConnect part) should fix bug #4032. ## Comment 22232 Date: 2016-07-05 16:29:58 +0200 From: @sjoerdmullender This should be fixed now.
no decimal places after update. ODBC driver
https://api.github.com/repos/MonetDB/MonetDB/issues/4032/comments
0
2020-11-30T13:35:02Z
2024-06-27T12:38:00Z
https://github.com/MonetDB/MonetDB/issues/4032
753,483,767
4,032
[ "MonetDB", "MonetDB" ]
Date: 2016-07-01 09:41:29 +0200 From: @sjoerdmullender To: clients devs &lt;<bugs-clients>&gt; Version: 11.23.3 (Jun2016) Last updated: 2016-07-22 09:56:17 +0200 ## Comment 22221 Date: 2016-07-01 09:41:29 +0200 From: @sjoerdmullender User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0 Build Identifier: This is a regression in the Jun2016 release. It was fixed in changeset [19728d5d6a09](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=19728d5d6a09) Reproducible: Always ### Steps to Reproduce: 1. mclient - 2. 3. ### Actual Results: -: cannot open ### Expected Results: mclient reading from stdin.
mclient doesn't accept - argument to refer to stdin
https://api.github.com/repos/MonetDB/MonetDB/issues/4031/comments
0
2020-11-30T13:35:00Z
2024-06-27T12:37:59Z
https://github.com/MonetDB/MonetDB/issues/4031
753,483,737
4,031
[ "MonetDB", "MonetDB" ]
Date: 2016-06-29 15:55:54 +0200 From: anthonin.bonnefoy To: SQL devs &lt;<bugs-sql>&gt; Version: 11.23.3 (Jun2016) CC: @mlkersten, @njnes Last updated: 2016-08-11 18:46:29 +0200 ## Comment 22217 Date: 2016-06-29 15:55:54 +0200 From: anthonin.bonnefoy Sometimes, monetdb start in a state where queries on some tables gives no results when a filter is given. Restarting monetdb solves the problem. select * from sys.schemas; +------+------+---------------+-------+--------+ | id | name | authorization | owner | system | +======+======+===============+=======+========+ | 2000 | sys | 2 | 3 | true | | 2106 | tmp | 2 | 3 | true | | 6621 | json | 3 | 3 | true | | 7240 | sact | 3 | 3 | false | +------+------+---------------+-------+--------+ 4 tuples (1.687ms) select name from sys.schemas where name='sact'; +------+ | name | +======+ +------+ By deactivating the pushselect optimizer, the result is correct (on a bugged instance) set optimizer='optimizer.inline();optimizer.remap();optimizer.costModel();optimizer.coercions();optimizer.evaluate();optimizer.aliases();optimizer.mitosis();optimizer.mergetable();optimizer.deadcode();optimizer.commonTerms();optimizer.joinPath();optimizer.reorder();optimizer.deadcode();optimizer.reduce();optimizer.matpack();optimizer.dataflow();optimizer.querylog();optimizer.multiplex();optimizer.generator();optimizer.garbageCollector();'; select name from sys.schemas where name='sact'; +------+ | name | +======+ | sact | +------+ Here is another example: sql>select * from sact.aggregates_info; +-------+--------------+ | level | last_dumpset | +=======+==============+ | 1 | 1467187260 | | 2 | 1467183600 | | 3 | 1467072000 | +-------+--------------+ 3 tuples (0.929ms) sql>select * from sact.aggregates_info where level = 1; +-------+--------------+ | level | last_dumpset | +=======+==============+ +-------+--------------+ 0 tuples (1.263ms) sql>set optimizer='optimizer.inline();optimizer.remap();optimizer.costModel();optimizer.coercions();optimizer.evaluate();optimizer.aliases();optimizer.mitosis();optimizer.mergetable();optimizer.deadcode();optimizer.commonTerms();optimizer.joinPath();optimizer.reorder();optimizer.deadcode();optimizer.reduce();optimizer.matpack();optimizer.dataflow();optimizer.querylog();optimizer.multiplex();optimizer.generator();optimizer.garbageCollector();'; operation successful (1.521ms) sql>select * from sact.aggregates_info where level = 1; +-------+--------------+ | level | last_dumpset | +=======+==============+ | 1 | 1467187260 | +-------+--------------+ 1 tuple (1.387ms) Not all tables are impacted: sql>select * from sys.tables limit 1; +------+------+-----------+-------+------+--------+---------------+--------+-----------+ | id | name | schema_id | query | type | system | commit_action | access | temporary | +======+======+===========+=======+======+========+===============+========+===========+ | 2086 | idxs | 2000 | null | 10 | true | 0 | 0 | 0 | +------+------+-----------+-------+------+--------+---------------+--------+-----------+ 1 tuple (17.400ms) sql>select id from sys.tables where id=2086; +------+ | id | +======+ | 2086 | +------+ 1 tuple (4.961ms) ## Comment 22218 Date: 2016-06-30 10:55:54 +0200 From: anthonin.bonnefoy More details: Around 100 tables have been dropped at the start of the execution. I tried to debug the mal plan, here is what I executed: --- sql.init(); filter_str:str := "sact"; X_35:void := querylog.define("explain select name from sys.schemas where name=\\'sact\\';","default_pipe",24); X_19 := bat.new(nil:oid,nil:str); sys_schemas := bat.append(X_19,"sys.schemas"); X_22 := bat.new(nil:oid,nil:str); field_name := bat.append(X_22,"name"); X_23 := bat.new(nil:oid,nil:str); type_name := bat.append(X_23,"varchar"); X_24 := bat.new(nil:oid,nil:int); a_size := bat.append(X_24,1024); X_26 := bat.new(nil:oid,nil:int); a_min := bat.append(X_26,0); X_3 := sql.mvc(); rdonly_names:bat[:oid,:str] := sql.bind(X_3,"sys","schemas","name",0); tid_schemas:bat[:oid,:oid] := sql.tid(X_3,"sys","schemas"); res_subselect_0 := algebra.subselect(rdonly_names,tid_schemas,filter_str,filter_str,true,false,false); (uid_names:bat[:oid,:oid],uv_names:bat[:oid,:str]) := sql.bind(X_3,"sys","schemas","name",2); res_subselect1 := algebra.subselect(uv_names,nil:bat[:oid,:oid],filter_str,filter_str,true,false,false); ins_names:bat[:oid,:str] := sql.bind(X_3,"sys","schemas","name",1); res_subselect2 := algebra.subselect(ins_names,tid_schemas,filter_str,filter_str,true,false,false); res_subdelta:bat[:oid,:oid] := sql.subdelta(res_subselect_0,tid_schemas,uid_names,res_subselect1,res_subselect2); res_final := sql.projectdelta(res_subdelta,rdonly_names,uid_names,uv_names,ins_names); --- Values of final variables: res_final = <tmp_525442>:bat[:void,:str] count=0 lrefs=1 res_subselect_0 = [ 0@0, 3@0 ] tid_schemas = [ 0@0, 0@0 ] [ 1@0, 1@0 ] [ 2@0, 2@0 ] [ 3@0, 3@0 ] rdonly_names = [ 0@0, "sys" ] [ 1@0, "tmp" ] [ 2@0, "json" ] [ 3@0, "sact" ] uid_names = <tmp_72013>:bat[:void,:oid] count=681 lrefs=153888 refs=2 [ 0@0, 50@0 ] [ 1@0, 451@0 ] [ 2@0, 452@0 ] [ 3@0, 453@0 ] [ 4@0, 454@0 ] [ 5@0, 455@0 ] [ 6@0, 456@0 ] [ 7@0, 457@0 ] [ 8@0, 458@0 ] [ 9@0, 459@0 ] ... uv_names = <tmp_75263>:bat[:void,:str] count=0 lrefs=27901 refs=2 ins_names = <tmp_75263>:bat[:void,:str] count=0 lrefs=27901 refs=2 uid_names seems incorrect, replacing it by an empty bat gives the correct result. On another table: sql>select * from sact.aggregates_info; +-------+--------------+ | level | last_dumpset | +=======+==============+ | 1 | 1466719200 | | 2 | 1466715600 | | 3 | 1466553600 | +-------+--------------+ sql>select * from sact.aggregates_info where level < 7; +-------+--------------+ | level | last_dumpset | +=======+==============+ | 1 | 1466719200 | | 3 | 1466553600 | +-------+--------------+ I checked the uid on this table: ---- sql.init(); X_3 := sql.mvc(); (uid:bat[:oid,:oid],uv:bat[:oid,:str]) := sql.bind(X_3,"sact","aggregates_info","level",2); ---- Print of uid: uid = <tmp_72013>:bat[:void,:oid] count=681 lrefs=153888 refs=2 The uid bat is the same than the sys.schemas one (though I don't know if it is normal…) ## Comment 22292 Date: 2016-08-11 18:46:29 +0200 From: @njnes indeed uid_names and uv_names should be aligned.
Queries gives no result on a correct filter.
https://api.github.com/repos/MonetDB/MonetDB/issues/4030/comments
0
2020-11-30T13:34:57Z
2024-06-27T12:37:58Z
https://github.com/MonetDB/MonetDB/issues/4030
753,483,704
4,030
[ "MonetDB", "MonetDB" ]
Date: 2016-06-28 12:44:50 +0200 From: Shreya &lt;<shreya.ozalkar>&gt; To: clients devs &lt;<bugs-clients>&gt; Version: 11.23.3 (Jun2016) CC: martin.van.dinther Last updated: 2016-07-06 08:58:55 +0200 ## Comment 22216 Date: 2016-06-28 12:44:50 +0200 From: Shreya &lt;<shreya.ozalkar>&gt; User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0 Build Identifier: Wrote a simple java program to connect to a database and created a table in the database.While trying to get the database metadata using the DatabaseMetaData.getTables method was getting no values in the Resultset. Reproducible: Always ### Steps to Reproduce: 1. Create a new database TestDB 2. Create a table testtable 3. Try to retrieve table metadata using the below mentioned code snippet DatabaseMetaData metaData = connection.getMetaData(); ResultSet resultSet = metaData.getTables("TestDB", "sys", "testtable", new String[] {"TABLE"}); ### Actual Results: ResultSet doesnot have any values. Note: When we used monetdb-jdbc-2.19 jar we are getting the expected results. ### Expected Results: Resultset should have the database metadata information JDBC driver : monetdb-jdbc-2.19 jar is working as expected ## Comment 22220 Date: 2016-06-30 17:38:01 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; MonetDB does not support the SQL concept of catalogs as in catalog.schema.table naming schemes. So select * from "TestDB"."sys"."testtable"; is not supported. We only support select * from "sys"."testtable"; As of Jun2016 release (monetdb-jdbc-2.21.jar) the implementation of all DatabaseMetaData class methods which accept a catalog parameter have been corrected. See the Jun2016 release notes for Java Module: "Corrected DatabaseMetaData methods which accept a catalog filter argument. Those methods will now filter the results on the specified catalog name, whereas previously the catalog filter argument was ignored." So, it now checks the catalog input parameter and if it is not null or not empty String it returns an empty ResultSet as no data rows match the specified catalog name (as catalogs are not supported in MonetDB). This is in compliance with the JDBC API documentation: http://docs.oracle.com/javase/7/docs/api/java/sql/DatabaseMetaData.htmlgetTables%28java.lang.String,%20java.lang.String,%20java.lang.String,%20java.lang.String[]%29 A JDBC driver must treat the catalog parameter as: catalog - a catalog name; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means that the catalog name should not be used to narrow the search If you use: metaData.getTables(null, "sys", "testtable", new String[] {"TABLE"}); or metaData.getTables("", "sys", "testtable", new String[] {"TABLE"}); it will work as expected. ## Comment 22237 Date: 2016-07-06 08:58:55 +0200 From: Shreya &lt;<shreya.ozalkar>&gt; Thank you Martin for your detailed clarification. Its working for me with the changes as suggested by you.
Latest monetdb-jdbc-2.21.jar driver not able to retrieve DatabaseMetaData.getTables information from any schema
https://api.github.com/repos/MonetDB/MonetDB/issues/4029/comments
0
2020-11-30T13:34:55Z
2024-06-28T13:12:25Z
https://github.com/MonetDB/MonetDB/issues/4029
753,483,679
4,029
[ "MonetDB", "MonetDB" ]
Date: 2016-06-28 03:12:59 +0200 From: @skinkie To: SQL devs &lt;<bugs-sql>&gt; Version: 11.21.19 (Jul2015-SP4) CC: @njnes Last updated: 2016-07-22 09:56:09 +0200 ## Comment 22215 Date: 2016-06-28 03:12:59 +0200 From: @skinkie User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/49.0.2623.108 Chrome/49.0.2623.108 Safari/537.36 Build Identifier: CREATE TABLE "sys"."av_20160609" ( "trip_hash" BIGINT, "userstopcode" CHARACTER LARGE OBJECT, "vehiclenumber" INTEGER, "operatingday" DATE, "trip_id" VARCHAR(16), "pointorder" SMALLINT, "passagesequencenumber" SMALLINT, "targetarrivaltime" VARCHAR(8), "targetdeparturetime" VARCHAR(8), "arrivaltime" TIMESTAMP, "departuretime" TIMESTAMP ); This table is generated from: create table av_20160609 as select * from tt_20160609 left join (select max(receive) as arrivaltime, trip_hash, userstopcode, vehiclenumber from kv6_20160609 where messagetype = 'ARRIVAL' group by trip_hash, userstopcode, vehiclenumber) as arrival using (trip_hash, userstopcode) left join (select max(receive) as departuretime, trip_hash, userstopcode, vehiclenumber from kv6_20160609 where messagetype = 'DEPARTURE' group by trip_hash, userstopcode, vehiclenumber) as departure using (trip_hash, userstopcode, vehiclenumber) order by trip_hash, pointorder, vehiclenumber with data; sql>select arrivaltime, userstopcode, departuretime - arrivaltime from av_20160609 where vehiclenumber is not null limit 10; inputs not the same size Moving the arrivaltime to the end of the selection list: sql>select userstopcode, departuretime - arrivaltime, arrivaltime from av_20160609 where vehiclenumber is not null limit 10; +--------------+---------+----------------------------+ | userstopcode | L1 | arrivaltime | +==============+=========+============================+ | 6022 | 155.966 | 2016-06-09 21:43:40.382000 | | 4014 | 17.936 | 2016-06-09 21:47:52.394000 | | 4012 | 17.934 | 2016-06-09 21:50:40.407000 | | 4010 | 14.983 | 2016-06-09 21:52:22.341000 | | 3443 | 14.983 | 2016-06-09 21:54:46.392000 | | 3417 | 14.983 | 2016-06-09 21:55:56.406000 | | 3423 | 14.996 | 2016-06-09 21:56:59.399000 | | 3425 | 21.003 | 2016-06-09 21:57:50.375000 | | 3609 | 18.050 | 2016-06-09 21:59:44.354000 | | 3614 | 33.035 | 2016-06-09 22:00:29.302000 | +--------------+---------+----------------------------+ 10 tuples (10.890ms) I cannot reproduce the case with the example below. DROP TABLE "av"; CREATE TABLE "av" ( "userstopcode" TEXT, "vehiclenumber" INTEGER, "arrivaltime" TIMESTAMP, "departuretime" TIMESTAMP ); INSERT INTO av VALUES ('test', NULL, now(), now()); INSERT INTO av VALUES ('test', 1, now(), now()); Reproducible: Always MonetDB 5 server v11.24.0 (64-bit, 64-bit oids, 128-bit integers) This is an unreleased version Copyright (c) 1993-July 2008 CWI Copyright (c) August 2008-2016 MonetDB B.V., all rights reserved Visit http://www.monetdb.org/ for further information Found 62.8GiB available memory, 8 available cpu cores Libraries: libpcre: 8.38 2015-11-23 (compiled with 8.38) openssl: OpenSSL 1.0.2h 3 May 2016 (compiled with OpenSSL 1.0.2h 3 May 2016) libxml2: 2.9.4 (compiled with 2.9.4) Compiled by: skinkie@chamechaude (x86_64-pc-linux-gnu) Compilation: gcc -O3 -pipe -march=broadwell -mabm -mavx256-split-unaligned-load -mavx256-split-unaligned-store -mclflushopt -mrtm -mxsavec -mxsaves -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 22246 Date: 2016-07-13 13:50:27 +0200 From: @njnes fixed in jun2016 and default. The (sub)slice instructions were not pushed down properly.
inputs not the same size
https://api.github.com/repos/MonetDB/MonetDB/issues/4028/comments
0
2020-11-30T13:34:53Z
2024-06-27T12:37:56Z
https://github.com/MonetDB/MonetDB/issues/4028
753,483,657
4,028
[ "MonetDB", "MonetDB" ]
Date: 2016-06-27 14:53:30 +0200 From: homner To: clients devs &lt;<bugs-clients>&gt; Version: 11.23.3 (Jun2016) Last updated: 2016-07-01 11:37:05 +0200 ## Comment 22212 Date: 2016-06-27 14:53:30 +0200 From: homner User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36 Build Identifier: After update from 11.12.19 to current monetdb Version 11.23.3 on centOS 7, client connections are refused. ODBC connection is always refused, mclient connections are refused when using HOST and PORT argument Reproducible: Always ### Steps to Reproduce: 1.[root@VM-MonetDBCentos ~] systemctl stop monet.service 2.[root@VM-MonetDBCentos ~] yum update MonetDB.x86_64 3.[root@VM-MonetDBCentos ~] systemctl start monet.service 4.[root@VM-MonetDBCentos ~] mclient -d mydb -h 192.168.173.16 -p50000 user(root):monetdb password: could not connect to 192.168.173.16:50000: Connection refused ### Actual Results: could not connect to 192.168.173.16:50000: Connection refused ### Expected Results: Welcome to mclient, the MonetDB/SQL interactive terminal (Jun2016) Database: MonetDB v11.23.3 (Jun2016), 'mapi:monetdb://VM-MonetDBCentos.enterprise.local:50000/mydb' Connection is also refused when trying to access via ODBC ## Comment 22213 Date: 2016-06-27 14:55:05 +0200 From: homner Created attachment 399 Screen log of executed steps > Attached file: [MonetDB Update to 11.23.3.txt](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_4027_MonetDB_Update_to_11.23.3.txt_399) (text/plain, 8310 bytes) > Description: Screen log of executed steps ## Comment 22214 Date: 2016-06-27 19:20:50 +0200 From: @sjoerdmullender My guess is this has to do with tightening of the default address on which the MonetDB server listens. You can change that with the monetdbd program. See the manual (man monetdbd) and look for the listenaddr option. The default used to be that the server would listen to all addresses (0.0.0.0), but now it listens only on localhost (127.0.0.1). Using the option you can change that. Another possible solution would be to not use the host name (or the IP address) but to use localhost (or 127.0.0.1) to connect through the driver. ## Comment 22222 Date: 2016-07-01 11:37:05 +0200 From: homner Thanks, after shell>monetdbd set listenaddr=0.0.0.0 /mydb/dbfarm we server listen to all addresses
Connection refused by mclient and ODBC Driver after update
https://api.github.com/repos/MonetDB/MonetDB/issues/4027/comments
0
2020-11-30T13:34:50Z
2024-06-28T13:12:24Z
https://github.com/MonetDB/MonetDB/issues/4027
753,483,627
4,027
[ "MonetDB", "MonetDB" ]
Date: 2016-06-27 11:24:33 +0200 From: Erik Berglund &lt;<erik.berglund>&gt; To: clients devs &lt;<bugs-clients>&gt; Version: 11.23.3 (Jun2016) Last updated: 2016-07-22 09:56:10 +0200 ## Comment 22211 Date: 2016-06-27 11:24:33 +0200 From: Erik Berglund &lt;<erik.berglund>&gt; User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36 Build Identifier: When requesting the result of a query as an object, the JDBC driver returns TINYINT fields as String objects instead of, for example Short or Integer objects. Reproducible: Always ### Steps to Reproduce: Java code to replicate: Connection c = ... PreparedStatement ps = c.prepareStatement("create table foo (bar tinyint)"); ps.execute(); ps.close(); ps = c.prepareStatement("insert into foo (bar) values(99)"); ps.execute(); ps.close(); ps = c.prepareStatement("select bar from foo"); ResultSet rs = ps.executeQuery(); if(rs.next()) { //causes exception: Short value = (Short) rs.getObject(1); } ps.close(); ps = c.prepareStatement("drop table foo "); ps.execute(); ps.close(); ### Actual Results: Instead of returning an object of an integer class (Integer, Short, or Long) the driver returns a String object with the result encoded as text. ### Expected Results: The driver should return a type that as closely matches the type of the database column as possible. This happens every time on 32 bit windows 7, but only intermittently on 64-bit Ubuntu 16.04 with the MonetDB version included in that distribution's repository (Jun2016). ## Comment 22219 Date: 2016-06-30 16:03:33 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [ac8dddcdeaf5](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ac8dddcdeaf5) 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=ac8dddcdeaf5](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=ac8dddcdeaf5) Changeset description: Added missing case for type == Short.class which is needed for SQL smallint and tinyint columns. Added Java test program Test_PSgetObject. This fixes bug #4026. Also improved handling of getObject(int colnr, Map<String,Class<?>> map) input arguments. When colnr is invalid it now throws a proper SQLException. When map is null it falls back to internal default mapping as defined in getClassForType(). ## Comment 22233 Date: 2016-07-05 16:38:06 +0200 From: @sjoerdmullender I understand the commit fixed the problem.
JDBC driver incorrectly converts TINYINT fields to String instead of an integer type.
https://api.github.com/repos/MonetDB/MonetDB/issues/4026/comments
0
2020-11-30T13:34:48Z
2024-06-27T12:37:54Z
https://github.com/MonetDB/MonetDB/issues/4026
753,483,599
4,026
[ "MonetDB", "MonetDB" ]
Date: 2016-06-23 16:03:40 +0200 From: homner To: SQL devs &lt;<bugs-sql>&gt; Version: 11.23.3 (Jun2016) CC: @njnes Last updated: 2016-10-13 10:04:26 +0200 ## Comment 22209 Date: 2016-06-23 16:03:40 +0200 From: homner User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36 Build Identifier: We found yet another combination of expressions in the WHERE clause that evaluates incorrectly. Reproducible: Always ### Steps to Reproduce: CREATE TABLE test3 (pid INTEGER); INSERT INTO test3 VALUES (1); SELECT t3.pid FROM test3 t3 WHERE FALSE AND (FALSE OR FALSE) OR TRUE similar to https://www.monetdb.org/bugzilla/show_bug.cgi?id=3851 ### Actual Results: +-----+ | pid | +=====+ +-----+ ### Expected Results: +------+ | pid | +======+ | 1 | +------+ the same problem with: FALSE AND (TRUE OR TRUE) OR TRUE FALSE AND (FALSE OR TRUE) OR TRUE if you replace the OR operator in the middle expression with AND like (FALSE OR FALSE) -> (FALSE AND FALSE), the expression evaluates correctly. ## Comment 22234 Date: 2016-07-05 16:43:54 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [dc3f469aa330](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=dc3f469aa330) 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=dc3f469aa330](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=dc3f469aa330) Changeset description: Added test for bug #4025. ## Comment 22286 Date: 2016-08-07 19:29:45 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [ef8b58752be3](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ef8b58752be3) 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=ef8b58752be3](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=ef8b58752be3) Changeset description: fixed bug #4025, ie incorrect handling of boolean expressions ## Comment 22287 Date: 2016-08-07 19:49:11 +0200 From: @njnes fixed bug in or rewrites ## Comment 24498 Date: 2016-10-13 10:04:26 +0200 From: @sjoerdmullender Jun2016-SP2 has been released.
expressions in the WHERE clause that evaluates incorrectly
https://api.github.com/repos/MonetDB/MonetDB/issues/4025/comments
0
2020-11-30T13:34:46Z
2024-06-27T12:37:52Z
https://github.com/MonetDB/MonetDB/issues/4025
753,483,576
4,025
[ "MonetDB", "MonetDB" ]
Date: 2016-06-14 11:54:50 +0200 From: @swingbit To: SQL devs &lt;<bugs-sql>&gt; Version: 11.21.19 (Jul2015-SP4) Last updated: 2016-06-21 13:02:52 +0200 ## Comment 22207 Date: 2016-06-14 11:54:50 +0200 From: @swingbit User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.86 Safari/537.36 Build Identifier: I have an assertion popping up during the creation of a foreign key constraint. When I take in isolation just the two tables involved and the FK creation, then it works. But If I take a dump of the database and add the FK creation at the end, then it fails. So the good news is that this is reproducible, the bad news is that I'll have to send a 16MB (compressed) sql file. A few facts: - Jul2015 from 2016-02-25 : OK - (I haven't had the time to test versions in between these dates) - Jul2015 from 2016-05-08: FAILS - Jul2015 from 2016-06-14: FAILS - Query: alter table B add foreign key (sb) references A; - The FK/PK column is a integer - Sizes: A: 52K, B: 77K Please let me know whom to send the file to. mserver5: gdk_bat.c:1807: void_inplace: Assertion `b->S->count > (id - b->H->seq)' failed Breakpoint 1, 0x00007eff1dcf5290 in __assert_fail () from /lib64/libc.so.6 (gdb) bt 0 0x00007eff1dcf5290 in __assert_fail () from /lib64/libc.so.6 1 0x00007eff20301e05 in void_inplace (b=0x7eff04ca44b0, id=9223372036854775808, val=0x7efeee0f0000, force=1 '\001') at gdk_bat.c:1807 2 0x00007eff20302489 in void_replace_bat (b=0x7eff04ca44b0, p=0x7eff04ca8520, u=0x7efef00208f0, force=1 '\001') at gdk_bat.c:1832 3 0x00007eff149a8f3c in delta_update_bat (bat=0x7eff04ca5f10, tids=0x7eff04ca8520, updates=0x7efef00208f0, is_new=1) at bat_storage.c:310 4 0x00007eff149a9ca4 in update_idx (tr=0x20e3e20, i=0x7eff04c63600, tids=0x7eff04ca8520, upd=0x7efef00208f0, tpe=4) at bat_storage.c:490 5 0x00007eff148346c6 in mvc_update_wrap (cntxt=0x7eff15bdc328, mb=0x7eff044ec5b0, stk=0x7eff04c8bc20, pci=0x7eff04c8ba00) at sql.c:2057 6 0x00007eff208eaab1 in runMALsequence (cntxt=0x7eff15bdc328, mb=0x7eff044ec5b0, startpc=1, stoppc=0, stk=0x7eff04c8bc20, env=0x0, pcicaller=0x0) at mal_interpreter.c:643 7 0x00007eff208e9b6d in callMAL (cntxt=0x7eff15bdc328, mb=0x7eff044ec5b0, env=0x7efeec2a1958, argv=0x7efeec2a1a00, debug=0 '\000') at mal_interpreter.c:447 8 0x00007eff14852a94 in SQLexecutePrepared (c=0x7eff15bdc328, be=0x7eff04544330, q=0x7eff04567270) at sql_execute.c:328 9 0x00007eff14852f9c in SQLengineIntern (c=0x7eff15bdc328, be=0x7eff04544330) at sql_execute.c:390 10 0x00007eff14851316 in SQLengine (c=0x7eff15bdc328) at sql_scenario.c:1323 11 0x00007eff20916061 in runPhase (c=0x7eff15bdc328, phase=4) at mal_scenario.c:515 12 0x00007eff209162a3 in runScenarioBody (c=0x7eff15bdc328) at mal_scenario.c:559 13 0x00007eff209163b3 in runScenario (c=0x7eff15bdc328) at mal_scenario.c:579 14 0x00007eff20917cef in MSserveClient (dummy=0x7eff15bdc328) at mal_session.c:439 15 0x00007eff209176e8 in MSscheduleClient (command=0x7eff0416d100 "\001", challenge=0x7efeec2a1df0 "KcGirqNfnA7", fin=0x7eff0414b590, fout=0x7eff048957b0) at mal_session.c:319 16 0x00007eff20a104bf in doChallenge (data=0x7eff000008d0) at mal_mapi.c:184 17 0x00007eff20317869 in thread_starter (arg=0x7eff00000a70) at gdk_system.c:458 18 0x00007eff1e09060a in start_thread () from /lib64/libpthread.so.0 19 0x00007eff1ddcaa4d in clone () from /lib64/libc.so.6 Reproducible: Always ## Comment 22208 Date: 2016-06-21 13:02:52 +0200 From: @swingbit It turns out the issue is caused by some of our own extensions. I've identified the code responsible for this, but not the reason yet. Closing this issue as invalid.
gdk_bat.c:1807: void_inplace: Assertion `b->S->count > (id - b->H->seq)' failed
https://api.github.com/repos/MonetDB/MonetDB/issues/4024/comments
0
2020-11-30T13:34:43Z
2024-06-28T13:12:24Z
https://github.com/MonetDB/MonetDB/issues/4024
753,483,540
4,024
[ "MonetDB", "MonetDB" ]
Date: 2016-06-13 13:44:12 +0200 From: @skinkie To: SQL devs &lt;<bugs-sql>&gt; Version: 11.21.19 (Jul2015-SP4) Last updated: 2016-06-13 13:44:12 +0200 ## Comment 22205 Date: 2016-06-13 13:44:12 +0200 From: @skinkie User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/49.0.2623.108 Chrome/49.0.2623.108 Safari/537.36 Build Identifier: Currently a top N query by select * from mergetable limit 1; materializes the entire tableset. Would be nice if it would select breadth-first. Reproducible: Always MonetDB 5 server v11.24.0 (64-bit, 64-bit oids, 128-bit integers) This is an unreleased version Copyright (c) 1993-July 2008 CWI Copyright (c) August 2008-2016 MonetDB B.V., all rights reserved Visit http://www.monetdb.org/ for further information Found 62.8GiB available memory, 8 available cpu cores Libraries: libpcre: 8.38 2015-11-23 (compiled with 8.38) openssl: OpenSSL 1.0.2h 3 May 2016 (compiled with OpenSSL 1.0.2h 3 May 2016) libxml2: 2.9.4 (compiled with 2.9.4) Compiled by: skinkie@chamechaude (x86_64-pc-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
TOP N queries in merge tables
https://api.github.com/repos/MonetDB/MonetDB/issues/4023/comments
0
2020-11-30T13:34:41Z
2024-06-28T07:19:58Z
https://github.com/MonetDB/MonetDB/issues/4023
753,483,503
4,023
[ "MonetDB", "MonetDB" ]
Date: 2016-06-13 11:15:38 +0200 From: @skinkie To: SQL devs &lt;<bugs-sql>&gt; Version: 11.21.19 (Jul2015-SP4) CC: martin.van.dinther, webhostinguk Last updated: 2019-02-12 13:52:30 +0100 ## Comment 22204 Date: 2016-06-13 11:15:38 +0200 From: @skinkie User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/49.0.2623.108 Chrome/49.0.2623.108 Safari/537.36 Build Identifier: The query generator in Tableau Desktop 9.3 is generating queries in this template. SELECT AVG(CAST("punctdep"."punctuality" AS FLOAT)) AS "avg:punctuality:ok", CAST("punctdep"."classificatie" AS VARCHAR(100)) AS "classificatie", COUNT("punctdep"."punctuality") AS "cnt:punctuality:ok", CAST("punctdep"."lineplanningnumber" AS VARCHAR(100)) AS "lineplanningnumber", CAST("punctdep"."name" AS VARCHAR(100)) AS "name", "punctdep"."pointorder" AS "pointorder", SUM("punctdep"."punctuality") AS "sum:punctuality:ok" FROM "sys"."punctdep" "punctdep" WHERE (((CAST("punctdep"."classificatie" AS VARCHAR(100)) IN ('t < -60', 't > 300')) OR ((CAST("punctdep"."classificatie" AS VARCHAR(100)) >= '-60 <= t < 0') AND (CAST("punctdep"."classificatie" AS VARCHAR(100)) <= '60 < t <= 120'))) AND (CAST("punctdep"."journeynumber" AS VARCHAR(100)) >= '1') AND (CAST("punctdep"."journeynumber" AS VARCHAR(100)) <= '9997') AND (CAST("punctdep"."lineplanningnumber" AS VARCHAR(100)) = '4') AND ("punctdep"."operatingday" = DATE'2016-03-08') AND (CAST("punctdep"."richting" AS VARCHAR(100)) = 'Zoetermeer, Javalaan')) GROUP BY "classificatie", "lineplanningnumber", "name", "pointorder"; Schema definition: CREATE MERGE TABLE "sys"."punctdep" ( "operatingday" DATE, "lineplanningnumber" CHARACTER LARGE OBJECT, "journeynumber" CHARACTER LARGE OBJECT, "pointorder" SMALLINT, "userstopcode" CHARACTER LARGE OBJECT, "punctuality" INTEGER, "name" CHARACTER LARGE OBJECT, "vanaf" CHARACTER LARGE OBJECT, "richting" CHARACTER LARGE OBJECT, "vehiclenumber" INTEGER, "ltmin61" TINYINT, "min60" TINYINT, "pos60" TINYINT, "pos120" TINYINT, "pos180" TINYINT, "pos300" TINYINT, "gt300" TINYINT, "classificatie" CHARACTER LARGE OBJECT, "dow" TINYINT, "hod" TINYINT ); Optimisations that are possible but not used in MonetDB: Classificatie is a column which has just a few distinct values. The distinct values are selected inclusively while the user actually wants to prevent 'Onbekend' to be selected. Would it be reasonable for a database system to do a faster negation? Stupid query generation from the Client: Columns are recasted. This results in MonetDB performance to decrease ten fold. I wonder: how reasonable would it be to make a cast to varchar a no-op when applied to a text (character large object) where the proposed varchar constraint is larger than the (const) equality constraint hence: the column is not shrunken to facilitate equality. An other suggestion might be to optimise: cast(bla to varchar(2)) = 'hello world' => 'hello world' = 11, 11 > 2, op to false; cast(bla to varchar(12)) = 'hello world' => 'hello world' = 11, 11 >= 12, strncmp('hello world', bla, max(12, strlen('hello world')) Reproducible: Always MonetDB 5 server v11.24.0 (64-bit, 64-bit oids, 128-bit integers) This is an unreleased version Copyright (c) 1993-July 2008 CWI Copyright (c) August 2008-2016 MonetDB B.V., all rights reserved Visit http://www.monetdb.org/ for further information Found 62.8GiB available memory, 8 available cpu cores Libraries: libpcre: 8.38 2015-11-23 (compiled with 8.38) openssl: OpenSSL 1.0.2h 3 May 2016 (compiled with OpenSSL 1.0.2h 3 May 2016) libxml2: 2.9.4 (compiled with 2.9.4) Compiled by: skinkie@chamechaude (x86_64-pc-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 22210 Date: 2016-06-23 18:48:51 +0200 From: Martin van Dinther &lt;<martin.van.dinther>&gt; I guess that Tableau is generating the CAST(... AS VARCHAR(100)) parts as most RDBMS do not allow complex operations on CLOBs, so convert it to VARCHAR first. MonetDB however does allow to use all string operations even on CLOB columns. To 'help' Tableau to not generate the CAST(... AS VARCHAR(100)) parts you could create a view (or copy the table or recreate the table) to have all CLOB columns to be of type VARCHAR(100) instead. CREATE VIEW "sys"."punctdep_noCLOB" AS SELECT "operatingday", CAST("lineplanningnumber" AS VARCHAR(100)) AS "lineplanningnumber", CAST("journeynumber" AS VARCHAR(100)) AS "journeynumber", "pointorder", CAST("userstopcode" AS VARCHAR(100)) AS "userstopcode", "punctuality", CAST("name" AS VARCHAR(100)) AS "name", CAST("vanaf" AS VARCHAR(100)) AS "vanaf", CAST("richting" AS VARCHAR(100)) AS "richting", "vehiclenumber", "ltmin61", "min60", "pos60", "pos120", "pos180", "pos300", "gt300", CAST("classificatie" AS VARCHAR(100)) AS "classificatie", "dow", "hod" FROM "sys"."punctdep"; Please try and let us know if it helps. This would be a workaround, not an implementation of the enhancement of course. ## Comment 26691 Date: 2018-11-20 19:21:33 +0100 From: Martin van Dinther &lt;<martin.van.dinther>&gt; Hi Stefan, Did the workaround with the view work? If not, you should avoid using CHARACTER LARGE OBJECT in the CREATE MERGE TABLE and use VARCHAR(999) instead (or VARCHAR(9999) depending on the content of the column data), for example: CREATE MERGE TABLE "sys"."punctdep" ( "operatingday" DATE, "lineplanningnumber" VARCHAR(999), "journeynumber" VARCHAR(999), "pointorder" SMALLINT, "userstopcode" VARCHAR(999), "punctuality" INTEGER, "name" VARCHAR(999), "vanaf" VARCHAR(999), "richting" VARCHAR(999), "vehiclenumber" INTEGER, "ltmin61" TINYINT, "min60" TINYINT, "pos60" TINYINT, "pos120" TINYINT, "pos180" TINYINT, "pos300" TINYINT, "gt300" TINYINT, "classificatie" VARCHAR(999), "dow" TINYINT, "hod" TINYINT ); This way Tableau knows it can use: "classificatie" IN ('case1', 'case2') without the need to add CAST("classificatie" AS VARCHAR(100)) functions as the "classificatie" column is already a VARCHAR. This should speed up your queries. ## Comment 26692 Date: 2018-11-20 20:13:15 +0100 From: @skinkie I was sadly not able to test the workaround.
Preventing CAST( AS VARCHAR) from TEXT within WHERE part
https://api.github.com/repos/MonetDB/MonetDB/issues/4022/comments
0
2020-11-30T13:34:39Z
2024-06-28T07:19:58Z
https://github.com/MonetDB/MonetDB/issues/4022
753,483,468
4,022
[ "MonetDB", "MonetDB" ]
Date: 2016-06-08 21:38:56 +0200 From: @skinkie To: SQL devs &lt;<bugs-sql>&gt; Version: 11.21.19 (Jul2015-SP4) Last updated: 2016-07-22 09:56:07 +0200 ## Comment 22200 Date: 2016-06-08 21:38:56 +0200 From: @skinkie User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/49.0.2623.108 Chrome/49.0.2623.108 Safari/537.36 Build Identifier: ANALYZE sys.kv17_20151208; !42000!syntax error, unexpected IDENT, expecting ')' or ',' in: "insert into sys.statistics values(15725,'clob',2,now(),23031,23031,21,0,'"'s" Reproducible: Always MonetDB 5 server v11.24.0 (64-bit, 64-bit oids, 128-bit integers) This is an unreleased version Copyright (c) 1993-July 2008 CWI Copyright (c) August 2008-2016 MonetDB B.V., all rights reserved Visit http://www.monetdb.org/ for further information Found 62.8GiB available memory, 8 available cpu cores Libraries: libpcre: 8.38 2015-11-23 (compiled with 8.38) openssl: OpenSSL 1.0.2h 3 May 2016 (compiled with OpenSSL 1.0.2h 3 May 2016) libxml2: 2.9.4 (compiled with 2.9.4) Compiled by: skinkie@chamechaude (x86_64-pc-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 Marking this as critical because it seems that someone inserting the correct content might be able to temper with escaping. ## Comment 22228 Date: 2016-07-05 15:34:12 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [1572a42868fa](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1572a42868fa) 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=1572a42868fa](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=1572a42868fa) Changeset description: Create and use a variant of strToStr to convert value for inclusion in SQL query. This fixes bug #4021. ## Comment 22229 Date: 2016-07-05 15:42:50 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [f94345f8e81b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f94345f8e81b) 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=f94345f8e81b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=f94345f8e81b) Changeset description: Test for bug #4021.
Analyze query does not escape input [security]
https://api.github.com/repos/MonetDB/MonetDB/issues/4021/comments
0
2020-11-30T13:34:37Z
2024-06-27T12:37:48Z
https://github.com/MonetDB/MonetDB/issues/4021
753,483,444
4,021
[ "MonetDB", "MonetDB" ]
Date: 2016-06-08 20:51:46 +0200 From: @skinkie To: SQL devs &lt;<bugs-sql>&gt; Version: -- development CC: @njnes Last updated: 2018-08-31 13:34:13 +0200 ## Comment 22199 Date: 2016-06-08 20:51:46 +0200 From: @skinkie User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/49.0.2623.108 Chrome/49.0.2623.108 Safari/537.36 Build Identifier: I would like to import a timestamp with time zone from a CSV file. The ISO format is used hence: '2015-12-08T00:46:60+01:00'. As follow up to my last bug, I also would like to see that a cast would work. Reproducible: Always ### Steps to Reproduce: 1. copy a timestamp with time zone from a CSV 2. select cast('2015-12-08T00:46:60+0200' as timestamp with time zone); ### Actual Results: Failed to import table line 1483 field 3 'timestamptz(7)' expected in '2015-12-08T00:46:60+01:00' MonetDB 5 server v11.24.0 (64-bit, 64-bit oids, 128-bit integers) This is an unreleased version Copyright (c) 1993-July 2008 CWI Copyright (c) August 2008-2016 MonetDB B.V., all rights reserved Visit http://www.monetdb.org/ for further information Found 62.8GiB available memory, 8 available cpu cores Libraries: libpcre: 8.38 2015-11-23 (compiled with 8.38) openssl: OpenSSL 1.0.2h 3 May 2016 (compiled with OpenSSL 1.0.2h 3 May 2016) libxml2: 2.9.4 (compiled with 2.9.4) Compiled by: skinkie@chamechaude (x86_64-pc-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 24970 Date: 2017-02-03 17:10:04 +0100 From: @sjoerdmullender The problem is, there are fewer than 60 seconds in a minute. In other words, the input is incorrect. If you change the 60 into 59, the query works. ## Comment 24972 Date: 2017-02-03 17:22:25 +0100 From: @skinkie There are more than 60 seconds in a minute in a given year. Which are called leap seconds. As is explained in man mktime. struct tm { int tm_sec; /* Seconds (0-60) */ int tm_min; /* Minutes (0-59) */ int tm_hour; /* Hours (0-23) */ int tm_mday; /* Day of the month (1-31) */ int tm_mon; /* Month (0-11) */ int tm_year; /* Year - 1900 */ int tm_wday; /* Day of the week (0-6, Sunday = 0) */ int tm_yday; /* Day in the year (0-365, 1 Jan = 0) */ int tm_isdst; /* Daylight saving time */ }; tm_sec The number of seconds after the minute, normally in the range 0 to 59, but can be up to 60 to allow for leap seconds. As an example program that uses mktime would give the expected output, hence the reason this is a bug. include <stdio.h> include <time.h> int main () { int ret; struct tm info; char buffer[80]; info.tm_year = 2001 - 1900; info.tm_mon = 7 - 1; info.tm_mday = 4; info.tm_hour = 0; info.tm_min = 0; info.tm_sec = 60; info.tm_isdst = -1; ret = mktime(&info); if( ret == -1 ) { printf("Error: unable to make time using mktime\n"); } else { strftime(buffer, sizeof(buffer), "%c", &info ); printf(buffer); } return(0); } ## Comment 26593 Date: 2018-08-08 11:19:52 +0200 From: @njnes fixed ## Comment 26608 Date: 2018-08-31 13:34:13 +0200 From: @skinkie Thanks for fixing this Niels :)
Importing timestamp with zone from copy into
https://api.github.com/repos/MonetDB/MonetDB/issues/4020/comments
0
2020-11-30T13:34:34Z
2024-06-27T12:37:47Z
https://github.com/MonetDB/MonetDB/issues/4020
753,483,404
4,020
[ "MonetDB", "MonetDB" ]
Date: 2016-06-08 20:48:19 +0200 From: @skinkie To: SQL devs &lt;<bugs-sql>&gt; Version: 11.21.19 (Jul2015-SP4) CC: @njnes Last updated: 2016-10-13 10:04:11 +0200 ## Comment 22198 Date: 2016-06-08 20:48:19 +0200 From: @skinkie User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/49.0.2623.108 Chrome/49.0.2623.108 Safari/537.36 Build Identifier: I would like to use MonetDB to parse an ISO timestamp. This operation works with copy into for certain timestamps but doesn't work in the SQL layer. Reproducible: Always ### Steps to Reproduce: 1. select cast('2015-12-08T00:46:60' as timestamp); 2. select cast('2015-12-08 00:46:60' as timestamp); ### Actual Results: +----------------------------+ | L1 | +============================+ | null | +----------------------------+ MonetDB 5 server v11.24.0 (64-bit, 64-bit oids, 128-bit integers) This is an unreleased version Copyright (c) 1993-July 2008 CWI Copyright (c) August 2008-2016 MonetDB B.V., all rights reserved Visit http://www.monetdb.org/ for further information Found 62.8GiB available memory, 8 available cpu cores Libraries: libpcre: 8.38 2015-11-23 (compiled with 8.38) openssl: OpenSSL 1.0.2h 3 May 2016 (compiled with OpenSSL 1.0.2h 3 May 2016) libxml2: 2.9.4 (compiled with 2.9.4) Compiled by: skinkie@chamechaude (x86_64-pc-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 22309 Date: 2016-08-19 16:33:16 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [93eaf7528d23](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=93eaf7528d23) 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=93eaf7528d23](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=93eaf7528d23) Changeset description: added test for bug #4019. fixed bug: added check for nil by timestamp fromstr ## Comment 24493 Date: 2016-10-13 10:04:11 +0200 From: @sjoerdmullender Jun2016-SP2 has been released.
Casting a timestamp from a string results in NULL
https://api.github.com/repos/MonetDB/MonetDB/issues/4019/comments
0
2020-11-30T13:34:32Z
2024-06-27T12:37:46Z
https://github.com/MonetDB/MonetDB/issues/4019
753,483,381
4,019
[ "MonetDB", "MonetDB" ]
Date: 2016-06-08 20:14:56 +0200 From: @skinkie To: SQL devs &lt;<bugs-sql>&gt; Version: -- development CC: @njnes Last updated: 2016-06-09 15:52:27 +0200 ## Comment 22197 Date: 2016-06-08 20:14:56 +0200 From: @skinkie MonetDB was compiled with --with-lzma. When using copy into with a filename having an .lzma suffix I get the error: Failed to import table record too long (EOS found) MonetDB 5 server v11.24.0 (64-bit, 64-bit oids, 128-bit integers) This is an unreleased version Copyright (c) 1993-July 2008 CWI Copyright (c) August 2008-2016 MonetDB B.V., all rights reserved Visit http://www.monetdb.org/ for further information Found 62.8GiB available memory, 8 available cpu cores Libraries: libpcre: 8.38 2015-11-23 (compiled with 8.38) openssl: OpenSSL 1.0.2h 3 May 2016 (compiled with OpenSSL 1.0.2h 3 May 2016) libxml2: 2.9.4 (compiled with 2.9.4) Compiled by: skinkie@chamechaude (x86_64-pc-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 22201 Date: 2016-06-09 13:52:45 +0200 From: @njnes only the 'xz' extension is used for this. ## Comment 22202 Date: 2016-06-09 14:47:32 +0200 From: @skinkie If you use the tool lzma, then you get the lzma extension. Would you consider to support both? ## Comment 22203 Date: 2016-06-09 15:52:27 +0200 From: @skinkie Created attachment 398 LZMA suffix patch > Attached file: [lzma.patch](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_4018_lzma.patch_398) (text/plain, 464 bytes) > Description: LZMA suffix patch
Should .lzma files be imported via copy into?
https://api.github.com/repos/MonetDB/MonetDB/issues/4018/comments
0
2020-11-30T13:34:30Z
2024-06-28T13:12:23Z
https://github.com/MonetDB/MonetDB/issues/4018
753,483,351
4,018
[ "MonetDB", "MonetDB" ]
Date: 2016-06-06 10:57:19 +0200 From: fioravanzos To: Embedded devs &lt;<bugs-embedded>&gt; Version: unspecified CC: @njnes Last updated: 2017-10-26 14:01:28 +0200 ## Comment 22196 Date: 2016-06-06 10:57:19 +0200 From: fioravanzos User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36 Build Identifier: If I execute a loopback query with a min() or max() statement in it, monet crashes. mserver5 outputs 'segmentation fault'. Example of function used: CREATE FUNCTION myfunc() RETURNS TABLE(n STRING) LANGUAGE PYTHON { res = _conn.execute("SELECT max(d) FROM mytable;") result = dict() result['n'] = str(res) return result }; Using the function without min() or max() in the query does not arise any issue. Reproducible: Always ### Steps to Reproduce: 1.Create function 2.Executed function 3.Server crashed ### Actual Results: Server crashes, segmentation fault ### Expected Results: Returned a table with the min or max result ## Comment 24971 Date: 2017-02-03 17:15:12 +0100 From: @sjoerdmullender Is this still a problem? I tried: sql>create table mytable (d int); operation successful (13.110ms) sql>create function myfunc() returns table(n string) language python { more> res = _conn.execute("SELECT max(d) FROM mytable;") more> result = dict() more> result['n'] = str(res) more> return result more>}; operation successful (1.2s) sql>insert into mytable values (10); 1 affected row (5.312ms) sql>insert into mytable values (20); 1 affected row (5.973ms) sql>select * from myfunc(); +----------------------------------+ | n | +==================================+ | {'L3': array([20], dtype=int32)} | +----------------------------------+ 1 tuple (9.596ms) I.e., no crash. This was in the Dec2016 branch. ## Comment 24982 Date: 2017-02-07 09:14:39 +0100 From: fioravanzos Indeed the issue seems to have been resolved. Thank you!
server crashes when executing particular loopback query in embedded python
https://api.github.com/repos/MonetDB/MonetDB/issues/4017/comments
0
2020-11-30T13:34:27Z
2024-06-27T12:37:44Z
https://github.com/MonetDB/MonetDB/issues/4017
753,483,326
4,017
[ "MonetDB", "MonetDB" ]
Date: 2016-06-06 02:20:45 +0200 From: @skinkie To: SQL devs &lt;<bugs-sql>&gt; Version: 11.21.19 (Jul2015-SP4) CC: @njnes Last updated: 2016-12-21 13:07:34 +0100 ## Comment 22195 Date: 2016-06-06 02:20:45 +0200 From: @skinkie User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2739.0 Safari/537.36 Build Identifier: When using a merge table with analyze and read only awesome performance can be achieved using a point query; explain select count(*) from punctdep where operatingday = '2015-06-02'; function user.main():void; X_2 := sql.mvc(); X_6:bat[:date] := sql.bind(X_2,"sys","punctdep_20150602","operatingday",0); C_3:bat[:oid] := sql.tid(X_2,"sys","punctdep_20150602"); C_9 := algebra.subselect(X_6,C_3,"2015-06-02","2015-06-02",true,false,false); X_12 := algebra.projection(C_9,X_6); X_13 := aggr.count(X_12); sql.resultSet("sys.L1","L1","bigint",64,0,7,X_13); end user.main; Now this trivial examples still explodes in the query plan: explain select count(*) from punctdep where operatingday = '2015-06-02' or operatingday = '2015-06-03'; explain select count(*) from punctdep where operatingday IN ('2015-06-02', '2015-06-03'); Reproducible: Always MonetDB 5 server v11.24.0 (64-bit, 64-bit oids, 128-bit integers) This is an unreleased version Copyright (c) 1993-July 2008 CWI Copyright (c) August 2008-2016 MonetDB B.V., all rights reserved Visit http://www.monetdb.org/ for further information Found 62.8GiB available memory, 8 available cpu cores Libraries: libpcre: 8.38 2015-11-23 (compiled with 8.38) openssl: OpenSSL 1.0.2h 3 May 2016 (compiled with OpenSSL 1.0.2h 3 May 2016) libxml2: 2.9.4 (compiled with 2.9.4) Compiled by: skinkie@chamechaude (x86_64-pc-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 22308 Date: 2016-08-19 16:21:39 +0200 From: @njnes in lists and ranges are handled by the current partition elimination in the default branch.
merge table only optimises for point query
https://api.github.com/repos/MonetDB/MonetDB/issues/4016/comments
0
2020-11-30T13:34:25Z
2024-06-27T12:37:43Z
https://github.com/MonetDB/MonetDB/issues/4016
753,483,302
4,016
[ "MonetDB", "MonetDB" ]
Date: 2016-06-02 14:33:07 +0200 From: @kutsurak To: Merovingian devs &lt;<bugs-merovingian>&gt; Version: 11.21.19 (Jul2015-SP4) Last updated: 2016-06-23 10:24:28 +0200 ## Comment 22190 Date: 2016-06-02 14:33:07 +0200 From: @kutsurak User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:46.0) Gecko/20100101 Firefox/46.0 Build Identifier: The MonetDB daemon crashes on ARM virtual machines, when using the monetdb release command. I will try to test on actual hardware. Reproducible: Always ### Steps to Reproduce: 1. monetdbd create /path/to/dbfarm 2. monetdbd start /path/to/dbfarm 3. monetdb create test_db 4. monetdb release test_db The contents of the merovingian.log are: 2016-06-02 11:38:31 MSG merovingian[2418]: Merovingian 1.7 (unreleased) starting 2016-06-02 11:38:31 MSG merovingian[2418]: monitoring dbfarm /home/exanest/usr/farms/exanest_db 2016-06-02 11:38:31 MSG merovingian[2418]: accepting connections on TCP socket localhost:50000 2016-06-02 11:38:31 MSG merovingian[2418]: accepting connections on UNIX domain socket /tmp/.s.monetdb.50000 2016-06-02 11:38:31 MSG discovery[2418]: listening for UDP messages on localhost:50000 2016-06-02 11:38:31 MSG control[2418]: accepting connections on UNIX domain socket /tmp/.s.merovingian.50000 SEGMENTATION FAULT OCCURRED A fatal error has occurred which prevents monetdbd from operating. This is likely a bug in monetdbd, please report it on http://bugs.monetdb.org/ and include the tail of this log in your bugreport with your explanation of what you were doing, if possible. ABORTING NOW, YOU HAVE TO MANUALLY KILL ALL REMAINING mserver5 PROCESSES ## Comment 22192 Date: 2016-06-02 17:59:53 +0200 From: @kutsurak The crash is caused by an incorrect cast to char when using fgetc at msabaoth.c line 852. ## Comment 22194 Date: 2016-06-03 12:50:37 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [a33f95d3b785](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a33f95d3b785) 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=a33f95d3b785](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=a33f95d3b785) Changeset description: Don't cast (f)getc to char: you loose information. This fixes bug #4015.
Daemon crashes on database release command
https://api.github.com/repos/MonetDB/MonetDB/issues/4015/comments
0
2020-11-30T13:34:23Z
2024-06-27T12:37:42Z
https://github.com/MonetDB/MonetDB/issues/4015
753,483,276
4,015
[ "MonetDB", "MonetDB" ]
Date: 2016-05-25 05:27:30 +0200 From: @mlkersten To: SQL devs &lt;<bugs-sql>&gt; Version: -- development CC: @njnes Last updated: 2016-07-22 09:56:19 +0200 ## Comment 22178 Date: 2016-05-25 05:27:30 +0200 From: @mlkersten User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:46.0) Gecko/20100101 Firefox/46.0 Build Identifier: When running SF100 on the desktop I get a OOM kill persistently at Q21 Reproducible: Always ## Comment 22179 Date: 2016-05-25 05:30:09 +0200 From: @mlkersten On the default branch ## Comment 22236 Date: 2016-07-05 19:03:53 +0200 From: @njnes cannot repeat this reliably, ie its related to the os
KILL signal
https://api.github.com/repos/MonetDB/MonetDB/issues/4014/comments
0
2020-11-30T13:34:20Z
2024-06-27T12:37:41Z
https://github.com/MonetDB/MonetDB/issues/4014
753,483,247
4,014
[ "MonetDB", "MonetDB" ]
Date: 2016-05-24 14:31:12 +0200 From: @swingbit To: GDK devs &lt;<bugs-common>&gt; Version: 11.21.1 (Jul2015) Last updated: 2016-06-23 10:24:13 +0200 ## Comment 22173 Date: 2016-05-24 14:31:12 +0200 From: @swingbit User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.86 Safari/537.36 Build Identifier: I fired a cartesian product by mistake, which obviously failed with GDK reported error. GDKextendf: could not extend file !OS: No space left on device HEAPalloc: Insufficient space for HEAP of 6754142916608 bytes. GDKextendf: could not extend file !OS: No space left on device HEAPalloc: Insufficient space for HEAP of 6754142916608 bytes. sql> The problem is that by trying this extend, the disk was filled up. So I got back a prompt, like if nothing had happened, but an unusable system. It only freed up the allocated space when I stopped and restarted the mserver5. Can the so-far-allocated memory not be freed when this error occurs? Even better, this was a cartesian product, no estimations involved, we know the size of the result before even trying to execute, shouldn't this fail before allocating any memory? Reproducible: Always MonetDB 5 server v11.21.20 (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 22184 Date: 2016-05-30 14:30:02 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [57f925797ea1](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=57f925797ea1) 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=57f925797ea1](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=57f925797ea1) Changeset description: Truncate file back to original size after failed extend. This should solve bug #4013. ## Comment 22185 Date: 2016-05-30 14:31:45 +0200 From: @sjoerdmullender Fix is in Jun2016 branch.
GDKextendf does not free up memory when it fails due to insufficient resources
https://api.github.com/repos/MonetDB/MonetDB/issues/4013/comments
0
2020-11-30T13:34:18Z
2024-06-27T12:37:40Z
https://github.com/MonetDB/MonetDB/issues/4013
753,483,211
4,013
[ "MonetDB", "MonetDB" ]
Date: 2016-05-23 23:49:49 +0200 From: @yzchang To: SQL devs &lt;<bugs-sql>&gt; Version: -- development CC: warren.master Last updated: 2016-07-31 15:08:58 +0200 ## Comment 22172 Date: 2016-05-23 23:49:49 +0200 From: @yzchang Just to not forget: Currently, the "columnsize" returned by the storage() function shows the actual size of the file of the corresponding BAT, i.e., this size includes all values that have been deleted (by UPDATE or DELETE) from this column earlier. It would be useful to extend the storage() function to also show the total size of the deleted values. ## Comment 22271 Date: 2016-07-31 15:08:58 +0200 From: WARREN MASTER &lt;<warren.master>&gt; is there any other way that i can determine the size of the deleted records?
Extend storage() function with garbage size
https://api.github.com/repos/MonetDB/MonetDB/issues/4012/comments
0
2020-11-30T13:34:16Z
2024-06-28T07:19:58Z
https://github.com/MonetDB/MonetDB/issues/4012
753,483,192
4,012
[ "MonetDB", "MonetDB" ]
Date: 2016-05-19 17:50:35 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; To: SQL devs &lt;<bugs-sql>&gt; Version: 11.21.19 (Jul2015-SP4) CC: @njnes Last updated: 2016-06-23 10:23:59 +0200 ## Comment 22156 Date: 2016-05-19 17:50:35 +0200 From: Richard Hughes &lt;<richard.monetdb>&gt; Build is Jul2015 [df58cfe6f8b9](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=df58cfe6f8b9) ### Steps to reproduce: root@mybox:~ monetdb create foobar created database in maintenance mode: foobar root@mybox:~ monetdb release foobar taken database out of maintenance mode: foobar In console 1: $ mclient -h 127.0.0.1 -u monetdb foobar sql>create user foo with password 'test' name 'foo' schema sys; operation successful (43.508ms) sql>select * from sys.sessions; +---------+----------------------+------+----------------------+------+-------+ | user | login | sess | lastcommand | quer | activ | : : : iont : : ytim : e : : : : imeo : : eout : : : : : ut : : : : +=========+======================+======+======================+======+=======+ | monetdb | 2016-05-19 15:43:23. | 0 | 2016-05-19 15:44:06. | 0 | true | : : 000000 : : 000000 : : : +---------+----------------------+------+----------------------+------+-------+ 1 tuple (12.965ms) In console 2: $ mclient -h 127.0.0.1 -u foo foobar sql> Back in console 1: sql>select * from sys.sessions; +---------+----------------------+------+----------------------+------+-------+ | user | login | sess | lastcommand | quer | activ | : : : iont : : ytim : e : : : : imeo : : eout : : : : : ut : : : : +=========+======================+======+======================+======+=======+ | monetdb | 2016-05-19 15:43:23. | 0 | 2016-05-19 15:44:27. | 0 | true | : : 000000 : : 000000 : : : | monetdb | 2016-05-19 15:44:23. | 0 | 2016-05-19 15:44:23. | 0 | false | : : 000000 : : 000000 : : : +---------+----------------------+------+----------------------+------+-------+ 2 tuples (40.751ms) Expected result: The second query should show one row with user='monetdb' and one row with user='foo'. ## Comment 22175 Date: 2016-05-24 23:47:37 +0200 From: @njnes fixed in jul2015, ie don't pass a fixed string but use string from the client record. ## Comment 22176 Date: 2016-05-24 23:49:26 +0200 From: @njnes resolved in jun2016, as jun2015 didn't have the username field.. ## Comment 22177 Date: 2016-05-24 23:51:10 +0200 From: MonetDB Mercurial Repository &lt;<hg>&gt; Changeset [6e6a6b6f4be1](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6e6a6b6f4be1) 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=6e6a6b6f4be1](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=6e6a6b6f4be1) Changeset description: fixed bug #4011
sys.sessions.user column always shows 'monetdb'
https://api.github.com/repos/MonetDB/MonetDB/issues/4011/comments
0
2020-11-30T13:34:14Z
2024-06-27T12:37:38Z
https://github.com/MonetDB/MonetDB/issues/4011
753,483,156
4,011