issue_owner_repo listlengths 2 2 | issue_body stringlengths 0 261k ⌀ | issue_title stringlengths 1 925 | issue_comments_url stringlengths 56 81 | issue_comments_count int64 0 2.5k | issue_created_at stringlengths 20 20 | issue_updated_at stringlengths 20 20 | issue_html_url stringlengths 37 62 | issue_github_id int64 387k 2.46B | issue_number int64 1 127k |
|---|---|---|---|---|---|---|---|---|---|
[
"MonetDB",
"MonetDB"
] | Date: 2012-06-29 21:51:25 +0200
From: Benjie Chen <<benjie>>
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes
Last updated: 2012-07-04 15:11:11 +0200
## Comment 17400
Date: 2012-06-29 21:51:25 +0200
From: Benjie Chen <<benjie>>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_7) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.56 Safari/536.5
Build Identifier:
I can do
select * from table where name IS NULL;
but
select * from table where name = NULL;
breaks.
MySQL supports that, but I am not sure what the standards say.
Reproducible: Always
## Comment 17407
Date: 2012-07-04 15:11:11 +0200
From: @njnes
error is expected as the sql standard doesn't allow for = NULL.
| = NULL in WHERE clause breaks | https://api.github.com/repos/MonetDB/MonetDB/issues/3110/comments | 0 | 2020-11-30T12:11:33Z | 2024-06-28T13:18:28Z | https://github.com/MonetDB/MonetDB/issues/3110 | 753,425,895 | 3,110 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-06-29 13:58:02 +0200
From: Christian Braun <<hcb>>
To: SQL devs <<bugs-sql>>
Version: 11.11.5 (Jul2012)
CC: hcb, @njnes
Last updated: 2012-07-17 13:46:40 +0200
## Comment 17395
Date: 2012-06-29 13:58:02 +0200
From: Christian Braun <<hcb>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20100101 Firefox/13.0.1
Build Identifier: monetdb5-server_11.9.7-20120607_amd64.deb
WARNING: LoaderException:loadLibrary:Loading error could not locate library opt_sql_append (from within file 'opt_sql_append')
Reproducible: Always
## Comment 17396
Date: 2012-06-29 13:58:53 +0200
From: Christian Braun <<hcb>>
Created attachment 123
correct order in autload mal file
> Attached file: [debian.diff](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3109_debian.diff_123) (text/plain, 507 bytes)
> Description: correct order in autload mal file
## Comment 17397
Date: 2012-06-29 14:02:00 +0200
From: @grobian
I think the "library opt_sql_append;" isn't even nessecary, as it's done automatically.
## Comment 17398
Date: 2012-06-29 14:06:58 +0200
From: Christian Braun <<hcb>>
No idea what it is for. I just tried to get rid of that warning on every startup.
## Comment 17399
Date: 2012-06-29 14:09:47 +0200
From: @grobian
Yes thank you for notifying us. I was just making a remark more to the other devs :)
## Comment 17408
Date: 2012-07-04 15:21:16 +0200
From: @njnes
removed library statement
## Comment 17477
Date: 2012-07-17 13:46:40 +0200
From: @grobian
Fix delivered in Jul2012 release
| Wrong order in autoload mal script causes warning on startup | https://api.github.com/repos/MonetDB/MonetDB/issues/3109/comments | 0 | 2020-11-30T12:11:31Z | 2024-06-27T11:56:53Z | https://github.com/MonetDB/MonetDB/issues/3109 | 753,425,874 | 3,109 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-06-28 16:22:05 +0200
From: mrunal.gawade
To: clients devs <<bugs-clients>>
Version: 11.9.7 (Apr2012-SP2) [obsolete]
Last updated: 2012-07-18 10:58:03 +0200
## Comment 17391
Date: 2012-06-28 16:22:05 +0200
From: mrunal.gawade
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.43 Safari/536.11
Build Identifier: Default
I tried doing autocommit mode off by using -a switch in mclient. However it stays on still. I talked with Sjourd and he was confused in the code base of mclient where the check is made as it was not clear what was going on in code.
Reproducible: Always
## Comment 17392
Date: 2012-06-28 16:32:22 +0200
From: @sjoerdmullender
Changeset [b10b0ddbce7b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b10b0ddbce7b) 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=b10b0ddbce7b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b10b0ddbce7b)
Changeset description:
Correctly report on auto commit mode.
This should fix bug #3108.
## Comment 17499
Date: 2012-07-18 10:58:03 +0200
From: @grobian
This is fixed in Jul2012 release
| mclient autocommit mode switch does not switch autocommit mode off. | https://api.github.com/repos/MonetDB/MonetDB/issues/3108/comments | 0 | 2020-11-30T12:11:29Z | 2024-06-27T11:56:52Z | https://github.com/MonetDB/MonetDB/issues/3108 | 753,425,850 | 3,108 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-06-21 13:02:31 +0200
From: @swingbit
To: Merovingian devs <<bugs-merovingian>>
Version: 11.11.5 (Jul2012)
Last updated: 2012-08-23 10:14:38 +0200
## Comment 17379
Date: 2012-06-21 13:02:31 +0200
From: @swingbit
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.39 Safari/536.11
Build Identifier: Apr2012
If mserver5 was killed or had crashed before the SQL log could be flushed, the next startup will first check the log. If one mclient connection wakes up the server after it had died, this works correctly. If two mclient sessions arrive almost at the same time, this fails.
Reproducible: Sometimes
### Steps to Reproduce:
1. Source the bash script in attachment after customizing port and database name
2. Occasionally, the test succeeds. Most of the times, though, it fails
3.
### Actual Results:
A mixture of the following:
- both mclient sessions succeed
- both mclient sessions fail with "Connection terminated"
- one succeeds, one fails
### Expected Results:
Both mclient sessions succeed
$ mserver5 --version
MonetDB 5 server v11.7.10 (64-bit, 64-bit oids)
This is an unreleased version
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2012 MonetDB B.V., all rights reserved
Visit http://www.monetdb.org/ for further information
Found 35.5GiB available memory, 8 available cpu cores
Libraries:
libpcre: 7.8 2008-09-05 (compiled with 7.8)
openssl: OpenSSL 1.0.0d 8 Feb 2011 (compiled with OpenSSL 1.0.0d-fips 8 Feb 2011)
libxml2: 2.7.7 (compiled with 2.7.7)
Compiled by: roberto@spinque01.ins.cwi.nl (x86_64-unknown-linux-gnu)
Compilation: gcc -g -Werror -Wall -Wextra -W -Werror-implicit-function-declaration -Wpointer-arith -Wdeclaration-after-statement -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 -Wmissing-include-dirs -Wp,-D_FORTIFY_SOURCE=2
Linking : /usr/bin/ld -m elf_x86_64
## Comment 17380
Date: 2012-06-21 13:03:49 +0200
From: @swingbit
Created attachment 120
Bash script to to reproduce the bug
> Attached file: [recover_crash.bash](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3107_recover_crash.bash_120) (application/octet-stream, 736 bytes)
> Description: Bash script to to reproduce the bug
## Comment 17383
Date: 2012-06-26 10:34:15 +0200
From: @sjoerdmullender
I cannot reproduce this. Can you try it on an up-to-date release (at least Apr2012 branch)?
## Comment 17500
Date: 2012-07-18 11:02:20 +0200
From: @grobian
This is a bug in monetdbd, next to a bug in mserver5 which apparently doesn't protect itself good enough. monetdbd in the first place should know better and make sure it only starts an mserver5 only once at the same time.
## Comment 17508
Date: 2012-07-18 16:00:36 +0200
From: @grobian
Changeset [fc516173a646](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fc516173a646) made by Fabian Groffen <fabian@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=fc516173a646](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=fc516173a646)
Changeset description:
forkmserver: fix possible race condition when starting mservers
As reported in bug #3107, when multiple clients would trigger monetdbd
to auto-start an mserver at the same time, monetdbd could wrongly start
forking mserver5's for the same database, obviously with failing
behaviour as a result.
This is now resolved by using a global lock for forkmserver when it
figures out it really needs to fork an mserver5 process. Multiple
concurrent clients would in this case block, and have to re-evaluate
whether they still need to start an mserver5 or not in serial order.
Upside of this fix, is that successive connects to a database should be
slightly faster now, as a shortcut is taken when the database already
appears to be running, avoiding expensive calls which results aren't
used.
## Comment 17639
Date: 2012-08-23 10:14:38 +0200
From: @sjoerdmullender
Jul2012-SP1 has been released.
| concurrent connections to the same stopped database yield in multiple mserver5 starts by monetdbd | https://api.github.com/repos/MonetDB/MonetDB/issues/3107/comments | 0 | 2020-11-30T12:11:26Z | 2024-06-27T11:56:51Z | https://github.com/MonetDB/MonetDB/issues/3107 | 753,425,825 | 3,107 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-06-20 10:07:32 +0200
From: @drstmane
To: MonetDB5 devs <<bugs-monetdb5>>
Version: -- development
CC: @yzchang
Last updated: 2012-11-27 13:33:12 +0100
## Comment 17378
Date: 2012-06-20 10:07:32 +0200
From: @drstmane
changeset [89ede0180774](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=89ede0180774)
(cf., http://dev.monetdb.org/hg/MonetDB/rev/89ede0180774)
makes 3 M5 tests fail; cf.,
http://monetdb.cwi.nl/testweb/tests/44351:89ede0180774/GNU-Fedora-x86_64-propcheck-assert/monetdb5/mTests/mal/tst1200.out.diff.html
http://monetdb.cwi.nl/testweb/tests/44351:89ede0180774/GNU-Fedora-x86_64-propcheck-assert/monetdb5/mTests/mal/tst1201.out.diff.html
http://monetdb.cwi.nl/testweb/tests/44351:89ede0180774/GNU-Fedora-x86_64-propcheck-assert/monetdb5/mTests/tests/suite_01/test_15.out.diff.html
http://monetdb.cwi.nl/testweb/web/testgrid.php?serial=44351:89ede0180774,44342:b2783faa9b8f&module=monetdb5&targets=&order=platform,arch,compiler&diff
## Comment 17511
Date: 2012-07-19 06:43:37 +0200
From: @drstmane
All 3 tests appear to work fine, again:
http://monetdb.cwi.nl/testweb/web/testgrid.php?serial=44678:8cb9aaea0019&module=monetdb5&targets=&order=platform,arch,compiler
## Comment 18057
Date: 2012-11-27 13:33:12 +0100
From: @yzchang
This is about existing tests
| M5: "De-Mx a bunch of files" makes 3 tests fail | https://api.github.com/repos/MonetDB/MonetDB/issues/3106/comments | 0 | 2020-11-30T12:11:22Z | 2024-06-27T11:56:50Z | https://github.com/MonetDB/MonetDB/issues/3106 | 753,425,788 | 3,106 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-06-18 16:39:34 +0200
From: @skinkie
To: SQL devs <<bugs-sql>>
Version: 11.11.5 (Jul2012)
CC: @njnes
Last updated: 2012-07-17 13:46:38 +0200
## Comment 17370
Date: 2012-06-18 16:39:34 +0200
From: @skinkie
User-Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1171.0 Safari/537.1
Build Identifier:
For some reason a connection by Python, and a few hunderd queries over the MAPI interface result in significant leakage over time.
Reproducible: Always
### Steps to Reproduce:
1. use the pyhon dbapi
2. make queries
3. observe leakage
## Comment 17372
Date: 2012-06-18 16:42:22 +0200
From: @skinkie
Created attachment 116
MonetDB Valgrind
Valgrind output.
> Attached file: [monetdb-valgrind.txt.gz](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3105_monetdb-valgrind.txt.gz_116) (application/gzip, 72051 bytes)
> Description: MonetDB Valgrind
## Comment 17374
Date: 2012-06-18 17:48:07 +0200
From: @skinkie
Reproduce with:
/tmp/test.sql;
select 1;
while [ 1 ]; do /opt/monetdb-mei/bin/mclient -i /tmp/test.sql 1>/dev/null 2>&1; done
So the bug is much broader. This specific example shows the issues with SQL scenario. Likely within the scenario something going on - and I presume Python is not making a new connection per query.
## Comment 17409
Date: 2012-07-04 15:40:24 +0200
From: @njnes
this leak is/was in the new groups optimizer
## Comment 17410
Date: 2012-07-04 15:46:26 +0200
From: @skinkie
You know that select 1; was merely an example query? I have a much larger valgrind trace now, if you are interested in it, I can also post it.
## Comment 17472
Date: 2012-07-17 13:46:38 +0200
From: @grobian
Fix delivered in Jul2012 release
| Leaking using Python | https://api.github.com/repos/MonetDB/MonetDB/issues/3105/comments | 0 | 2020-11-30T12:11:20Z | 2024-06-27T11:56:49Z | https://github.com/MonetDB/MonetDB/issues/3105 | 753,425,758 | 3,105 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-06-18 16:24:59 +0200
From: @gijzelaerr
To: clients devs <<bugs-clients>>
Version: -- development
Last updated: 2012-07-18 11:15:47 +0200
## Comment 17368
Date: 2012-06-18 16:24:59 +0200
From: @gijzelaerr
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:13.0) Gecko/20100101 Firefox/13.0
Build Identifier:
Probably this would require a split of a Python2 and a Python3 version of the API.
Reproducible: Always
## Comment 17439
Date: 2012-07-10 10:55:02 +0200
From: @gijzelaerr
Yes, this would require a split of the python code into a python2 and python3 version, which now seems to be a better solution anyway.
When I find the time i'll spilt the 2 versions (in the trunk), and do some more python version specific changes - and also update the debian packages.
## Comment 17501
Date: 2012-07-18 11:04:43 +0200
From: @grobian
are commits
http://dev.monetdb.org/hg/MonetDB/rev/071500627fb0
http://dev.monetdb.org/hg/MonetDB/rev/74e28f840393
http://dev.monetdb.org/hg/MonetDB/rev/669ad11ea799
anywhere related to this, and/or do they fix/implement this bug?
## Comment 17503
Date: 2012-07-18 11:12:35 +0200
From: @gijzelaerr
yes, was about to close this bug. The python2 api in the trunk uses 'new style' objects now.
## Comment 17504
Date: 2012-07-18 11:15:47 +0200
From: @grobian
Can you make a ChangeLog entry for this? It is a feature that got implemented.
| It would be nice if the Python API would use the 'new style' python object | https://api.github.com/repos/MonetDB/MonetDB/issues/3104/comments | 0 | 2020-11-30T12:11:18Z | 2024-06-27T11:56:49Z | https://github.com/MonetDB/MonetDB/issues/3104 | 753,425,738 | 3,104 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-06-18 16:23:47 +0200
From: @gijzelaerr
To: clients devs <<bugs-clients>>
Version: 11.9.7 (Apr2012-SP2) [obsolete]
Last updated: 2012-07-17 13:57:43 +0200
## Comment 17367
Date: 2012-06-18 16:23:47 +0200
From: @gijzelaerr
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:13.0) Gecko/20100101 Firefox/13.0
Build Identifier:
This information is not in a query result and can not be retrieved without issuing a seperate SQL query. This would mess with the current API state, so probably not a good idea. The DB API specs dictate that these values should then be 'None'.
Reproducible: Always
## Comment 17385
Date: 2012-06-26 11:06:07 +0200
From: @sjoerdmullender
You should mine the ODBC and JDBC implementations. They manage to figure out the information.
In particular, ODBC uses the call mapi_set_size_header() (which sends an "X" command "sizeheader 1" to the server--this can be done in Python as well) to get extra information in the result set header of each subsequent query. Also, the prepare variant of a query returns all sorts of useful information.
## Comment 17432
Date: 2012-07-09 13:51:18 +0200
From: @gijzelaerr
This bug has been resolved in the Jun2012 branch.
http://dev.monetdb.org/hg/MonetDB/rev/002c2ba3b38a
## Comment 17433
Date: 2012-07-09 13:52:02 +0200
From: @gijzelaerr
I should have said 'resolved in Jul2012 branch'.
sorry.
## Comment 17484
Date: 2012-07-17 13:57:43 +0200
From: @grobian
Fix released in Jul2012
| display_size and internal_size of Cursor.description or incorrect | https://api.github.com/repos/MonetDB/MonetDB/issues/3103/comments | 0 | 2020-11-30T12:11:15Z | 2024-06-27T11:56:48Z | https://github.com/MonetDB/MonetDB/issues/3103 | 753,425,720 | 3,103 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-06-18 16:20:54 +0200
From: @gijzelaerr
To: clients devs <<bugs-clients>>
Version: -- development
Last updated: 2012-07-10 11:13:59 +0200
## Comment 17366
Date: 2012-06-18 16:20:54 +0200
From: @gijzelaerr
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:13.0) Gecko/20100101 Firefox/13.0
Build Identifier:
This is because the version number of python is hardcoded in
debian/python-monetdb.install
Probably changing it to:
debian/tmp/usr/lib/python2.*/*
would solve the problem, but I assume then also the test stuff is included in the packages which is unwanted behaviour. Probably updating the Debian packaging files to use dh_python could solve the problem.
Reproducible: Always
## Comment 17386
Date: 2012-06-26 11:10:37 +0200
From: @sjoerdmullender
Is this an actual problem or just a perceived one? We work around the different Python versions in different Ubuntu versions in our release build process. As far as I am aware, all Debian and Ubuntu packages we release contain the Python files.
## Comment 17438
Date: 2012-07-10 10:41:03 +0200
From: @gijzelaerr
sorry, my statement about the missing files part is not true.
I assume you search replace the 2.6 with 2.7 when you build Ubuntu packages? There is a better way of packaging python code for debian which will manage this kind of stuff automatically, but i'm not familiar with it (yet). I can have a look at it when I find the time.
| ubuntu monetdb-python packages don't contain the python code | https://api.github.com/repos/MonetDB/MonetDB/issues/3102/comments | 0 | 2020-11-30T12:11:13Z | 2024-06-28T07:23:17Z | https://github.com/MonetDB/MonetDB/issues/3102 | 753,425,693 | 3,102 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-06-18 16:14:20 +0200
From: @gijzelaerr
To: SQL devs <<bugs-sql>>
Version: -- development
Last updated: 2012-11-07 19:23:33 +0100
## Comment 17362
Date: 2012-06-18 16:14:20 +0200
From: @gijzelaerr
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.56 Safari/536.5
Build Identifier:
some things changed and now the startup scripts don't work anymore.
Also, the system wide dbfarm should be under /var/lib somewhere according to the debian policy. I updated the startup script to reflect these changes, see attachments.
Reproducible: Always
## Comment 17363
Date: 2012-06-18 16:14:53 +0200
From: @gijzelaerr
Created attachment 113
added a readme file for debian package
> Attached file: [monetdb5-sql.README.Debian](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3101_monetdb5-sql.README.Debian_113) (text/plain, 455 bytes)
> Description: added a readme file for debian package
## Comment 17364
Date: 2012-06-18 16:15:13 +0200
From: @gijzelaerr
Created attachment 114
updated init.d file for monetdb5 package
> Attached file: [monetdb5-sql.init.d](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3101_monetdb5-sql.init.d_114) (text/x-dsrc, 2773 bytes)
> Description: updated init.d file for monetdb5 package
## Comment 17365
Date: 2012-06-18 16:15:32 +0200
From: @gijzelaerr
Created attachment 115
updated defaults file for monetdb5 package
> Attached file: [monetdb5-sql.default](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3101_monetdb5-sql.default_115) (application/octet-stream, 347 bytes)
> Description: updated defaults file for monetdb5 package
## Comment 17545
Date: 2012-07-21 17:14:09 +0200
From: @grobian
I don't have any problems with you committing these
## Comment 17565
Date: 2012-07-24 12:24:36 +0200
From: @gijzelaerr
ok, i'll have a look at this when I find the time. There are some other things that need modification, for example Python3 specific packages. The next ubuntu will use python3 as the default for example.
## Comment 17602
Date: 2012-08-02 14:44:11 +0200
From: @gijzelaerr
ok, I've updated the debian packaging files.
changes:
* Switched to debhelper layout
* Added python3 packages
* packages should build on debian and ubuntu without modifications
* changed dbfarm location to /var/lib/monetdb to confirm to debian
filesystem layout policy.
* I had to disable the inclusion of some missing mal files:
- usr/lib/monetdb5/statistics.mal
- usr/lib/monetdb5/chopper.mal
- usr/lib/monetdb5/algebraExtensions.mal
Tested the packaging with Debian squeeze (6.0) and Ubuntu 12.04.
## Comment 17901
Date: 2012-11-07 19:23:33 +0100
From: @grobian
sort of fixed, since it's committed now
| Debian/Ubuntu startup scripts don't work (anymore) | https://api.github.com/repos/MonetDB/MonetDB/issues/3101/comments | 0 | 2020-11-30T12:11:11Z | 2024-06-27T11:56:45Z | https://github.com/MonetDB/MonetDB/issues/3101 | 753,425,666 | 3,101 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-06-18 11:11:12 +0200
From: liangm <<13802880779>>
To: clients devs <<bugs-clients>>
Version: 11.9.7 (Apr2012-SP2) [obsolete]
CC: khushikashyap123
Last updated: 2018-10-17 06:59:30 +0200
## Comment 17361
Date: 2012-06-18 11:11:12 +0200
From: liangm <<13802880779>>
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)
Build Identifier:
hello, all, i installed monetdb in windows server 2008(64bit) , and installed the odbc for windows( 32bit intalled firstly, and 64bit the next), after insert some Chinese characters, i use oracle biee to show the table data, but biee can't show all the characters, just like below:
0 广ͫ
1 梅
1)monetdb data showed in biee
i also install mysql to test this, the database character set is utf8 too, and biee can show the data correctly:
0 广州
1 梅州
2)mysql data showed in biee
the data showed in command line tool are the same from monetdb and mysql
monetdb command line tool return:
sql>select * from test2;
+------+
| nam |
+======+
| 骞垮窞 |
| 姊呭窞 |
+------+
2 tuples (2.189ms)
mysql commad line tool return:
mysql> select * from test;
+--------+
| nam |
+--------+
| 骞垮窞 |
| 姊呭窞 |
+--------+
2 rows in set (0.00 sec)
Does this mean that: the odbc driver of monetdb has some problems?
Reproducible: Always
## Comment 17373
Date: 2012-06-18 16:54:36 +0200
From: @sjoerdmullender
Can you generate a log file and attach that to the bug report? I'm especially interested in the failing interaction (i.e. using the Oracle biee).
You can see in bug #2910, comment 1, how to do this.
## Comment 17375
Date: 2012-06-18 18:04:43 +0200
From: liangm <<13802880779>>
Created attachment 117
logfile
the dbvisualizer show the chinese characters correctly through jdbc driver, but biee using monetdb odbc driver can't show all the characters, seems the string is truncated, but with mysql odbc driver, everything is ok.
> Attached file: [log.rar](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3100_log.rar_117) (text/plain, 340285 bytes)
> Description: logfile
## Comment 17376
Date: 2012-06-18 18:12:31 +0200
From: liangm <<13802880779>>
Created attachment 118
use_this_odbc_log
> Attached file: [use_this_odbc.log](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3100_use_this_odbc.log_118) (application/octet-stream, 5973 bytes)
> Description: use_this_odbc_log
## Comment 17377
Date: 2012-06-18 18:14:40 +0200
From: liangm <<13802880779>>
Created attachment 119
screen snapshot
> Attached file: [screen_snapshot.rar](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3100_screen_snapshot.rar_119) (application/octet-stream, 336028 bytes)
> Description: screen snapshot
## Comment 17382
Date: 2012-06-26 09:54:31 +0200
From: @sjoerdmullender
Created attachment 121
screenshot of OBIEE window
I cannot reproduce the problem. When I try to reproduce it in OBIEE I end up with the results that you can see in the attached screen shot.
> Attached file: [Screenshot - 2012-06-25 - 17:07:11.png](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3100_Screenshot_-_2012-06-25_-_17:07:11.png_121) (image/png, 9654 bytes)
> Description: screenshot of OBIEE window
## Comment 17384
Date: 2012-06-26 10:56:56 +0200
From: liangm <<13802880779>>
'骞垮窞' is a utf-8 encoding string for '广州', that means your obiee show the utf string directly, not translate it into gbk or gb2312, maybe you should change your obiee environment to gbk encoding;
## Comment 17387
Date: 2012-06-26 15:23:27 +0200
From: @sjoerdmullender
I'm lost. I see two sets of (to me) unrelated tables. In the one set I see two rows of 3 glyphs each (the command line interfaces using both mclient and mysql). In the other set I see two rows of 2 glyphs each. What is the relationship between those sets?
Are those two sets different views of the same database table or are they indeed different tables? What are the encodings involved, and what is actually stored in the database? I'd love to see an actual byte sequence of the data in the database. Would it be possible to package up the dbfarm directory into a zip file and either attach that to this bug report or send it directly to me? Best would be if there's nothing else in the database.
You say, "'骞垮窞' is a utf-8 encoding string for '广州'". What exactly do you mean by that? When I copy and paste those strings, I get utf-8 encoded strings for both. One is 9 bytes long, the other 6.
## Comment 17388
Date: 2012-06-27 03:30:42 +0200
From: liangm <<13802880779>>
Created attachment 122
dbfarm files and screenshot
here are the dbfarm files and screenshot, i create a schema 'dw', and create a table 'test' with only one column 'nam'(varchar(10)), i inserted some chinese character from dbvisualizer, in the sql command dialog, the chinese characters did not show correctly, but it did inserted, when i executed the select command, the dbvisualizer show the characters correctly, just like '广州' and '梅州', but in obiee, it show the characters not correctly, some characters are missing.
i use windows 7 Chinese Simplified Edition, 64bit
> Attached file: [dbfarm.rar](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3100_dbfarm.rar_122) (application/octet-stream, 203523 bytes)
> Description: dbfarm files and screenshot
## Comment 17389
Date: 2012-06-27 18:06:37 +0200
From: @sjoerdmullender
Changeset [65609602b082](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=65609602b082) 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=65609602b082](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=65609602b082)
Changeset description:
Correct test for high and low surrogates encoded in UTF-8.
This should fix bug #3100.
## Comment 17390
Date: 2012-06-27 19:31:44 +0200
From: @sjoerdmullender
Thanks for the database and the images. I was able to reproduce the problem now, and so was able to find the bug.
## Comment 17394
Date: 2012-06-29 12:46:12 +0200
From: @sjoerdmullender
Closing since the bug was fixed.
## Comment 17482
Date: 2012-07-17 13:57:42 +0200
From: @grobian
Fix released in Jul2012
## Comment 26645
Date: 2018-10-17 06:59:30 +0200
From: khushi <<khushikashyap123>>
Main issue is "charset problem with the odbc driver for windows" then download the best tutorial from http://screenshotwindows.net and resolve the problem.
| charset problem with the odbc driver for windows | https://api.github.com/repos/MonetDB/MonetDB/issues/3100/comments | 0 | 2020-11-30T12:11:08Z | 2024-06-27T11:56:45Z | https://github.com/MonetDB/MonetDB/issues/3100 | 753,425,638 | 3,100 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-06-16 16:25:56 +0200
From: Viktor Rosenfeld <<24hesk>>
To: SQL devs <<bugs-sql>>
Version: 11.11.5 (Jul2012)
CC: @njnes
Last updated: 2012-07-17 13:46:40 +0200
## Comment 17360
Date: 2012-06-16 16:25:56 +0200
From: Viktor Rosenfeld <<24hesk>>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.56 Safari/536.5
Build Identifier:
The following query results in the error message "SELECT: identifier 'pre' ambiguous". The error message appears to be triggered by the EXISTS clause.
Query:
WITH
span1 AS ( SELECT pre FROM rank ),
span2 AS ( SELECT pre FROM rank )
SELECT span1.pre AS pre1, span2.pre AS pre2
FROM span1, span2
WHERE EXISTS (
SELECT 1
FROM rank as ancestor
WHERE ancestor.pre < span1.pre
AND span1.pre < ancestor.post
AND ancestor.pre < span2.pre
AND span2.pre < ancestor.post)
AND span1.pre <> span2.pre;
Reproducible: Always
### Steps to Reproduce:
Minimal example:
CREATE TABLE rank (pre INTEGER, post INTEGER);
INSERT INTO rank VALUES (1, 6);
INSERT INTO rank VALUES (2, 3);
INSERT INTO rank VALUES (4, 5);
If the pre columns are aliased to unambiguous names the query returns the wrong result. It appears that the EXISTS clause is ignored:
WITH
span1 AS ( SELECT pre AS pre1 FROM rank ),
span2 AS ( SELECT pre AS pre2 FROM rank )
SELECT DISTINCT span1.pre1, span2.pre2
FROM span1, span2
WHERE EXISTS (
SELECT 1
FROM rank as ancestor
WHERE ancestor.pre < span1.pre1
AND span1.pre1 < ancestor.post
AND ancestor.pre < span2.pre2
AND span2.pre2 < ancestor.post)
AND span1.pre1 <> span2.pre2;
### Actual Results:
+------+------+
| pre1 | pre2 |
+======+======+
| 1 | 2 |
| 1 | 4 |
| 2 | 1 |
| 2 | 4 |
| 4 | 1 |
| 4 | 2 |
+------+------+
### Expected Results:
+------+------+
| pre | pre |
+======+======+
| 2 | 4 |
| 4 | 2 |
+------+------+
The following two rewritten queries produce the expected results. One query omits the WITH clause, the other the EXISTS clause.
SELECT DISTINCT span1.pre, span2.pre
FROM rank AS span1, rank AS span2
WHERE EXISTS (
SELECT ancestor.pre
FROM rank as ancestor
WHERE ancestor.pre < span1.pre
AND span1.pre < ancestor.post
AND ancestor.pre < span2.pre
AND span2.pre < ancestor.post)
AND span1.pre <> span2.pre;
WITH
span1 AS ( SELECT pre FROM rank ),
span2 AS ( SELECT pre FROM rank )
SELECT DISTINCT span1.pre, span2.pre
FROM span1, span2, rank AS ancestor
WHERE ancestor.pre < span1.pre
AND span1.pre < ancestor.post
AND ancestor.pre < span2.pre
AND span2.pre < ancestor.post
AND span1.pre <> span2.pre;
## Comment 17422
Date: 2012-07-06 14:42:16 +0200
From: @njnes
Fixed, during the select 1... handling we use span1/span2 from the outer context now (not from the more global with context).
## Comment 17425
Date: 2012-07-06 17:12:04 +0200
From: @njnes
Changeset [6a9b850bc58f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6a9b850bc58f) 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=6a9b850bc58f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=6a9b850bc58f)
Changeset description:
fix bug #3099. ie don't lookup views outside the from.
## Comment 17476
Date: 2012-07-17 13:46:40 +0200
From: @grobian
Fix delivered in Jul2012 release
| ambiguous attributes in query with WITH clause and EXISTS clause | https://api.github.com/repos/MonetDB/MonetDB/issues/3099/comments | 0 | 2020-11-30T12:11:06Z | 2024-06-27T11:56:44Z | https://github.com/MonetDB/MonetDB/issues/3099 | 753,425,607 | 3,099 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-06-13 13:14:10 +0200
From: @gijzelaerr
To: SQL devs <<bugs-sql>>
Version: 11.9.7 (Apr2012-SP2) [obsolete]
CC: @bartscheers, @njnes
Last updated: 2012-11-27 14:37:00 +0100
## Comment 17357
Date: 2012-06-13 13:14:10 +0200
From: @gijzelaerr
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.56 Safari/536.5
Build Identifier: 11.7.9 and 11.9.7
Another set of queries from the Django test suite hang on monetdb, making it go to 100% cpu usage for probably infinity.
I tried Dec2011-sp2, Apr2012-SP1 and Apr2012-SP2 currently in testing.
Reproducible: Always
## Comment 17358
Date: 2012-06-13 13:14:42 +0200
From: @gijzelaerr
Created attachment 112
sql statements
> Attached file: [crash.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3098_crash.sql_112) (application/octet-stream, 3705 bytes)
> Description: sql statements
## Comment 17436
Date: 2012-07-10 08:19:23 +0200
From: @njnes
we cannot reproduce the problem with the bound to be released jul2012 version.
## Comment 18087
Date: 2012-11-27 14:37:00 +0100
From: @bartscheers
Added Test
| query makes monetdb go to 100% for probably inifinity | https://api.github.com/repos/MonetDB/MonetDB/issues/3098/comments | 0 | 2020-11-30T12:11:04Z | 2024-06-27T11:56:43Z | https://github.com/MonetDB/MonetDB/issues/3098 | 753,425,577 | 3,098 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-06-07 15:26:36 +0200
From: @gijzelaerr
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @bartscheers, @njnes
Last updated: 2012-11-27 13:46:48 +0100
## Comment 17352
Date: 2012-06-07 15:26:36 +0200
From: @gijzelaerr
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:13.0) Gecko/20100101 Firefox/13.0
Build Identifier: 11.9.5-20120516 Ubuntu packages
After upgrading to 11.9.5-20120516 one of my Django tests fail.
Query used:
DROP TABLE "django_content_type";
CREATE TABLE "sys"."django_content_type" (
"id" INTEGER NOT NULL AUTO_INCREMENT,
"name" VARCHAR(100) NOT NULL,
"app_label" VARCHAR(100) NOT NULL,
"model" VARCHAR(100) NOT NULL,
CONSTRAINT "django_content_type_id_pkey" PRIMARY KEY ("id"),
CONSTRAINT "django_content_type_app_label_model_unique" UNIQUE ("app_label", "model")
);
INSERT INTO "django_content_type" ("name", "app_label", "model") VALUES ('content type', 'contenttypes', 'contenttype');
The error returned by MonetDB:
TypeException:user.s0_1[52]:'bat.reverse' undefined in: _79:any := bat.reverse(_76:wrd)
TypeException:user.s0_1[53]:'algebra.join' undefined in: _80:any := algebra.join(_70:bat[:oid,:wrd], _79:any)
TypeException:user.s0_1[55]:'algebra.markT' undefined in: _83:any := algebra.markT(_80:any, _81:oid)
TypeException:user.s0_1[56]:'bat.reverse' undefined in: _84:any := bat.reverse(_83:any)
TypeException:user.s0_1[63]:'algebra.leftjoin' undefined in: _95:any := algebra.leftjoin(_84:any, _94:bat[:oid,:str])
TypeException:user.s0_1[64]:'bat.reverse' undefined in: _96:any := bat.reverse(_80:any)
TypeException:user.s0_1[66]:'algebra.markT' undefined in: _98:any := algebra.markT(_96:any, _97:oid)
TypeException:user.s0_1[67]:'bat.reverse' undefined in: _99:any := bat.reverse(_98:any)
TypeException:user.s0_1[68]:'algebra.leftjoin' undefined in: _100:any := algebra.leftjoin(_99:any, _17:str)
TypeException:user.s0_1[72]:'algebra.semijoin' undefined in: _107:any := algebra.semijoin(_84:any, _106:bat[:oid,:void])
TypeException:user.s0_1[79]:'algebra.leftjoin' undefined in: _117:any := algebra.leftjoin(_107:any, _116:bat[:oid,:str])
TypeException:user.s0_1[80]:'algebra.semijoin' undefined in: _118:any := algebra.semijoin(_99:any, _106:bat[:oid,:void])
TypeException:user.s0_1[81]:'algebra.leftjoin' undefined in: _119:any := algebra.leftjoin(_118:any, _6:str)
TypeException:user.s0_1[85]:'algebra.semijoin' undefined in: _123:any := algebra.semijoin(_107:any, _122:bat[:oid,:void])
TypeException:user.s0_1[86]:'bat.reverse' undefined in: _124:any := bat.reverse(_123:any)
TypeException:user.s0_1[87]:'algebra.semijoin' undefined in: _125:any := algebra.semijoin(_118:any, _122:bat[:oid,:void])
TypeException:user.s0_1[88]:'algebra.join' undefined in: _126:any := algebra.join(_124:any, _125:any)
TypeException:user.s0_1[89]:'aggr.count' undefined in: _127:any := aggr.count(_126:any)
39000!program contains errors
Reproducible: Always
## Comment 17356
Date: 2012-06-13 11:30:57 +0200
From: @gijzelaerr
I have the same issue with the current Apr2012-SP2 in testing.
## Comment 17437
Date: 2012-07-10 08:21:20 +0200
From: @njnes
We cannot reproduce this on the bound to be released jul2012 version
## Comment 18061
Date: 2012-11-27 13:46:48 +0100
From: @bartscheers
Added Test
| Query gives "39000!program contains errors" after updating to 11.9.5-20120516 | https://api.github.com/repos/MonetDB/MonetDB/issues/3097/comments | 0 | 2020-11-30T12:11:01Z | 2024-06-27T11:56:41Z | https://github.com/MonetDB/MonetDB/issues/3097 | 753,425,542 | 3,097 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-06-02 00:07:10 +0200
From: @mlkersten
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes
Last updated: 2012-06-19 11:20:47 +0200
## Comment 17333
Date: 2012-06-02 00:07:10 +0200
From: @mlkersten
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:12.0) Gecko/20100101 Firefox/12.0
Build Identifier:
Unexpected type mismatch in date expression. The median(date) should return the same as min/max(date)
sql>select median(departure_date) - min(departure_date) from voyages;
types date(0,0) and tinyint(8,0) are not equal for column 'departure_date'
sql>select max(departure_date) - min(departure_date) from voyages;
+------------+
| sql_sub_L1 |
+============+
| 73615 |
+------------+
1 tuple (18.832ms)
Reproducible: Always
## Comment 17346
Date: 2012-06-06 16:08:22 +0200
From: @njnes
Changeset [36b7be236d87](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=36b7be236d87) 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=36b7be236d87](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=36b7be236d87)
Changeset description:
fixed bug #3096
1) added missinge sql create functions for date/time/timestamp
2) fixed problem with median on empty column
## Comment 17348
Date: 2012-06-06 16:09:35 +0200
From: @njnes
fixed by adding the missing create functions in sql
## Comment 17353
Date: 2012-06-09 17:01:31 +0200
From: @mlkersten
On the current:
sql>select median(departure_date), min (departure_date) from voyages;
types date(0,0) and tinyint(8,0) are not equal for column 'departure_date'
sql>select median(departure_date) from voyages;
types date(0,0) and tinyint(8,0) are not equal for column 'departure_date'
sql>
## Comment 17354
Date: 2012-06-09 20:27:41 +0200
From: @grobian
Jul2012 has not been merged into default yet (http://dev.monetdb.org/hg/MonetDB/graph/)
| Type of median error | https://api.github.com/repos/MonetDB/MonetDB/issues/3096/comments | 0 | 2020-11-30T12:10:58Z | 2024-06-27T11:56:40Z | https://github.com/MonetDB/MonetDB/issues/3096 | 753,425,513 | 3,096 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-06-01 22:11:39 +0200
From: Nathan Allan <<nallan>>
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes
Last updated: 2012-06-06 18:11:56 +0200
## Comment 17332
Date: 2012-06-01 22:11:39 +0200
From: Nathan Allan <<nallan>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.52 Safari/536.5
Build Identifier: v11.9.5 "Apr2012-SP1"
select * from storage() crashes the server.
Reproducible: Always
### Steps to Reproduce:
1. From a client, execute: select * from storage();
### Actual Results:
Server crashes
### Expected Results:
Expect to get results with no server crash
MonetDB 5 server v11.9.5 "Apr2012-SP1"
Serving database 'demo', using 4 threads
Compiled for x86_64-pc-winnt/64bit with 64bit OIDs dynamically linked
Found 31.926 GiB available main-memory.
## Comment 17337
Date: 2012-06-06 10:22:12 +0200
From: @njnes
I'm unable to reproduce the crash (both april branch and default).
## Comment 17349
Date: 2012-06-06 18:11:26 +0200
From: Nathan Allan <<nallan>>
I can reproduce it every time. Did you try on Windows? Any way that I can help with a repro?
## Comment 17350
Date: 2012-06-06 18:11:56 +0200
From: Nathan Allan <<nallan>>
64bit Windows 7
| Server crashes when selecting from storage() | https://api.github.com/repos/MonetDB/MonetDB/issues/3095/comments | 0 | 2020-11-30T12:10:56Z | 2024-06-28T07:23:17Z | https://github.com/MonetDB/MonetDB/issues/3095 | 753,425,494 | 3,095 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-05-31 16:03:03 +0200
From: @sjoerdmullender
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @mlkersten, sgpipub, @drstmane
Depends on: #3067
Last updated: 2012-06-06 11:46:08 +0200
## Comment 17318
Date: 2012-05-31 16:03:03 +0200
From: @sjoerdmullender
I have made a new bug for the crash. Let's keep the original bug focused on the memory management issues.
+++ This bug was initially created as a clone of Bug #3067 +++
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)
Build Identifier: Dec2011 / Dec2011SP2 / Apr2012
MonetDB hangs after submitting many queries and each query creates hash in real memory. Hashes were not freed when working memory is low.
Reproducible: Always
### Steps to Reproduce:
1. MonetDB Dec2011SP2 or Apr2012, 23GB server memory, Solaris x86
2. Test database with 14 tables (table_1..table_14), each table has 40 columns (col_1..col_40) and ~17 000 000 records.
3. For simplicity the test algorithm can be reduced to a loop:
for (i=1;i<=14;i++)
for (j=1;j<=40;j++)
select count(*) from table_i where col_j=12345;
Typical select took few seconds (5-10s).
Each select creates new hash but old hashes are kept in memory (tested by running select sum(hash) from storage();).
After a while system is going to hang (rsstarget=20530332897. rss = 18740 MB)
Next query executes properly but it takes >3000 s.
Why GDK can't free unused hashes to free memory?
mserver5 --version
MonetDB 5 server v11.9.0 (64-bit, 64-bit oids)
This is an unreleased version
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2012 MonetDB B.V., all rights reserved
Visit http://www.monetdb.org/ for further information
Found 23.5GiB available memory, 4 available cpu cores
Libraries:
libpcre: 7.8 2008-09-05 (compiled with 7.8)
openssl: OpenSSL 1.0.0e 6 Sep 2011 (compiled with OpenSSL 1.0.0e 6 Sep 2011)
libxml2: 2.7.6 (compiled with 2.7.6)
Compiled by: @mdb (i386-pc-solaris2.11)
Compilation: gcc -m64 -g -Wall -Wextra -W -Werror-implicit-function-declaration -Wpointer-arith -Wdeclaration-after-statement -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 -Wp,-D_FORTIFY_SOURCE=2
Linking : /usr/ccs/bin/ld
output from mserver5 --memory
...
MT_mmap_trim(19579 MB): rss = 18740 MB
MT_mmap_save_tile: msync(bat/47/4705.tail,off=130M,0,SYNC)...
MT_mmap_save_tile: msync(bat/47/4705.tail,tile=130M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/45/4512.tail,off=136M,0,SYNC)...
MT_mmap_save_tile: msync(bat/45/4512.tail,tile=136M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/32/3254.tail,off=128M,0,SYNC)...
MT_mmap_save_tile: msync(bat/32/3254.tail,tile=128M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/51/5121.theap,off=174M,0,SYNC)...
MT_mmap_save_tile: msync(bat/51/5121.theap,tile=174M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/47/4721.theap,off=178M,0,SYNC)...
MT_mmap_save_tile: msync(bat/47/4721.theap,tile=178M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/45/4526.theap,off=178M,0,SYNC)...
MT_mmap_save_tile: msync(bat/45/4526.theap,tile=178M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/43/4330.theap,off=160M,0,SYNC)...
MT_mmap_save_tile: msync(bat/43/4330.theap,tile=160M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/37/3726.theap,off=174M,0,SYNC)...
MT_mmap_save_tile: msync(bat/37/3726.theap,tile=174M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/35/3507.theap,off=172M,0,SYNC)...
MT_mmap_save_tile: msync(bat/35/3507.theap,tile=172M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/32/3270.theap,off=179M,0,SYNC)...
MT_mmap_save_tile: msync(bat/32/3270.theap,tile=179M,0M,SYNC) = 22 (0ms)
GDKvmtrim(load=high, rsstarget=20530332897, GDK_mmap_minsize=268435456)
MT_mmap_trim(19579 MB): rss = 18741 MB
MT_mmap_save_tile: msync(bat/47/4705.tail,off=130M,0,SYNC)...
MT_mmap_save_tile: msync(bat/47/4705.tail,tile=130M,0M,SYNC) = 22 (1ms)
MT_mmap_save_tile: msync(bat/45/4512.tail,off=136M,0,SYNC)...
MT_mmap_save_tile: msync(bat/45/4512.tail,tile=136M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/32/3254.tail,off=128M,0,SYNC)...
MT_mmap_save_tile: msync(bat/32/3254.tail,tile=128M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/51/5121.theap,off=174M,0,SYNC)...
MT_mmap_save_tile: msync(bat/51/5121.theap,tile=174M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/47/4721.theap,off=178M,0,SYNC)...
MT_mmap_save_tile: msync(bat/47/4721.theap,tile=178M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/45/4526.theap,off=178M,0,SYNC)...
MT_mmap_save_tile: msync(bat/45/4526.theap,tile=178M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/43/4330.theap,off=160M,0,SYNC)...
MT_mmap_save_tile: msync(bat/43/4330.theap,tile=160M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/37/3726.theap,off=174M,0,SYNC)...
MT_mmap_save_tile: msync(bat/37/3726.theap,tile=174M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/35/3507.theap,off=172M,0,SYNC)...
MT_mmap_save_tile: msync(bat/35/3507.theap,tile=172M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/32/3270.theap,off=179M,0,SYNC)...
MT_mmap_save_tile: msync(bat/32/3270.theap,tile=179M,0M,SYNC) = 22 (0ms)
GDKvmtrim(load=high, rsstarget=20530332897, GDK_mmap_minsize=268435456)
MT_mmap_trim(19579 MB): rss = 18741 MB
MT_mmap_save_tile: msync(bat/47/4705.tail,off=130M,0,SYNC)...
MT_mmap_save_tile: msync(bat/47/4705.tail,tile=130M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/45/4512.tail,off=136M,0,SYNC)...
MT_mmap_save_tile: msync(bat/45/4512.tail,tile=136M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/32/3254.tail,off=128M,0,SYNC)...
MT_mmap_save_tile: msync(bat/32/3254.tail,tile=128M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/51/5121.theap,off=174M,0,SYNC)...
MT_mmap_save_tile: msync(bat/51/5121.theap,tile=174M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/47/4721.theap,off=178M,0,SYNC)...
MT_mmap_save_tile: msync(bat/47/4721.theap,tile=178M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/45/4526.theap,off=178M,0,SYNC)...
MT_mmap_save_tile: msync(bat/45/4526.theap,tile=178M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/43/4330.theap,off=160M,0,SYNC)...
MT_mmap_save_tile: msync(bat/43/4330.theap,tile=160M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/37/3726.theap,off=174M,0,SYNC)...
MT_mmap_save_tile: msync(bat/37/3726.theap,tile=174M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/35/3507.theap,off=172M,0,SYNC)...
MT_mmap_save_tile: msync(bat/35/3507.theap,tile=172M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/32/3270.theap,off=179M,0,SYNC)...
MT_mmap_save_tile: msync(bat/32/3270.theap,tile=179M,0M,SYNC) = 22 (0ms)
GDKvmtrim(load=high, rsstarget=20530332897, GDK_mmap_minsize=268435456)
MT_mmap_trim(19579 MB): rss = 18740 MB
MT_mmap_save_tile: msync(bat/47/4705.tail,off=130M,0,SYNC)...
MT_mmap_save_tile: msync(bat/47/4705.tail,tile=130M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/45/4512.tail,off=136M,0,SYNC)...
MT_mmap_save_tile: msync(bat/45/4512.tail,tile=136M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/32/3254.tail,off=128M,0,SYNC)...
MT_mmap_save_tile: msync(bat/32/3254.tail,tile=128M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/51/5121.theap,off=174M,0,SYNC)...
MT_mmap_save_tile: msync(bat/51/5121.theap,tile=174M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/47/4721.theap,off=178M,0,SYNC)...
MT_mmap_save_tile: msync(bat/47/4721.theap,tile=178M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/45/4526.theap,off=178M,0,SYNC)...
MT_mmap_save_tile: msync(bat/45/4526.theap,tile=178M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/43/4330.theap,off=160M,0,SYNC)...
MT_mmap_save_tile: msync(bat/43/4330.theap,tile=160M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/37/3726.theap,off=174M,0,SYNC)...
MT_mmap_save_tile: msync(bat/37/3726.theap,tile=174M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/35/3507.theap,off=172M,0,SYNC)...
MT_mmap_save_tile: msync(bat/35/3507.theap,tile=172M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/32/3270.theap,off=179M,0,SYNC)...
MT_mmap_save_tile: msync(bat/32/3270.theap,tile=179M,0M,SYNC) = 22 (0ms)
GDKvmtrim(load=high, rsstarget=20530332897, GDK_mmap_minsize=268435456)
MT_mmap_trim(19579 MB): rss = 18741 MB
MT_mmap_save_tile: msync(bat/47/4705.tail,off=130M,0,SYNC)...
MT_mmap_save_tile: msync(bat/47/4705.tail,tile=130M,0M,SYNC) = 22 (1ms)
MT_mmap_save_tile: msync(bat/45/4512.tail,off=136M,0,SYNC)...
MT_mmap_save_tile: msync(bat/45/4512.tail,tile=136M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/32/3254.tail,off=128M,0,SYNC)...
MT_mmap_save_tile: msync(bat/32/3254.tail,tile=128M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/51/5121.theap,off=174M,0,SYNC)...
MT_mmap_save_tile: msync(bat/51/5121.theap,tile=174M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/47/4721.theap,off=178M,0,SYNC)...
MT_mmap_save_tile: msync(bat/47/4721.theap,tile=178M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/45/4526.theap,off=178M,0,SYNC)...
MT_mmap_save_tile: msync(bat/45/4526.theap,tile=178M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/43/4330.theap,off=160M,0,SYNC)...
MT_mmap_save_tile: msync(bat/43/4330.theap,tile=160M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/37/3726.theap,off=174M,0,SYNC)...
MT_mmap_save_tile: msync(bat/37/3726.theap,tile=174M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/35/3507.theap,off=172M,0,SYNC)...
MT_mmap_save_tile: msync(bat/35/3507.theap,tile=172M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/32/3270.theap,off=179M,0,SYNC)...
MT_mmap_save_tile: msync(bat/32/3270.theap,tile=179M,0M,SYNC) = 22 (0ms)
GDKvmtrim(load=high, rsstarget=20530332897, GDK_mmap_minsize=268435456)
MT_mmap_trim(19579 MB): rss = 18739 MB
MT_mmap_save_tile: msync(bat/47/4705.tail,off=130M,0,SYNC)...
....
and backtrace
(gdb) thread apply all backtrace
[New LWP 9 ]
[New LWP 8 ]
[New LWP 7 ]
[New LWP 6 ]
[New LWP 22 ]
[New LWP 4 ]
[New LWP 3 ]
[New LWP 2 ]
[New Thread 2 (LWP 2)]
[New Thread 3 (LWP 3)]
[New Thread 4 (LWP 4)]
[New Thread 6 ]
[New Thread 7 ]
[New Thread 8 ]
[New Thread 9 ]
[New Thread 22 (LWP 22)]
Thread 18 (Thread 22 (LWP 22)):
0 0xfffffd7ff81344c2 in BAThash (b=0x481748, masksize=0) at gdk_search.mx:513
1 0xfffffd7ff80c1d28 in BAT_hashselect (b=0x481748, bn=0x12a4680, tl=0x13e6fb0) at gdk_batop.mx:999
2 0xfffffd7ff80d8413 in BAT_select_ (b=0x481720, tl=0x13e6fb0, th=0x13e6fb0, li=1 '\001', hi=1 '\001', tail=0 '\0', anti=0 '\0', preserve_order=0 '\0')
at gdk_batop.mx:1268
3 0xfffffd7ff80d94a6 in BATuselect (b=0x481720, h=0x13e6fb0, t=0x0) at gdk_batop.mx:1344
4 0xfffffd7ff9389c24 in CMDuselect1 (result=0xfffffd7ffd5ff2e0, b=0x481720, value=0x13e6fb0) at algebra.mx:1417
5 0xfffffd7ff93916d6 in ALGuselect1 (result=0x1d29336c0, bid=0x1d29336b0, value=0x13e6fb0) at algebra.mx:2257
6 0xfffffd7ff8b025bb in runMALsequence (cntxt=0x4ca180, mb=0x1d2921920, startpc=1, stoppc=0, stk=0x1d29334b0, env=0x0, pcicaller=0x0) at mal_interpreter.mx:1958
7 0xfffffd7ff8ae51d5 in callMAL (cntxt=0x4ca180, mb=0x1d2921920, env=0xfffffd7ffd5ffd00, argv=0xfffffd7ffd5ffda0, debug=0 '\0') at mal_interpreter.mx:423
8 0xfffffd7ffe0569cf in SQLexecutePrepared (c=0x4ca180, be=0x131cd90, q=0x1d2921770) at sql_scenario.c:1642
9 0xfffffd7ffe056cb9 in SQLengineIntern (c=0x4ca180, be=0x131cd90) at sql_scenario.c:1695
10 0xfffffd7ffe05731b in SQLengine (c=0x4ca180) at sql_scenario.c:1821
11 0xfffffd7ff8ad0a08 in runPhase (c=0x4ca180, phase=4) at mal_scenario.c:522
12 0xfffffd7ff8ad0c04 in runScenarioBody (c=0x4ca180) at mal_scenario.c:573
13 0xfffffd7ff8ad0e11 in runScenario (c=0x4ca180) at mal_scenario.c:601
14 0xfffffd7ff8ad1ed5 in MSserveClient (dummy=0x4ca180) at mal_session.c:438
15 0xfffffd7fff0b22ad in _thrp_setup () from /lib/64/libc.so.1
16 0xfffffd7fff0b2550 in ?? () from /lib/64/libc.so.1
17 0x0000000000000000 in ?? ()
Thread 17 (Thread 9 ):
0 0xfffffd7fff0b2597 in __lwp_park () from /lib/64/libc.so.1
1 0xfffffd7fff0a553a in sema_wait_impl () from /lib/64/libc.so.1
2 0xfffffd7fff0a56c0 in sema_wait () from /lib/64/libc.so.1
3 0xfffffd7fff09a0cc in sem_wait () from /lib/64/libc.so.1
4 0xfffffd7ff8b0c4dc in q_dequeue (q=0x13fed60) at mal_interpreter.mx:874
5 0xfffffd7ff8b1825d in runDFLOWworker (t=0x1402e78) at mal_interpreter.mx:1087
6 0xfffffd7fff0b22ad in _thrp_setup () from /lib/64/libc.so.1
7 0xfffffd7fff0b2550 in ?? () from /lib/64/libc.so.1
8 0x0000000000000000 in ?? ()
Thread 16 (Thread 8 ):
0 0xfffffd7fff0b2597 in __lwp_park () from /lib/64/libc.so.1
1 0xfffffd7fff0a553a in sema_wait_impl () from /lib/64/libc.so.1
2 0xfffffd7fff0a56c0 in sema_wait () from /lib/64/libc.so.1
3 0xfffffd7fff09a0cc in sem_wait () from /lib/64/libc.so.1
4 0xfffffd7ff8b0c4dc in q_dequeue (q=0x13fed60) at mal_interpreter.mx:874
5 0xfffffd7ff8b1825d in runDFLOWworker (t=0x1402e50) at mal_interpreter.mx:1087
6 0xfffffd7fff0b22ad in _thrp_setup () from /lib/64/libc.so.1
7 0xfffffd7fff0b2550 in ?? () from /lib/64/libc.so.1
8 0x0000000000000000 in ?? ()
Thread 15 (Thread 7 ):
0 0xfffffd7fff0b2597 in __lwp_park () from /lib/64/libc.so.1
1 0xfffffd7fff0a553a in sema_wait_impl () from /lib/64/libc.so.1
2 0xfffffd7fff0a56c0 in sema_wait () from /lib/64/libc.so.1
3 0xfffffd7fff09a0cc in sem_wait () from /lib/64/libc.so.1
4 0xfffffd7ff8b0c4dc in q_dequeue (q=0x13fed60) at mal_interpreter.mx:874
5 0xfffffd7ff8b1825d in runDFLOWworker (t=0x1402e28) at mal_interpreter.mx:1087
6 0xfffffd7fff0b22ad in _thrp_setup () from /lib/64/libc.so.1
7 0xfffffd7fff0b2550 in ?? () from /lib/64/libc.so.1
8 0x0000000000000000 in ?? ()
Thread 14 (Thread 6 ):
0 0xfffffd7fff0b2597 in __lwp_park () from /lib/64/libc.so.1
1 0xfffffd7fff0a553a in sema_wait_impl () from /lib/64/libc.so.1
2 0xfffffd7fff0a56c0 in sema_wait () from /lib/64/libc.so.1
3 0xfffffd7fff09a0cc in sem_wait () from /lib/64/libc.so.1
4 0xfffffd7ff8b0c4dc in q_dequeue (q=0x13fed60) at mal_interpreter.mx:874
5 0xfffffd7ff8b1825d in runDFLOWworker (t=0x1402e00) at mal_interpreter.mx:1087
6 0xfffffd7fff0b22ad in _thrp_setup () from /lib/64/libc.so.1
7 0xfffffd7fff0b2550 in ?? () from /lib/64/libc.so.1
8 0x0000000000000000 in ?? ()
Thread 13 (Thread 4 (LWP 4)):
0 0xfffffd7fff0bb3ea in __pollsys () from /lib/64/libc.so.1
1 0xfffffd7fff0a43f5 in _pollsys () from /lib/64/libc.so.1
2 0xfffffd7fff062bed in pselect () from /lib/64/libc.so.1
3 0xfffffd7fff06306c in select () from /lib/64/libc.so.1
4 0xfffffd7ff78803d1 in MT_sleep_ms (ms=30000) at gdk_posix.c:1680
5 0xfffffd7ffe17156f in store_manager () at store.c:1530
6 0xfffffd7ffe0ea37b in mvc_logmanager () at sql_mvc.c:151
7 0xfffffd7fff0b22ad in _thrp_setup () from /lib/64/libc.so.1
8 0xfffffd7fff0b2550 in ?? () from /lib/64/libc.so.1
9 0x0000000000000000 in ?? ()
Thread 12 (Thread 3 (LWP 3)):
0 0xfffffd7fff0bb3ea in __pollsys () from /lib/64/libc.so.1
1 0xfffffd7fff0a43f5 in _pollsys () from /lib/64/libc.so.1
2 0xfffffd7fff062bed in pselect () from /lib/64/libc.so.1
3 0xfffffd7fff06306c in select () from /lib/64/libc.so.1
4 0xfffffd7ff985e292 in SERVERlistenThread (Sock=0x1089980) at mal_mapi.mx:512
5 0xfffffd7fff0b22ad in _thrp_setup () from /lib/64/libc.so.1
6 0xfffffd7fff0b2550 in ?? () from /lib/64/libc.so.1
7 0x0000000000000000 in ?? ()
Thread 11 (Thread 2 (LWP 2)):
0 0xfffffd7fff0bb3ea in __pollsys () from /lib/64/libc.so.1
1 0xfffffd7fff0a43f5 in _pollsys () from /lib/64/libc.so.1
2 0xfffffd7fff062bed in pselect () from /lib/64/libc.so.1
3 0xfffffd7fff06306c in select () from /lib/64/libc.so.1
4 0xfffffd7ff78803d1 in MT_sleep_ms (ms=50) at gdk_posix.c:1680
5 0xfffffd7ff82e336b in GDKvmtrim (limit=0xfffffd7ff8779a18) at gdk_utils.mx:1559
6 0xfffffd7fff0b22ad in _thrp_setup () from /lib/64/libc.so.1
7 0xfffffd7fff0b2550 in ?? () from /lib/64/libc.so.1
8 0x0000000000000000 in ?? ()
Thread 10 (LWP 2 ):
0 0xfffffd7fff0bb3ea in __pollsys () from /lib/64/libc.so.1
1 0xfffffd7fff0a43f5 in _pollsys () from /lib/64/libc.so.1
2 0xfffffd7fff062bed in pselect () from /lib/64/libc.so.1
3 0xfffffd7fff06306c in select () from /lib/64/libc.so.1
4 0xfffffd7ff78803d1 in MT_sleep_ms (ms=50) at gdk_posix.c:1680
5 0xfffffd7ff82e336b in GDKvmtrim (limit=0xfffffd7ff8779a18) at gdk_utils.mx:1559
6 0xfffffd7fff0b22ad in _thrp_setup () from /lib/64/libc.so.1
7 0xfffffd7fff0b2550 in ?? () from /lib/64/libc.so.1
8 0x0000000000000000 in ?? ()
Thread 9 (LWP 3 ):
0 0xfffffd7fff0bb3ea in __pollsys () from /lib/64/libc.so.1
1 0xfffffd7fff0a43f5 in _pollsys () from /lib/64/libc.so.1
2 0xfffffd7fff062bed in pselect () from /lib/64/libc.so.1
3 0xfffffd7fff06306c in select () from /lib/64/libc.so.1
4 0xfffffd7ff985e292 in SERVERlistenThread (Sock=0x1089980) at mal_mapi.mx:512
5 0xfffffd7fff0b22ad in _thrp_setup () from /lib/64/libc.so.1
6 0xfffffd7fff0b2550 in ?? () from /lib/64/libc.so.1
7 0x0000000000000000 in ?? ()
Thread 8 (LWP 4 ):
0 0xfffffd7fff0bb3ea in __pollsys () from /lib/64/libc.so.1
1 0xfffffd7fff0a43f5 in _pollsys () from /lib/64/libc.so.1
2 0xfffffd7fff062bed in pselect () from /lib/64/libc.so.1
3 0xfffffd7fff06306c in select () from /lib/64/libc.so.1
4 0xfffffd7ff78803d1 in MT_sleep_ms (ms=30000) at gdk_posix.c:1680
5 0xfffffd7ffe17156f in store_manager () at store.c:1530
6 0xfffffd7ffe0ea37b in mvc_logmanager () at sql_mvc.c:151
7 0xfffffd7fff0b22ad in _thrp_setup () from /lib/64/libc.so.1
8 0xfffffd7fff0b2550 in ?? () from /lib/64/libc.so.1
9 0x0000000000000000 in ?? ()
Thread 7 (LWP 22 ):
0 0xfffffd7ff81344c2 in BAThash (b=0x481748, masksize=0) at gdk_search.mx:513
1 0xfffffd7ff80c1d28 in BAT_hashselect (b=0x481748, bn=0x12a4680, tl=0x13e6fb0) at gdk_batop.mx:999
2 0xfffffd7ff80d8413 in BAT_select_ (b=0x481720, tl=0x13e6fb0, th=0x13e6fb0, li=1 '\001', hi=1 '\001', tail=0 '\0', anti=0 '\0', preserve_order=0 '\0')
at gdk_batop.mx:1268
3 0xfffffd7ff80d94a6 in BATuselect (b=0x481720, h=0x13e6fb0, t=0x0) at gdk_batop.mx:1344
4 0xfffffd7ff9389c24 in CMDuselect1 (result=0xfffffd7ffd5ff2e0, b=0x481720, value=0x13e6fb0) at algebra.mx:1417
5 0xfffffd7ff93916d6 in ALGuselect1 (result=0x1d29336c0, bid=0x1d29336b0, value=0x13e6fb0) at algebra.mx:2257
6 0xfffffd7ff8b025bb in runMALsequence (cntxt=0x4ca180, mb=0x1d2921920, startpc=1, stoppc=0, stk=0x1d29334b0, env=0x0, pcicaller=0x0) at mal_interpreter.mx:1958
7 0xfffffd7ff8ae51d5 in callMAL (cntxt=0x4ca180, mb=0x1d2921920, env=0xfffffd7ffd5ffd00, argv=0xfffffd7ffd5ffda0, debug=0 '\0') at mal_interpreter.mx:423
8 0xfffffd7ffe0569cf in SQLexecutePrepared (c=0x4ca180, be=0x131cd90, q=0x1d2921770) at sql_scenario.c:1642
9 0xfffffd7ffe056cb9 in SQLengineIntern (c=0x4ca180, be=0x131cd90) at sql_scenario.c:1695
10 0xfffffd7ffe05731b in SQLengine (c=0x4ca180) at sql_scenario.c:1821
11 0xfffffd7ff8ad0a08 in runPhase (c=0x4ca180, phase=4) at mal_scenario.c:522
12 0xfffffd7ff8ad0c04 in runScenarioBody (c=0x4ca180) at mal_scenario.c:573
13 0xfffffd7ff8ad0e11 in runScenario (c=0x4ca180) at mal_scenario.c:601
14 0xfffffd7ff8ad1ed5 in MSserveClient (dummy=0x4ca180) at mal_session.c:438
15 0xfffffd7fff0b22ad in _thrp_setup () from /lib/64/libc.so.1
16 0xfffffd7fff0b2550 in ?? () from /lib/64/libc.so.1
17 0x0000000000000000 in ?? ()
Thread 6 (LWP 6 ):
0 0xfffffd7fff0b2597 in __lwp_park () from /lib/64/libc.so.1
1 0xfffffd7fff0a553a in sema_wait_impl () from /lib/64/libc.so.1
2 0xfffffd7fff0a56c0 in sema_wait () from /lib/64/libc.so.1
3 0xfffffd7fff09a0cc in sem_wait () from /lib/64/libc.so.1
4 0xfffffd7ff8b0c4dc in q_dequeue (q=0x13fed60) at mal_interpreter.mx:874
5 0xfffffd7ff8b1825d in runDFLOWworker (t=0x1402e00) at mal_interpreter.mx:1087
6 0xfffffd7fff0b22ad in _thrp_setup () from /lib/64/libc.so.1
7 0xfffffd7fff0b2550 in ?? () from /lib/64/libc.so.1
8 0x0000000000000000 in ?? ()
Thread 5 (LWP 7 ):
0 0xfffffd7fff0b2597 in __lwp_park () from /lib/64/libc.so.1
1 0xfffffd7fff0a553a in sema_wait_impl () from /lib/64/libc.so.1
2 0xfffffd7fff0a56c0 in sema_wait () from /lib/64/libc.so.1
3 0xfffffd7fff09a0cc in sem_wait () from /lib/64/libc.so.1
4 0xfffffd7ff8b0c4dc in q_dequeue (q=0x13fed60) at mal_interpreter.mx:874
5 0xfffffd7ff8b1825d in runDFLOWworker (t=0x1402e28) at mal_interpreter.mx:1087
6 0xfffffd7fff0b22ad in _thrp_setup () from /lib/64/libc.so.1
7 0xfffffd7fff0b2550 in ?? () from /lib/64/libc.so.1
8 0x0000000000000000 in ?? ()
Thread 4 (LWP 8 ):
0 0xfffffd7fff0b2597 in __lwp_park () from /lib/64/libc.so.1
1 0xfffffd7fff0a553a in sema_wait_impl () from /lib/64/libc.so.1
2 0xfffffd7fff0a56c0 in sema_wait () from /lib/64/libc.so.1
3 0xfffffd7fff09a0cc in sem_wait () from /lib/64/libc.so.1
4 0xfffffd7ff8b0c4dc in q_dequeue (q=0x13fed60) at mal_interpreter.mx:874
5 0xfffffd7ff8b1825d in runDFLOWworker (t=0x1402e50) at mal_interpreter.mx:1087
6 0xfffffd7fff0b22ad in _thrp_setup () from /lib/64/libc.so.1
7 0xfffffd7fff0b2550 in ?? () from /lib/64/libc.so.1
8 0x0000000000000000 in ?? ()
Thread 3 (LWP 9 ):
0 0xfffffd7fff0b2597 in __lwp_park () from /lib/64/libc.so.1
1 0xfffffd7fff0a553a in sema_wait_impl () from /lib/64/libc.so.1
2 0xfffffd7fff0a56c0 in sema_wait () from /lib/64/libc.so.1
3 0xfffffd7fff09a0cc in sem_wait () from /lib/64/libc.so.1
4 0xfffffd7ff8b0c4dc in q_dequeue (q=0x13fed60) at mal_interpreter.mx:874
5 0xfffffd7ff8b1825d in runDFLOWworker (t=0x1402e78) at mal_interpreter.mx:1087
6 0xfffffd7fff0b22ad in _thrp_setup () from /lib/64/libc.so.1
7 0xfffffd7fff0b2550 in ?? () from /lib/64/libc.so.1
8 0x0000000000000000 in ?? ()
Thread 2 (Thread 1 (LWP 1)):
0 0xfffffd7fff0bb4fa in __read () from /lib/64/libc.so.1
1 0xfffffd7fff0a2023 in read () from /lib/64/libc.so.1
2 0xfffffd7ffcf46c02 in rl_getc () from /usr/lib/64/libreadline.so.5
3 0xfffffd7ffcf46bc6 in rl_read_key () from /usr/lib/64/libreadline.so.5
4 0xfffffd7ffcf1afcc in readline_internal_char () from /usr/lib/64/libreadline.so.5
5 0xfffffd7ffcf1ab35 in readline () from /usr/lib/64/libreadline.so.5
6 0xfffffd7ff8ac14cb in getConsoleInput (c=0x4c9ee0, prompt=0x4c0fc0 ">", linemode=0, exit_on_error=1) at mal_readline.c:333
7 0xfffffd7ff8ac1bac in readConsole (cntxt=0x4c9ee0) at mal_readline.c:492
8 0xfffffd7ff8ad2115 in MALreader (c=0x4c9ee0) at mal_session.c:501
9 0xfffffd7ff8ad0a08 in runPhase (c=0x4c9ee0, phase=0) at mal_scenario.c:522
10 0xfffffd7ff8ad0b12 in runScenarioBody (c=0x4c9ee0) at mal_scenario.c:559
11 0xfffffd7ff8ad0e11 in runScenario (c=0x4c9ee0) at mal_scenario.c:601
12 0xfffffd7ff8ad1ed5 in MSserveClient (dummy=0x4c9ee0) at mal_session.c:438
13 0x0000000000404099 in main (argc=23, av=0xfffffd7fffdffa08) at mserver5.c:596
Thread 1 (LWP 1 ):
0 0xfffffd7fff0bb4fa in __read () from /lib/64/libc.so.1
1 0xfffffd7fff0a2023 in read () from /lib/64/libc.so.1
2 0xfffffd7ffcf46c02 in rl_getc () from /usr/lib/64/libreadline.so.5
3 0xfffffd7ffcf46bc6 in rl_read_key () from /usr/lib/64/libreadline.so.5
4 0xfffffd7ffcf1afcc in readline_internal_char () from /usr/lib/64/libreadline.so.5
5 0xfffffd7ffcf1ab35 in readline () from /usr/lib/64/libreadline.so.5
6 0xfffffd7ff8ac14cb in getConsoleInput (c=0x4c9ee0, prompt=0x4c0fc0 ">", linemode=0, exit_on_error=1) at mal_readline.c:333
7 0xfffffd7ff8ac1bac in readConsole (cntxt=0x4c9ee0) at mal_readline.c:492
8 0xfffffd7ff8ad2115 in MALreader (c=0x4c9ee0) at mal_session.c:501
9 0xfffffd7ff8ad0a08 in runPhase (c=0x4c9ee0, phase=0) at mal_scenario.c:522
10 0xfffffd7ff8ad0b12 in runScenarioBody (c=0x4c9ee0) at mal_scenario.c:559
11 0xfffffd7ff8ad0e11 in runScenario (c=0x4c9ee0) at mal_scenario.c:601
12 0xfffffd7ff8ad1ed5 in MSserveClient (dummy=0x4c9ee0) at mal_session.c:438
13 0x0000000000404099 in main (argc=23, av=0xfffffd7fffdffa08) at mserver5.c:596
## Comment 17320
Date: 2012-05-31 17:25:16 +0200
From: sgpi <<sgpipub>>
...continued from bug #3067
> To answer your question, you can see global temporary tables with the query
> select * from sys.tables where schema_id = (select id from sys.schemas where
> name = 'tmp');
> The tables with the names _tables, _columns, keys, idxs, triggers, and objects
> are created by the system.
sql>select * from sys.tables where schema_id = (select id from sys.schemas where
more>name = 'tmp');
+------+----------+-----------+-------+------+--------+---------------+----------+-----------+
| id | name | schema_id | query | type | system | commit_action | readonly | temporary |
+======+==========+===========+=======+======+========+===============+==========+===========+
| 2103 | _tables | 2102 | null | 0 | true | 2 | false | 0 |
| 2112 | _columns | 2102 | null | 0 | true | 2 | false | 0 |
| 2123 | keys | 2102 | null | 0 | true | 2 | false | 0 |
| 2130 | idxs | 2102 | null | 0 | true | 2 | false | 0 |
| 2135 | triggers | 2102 | null | 0 | true | 2 | false | 0 |
| 2146 | objects | 2102 | null | 0 | true | 2 | false | 0 |
+------+----------+-----------+-------+------+--------+---------------+----------+-----------+
6 tuples (93.566ms)
> Unfortunately, having the answer doesn't bring me any closer to the solution.
As you can see I have no temporary tables.
## Comment 17334
Date: 2012-06-05 10:05:49 +0200
From: @sjoerdmullender
Try what I may, I cannot reproduce this problem, and I don't see how this (and the presumably related) crashes from bug #3067 can occur in the first place.
Can you send me (attach) your config.status output? I can try to compare and see what's different in your setup from mine.
## Comment 17336
Date: 2012-06-05 13:38:45 +0200
From: @sjoerdmullender
Can you do a full rebuild, including configure with these changes:
Remove --enable-bits=64, and instead use
CC='gcc -m64' ./configure (other configure options)
It looks like you're using a compiler that by default targets 32 bits. The configure script does a bunch of checks of the compiler environment before it checks for the --enable-bits option. This is incorrect (so we will remove the --enable-bits).
## Comment 17338
Date: 2012-06-06 11:00:12 +0200
From: sgpi <<sgpipub>>
(In reply to comment 3)
> Can you do a full rebuild, including configure with these changes:
> Remove --enable-bits=64, and instead use
> CC='gcc -m64' ./configure (other configure options)
This solves the problem. Thanks!
## Comment 17339
Date: 2012-06-06 11:05:52 +0200
From: @grobian
Ah, thank you very much for the feedback!
## Comment 17341
Date: 2012-06-06 11:46:08 +0200
From: @sjoerdmullender
I'm glad this problem is fixed.
Now we can go back to bug #3067.
| crash when attaching new client | https://api.github.com/repos/MonetDB/MonetDB/issues/3094/comments | 0 | 2020-11-30T12:10:53Z | 2024-06-27T11:56:38Z | https://github.com/MonetDB/MonetDB/issues/3094 | 753,425,455 | 3,094 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-05-30 13:18:36 +0200
From: Inho Kim <<georgios.kim>>
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @bartscheers, @njnes
Last updated: 2012-11-27 15:22:07 +0100
## Comment 17306
Date: 2012-05-30 13:18:36 +0200
From: Inho Kim <<georgios.kim>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.52 Safari/536.5
Build Identifier: MonetDB v11.9.5
sql failed if use scalar subquery with alias
Reproducible: Always
### Steps to Reproduce:
create table test1 ( id int, name varchar(20));
create table test2 ( id int, name varchar(20));
select
(select count(id) as cnt1 from test1 ) as c1,
(select count(b.id) as cnt2 from test2 b where a.id = b.id) as c2
from test1 a;
### Actual Results:
No error, no output.. just display prompt..
### Expected Results:
+----+----+
| L2 | c2 |
+====+====+
+----+----+
0 tuples
case 1:
select
(select count(id) as cnt1 from test1 ),
(select count(b.id) as cnt2 from test2 b where a.id = b.id)
from test1 a;
=> OK
case 2:
select
(select count(id) as cnt1 from test1 ) ,
(select count(b.id) as cnt2 from test2 b where a.id = b.id) as c2
from test1 a;
==> OK
case 3
select
(select count(b.id) as cnt2 from test2 b where a.id = b.id) as c2,
(select count(id) as cnt1 from test1 ) as c1
from test1 a;
==> OK
case 4:
select
(select count(id) as cnt1 from test1 ) as c1,
(select count(b.id) as cnt2 from test2 b where a.id = b.id) as c2
from test1 a;
==> Fail
## Comment 17443
Date: 2012-07-11 18:22:59 +0200
From: @njnes
Changeset [9b77e58aa75e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9b77e58aa75e) 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=9b77e58aa75e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=9b77e58aa75e)
Changeset description:
fixed bug #3093. When we repeat the projection of partial query before the correlated subquery we need to use the aliases of this partial projection.
## Comment 17444
Date: 2012-07-11 18:25:50 +0200
From: @njnes
Fixed. Indeed the alias wasn't propagated properly through out the query.
## Comment 17643
Date: 2012-08-23 10:14:40 +0200
From: @sjoerdmullender
Jul2012-SP1 has been released.
## Comment 18112
Date: 2012-11-27 15:22:07 +0100
From: @bartscheers
Added test, with and without data
| sql fail if use scalar subquery with alias | https://api.github.com/repos/MonetDB/MonetDB/issues/3093/comments | 0 | 2020-11-30T12:10:51Z | 2024-06-27T11:56:38Z | https://github.com/MonetDB/MonetDB/issues/3093 | 753,425,427 | 3,093 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-05-30 10:56:18 +0200
From: Gatis Ozolins <<g.ozolins>>
To: clients devs <<bugs-clients>>
Version: 11.15.11 (Feb2013-SP3)
Last updated: 2014-02-20 15:03:03 +0100
## Comment 17305
Date: 2012-05-30 10:56:18 +0200
From: Gatis Ozolins <<g.ozolins>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0
Build Identifier: Apr 2012-SP1
Scalar function escape is not supported
Reproducible: Always
### Steps to Reproduce:
select {fn concat('a', 'b') }
### Actual Results:
unexpected symbol ({)
### Expected Results:
ab
## Comment 17654
Date: 2012-08-24 14:50:23 +0200
From: @sjoerdmullender
Jul2012-SP1 has been released.
## Comment 19127
Date: 2013-09-04 17:43:30 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [3d1afd974f11](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3d1afd974f11) 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=3d1afd974f11](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=3d1afd974f11)
Changeset description:
ODBC: Implemented scalar function conversions (e.g. {fn concat('a','b')}).
This is not very well tested since there are many functions to be converted.
This fixes bug #3092.
## Comment 19136
Date: 2013-09-06 14:49:29 +0200
From: @sjoerdmullender
The feature has been implemented.
## Comment 19621
Date: 2014-02-20 15:03:03 +0100
From: @sjoerdmullender
Jan2014 has been released.
| ODBC client doesn't support scalar function escape | https://api.github.com/repos/MonetDB/MonetDB/issues/3092/comments | 0 | 2020-11-30T12:10:48Z | 2024-06-27T11:56:37Z | https://github.com/MonetDB/MonetDB/issues/3092 | 753,425,389 | 3,092 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-05-29 16:31:55 +0200
From: Simon Brodt <<simon.brodt>>
To: SQL devs <<bugs-sql>>
Version: 11.3.3 (Apr2011-SP1) [obsolete]
CC: benjie, @njnes
Last updated: 2012-07-17 13:57:42 +0200
## Comment 17297
Date: 2012-05-29 16:31:55 +0200
From: Simon Brodt <<simon.brodt>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0
Build Identifier: Apr2012-SP1 (MonetDB 5 server v11.9.1 "Apr2012" Compiled for x86_64-pc-winnt/64bit with 64bit OIDs dynamically linked)
Since the Apr2012-SP1 release the query contained in lines 955-2766 of the 20120528-235447-584-monetdb.log file produces several BAT errors (see lines 2767-2786).
Reproducable: always
Remarks: Happens also after deletig the MonetDB dbfarm folder, i.e. with a fully fresh installation
Reproducible: Always
## Comment 17298
Date: 2012-05-29 16:34:47 +0200
From: Simon Brodt <<simon.brodt>>
Created attachment 111
Log file produced by the jdbc driver, where the error occurs
> Attached file: [20120528-235447-584-monetdb.log](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3091_20120528-235447-584-monetdb.log_111) (text/plain, 116883 bytes)
> Description: Log file produced by the jdbc driver, where the error occurs
## Comment 17344
Date: 2012-06-06 13:16:37 +0200
From: @njnes
With the given log we cannot debug this problem. Is it possible to create a small example script which triggers the problem.
## Comment 17351
Date: 2012-06-06 23:29:14 +0200
From: Simon Brodt <<simon.brodt>>
This does it for me:
CREATE SCHEMA "meta";
CREATE TABLE "meta"."program_specs" (
"id" INT AUTO_INCREMENT PRIMARY KEY,
"namespace" CLOB NOT NULL,
"simple_name" CLOB NOT NULL,
"description" CLOB NOT NULL DEFAULT '',
"xml_spec" CLOB NOT NULL,
CONSTRAINT "program_spec_unique_name" UNIQUE ("namespace", "simple_name")
);
INSERT INTO "meta"."program_specs"
("namespace", "simple_name", "description", "xml_spec")
VALUES
( 'example', 'access-control', '', '<?xml version="1.0" encoding="UTF-8"?>' )
;
Client session:
sql>CREATE SCHEMA "meta";
operation successful (2.121ms)
sql>
sql>CREATE TABLE "meta"."program_specs" (
more> "id" INT AUTO_INCREMENT PRIMARY KEY,
more> "namespace" CLOB NOT NULL,
more> "simple_name" CLOB NOT NULL,
more> "description" CLOB NOT NULL DEFAULT '',
more> "xml_spec" CLOB NOT NULL,
more> CONSTRAINT "program_spec_unique_name" UNIQUE ("namespace", "simple_name")
more>);
operation successful (5.398ms)
sql>
sql>INSERT INTO "meta"."program_specs"
more> ("namespace", "simple_name", "description", "xml_spec")
more>VALUES
more> ( 'example', 'access-control', '', '<?xml version="1.0" encoding="UTF-8"?>' )
more>;
TypeException:user.s1_1[59]:'bat.reverse' undefined in: _89:any := bat.reverse(_86:wrd)
TypeException:user.s1_1[60]:'algebra.join' undefined in: _90:any := algebra.join(_80:bat[:oid,:wrd], _89:any)
TypeException:user.s1_1[62]:'algebra.markT' undefined in: _93:any := algebra.markT(_90:any, _91:oid)
TypeException:user.s1_1[63]:'bat.reverse' undefined in: _94:any := bat.reverse(_93:any)
TypeException:user.s1_1[70]:'algebra.leftjoin' undefined in: _105:any := algebra.leftjoin(_94:any, _104:bat[:oid,:str])
TypeException:user.s1_1[71]:'bat.reverse' undefined in: _106:any := bat.reverse(_90:any)
TypeException:user.s1_1[73]:'algebra.markT' undefined in: _108:any := algebra.markT(_106:any, _107:oid)
TypeException:user.s1_1[74]:'bat.reverse' undefined in: _109:any := bat.reverse(_108:any)
TypeException:user.s1_1[75]:'algebra.leftjoin' undefined in: _110:any := algebra.leftjoin(_109:any, _36:str)
TypeException:user.s1_1[79]:'algebra.semijoin' undefined in: _117:any := algebra.semijoin(_94:any, _116:bat[:oid,:void])
TypeException:user.s1_1[86]:'algebra.leftjoin' undefined in: _127:any := algebra.leftjoin(_117:any, _126:bat[:oid,:str])
TypeException:user.s1_1[87]:'algebra.semijoin' undefined in: _128:any := algebra.semijoin(_109:any, _116:bat[:oid,:void])
TypeException:user.s1_1[88]:'algebra.leftjoin' undefined in: _129:any := algebra.leftjoin(_128:any, _27:str)
TypeException:user.s1_1[92]:'algebra.semijoin' undefined in: _133:any := algebra.semijoin(_117:any, _132:bat[:oid,:void])
TypeException:user.s1_1[93]:'bat.reverse' undefined in: _134:any := bat.reverse(_133:any)
TypeException:user.s1_1[94]:'algebra.semijoin' undefined in: _135:any := algebra.semijoin(_128:any, _132:bat[:oid,:void])
TypeException:user.s1_1[95]:'algebra.join' undefined in: _136:any := algebra.join(_134:any, _135:any)
TypeException:user.s1_1[96]:'aggr.count' undefined in: _137:any := aggr.count(_136:any)
39000!program contains errors
sql>
## Comment 17393
Date: 2012-06-28 22:08:10 +0200
From: Benjie Chen <<benjie>>
Yes. I have this problem, and it's isolated to the following.
The following all works:
create table t30(
a varchar(100),
b varchar(100),
CONSTRAINT "t30_unique" UNIQUE ("a", "b")
);
insert into t30(a,b) values('x','y');
create table t31(
a varchar(100),
b varchar(100),
c varchar(100),
CONSTRAINT "t31_unique" UNIQUE ("a", "b")
);
insert into t31(a,b) values('x','y');
create table t32(
c varchar(100),
a varchar(100),
b varchar(100),
CONSTRAINT "t32_unique" UNIQUE ("a", "b")
);
insert into t32(c,a,b) values(NULL,'x','y');
But the following DOES NOT WORK:
insert into t32(a,b) values('x','y');
error message is
TypeException:user.s2_1[45]:'bat.reverse' undefined in: _67:any := bat.reverse(_64:wrd)
TypeException:user.s2_1[46]:'algebra.join' undefined in: _68:any := algebra.join(_58:bat[:oid,:wrd], _67:any)
TypeException:user.s2_1[48]:'algebra.markT' undefined in: _71:any := algebra.markT(_68:any, _69:oid)
...
Seems like when you insert w/o specifying all values for columns before the indexed column, the failure occurs.
Help!!!
Thanks.
(In reply to comment 2)
> With the given log we cannot debug this problem. Is it possible to create a
> small example script which triggers the problem.
## Comment 17405
Date: 2012-07-04 15:08:28 +0200
From: @njnes
Changeset [6cd986132b9e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6cd986132b9e) 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=6cd986132b9e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=6cd986132b9e)
Changeset description:
fixed bug #3091. Handle single value (value lists) properly.
## Comment 17406
Date: 2012-07-04 15:09:19 +0200
From: @njnes
fixed the handling of single values
## Comment 17481
Date: 2012-07-17 13:57:42 +0200
From: @grobian
Fix released in Jul2012
| Since Apr2012-SP1 !TypeException:user.s11_1[59]:'bat.reverse' undefined in: _89:any := bat.reverse(_86:wrd) | https://api.github.com/repos/MonetDB/MonetDB/issues/3091/comments | 0 | 2020-11-30T12:10:45Z | 2024-06-27T11:56:36Z | https://github.com/MonetDB/MonetDB/issues/3091 | 753,425,366 | 3,091 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-05-29 10:53:59 +0200
From: Inho Kim <<georgios.kim>>
To: SQL devs <<bugs-sql>>
Version: 11.11.5 (Jul2012)
CC: @njnes, @drstmane
Last updated: 2013-05-22 13:36:32 +0200
## Comment 17296
Date: 2012-05-29 10:53:59 +0200
From: Inho Kim <<georgios.kim>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.52 Safari/536.5
Build Identifier: MonetDB v11.9.5
If where condition has single identifier expression, mserver5 crash.
for example..
select * from sys.tables where 1; ==> OK
select * from sys.tables where name ; ==> Crashed
Reproducible: Always
## Comment 17300
Date: 2012-05-29 18:57:55 +0200
From: @njnes
fixed a bug in the optimizer which pushes functions down select/joins.
## Comment 17463
Date: 2012-07-14 08:57:29 +0200
From: @drstmane
Re-opened and assigned to Jul2012 as test has being failing with Jul2012 & default for quite some time with
QUERY = select * from tables where name;
ERROR = !conversion from string to type bit failed.
!conversion from string to type bit failed.
!conversion from string to type bit failed.
cf.,
http://monetdb.cwi.nl/testweb/web/testgrid.php?serial=44603:a04c99a2b437&module=sql&targets=&order=platform,arch,compiler
http://monetdb.cwi.nl/testweb/tests/44603:a04c99a2b437/GNU-Fedora-x86_64-propcheck-assert/sql/mTests/test/BugTracker-2012/predicate_select.Bug-3090.err.diff.html
## Comment 17464
Date: 2012-07-14 15:10:46 +0200
From: @sjoerdmullender
This should be easy enough to fix, however the question is, would that fix be correct? The problem is that non-Boolean values are being used as Booleans. Is that actually allowed?
## Comment 17465
Date: 2012-07-15 10:38:39 +0200
From: @njnes
I think approving the error is much clearer. We have a strict rule for converting strings to bit (bool), ie the string should be true,false or NULL.
## Comment 17516
Date: 2012-07-19 14:54:47 +0200
From: @grobian
Changeset [b6b2bd626749](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b6b2bd626749) made by Fabian Groffen <fabian@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b6b2bd626749](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b6b2bd626749)
Changeset description:
predicate_select: approve per comment 4 in bug #3090
## Comment 17524
Date: 2012-07-20 10:53:06 +0200
From: @drstmane
Test proves to produce too variale output to be approved easily:
output (number of error messages) appears to depend on number of threads:
http://monetdb.cwi.nl/testweb/web/testgrid.php?serial=44688:b6b2bd626749&order=platform,arch,compiler&targets=&module=sql&tstlimit=test/BugTracker-2012
Maybe, we need to forcefully run it single-threaded, e.g., by using optimizer pipeline "sequential_pipe"?
## Comment 17525
Date: 2012-07-20 12:32:16 +0200
From: @grobian
Perhaps it would make more sense to only return one error message, or an unique set of error messages encountered by the workers.
## Comment 17533
Date: 2012-07-20 19:01:58 +0200
From: @drstmane
Changeset [807573750262](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=807573750262) made by Stefan Manegold <Stefan.Manegold@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=807573750262](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=807573750262)
Changeset description:
predicate_select.Bug-3090: approved output after recent changes
## Comment 17534
Date: 2012-07-20 19:39:32 +0200
From: @drstmane
Sjoerd checked in Fabian's suggestion:
http://dev.monetdb.org/hg/MonetDB/rev/a528928726b6
http://dev.monetdb.org/hg/MonetDB/rev/5e08a7eba004
## Comment 17535
Date: 2012-07-20 20:15:43 +0200
From: @drstmane
Changeset [a13583ea7077](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a13583ea7077) made by Stefan Manegold <Stefan.Manegold@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=a13583ea7077](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=a13583ea7077)
Changeset description:
predicate_select.Bug-3090: approved new output
## Comment 17555
Date: 2012-07-22 13:33:28 +0200
From: @drstmane
Changeset [3121867aed83](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3121867aed83) made by Stefan Manegold <Stefan.Manegold@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=3121867aed83](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=3121867aed83)
Changeset description:
rel_optimizer.c: fixed typo ("ne" -> "e")
found by segfault in test sql/test/BugTracker-2012/Tests/predicate_select.Bug-3090.sql
## Comment 17556
Date: 2012-07-22 13:33:30 +0200
From: @drstmane
Changeset [d4f17b9d4fc7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d4f17b9d4fc7) made by Stefan Manegold <Stefan.Manegold@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=d4f17b9d4fc7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=d4f17b9d4fc7)
Changeset description:
predicate_select.Bug-3090: approved SciQL output
## Comment 17637
Date: 2012-08-23 10:14:37 +0200
From: @sjoerdmullender
Jul2012-SP1 has been released.
## Comment 18583
Date: 2013-03-02 12:58:39 +0100
From: @drstmane
Changeset [1d5a855e4e87](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1d5a855e4e87) made by Stefan Manegold <Stefan.Manegold@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=1d5a855e4e87](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=1d5a855e4e87)
Changeset description:
predicate_select.Bug-3090: approved stable output after changeset [04ad0c9e2637](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=04ad0c9e2637)
## Comment 18744
Date: 2013-05-22 13:36:32 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [6f4a9ef59b50](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6f4a9ef59b50) made by Stefan Manegold <Stefan.Manegold@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=6f4a9ef59b50](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=6f4a9ef59b50)
Changeset description:
predicate_select.Bug-3090: (re-)approved nogeom output
| crashed if using single identifier for where condition | https://api.github.com/repos/MonetDB/MonetDB/issues/3090/comments | 0 | 2020-11-30T12:10:43Z | 2024-06-27T11:56:35Z | https://github.com/MonetDB/MonetDB/issues/3090 | 753,425,328 | 3,090 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-05-29 10:46:01 +0200
From: Inho Kim <<georgios.kim>>
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes
Last updated: 2012-06-19 11:20:37 +0200
## Comment 17295
Date: 2012-05-29 10:46:01 +0200
From: Inho Kim <<georgios.kim>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.52 Safari/536.5
Build Identifier: MonetDB v11.9.5
mserver5 crashed if join condition has two column and incorrect order..
select * from test1 a, test2 b where a.id = b.id and a.seq = b.seq; => OK
select * from test1 a, test2 b where a.id = b.id and b.seq = a.seq; => crash
Reproducible: Always
### Steps to Reproduce:
1.create table test1 ( id int, seq int, name varchar(20));
2.create table test2 ( id int, seq int, name varchar(20));
3.select * from test1 a, test2 b where a.id = b.id and b.seq = a.seq;
### Actual Results:
mserver5 crashed..
## Comment 17299
Date: 2012-05-29 17:43:56 +0200
From: @njnes
I'm unable to reproduce this crash with Apr2012/Jul2012 or tip
## Comment 17301
Date: 2012-05-30 04:24:11 +0200
From: Inho Kim <<georgios.kim>>
sorry for wrong example..
Please check out following example..
create table test1 ( id int, seq int, name varchar(20), primary key (id, seq));
create table test2 ( id int not null, seq int not null, name varchar(20));
select * from test1 a, test2 b where a.id = b.id and b.seq = a.seq;
## Comment 17302
Date: 2012-05-30 09:25:22 +0200
From: @njnes
Changeset [0f98dc926be5](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0f98dc926be5) 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=0f98dc926be5](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=0f98dc926be5)
Changeset description:
fixed crashing bug #3089
handle hash joins on partials keys
## Comment 17303
Date: 2012-05-30 09:28:29 +0200
From: @njnes
indeed this example crashes (asserts). Fixed, in case the hash join fails fall back to normal join.
| mserver5 crashed if join condition has two column and incorrect order | https://api.github.com/repos/MonetDB/MonetDB/issues/3089/comments | 0 | 2020-11-30T12:10:40Z | 2024-06-27T11:56:34Z | https://github.com/MonetDB/MonetDB/issues/3089 | 753,425,296 | 3,089 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-05-28 14:23:22 +0200
From: Gatis Ozolins <<g.ozolins>>
To: SQL devs <<bugs-sql>>
Version: -- development
CC: martin.van.dinther, richard.monetdb, @yzchang
Last updated: 2017-06-08 17:17:01 +0200
## Comment 17294
Date: 2012-05-28 14:23:22 +0200
From: Gatis Ozolins <<g.ozolins>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0
Build Identifier: Apr 2012-SP1
It is necessary to support larger DECIMAL data type, because there are many cases where 18 digits is not enough.
Reproducible: Always
## Comment 17674
Date: 2012-08-24 14:55:54 +0200
From: @sjoerdmullender
Jul2012-SP1 has been released.
## Comment 18134
Date: 2012-11-27 15:50:49 +0100
From: @yzchang
No test needed for feature request
## Comment 20611
Date: 2015-01-29 17:07:18 +0100
From: Richard Hughes <<richard.monetdb>>
I just tripped over the precision limits of the decimal data type and nearly filed a new bug report. Since MonetDB's behaviour is technically correct (albeit rather unhelpful to the programmer) I'll put my comments here instead:
Build is Oct2014 [e55aad69977b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e55aad69977b) (i.e. close to but not exactly SP2)
Actual behaviour:
sql>select cast(10 as decimal(18,9))/cast(1 as decimal(18,9));
too many digits (20 > 19)
Expected:
10.000000000
sql>explain select cast(10 as decimal(18,9))/cast(1 as decimal(18,9));
+-----------------------------------------------------------------------------+
| mal |
+=============================================================================+
| function user.s9_3{autoCommit=true}(A0:bte,A1:bte):void; |
| X_4 := calc.lng(A0,18,9); |
| X_7 := calc.lng(9,X_4,19,18); |
| X_9 := calc.lng(A1,18,9); |
| X_10 := calc./(X_7,X_9); |
| sql.exportValue(1,".L2","sql_div_single_value","decimal",19,9,8,X_10,"" |
: ); :
| end s9_3; |
| querylog.define("explain select cast(10 as decimal(18,9))/cast(1 as decim |
: al(18,9));","default_pipe") :
| optimizer.mitosis() |
| optimizer.dataflow() |
+-----------------------------------------------------------------------------+
The problem for the user is that it makes the decimal data type with large scale kind of useless, especially since the failure is data-dependent and hence (in my case at least) was discovered worryingly late during testing. The only reference I've found about how other databases deal with this is http://www.postgresql.org/message-id/29730.1342114219@sss.pgh.pa.us although it is well-known that Postgres's numeric data type is capable of infinite precision and scale.
Personally, I've worked around it by using floating-point for this bit of the calculation instead.
Multiplication has the same unhelpful behaviour but according to http://dev.mysql.com/doc/refman/5.5/en/precision-math-examples.html (example 2) this is mandated by SQL. It still makes life really awkward for the user, though:
sql>select cast(10 as decimal(18,9))*cast(1 as decimal(18,9));
overflow in calculation 10000000000*1000000000.
## Comment 25379
Date: 2017-06-08 17:17:01 +0200
From: Martin van Dinther <<martin.van.dinther>>
As of Jul2015 release we support DECIMAL(38) and NUMERIC(38) and HUGEINT,
but NOT on Windows or 32bit platforms.
See Jul 2015 feature release SQL note:
"Added support for 128-bit integers (called HUGEINT) on platforms that support this."
on https://www.monetdb.org/OldReleaseNotes/Jul2015
See also: https://www.monetdb.org/Documentation/Manuals/SQLreference/BuiltinTypes
The error with queries:
select cast(10 as decimal(18,9))/cast(1 as decimal(18,9));
select cast(10 as decimal(18,9))*cast(1 as decimal(18,9));
do not occur anymore (tested in Jul2017 release).
sql>explain select cast(10 as decimal(18,9))/cast(1 as decimal(18,9));
+--------------------------------------------------------------------------------------------------------------------------------+
| mal |
+================================================================================================================================+
| function user.s4_2():void; |
| X_3:void := querylog.define("explain select cast(10 as decimal(18,9))/cast(1 as decimal(18,9));", "default_pipe", 11:int); |
| sql.resultSet(".L4", "L4", "decimal", 27:int, 9:int, 10:int, 10000000000:hge); |
| end user.s4_2; +--------------------------------------------------------------------------------------------------------------------------------+
28 tuples (2.109ms)
sql>select cast(10 as decimal(18,9))/cast(1 as decimal(18,9));
+-------------------------------+
| L4 |
+===============================+
| 10.000000000 |
+-------------------------------+
1 tuple (0.860ms)
sql>select cast(10 as decimal(18,9))*cast(1 as decimal(18,9));
+----------------------------------------+
| L4 |
+========================================+
| 10.000000000000000000 |
+----------------------------------------+
1 tuple (0.937ms)
sql>
| Support for larger DECIMAL data type | https://api.github.com/repos/MonetDB/MonetDB/issues/3088/comments | 0 | 2020-11-30T12:10:38Z | 2024-06-27T11:56:33Z | https://github.com/MonetDB/MonetDB/issues/3088 | 753,425,269 | 3,088 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-05-28 12:51:41 +0200
From: @sjoerdmullender
To: SQL devs <<bugs-sql>>
Version: 11.9.5 (Apr2012-SP1) [obsolete]
CC: @njnes
Last updated: 2012-06-19 11:20:32 +0200
## Comment 17293
Date: 2012-05-28 12:51:41 +0200
From: @sjoerdmullender
sql>create table t (i int);
operation successful (62.572ms)
sql>create table t1 as select row_number() over () as id, i from t with data;
Not yet implemented
This is a regression: it worked in the Dec2011 branch.
$ mserver5 --version
MonetDB 5 server v11.9.5 "Apr2012-SP1" (64-bit, 64-bit oids)
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2012 MonetDB B.V., all rights reserved
Visit http://www.monetdb.org/ for further information
Found 3.9GiB available memory, 2 available cpu cores
Libraries:
libpcre: 8.12 2011-01-15 (compiled with 8.12)
openssl: OpenSSL 1.0.0i 19 Apr 2012 (compiled with OpenSSL 1.0.0i-fips 19 Apr 2012)
libxml2: 2.7.8 (compiled with 2.7.8)
Compiled by: mockbuild@ (x86_64-unknown-linux-gnu)
Compilation: gcc -O3 -fomit-frame-pointer -pipe -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic
Linking : /usr/bin/ld -m elf_x86_64 -Wl,-z,relro
## Comment 17304
Date: 2012-05-30 09:52:17 +0200
From: @sjoerdmullender
Changeset [4dfc90104ad9](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4dfc90104ad9) 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=4dfc90104ad9](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=4dfc90104ad9)
Changeset description:
Added test for bug #3087.
## Comment 17311
Date: 2012-05-30 15:21:49 +0200
From: @njnes
fixed by using the minimal_pipe in case of ddl statements (not the fixed 2 optimizers remap/multiplex only)
## Comment 17340
Date: 2012-06-06 11:29:57 +0200
From: @njnes
Next to the proper optimization pipeline we also needed a chkProgram call, to properly initialize the types of the mal program
## Comment 17342
Date: 2012-06-06 12:06:58 +0200
From: @njnes
Changeset [331edd3a8194](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=331edd3a8194) 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=331edd3a8194](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=331edd3a8194)
Changeset description:
fixed bug #3087, ie a chkProgram was missing
| query causes "Not yet implemented" message | https://api.github.com/repos/MonetDB/MonetDB/issues/3087/comments | 0 | 2020-11-30T12:10:35Z | 2024-06-27T11:56:32Z | https://github.com/MonetDB/MonetDB/issues/3087 | 753,425,250 | 3,087 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-05-24 15:09:25 +0200
From: @bartscheers
To: SQL devs <<bugs-sql>>
Version: 11.9.5 (Apr2012-SP1) [obsolete]
Last updated: 2012-06-19 11:20:26 +0200
## Comment 17283
Date: 2012-05-24 15:09:25 +0200
From: @bartscheers
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20100101 Firefox/12.0
Build Identifier: At least since Dec2011
Modulo function MOD() does not work in select from table
Reproducible: Always
### Steps to Reproduce:
1. CREATE TABLE t (d DOUBLE);
2. INSERT INTO t VALUES (0.011);
3. SELECT MOD(0.011 + 180, 360) gives correct results
4. SELECT MOD(d + 180, 360) FROM t gives TypeException
### Actual Results:
TypeException:user.s8_1[17]:'calc.fmod' undefined in: _53:any := calc.fmod(_51:dbl, A1:dbl)
TypeException:user.s8_1[18]:'bat.insert' undefined in: _54:any := bat.insert(_45:bat[:oid,:dbl], _50:oid, _53:any)
39000!program contains errors
### Expected Results:
result set containing one entry with value 180.011
## Comment 17284
Date: 2012-05-24 16:40:08 +0200
From: @sjoerdmullender
Changeset [e907dd8ed60c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e907dd8ed60c) 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=e907dd8ed60c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=e907dd8ed60c)
Changeset description:
Added test for bug #3086.
## Comment 17285
Date: 2012-05-24 16:42:18 +0200
From: @sjoerdmullender
Fixed with changeset 2b43985d0e8.
## Comment 17286
Date: 2012-05-24 16:43:01 +0200
From: @sjoerdmullender
(In reply to comment 2)
> Fixed with changeset 2b43985d0e8.
Make that [2b43985d0e82](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2b43985d0e82)
| Modulo function does not work in select from table | https://api.github.com/repos/MonetDB/MonetDB/issues/3086/comments | 0 | 2020-11-30T12:10:33Z | 2024-06-27T11:56:31Z | https://github.com/MonetDB/MonetDB/issues/3086 | 753,425,219 | 3,086 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-05-23 18:48:16 +0200
From: Babis <<charnik>>
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes, @drstmane
Last updated: 2012-06-19 11:20:20 +0200
## Comment 17277
Date: 2012-05-23 18:48:16 +0200
From: Babis <<charnik>>
User-Agent: Opera/9.80 (X11; Linux x86_64; U; en) Presto/2.9.168 Version/11.52
Build Identifier: Jul2012
mclient terminates its connection to mserver5 when executing a valid SQL query such as the above:
SELECT 1, (SELECT count(*) FROM R);
Notice that a query similar to the above that swaps the projected attributes executes correctly:
SELECT (SELECT count(*) FROM R), 1;
Reproducible: Always
### Steps to Reproduce:
1. CREATE TABLE R (c INT);
2. SELECT (SELECT count(*) FROM R), 1; it works fine
3. SELECT 1, (SELECT count(*) FROM R); it doesn't work
### Actual Results:
sql>SELECT 1, (SELECT count(*) FROM R);
MAPI = (monetdb) /tmp/.s.monetdb.50000
ACTION= read_line
QUERY = SELECT 1, (SELECT count(*) FROM R);
ERROR = !Connection terminated
## Comment 17278
Date: 2012-05-23 18:57:57 +0200
From: @drstmane
most probabaly this is actually a crash (segfault) of the server,
please check and share server console output or monetdbd (merovignian) log.
## Comment 17279
Date: 2012-05-23 19:06:47 +0200
From: Babis <<charnik>>
Oops, sorry, I forgot to include it:
ERR db[24300]: mserver5: ../../../MonetDB/sql/server/rel_select.c:616: rel_project: Assertion `exps_card(rel->exps) <= rel->card' failed.
MSG merovingian[9336]: database 'db' (24300) was killed by signal SIGABRT
## Comment 17280
Date: 2012-05-23 20:01:36 +0200
From: @drstmane
It indeed fails with Apr2012 with assertions enabled,
but appears to work fine with assertions disabled.
We'll need to check the validity of the asssertion ...
## Comment 17291
Date: 2012-05-25 21:51:53 +0200
From: @njnes
Changeset [4acfcc5693ca](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4acfcc5693ca) 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=4acfcc5693ca](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=4acfcc5693ca)
Changeset description:
fixed bug #3085, ie properly keep cardinality of projection/groupby
## Comment 17292
Date: 2012-05-25 21:53:49 +0200
From: @njnes
Fixed on the april2012 branch. The assertion doesn't appear anymore as the project/groupby now properly keep the cardinality (ie starting low (atom/aggr) and increased on multi row/columns)
| assertion fails upon execution of a valid SQL query | https://api.github.com/repos/MonetDB/MonetDB/issues/3085/comments | 0 | 2020-11-30T12:10:31Z | 2024-06-27T11:56:30Z | https://github.com/MonetDB/MonetDB/issues/3085 | 753,425,192 | 3,085 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-05-22 22:48:11 +0200
From: Richard Hughes <<cyreve>>
To: GDK devs <<bugs-common>>
Version: 11.11.5 (Jul2012)
Last updated: 2013-02-19 13:17:59 +0100
## Comment 17275
Date: 2012-05-22 22:48:11 +0200
From: Richard Hughes <<cyreve>>
User-Agent: Opera/9.80 (Windows NT 6.1; WOW64; U; en) Presto/2.10.229 Version/11.64
Build Identifier: v11.9.1 "Apr2012" amd64
Queries which rely on performing certain mathematical operations on timestamps run significantly slower than they could because of a lot of time spent locking and unlocking mutexes. The problem is compounded on Windows because pthread_mutex_lock() and pthread_mutex_unlock() are implemented using WaitForSingleObject() and ReleaseMutex(), which both involve a user<->kernel transition. The operations I have observed to have this problem so far are subtraction of two timestamps and extract(hour from ts).
Reproducible: Always
### Steps to Reproduce:
1. Create a file with 10000 lines of timestamps in it, all the same
2. create table times (t timestamp);
3. copy 10000 records into times from 'times.txt';
4. select count(*) from times A,times B where A.t-B.t<>0;
### Actual Results:
The select query takes 428s to complete (on a Sandy Bridge @ 3.4GHz).
### Expected Results:
The identical query "select count(*) from times A,times B where A.t<>B.t;" takes 910ms to complete.
System timing says that mserver5 spends 74% of its time in kernel mode when executing that slow query. Stack trace of a random mutex lock mid-query:
libbat!pthread_mutex_lock [gdk\gdk_system.c @ 295]
libbat!incref+0x109 [gdk\gdk_bbp.mx @ 2237]
libmonetdb5!BATdescriptor+0x66 [gdk\gdk.h @ 2507]
libmonetdb5!BKCinsert_bun+0x1e [monetdb5\modules\kernel\bat5.mx @ 1463]
libmonetdb5!runMALsequence+0x8c93 [monetdb5\mal\mal_interpreter.mx @ 1967]
libmonetdb5!callMAL+0x16b [monetdb5\mal\mal_interpreter.mx @ 2591]
lib_sql!SQLexecutePrepared+0x20b [sql\backends\monet5\sql_scenario.c @ 1642]
lib_sql!SQLengineIntern+0xb6 [sql\backends\monet5\sql_scenario.c @ 1695]
libmonetdb5!runScenarioBody+0x21e [monetdb5\mal\mal_scenario.c @ 574]
libmonetdb5!runScenario+0x22 [monetdb5\mal\mal_scenario.c @ 601]
libmonetdb5!MSserveClient+0xe0 [monetdb5\mal\mal_session.c @ 439]
libbat!thread_starter+0x10 [gdk\gdk_system.c @ 172]
kernel32!BaseThreadInitThunk+0xd
ntdll!RtlUserThreadStart+0x1d
FYI, the query above is obviously an artificial test-case for this bug report. The actual query I was doing was select * from bigtable where endtime-starttime>20000;
sql>explain select count(*) from times A,times B where A.t<>B.t;
+----------------------------------------------------------------------+
| mal |
+======================================================================+
| function user.s28_1{autoCommit=true}():void; |
| X_23 := nil:wrd; |
| barrier X_46 := language.dataflow(); |
| X_2 := sql.mvc(); |
| X_10:bat[:oid,:timestamp] := sql.bind(X_2,"sys","times","t",0); |
| X_8:bat[:oid,:timestamp] := sql.bind(X_2,"sys","times","t",2); |
| X_12 := algebra.kdifference(X_10,X_8); |
| X_13 := algebra.kunion(X_12,X_8); |
| X_4:bat[:oid,:timestamp] := sql.bind(X_2,"sys","times","t",1); |
| X_14 := algebra.kunion(X_13,X_4); |
| X_15:bat[:oid,:oid] := sql.bind_dbat(X_2,"sys","times",1); |
| X_16 := bat.reverse(X_15); |
| X_17 := algebra.kdifference(X_14,X_16); |
| X_18 := bat.reverse(X_17); |
| X_19 := algebra.antijoin(X_17,X_18); |
| X_20 := algebra.markT(X_19,0@0:oid); |
| X_21 := bat.reverse(X_20); |
| X_22 := algebra.leftjoin(X_21,X_14); |
| X_23 := aggr.count(X_22); |
| exit X_46; |
| sql.exportValue(1,"sys.a","L1":str,"wrd",64,0,6,X_23,""); |
| end s28_1; |
+----------------------------------------------------------------------+
sql>explain select count(*) from times A,times B where A.t-B.t<>0;
+----------------------------------------------------------------------+
| mal |
+======================================================================+
| function user.s29_1{autoCommit=true}(A0:lng):void; |
| X_27 := nil:bat[:oid,:timestamp]; |
| X_31:bat[:oid,:timestamp] := nil:bat[:oid,:timestamp]; |
| barrier X_62 := language.dataflow(); |
| X_3 := sql.mvc(); |
| X_11:bat[:oid,:timestamp] := sql.bind(X_3,"sys","times","t",0); |
| X_9:bat[:oid,:timestamp] := sql.bind(X_3,"sys","times","t",2); |
| X_13 := algebra.kdifference(X_11,X_9); |
| X_14 := algebra.kunion(X_13,X_9); |
| X_5:bat[:oid,:timestamp] := sql.bind(X_3,"sys","times","t",1); |
| X_15 := algebra.kunion(X_14,X_5); |
| X_16:bat[:oid,:oid] := sql.bind_dbat(X_3,"sys","times",1); |
| X_17 := bat.reverse(X_16); |
| X_18 := algebra.kdifference(X_15,X_17); |
| X_23 := algebra.project(X_18,0:int); |
| X_19 := bat.reverse(X_18); |
| X_20 := bat.reverse(X_19); |
| X_21 := algebra.project(X_20,0:int); |
| X_22 := bat.reverse(X_21); |
| X_24 := algebra.join(X_23,X_22); |
| X_25 := algebra.markT(X_24,0@0:oid); |
| X_26 := bat.reverse(X_25); |
| X_27 := algebra.leftjoin(X_26,X_15); |
| X_28 := bat.reverse(X_24); |
| X_29 := algebra.markT(X_28,0@0:oid); |
| X_30 := bat.reverse(X_29); |
| X_31:bat[:oid,:timestamp] := algebra.leftjoin(X_30,X_15); |
| exit X_62; |
| X_70 := bat.new(nil:oid,nil:lng); |
| barrier (X_73,X_74,X_75) := bat.newIterator(X_27); |
| X_77 := algebra.find(X_31,X_74); |
| X_79 := mtime.diff(X_75,X_77); |
| bat.insert(X_70,X_74,X_79); |
| redo (X_73,X_74,X_75) := bat.hasMoreElements(X_27); |
| exit (X_73,X_74,X_75); |
| X_31:bat[:oid,:timestamp] := nil:bat[:oid,:timestamp]; |
| X_32:bat[:oid,:lng] := X_70; |
| X_35 := algebra.antiuselect(X_32,A0); |
| X_36 := algebra.markT(X_35,0@0:oid); |
| X_37 := bat.reverse(X_36); |
| X_38 := algebra.leftjoin(X_37,X_27); |
| X_39 := aggr.count(X_38); |
| sql.exportValue(1,"sys.a","L1":str,"wrd",64,0:int,6,X_39,""); |
| end s29_1; |
+----------------------------------------------------------------------+
## Comment 17276
Date: 2012-05-22 23:10:56 +0200
From: @sjoerdmullender
I guess we need a bulk version of mtime.diff.
## Comment 17704
Date: 2012-08-27 11:19:25 +0200
From: @sjoerdmullender
Changeset [536a859ef7d7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=536a859ef7d7) 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=536a859ef7d7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=536a859ef7d7)
Changeset description:
Implemented bulk versions of mtime.diff.
This should fix bug #3084.
## Comment 17705
Date: 2012-08-27 11:22:23 +0200
From: @sjoerdmullender
I implemented bulk versions of mtime.diff which should solve the problem. The implementation will be in the next feature release (probably October).
## Comment 18514
Date: 2013-02-19 13:17:59 +0100
From: @sjoerdmullender
Feb2013 has been released.
| Timestamp arithmetic very slow (especially on Windows) | https://api.github.com/repos/MonetDB/MonetDB/issues/3084/comments | 0 | 2020-11-30T12:10:28Z | 2024-06-27T11:56:29Z | https://github.com/MonetDB/MonetDB/issues/3084 | 753,425,173 | 3,084 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-05-21 16:13:40 +0200
From: @skinkie
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes
Last updated: 2012-05-24 08:32:24 +0200
## Comment 17266
Date: 2012-05-21 16:13:40 +0200
From: @skinkie
Running database upgrade commands:
update sys.functions set type = 2, side_effect = false where type = 1 and id not in (select func_id from sys.args where number = 0 and name = 'result');
drop function sys.storage;
create function sys.storage() returns table ("schema" string, "table" string, "column" string, location string, "count" bigint, capacity bigint, width int, size bigint, hashsize bigint, sorted boolean) external name sql.storage;
create function sys.optimizers() returns table (name string, def string, status string) external name sql.optimizers;
drop procedure sys.ra;
create procedure sys.evalAlgebra( ra_stmt string, opt bool) external name sql."evalAlgebra";
insert into sys.systemfunctions (select f.id from sys.functions f, sys.schemas s where f.name in ('storage', 'optimizers') and f.type = 1 and f.schema_id = s.id and s.name = 'sys');
insert into sys.systemfunctions (select f.id from sys.functions f, sys.schemas s where f.name in ('evalalgebra') and f.type = 2 and f.schema_id = s.id and s.name = 'sys');
!ParseException:SQLparser:DROP PROCEDURE: no such procedure 'ra'
Running database upgrade commands:
create function sys.alpha(pdec double, pradius double) returns double external name sql.alpha;
insert into sys.systemfunctions (select f.id from sys.functions f, sys.schemas s where f.name = 'alpha' and f.type = 1 and f.schema_id = s.id and s.name = 'sys');
(Database was created before March, Trunk is of today)
## Comment 17267
Date: 2012-05-21 16:15:02 +0200
From: @skinkie
Lovely... can't go back.
!FATAL: BBPinit: incompatible BBP version: expected 061025, got 061026.
## Comment 17268
Date: 2012-05-21 17:17:30 +0200
From: @skinkie
"Fixed" by commenting out:
/* pos += snprintf(buf+pos, bufsize-pos, "drop procedure sys.ra;\n");
pos += snprintf(buf+pos, bufsize-pos, "create procedure sys.evalAlgebra( ra_stmt string, opt bool) external name sql.\"evalAlgebra\";\n"); */
## Comment 17269
Date: 2012-05-21 19:13:35 +0200
From: @sjoerdmullender
This looks like the bug that was fixed in changesets [3eba515f3e5d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3eba515f3e5d) [75a9c6a24aa7](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=75a9c6a24aa7) and [d22cb60b50d8](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d22cb60b50d8) on the Apr2012 branch. These fixes were merged into the default branch with changeset [2ab8a887b280](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2ab8a887b280) The merge was performed on May 15.
Please note that upgrades to the default branch are *never* guaranteed. Only upgrades between actual releases are supported.
| Upgrade to current trunk results in: ParseException:SQLparser:DROP PROCEDURE: no such procedure 'ra' | https://api.github.com/repos/MonetDB/MonetDB/issues/3083/comments | 0 | 2020-11-30T12:10:26Z | 2024-06-28T07:23:17Z | https://github.com/MonetDB/MonetDB/issues/3083 | 753,425,145 | 3,083 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-05-20 17:45:53 +0200
From: Richard Hughes <<cyreve>>
To: GDK devs <<bugs-common>>
Version: 11.15.15 (Feb2013-SP4)
CC: duc, @hannesmuehleisen, @mlkersten
Last updated: 2013-10-08 11:19:25 +0200
## Comment 17264
Date: 2012-05-20 17:45:53 +0200
From: Richard Hughes <<cyreve>>
User-Agent: Opera/9.80 (Windows NT 6.1; WOW64; U; en) Presto/2.10.229 Version/11.64
Build Identifier: v11.9.1 "Apr2012" amd64
The query "select n,count(*) as c from foo group by n order by c desc limit 10;" is designed to return the 10 most frequently occurring values in the column n. For 'difficult' cases (where there are many unique values in a large table) two cores of the CPU max out for longer than I'm prepared to wait (over 30 minutes and still waiting). For 'easy' cases where there are few unique values in a large table the query returns in a few seconds.
Reproducible: Always
### Steps to Reproduce:
1. Create a file 'randints.txt' with python: "import random;random.seed(0);for i in xrange(70000000): print random.randint(0,15000000)"
2. create table foo (n varchar(64) not null);
3. copy 70000000 records into foo from 'randints.txt';
4. select n,count(*) as c from foo group by n order by c desc limit 10;
### Actual Results:
Query still running after 30 minutes. Two CPU cores in use, no apparent I/O load or memory consumption.
### Expected Results:
Query returns in around 2 minutes. This guesstimate is based on "select count(distinct n) from foo;" taking about 1m20s (it's very I/O bound with 8GB of RAM so this time varies wildly).
Changing 'varchar(64)' to 'int' in the 'create table' above makes it all work, with a response time of 25.3s and plenty of memory usage.
Also, as a complete apples-for-oranges comparison "sort randints.txt|uniq -c|sort -nr|head -10" takes 1m45s (using cygwin's tools, where sort is parallel).
CPU: Sandy Bridge 2600 (4 cores, 8 threads, 3.4GHz).
RAM: 8GB
Disk: 2x7200rpm SATA in RAID-1
I fired up xperf and here's the highlights:
24.97% mserver5.exe
24.73% libmonetdb5.dll
24.72% CTgroup_str_hv_unclustered_STANDARD
11.98% 0x0000000180707397 [mov r,m64] modules/kernel/group.mx:496
3.98% 0x0000000180707249 [mov r,m64] modules/kernel/group.mx:499
3.22% 0x00000001807072ab [test r8,r8] modules/kernel/group.mx:499
2.23% 0x000000018070739b [mov r64,i] modules/kernel/group.mx:496
1.16% 0x0000000180707250 [mov r,m64] modules/kernel/group.mx:499
## Comment 17265
Date: 2012-05-20 18:08:17 +0200
From: Richard Hughes <<cyreve>>
Created attachment 108
explain select n,count(*) from ...
> Attached file: [explain-select-bug3067.txt](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3082_explain-select-bug3067.txt_108) (text/plain, 5353 bytes)
> Description: explain select n,count(*) from ...
## Comment 17270
Date: 2012-05-21 23:59:36 +0200
From: Richard Hughes <<cyreve>>
Some more data points, with variously-sized tables. All data were generated by scaling the numbers in the python script, so the ratio of unique values remained the same:
numrows distinct group
0.7m .12 1.3
1.4m .24 7.9
3.5m .7 68
7m 1.4 307
10.5m 2.1 842
14m 2.9 1461
All times are in seconds. 'distinct' is the time for "select
count(distinct n) from foo" to return and looks to be scaling impressively linearly.
'group' is the time for "select n,count(*) as c from foo group by n order by c desc limit 10" to return and some playing around with a spreadsheet gets 8.2n^2+9.5n as a curve that seems to fit. Extrapolating this produces 11 hours for my original 70m row table. The last two rows needed to use the disk, however, so there'll be a discontinuity in the timing.
What I find curious is that all 6 of these smaller tables started with a period where they pegged all 8 CPU threads (for roughly 20% of the overall runtime), for the larger two tables there was then a period where they spun the disk for a bit, then finally they all had a period where one core was pegged (for the remaining runtime). This is a different pattern to what happens with the 70m row table, where only two CPU cores are pegged at the beginning (and, as far as I know, forever - I have a low boredom threshold).
## Comment 17902
Date: 2012-11-07 19:27:06 +0100
From: @grobian
feels like something goes in a loop here, someone should check if this also is the case on non-windows (most likely it is)
## Comment 17916
Date: 2012-11-07 20:13:47 +0100
From: @mlkersten
Show be run again to understand causes.
## Comment 17917
Date: 2012-11-08 00:28:12 +0100
From: Richard Hughes <<cyreve>>
Still slow with Oct2012, but I suspect it's just being slow now and not actually hanging like before.
Using the same machine and recipe as before, it maxed out all 8 cores and trickled about 350KB/s of I/O for an hour before I got bored and killed it.
(I seem to be having difficulty building Oct2012 from the source tarball (NMAKE : fatal error U1073: don't know how to make '"..\..\..\monetdb5\modules\kernel\algebra.h"') so I can't get pdbs so I can't get useful xperf output for you)
## Comment 18153
Date: 2012-11-27 16:38:51 +0100
From: @mlkersten
The datafile produces an almost unique list. The order-by clause can not see this and performs an expensive grouping operation with lots internal structure overhead.
The details about what the cores are doing can be seen using the TRACE option.
Optimization of this use case is definitely on our list.
## Comment 18453
Date: 2013-01-30 11:08:55 +0100
From: @sjoerdmullender
I just tried this again on both the Oct2012 and Feb2013 branches.
A 7 million row database on Oct2012 took 30 minutes, whereas a 70 million row database on Feb2013 took only 7 minutes (on Fedora 18 Linux).
Can you try your tests on the Feb2013 branch? If necessary I can provide a Windows installer.
HP EliteBook 8470w with Intel i7-3610QM @ 2.30GHz, 4 cores, 8 threads, 8 GB memory, 7200 RPM disk (+ an SSD which wasn't involved), running Fedora 18.
| Very poor performance (or hang?) of n-most-common query over varchar | https://api.github.com/repos/MonetDB/MonetDB/issues/3082/comments | 0 | 2020-11-30T12:10:23Z | 2024-06-27T11:56:26Z | https://github.com/MonetDB/MonetDB/issues/3082 | 753,425,128 | 3,082 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-05-14 16:53:00 +0200
From: Alfred Nordman <<alfred.nordman>>
To: SQL devs <<bugs-sql>>
Version: 11.11.7 (Jul2012-SP1)
CC: @njnes, sellam, @drstmane
Last updated: 2012-11-27 16:17:24 +0100
## Comment 17252
Date: 2012-05-14 16:53:00 +0200
From: Alfred Nordman <<alfred.nordman>>
The query
SELECT * FROM t WHERE t.c = 1 OR t.c = 2;
runs twice as slowly than the query
SELECT * FROM t WHERE t.c < 1 OR t.c > 2;
Why should there be such a great difference in the query times?
## Comment 17257
Date: 2012-05-14 20:01:04 +0200
From: @drstmane
Alfred,
did you try only one run of each query, or did you run each query multiple times?
The first run of the first query might be slower due to building a hash index for the point selection(s) on the fly.
Other than that, we'd need some more info to interpret the results:
What kind of system (hardware, os) are you running on, and which version of MonetDB are you using? The output of `mserver5 --version` should answer all these questions.
How large is your table, i.e., how many columns and how many rows does it consist of?
How large is the result (number of rows) for either query?
It would be great if you could profile your queries by prefixing them with keyword "TRACE" and provide us with the results (attached) for analysis.
## Comment 17675
Date: 2012-08-24 14:55:54 +0200
From: @sjoerdmullender
Jul2012-SP1 has been released.
## Comment 18009
Date: 2012-11-26 15:22:52 +0100
From: @njnes
In the default branch the OR handling changed. This may result in a faster 1st query. However without your data etc we cannot verify this.
| Queries containing WHERE that have OR and equality in the condition run slowly | https://api.github.com/repos/MonetDB/MonetDB/issues/3081/comments | 0 | 2020-11-30T12:10:21Z | 2024-06-27T11:56:25Z | https://github.com/MonetDB/MonetDB/issues/3081 | 753,425,103 | 3,081 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-05-10 14:58:51 +0200
From: Sabst <<sabst>>
To: clients devs <<bugs-clients>>
Version: -- development
CC: @gijzelaerr
Last updated: 2012-06-18 16:42:03 +0200
## Comment 17248
Date: 2012-05-10 14:58:51 +0200
From: Sabst <<sabst>>
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:8.0.1) Gecko/20100101 Firefox/8.0.1
Build Identifier: 11.9.1-20120418
Hi,
In environments where different Python apps need to coexist with different version and module requirements, using virtualenv is required.
http://www.virtualenv.org/en/latest/index.html
Usually, application are installed using pip:
pip install somemodule
Python-monetdb is not among the published modules but it can be worked around using something like:
pip install http://dev.monetdb.org/downloads/sources/Latest/python-monetdb-11.9.1.tar.gz
In that case, the installation is always done in /usr/local/lib/python2.6/dist-packages even if a virtual environment is active (I'm on Ubuntu/Lucid).
This should not be the case and the module should be installed in its virtual environment as most Python modules do.
Best regards,
Stephane.
Reproducible: Always
## Comment 17369
Date: 2012-06-18 16:28:21 +0200
From: @gijzelaerr
Monetdb is now included in the pypi package repository and thus can be installed by issuing:
$ pip install python-monetdb
## Comment 17371
Date: 2012-06-18 16:42:03 +0200
From: @grobian
since this is something outside of our release cycle, NEXTRELEASE -> FIXED
| Hardcoded installation path, virtualenv not supported | https://api.github.com/repos/MonetDB/MonetDB/issues/3080/comments | 0 | 2020-11-30T12:10:19Z | 2024-06-27T11:56:25Z | https://github.com/MonetDB/MonetDB/issues/3080 | 753,425,082 | 3,080 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-05-06 12:36:58 +0200
From: Kendall <<kendallarium>>
To: SQL devs <<bugs-sql>>
Version: 11.3.7 (Apr2011-SP2) [obsolete]
CC: kendallarium, @njnes
Last updated: 2012-05-25 12:58:46 +0200
## Comment 17221
Date: 2012-05-06 12:36:58 +0200
From: Kendall <<kendallarium>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19
Build Identifier: monetdbd[7854] 1.6 (Apr2012)
An Oracle schema sql creates a table that has an integer column with label "no".
There's an issue when creating a table with column name "no" in MonetDB:
sql>create table test1 (
more>no int);
42000!syntax error, unexpected NO, expecting FOREIGN or PRIMARY or UNIQUE in: "create table test1 (
no int"
Reproducible: Always
### Steps to Reproduce:
1. Install MonetDB and create/start/release a new database (monetdbd/monetdb)
2. Use mclient to connect and create new table with an int column named 'no'
3. Observe error produced by step2:" 42000!syntax error, unexpected NO"
### Actual Results:
Welcome to mclient, the MonetDB/SQL interactive terminal (Apr2012)
Database: MonetDB v11.9.1 (Apr2012), 'mapi:monetdb://localhost:50000/mydb'
Type \q to quit, \? for a list of available commands
auto commit mode: on
sql>create table test (
more>no int);
42000!syntax error, unexpected NO, expecting FOREIGN or PRIMARY or UNIQUE in: "create table test (
no int"
### Expected Results:
Welcome to mclient, the MonetDB/SQL interactive terminal (Apr2012)
Database: MonetDB v11.9.1 (Apr2012), 'mapi:monetdb://localhost:50000/mydb'
Type \q to quit, \? for a list of available commands
auto commit mode: on
sql>create table test (
more>no int);
operation successful (2.404ms)
--The database appears to support most of the Oracle DDL, with minimal rewrites for constraints and differences in dialect. Here's an example testing syntax with the only difference being the column named 'id' rather than 'no'.
Welcome to mclient, the MonetDB/SQL interactive terminal (Apr2012)
sql>create table test (
more>id int);
operation successful (2.404ms)
sql>select * from test;
+----+
| id |
+====+
+----+
0 tuples (0.795ms)
Regarding the Error:"42000!syntax error, unexpected NO", The usage of the word "NO" should not be reserved, considering that other databases such as Oracle, PostgreSQL, MySQL allow the application to install with a column named 'no'.
## Comment 17224
Date: 2012-05-07 08:41:43 +0200
From: @njnes
fixed by adding 'no' to the non-reserved keywords
| Converting an Oracle schema DDL for MonetDB fails to create a column named "no". | https://api.github.com/repos/MonetDB/MonetDB/issues/3079/comments | 0 | 2020-11-30T12:10:17Z | 2024-06-27T11:56:24Z | https://github.com/MonetDB/MonetDB/issues/3079 | 753,425,061 | 3,079 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-05-04 14:56:48 +0200
From: @gijzelaerr
To: buildtools devs <<bugs-buildtools>>
Version: -- development
Last updated: 2012-05-14 18:05:09 +0200
## Comment 17219
Date: 2012-05-04 14:56:48 +0200
From: @gijzelaerr
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:12.0) Gecko/20100101 Firefox/12.0
Build Identifier:
packaging speed can be increased by defining:
DEB_BUILD_PARALLEL=1
in debian/rules. The number of make threads can then be controlled with the DEB_BUILD_OPTIONS environment variable:
export DEB_BUILD_OPTIONS="parallel=9"
Reproducible: Always
## Comment 17253
Date: 2012-05-14 17:12:54 +0200
From: @grobian
ohw, if this works, it would be great, building a release takes ages currently
## Comment 17254
Date: 2012-05-14 17:15:46 +0200
From: @gijzelaerr
Works for me ;)
## Comment 17255
Date: 2012-05-14 18:03:59 +0200
From: @grobian
Changeset [a40687406f12](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a40687406f12) made by Fabian Groffen <fabian@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=a40687406f12](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=a40687406f12)
Changeset description:
rules: allow building in parallel, bug #3078
Thanks to Gijs Molenaar.
## Comment 17256
Date: 2012-05-14 18:05:09 +0200
From: @grobian
Fixing as this is a build issue.
| debian/ubuntu package building speed can be increased | https://api.github.com/repos/MonetDB/MonetDB/issues/3078/comments | 0 | 2020-11-30T12:10:15Z | 2024-06-27T11:56:23Z | https://github.com/MonetDB/MonetDB/issues/3078 | 753,425,042 | 3,078 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-05-01 10:33:03 +0200
From: @yzchang
To: SQL devs <<bugs-sql>>
Version: 11.9.1 (Apr2012) [obsolete]
CC: @njnes
Last updated: 2012-05-25 12:58:44 +0200
## Comment 17200
Date: 2012-05-01 10:33:03 +0200
From: @yzchang
The following query should trigger an error, as the table actually returned has more columns than the table specified in de RETURNS statement:
sql>create function t3 () returns table (x int) begin declare table t (x int, y int); return t; end;
operation successful (19.386ms)
sql>select * from t3();
+---+
| x |
+===+
+---+
PS> Returning a table with too few columns does correctly trigger an error.
## Comment 17201
Date: 2012-05-01 10:50:26 +0200
From: @yzchang
Changeset [d5e2534ed65f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d5e2534ed65f) made by Jennie Zhang <y.zhang@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=d5e2534ed65f](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=d5e2534ed65f)
Changeset description:
Added test for Bug #3077
## Comment 17206
Date: 2012-05-02 11:01:27 +0200
From: @njnes
Added proper error
| No errors on UDF returning table with too many columns | https://api.github.com/repos/MonetDB/MonetDB/issues/3077/comments | 0 | 2020-11-30T12:10:13Z | 2024-06-27T11:56:22Z | https://github.com/MonetDB/MonetDB/issues/3077 | 753,425,014 | 3,077 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-04-29 12:57:19 +0200
From: @grobian
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes
Last updated: 2012-05-30 13:39:35 +0200
## Comment 17196
Date: 2012-04-29 12:57:19 +0200
From: @grobian
algol doesn't complete testing within reasonable time any more ever since Martin's de-Mx-ing commits that broke (around 21st April).
http://monetdb.cwi.nl/testweb/logs/43924:6c9e55b194e3/incoming_commits
http://monetdb.cwi.nl/testweb/logs/43930:f0508988d657/incoming_commits
Needless to say this is pretty annoying. Almost all test time-out, which indicates some severe problem (deadlock?).
## Comment 17199
Date: 2012-05-01 09:59:02 +0200
From: @sjoerdmullender
I see that in at least a couple of instances, there are a bunch of threads in mserver5, all busy-waiting in BATthetajoin (maybe there's one that actually does something?).
I need to reproduce this in an environment over which I have more control. The above observation was done on the actual test run.
## Comment 17204
Date: 2012-05-01 11:03:45 +0200
From: @sjoerdmullender
Changeset [2ee694210ef0](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2ee694210ef0) 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=2ee694210ef0](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=2ee694210ef0)
Changeset description:
Fix for bug #3076 and other repairs.
- You really don't have to export every function in sight!
- Inline only makes sense if the inlined function's definition (not
just declaration) is visible when the calling function is compiled.
- Don't call MT_mallinfo all the time: it's really expensive on
platforms where it is implemented.
- Correct copyright notices.
| Mic-Windows2008-i386-propcheck: timeouts for nearly every test since f0508988d657 | https://api.github.com/repos/MonetDB/MonetDB/issues/3076/comments | 0 | 2020-11-30T12:10:10Z | 2024-06-27T11:56:21Z | https://github.com/MonetDB/MonetDB/issues/3076 | 753,424,994 | 3,076 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-04-27 14:17:04 +0200
From: Yagiz <<y.kargin>>
To: GDK devs <<bugs-common>>
Version: 11.11.5 (Jul2012)
CC: y.kargin
Last updated: 2012-08-23 10:14:39 +0200
## Comment 17182
Date: 2012-04-27 14:17:04 +0200
From: Yagiz <<y.kargin>>
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.30 Safari/536.5
Build Identifier: MonetDB default branch
monetdb5/modules/kernel/algebra.mx:579:
command markH( b:bat[:any_1,:any_2], nr_parts:int, part_nr:int ) :bat[:any_1,:oid]
Its return value suggests that it is marking the tail, but it should mark the head. Inconsistency: Returning a BAT which is tail marked from a function that is defined to mark the head.
Reproducible: Always
### Steps to Reproduce:
1. Go to monetdb5/modules/kernel/algebra.mx:579
2. You will see it.
### Actual Results:
Inconsistency
### Expected Results:
command markH should return :bat[:oid, :any_2].
## Comment 17546
Date: 2012-07-21 18:30:48 +0200
From: @grobian
Changeset [9239f6bab22e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9239f6bab22e) made by Fabian Groffen <fabian@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=9239f6bab22e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=9239f6bab22e)
Changeset description:
markH: fix signature, bug #3075
## Comment 17641
Date: 2012-08-23 10:14:39 +0200
From: @sjoerdmullender
Jul2012-SP1 has been released.
| inconsistent declaration of algebra.markH with 3 input arguments | https://api.github.com/repos/MonetDB/MonetDB/issues/3075/comments | 0 | 2020-11-30T12:10:08Z | 2024-06-27T11:56:20Z | https://github.com/MonetDB/MonetDB/issues/3075 | 753,424,973 | 3,075 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-04-27 07:38:02 +0200
From: @mlkersten
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes
Last updated: 2012-05-25 12:58:48 +0200
## Comment 17176
Date: 2012-04-27 07:38:02 +0200
From: @mlkersten
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:11.0) Gecko/20100101 Firefox/11.0
Build Identifier:
Name resolution gets corrupted when multiple schema references are used in a procedure definition.
Reproducible: Always
### Steps to Reproduce:
create table runningcatalog(
tag timestamp
);
create table datacell.lta(
tag timestamp
);
create procedure datacell.archive()
begin
insert into runningcatalog select * from datacell.lta;
end;
call datacell.archive();
### Actual Results:
operation successful
operation successful
operation successful
TypeException:user.s0_1[2]:'user.archive' undefined in: _3:any := user.archive()
39000!program contains errors
## Comment 17193
Date: 2012-04-27 16:35:49 +0200
From: @njnes
Changeset [d6365fe49c70](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d6365fe49c70) 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=d6365fe49c70](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=d6365fe49c70)
Changeset description:
fixed bug #3074, ie switch to the schema of the to be created function.
## Comment 17194
Date: 2012-04-27 16:37:08 +0200
From: @njnes
we now switch to the schema of the to be created function. In the example the create procedure will than fail with a unknown table (runningcatalog).
| Name resolution in procedures | https://api.github.com/repos/MonetDB/MonetDB/issues/3074/comments | 0 | 2020-11-30T12:10:06Z | 2024-06-27T11:56:18Z | https://github.com/MonetDB/MonetDB/issues/3074 | 753,424,952 | 3,074 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-04-27 00:08:28 +0200
From: @drstmane
To: SQL devs <<bugs-sql>>
Version: 11.9.1 (Apr2012) [obsolete]
CC: freddy_priyatna, @njnes
Last updated: 2012-05-25 12:58:49 +0200
## Comment 17169
Date: 2012-04-27 00:08:28 +0200
From: @drstmane
Created attachment 105
plan & explain of foreign key checks
With Apr2012, foreign key check on columns that are *not* declared NOT NULL are 100-200(!) times slower than with Dec2011.
The reason seems to be a MAL loop (iterator) over calc.isnil(), which might be due to a missing batcalc.isnil() (?)
See attached log for details.
> Attached file: [FK](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3073_FK_105) (application/octet-stream, 23121 bytes)
> Description: plan & explain of foreign key checks
## Comment 17170
Date: 2012-04-27 00:13:46 +0200
From: @drstmane
hm, there seem to be batcalc.isnil() after all:
>?batcalc.isnil()
command batcalc.isnil(b:bat[:any_1,:timestamp]):bat[:any_1,:bit]
address MTIMEunaryISNIL;
comment Unary check for nil over the tail of the bat
command batcalc.isnil(b:bat[:any_1,:daytime]):bat[:any_1,:bit]
address MTIMEunaryISNIL;
comment Unary check for nil over the tail of the bat
command batcalc.isnil(b:bat[:any_1,:date]):bat[:any_1,:bit]
address MTIMEunaryISNIL;
comment Unary check for nil over the tail of the bat
command batcalc.isnil(b:bat[:any_1,:str]):bat[:any_1,:bit]
address CMDunaryISNIL;
comment Unary check for nil over the tail of the bat
command batcalc.isnil(b:bat[:any_1,:dbl]):bat[:any_1,:bit]
address CMDunaryISNIL;
comment Unary check for nil over the tail of the bat
command batcalc.isnil(b:bat[:any_1,:flt]):bat[:any_1,:bit]
address CMDunaryISNIL;
comment Unary check for nil over the tail of the bat
command batcalc.isnil(b:bat[:any_1,:lng]):bat[:any_1,:bit]
address CMDunaryISNIL;
comment Unary check for nil over the tail of the bat
command batcalc.isnil(b:bat[:any_1,:wrd]):bat[:any_1,:bit]
address CMDunaryISNIL;
comment Unary check for nil over the tail of the bat
command batcalc.isnil(b:bat[:any_1,:int]):bat[:any_1,:bit]
address CMDunaryISNIL;
comment Unary check for nil over the tail of the bat
command batcalc.isnil(b:bat[:any_1,:sht]):bat[:any_1,:bit]
address CMDunaryISNIL;
comment Unary check for nil over the tail of the bat
command batcalc.isnil(b:bat[:any_1,:oid]):bat[:any_1,:bit]
address CMDunaryISNIL;
comment Unary check for nil over the tail of the bat
command batcalc.isnil(b:bat[:any_1,:bte]):bat[:any_1,:bit]
address CMDunaryISNIL;
comment Unary check for nil over the tail of the bat
command batcalc.isnil(b:bat[:any_1,:bit]):bat[:any_1,:bit]
address CMDunaryISNIL;
comment Unary check for nil over the tail of the bat
?
## Comment 17171
Date: 2012-04-27 00:15:38 +0200
From: @drstmane
But calc.isnil() exists for more types (in case that matters):
>?calc.isnil()
command calc.isnil(v:wkb):bit
address wkbIsnil;
comment Nil test for wkb value
command calc.isnil(v:inet):bit
address INET_isnil;
comment Nil test for inet value
command calc.isnil(v:timestamp):bit
address MTIMEtimestamp_isnil;
comment Nil test for timestamp value
command calc.isnil(v:daytime):bit
address MTIMEdaytime_isnil;
comment Nil test for daytime value
command calc.isnil(v:date):bit
address MTIMEdate_isnil;
comment Nil test for date value
command calc.isnil(v:sqlblob):bit
address BLOB_isnil;
comment Nil test for blob value
command calc.isnil(v:blob):bit
address BLOB_isnil;
comment Nil test for blob value
command calc.isnil(v:void):bit
address CALCisnil_void;
comment is a value nil?
command calc.isnil(v:BAT):bit
address CALCisnil_bat;
comment is a value nil?
command calc.isnil(v:str):bit
address CALCisnil_str;
comment is a value nil?
command calc.isnil(v:dbl):bit
address CALCisnil_dbl;
comment is a value nil?
command calc.isnil(v:flt):bit
address CALCisnil_flt;
comment is a value nil?
command calc.isnil(v:lng):bit
address CALCisnil_lng;
comment is a value nil?
command calc.isnil(v:wrd):bit
address CALCisnil_wrd;
comment is a value nil?
command calc.isnil(v:oid):bit
address CALCisnil_oid;
comment is a value nil?
command calc.isnil(v:int):bit
address CALCisnil_int;
comment is a value nil?
command calc.isnil(v:sht):bit
address CALCisnil_sht;
comment is a value nil?
command calc.isnil(v:bte):bit
address CALCisnil_bte;
comment is a value nil?
command calc.isnil(v:bit):bit
address CALCisnil_bit;
comment is a value nil?
## Comment 17185
Date: 2012-04-27 14:19:30 +0200
From: @njnes
temporary solution checked in, ie added extra oid/void signatures. The proper solution (to be implemented on the default branch) is removing all virtual oid signatures using void.
## Comment 17187
Date: 2012-04-27 14:21:53 +0200
From: @njnes
*** Bug #3048 has been marked as a duplicate of this bug. ***
| VERY slow foreign key check (due to missing batcalc.isnil() ?) | https://api.github.com/repos/MonetDB/MonetDB/issues/3073/comments | 0 | 2020-11-30T12:10:03Z | 2024-06-27T11:56:17Z | https://github.com/MonetDB/MonetDB/issues/3073 | 753,424,923 | 3,073 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-04-26 21:43:22 +0200
From: @drstmane
To: SQL devs <<bugs-sql>>
Version: 11.9.1 (Apr2012) [obsolete]
CC: @mlkersten
Last updated: 2012-05-25 12:58:48 +0200
## Comment 17163
Date: 2012-04-26 21:43:22 +0200
From: @drstmane
storage() does not work in Apr2012, as sql.storage() has grown an extra return argument sorted:bat[:oid,:bit].
Apr2012:
sql>select * from storage();
TypeException:user.s1_1[5]:'sql.storage' undefined in: (_7:bat[:oid,:str], _8:bat[:oid,:str], _9:bat[:oid,:str], _10:bat[:oid,:str], _11:bat[:oid,:lng], _12:bat[:oid,:lng], _13:bat[:oid,:int], _14:bat[:oid,:lng], _15:bat[:oid,:lng]) := sql.storage()
39000!program contains errors
mal>?sql.storage()
pattern sql.storage() (schema:bat[:oid,:str],table:bat[:oid,:str],column:bat[:oid,:str],location:bat[:oid,:str],count:bat[:oid,:lng],capacity:bat[:oid,:lng],width:bat[:oid,:int],size:bat[:oid,:lng],hashsize:bat[:oid,:lng],sorted:bat[:oid,:bit])
address sql_storage;
comment return a table with storage information
Dec2011:
mal>?sql.storage()
pattern sql.storage() (schema:bat[:oid,:str],table:bat[:oid,:str],column:bat[:oid,:str],location:bat[:oid,:str],count:bat[:oid,:lng],capacity:bat[:oid,:lng],width:bat[:oid,:int],size:bat[:oid,:lng],hashsize:bat[:oid,:lng])
address sql_storage;
comment return a table with storage information
## Comment 17165
Date: 2012-04-26 22:03:21 +0200
From: @mlkersten
It works on current.
You have to redefine the storage() definition on an existing database.
mk@vienna::/export/scratch1/mk/current/package/sql/backends/monet5/datacell/Tests> mclient -d sf1
Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased)
Database: MonetDB v11.10.0 (unreleased), 'mapi:monetdb://vienna.ins.cwi.nl:50000/sf1'
Type \q to quit, \? for a list of available commands
auto commit mode: on
sql>select * from storage();
+--------+-----------------+----------------------+----------+---------+----------+-------+-----------+----------+--------+
| schema | table | column | location | count | capacity | width | size | hashsize | sorted |
+========+=================+======================+==========+=========+==========+=======+===========+==========+========+
| sys | schemas | id | 01/114 | 3 | 1024 | 4 | 4096 | 0 | true |
| sys | schemas | name | 01/112 | 3 | 256 | 1 | 10496 | 0 | false |
| sys | schemas | authorization | 01/115 | 3 | 256 | 4 | 1024 | 0 | true |
| sys | schemas | owner | 01/116 | 3 | 256 | 4 | 1024 | 0 | true |
## Comment 17166
Date: 2012-04-26 22:34:54 +0200
From: @drstmane
Indeed, on freshly created databases, storage() works fine with Dec2011-SP2, Apr2012_1 (release candidate), and latest Apr2012 (changeset 702b55cbad26).
However, after upgrading a Dec2011-SP2 (or earlier) created database to Apr2012, the automatic upgrade does not update the definition of SQL function storage() to reflect the signature change of MAL function sql.storage().
## Comment 17179
Date: 2012-04-27 10:31:15 +0200
From: @sjoerdmullender
Changeset [98699895d8d4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=98699895d8d4) 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=98699895d8d4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=98699895d8d4)
Changeset description:
Further update to database schema when upgrading to Apr2012 release.
This fixes bug #3072.
## Comment 17192
Date: 2012-04-27 15:58:09 +0200
From: @sjoerdmullender
Fixed for the next release.
| Database upgrade from Dec2011 to Apr2012 broken for storage() | https://api.github.com/repos/MonetDB/MonetDB/issues/3072/comments | 0 | 2020-11-30T12:10:00Z | 2024-06-27T11:56:16Z | https://github.com/MonetDB/MonetDB/issues/3072 | 753,424,881 | 3,072 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-04-26 10:59:13 +0200
From: @yzchang
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes
Last updated: 2012-04-27 15:32:10 +0200
## Comment 17160
Date: 2012-04-26 10:59:13 +0200
From: @yzchang
The SELECT query below works in Apr2012, but not in default branch:
sql>create table t (s varchar(100));
operation successful (25.314ms)
sql>select avg ( cast (s as double)) from t;
TypeException:user.s2_1[17]:'batcalc.dbl' undefined in: _27:any := batcalc.dbl(_26:bat[:oid,:str])
TypeException:user.s2_1[18]:'algebra.selectNotNil' undefined in: _28:any := algebra.selectNotNil(_27:any)
TypeException:user.s2_1[22]:'batcalc.dbl' undefined in: _33:any := batcalc.dbl(_26:bat[:oid,:str])
TypeException:user.s2_1[23]:'algebra.selectNotNil' undefined in: _34:any := algebra.selectNotNil(_33:any)
TypeException:user.s2_1[24]:'aggr.count' undefined in: _35:any := aggr.count(_34:any)
39000!program contains errors
## Comment 17191
Date: 2012-04-27 15:32:10 +0200
From: @njnes
added missing signatures
## Comment 17198
Date: 2012-04-30 12:42:32 +0200
From: @yzchang
Changeset [4443068ec3cd](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4443068ec3cd) made by Jennie Zhang <y.zhang@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=4443068ec3cd](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=4443068ec3cd)
Changeset description:
Added test for Bug #3071
| Failed to cast VARCHAR to DOUBLE | https://api.github.com/repos/MonetDB/MonetDB/issues/3071/comments | 0 | 2020-11-30T12:09:58Z | 2024-06-27T11:56:15Z | https://github.com/MonetDB/MonetDB/issues/3071 | 753,424,867 | 3,071 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-04-21 11:47:50 +0200
From: @drstmane
To: MonetDB5 devs <<bugs-monetdb5>>
Version: -- development
CC: @mlkersten, @yzchang
Last updated: 2012-11-27 13:34:48 +0100
## Comment 17141
Date: 2012-04-21 11:47:50 +0200
From: @drstmane
Clean default build from scratch on 64-bit Fedora 16 desktop:
.../default/source/MonetDB $ hg sum
parent: 43924:6c9e55b194e3 tip
mal_parser: fix showException invocation
branch: default
commit: (clean)
update: (current)
/bin/sh ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.../default/source/MonetDB/monetdb5/mal -I../.. -I.../default/source/MonetDB/monetdb5/mal -I../../common/options -I.../default/source/MonetDB/monetdb5/mal/../../common/options -I../../common/stream -I.../default/source/MonetDB/monetdb5/mal/../../common/stream -I../../common/utils -I.../default/source/MonetDB/monetdb5/mal/../../common/utils -I../../clients/mapilib -I.../default/source/MonetDB/monetdb5/mal/../../clients/mapilib -I../../gdk -I.../default/source/MonetDB/monetdb5/mal/../../gdk -DLIBMAL -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 -Wp,-D_FORTIFY_SOURCE=2 -D_REENTRANT -c -o libmal_la-mal_parser.lo `test -f 'mal_parser.c' || echo '.../default/source/MonetDB/monetdb5/mal/'`mal_parser.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.../default/source/MonetDB/monetdb5/mal -I../.. -I.../default/source/MonetDB/monetdb5/mal -I../../common/options -I.../default/source/MonetDB/monetdb5/mal/../../common/options -I../../common/stream -I.../default/source/MonetDB/monetdb5/mal/../../common/stream -I../../common/utils -I.../default/source/MonetDB/monetdb5/mal/../../common/utils -I../../clients/mapilib -I.../default/source/MonetDB/monetdb5/mal/../../clients/mapilib -I../../gdk -I.../default/source/MonetDB/monetdb5/mal/../../gdk -DLIBMAL -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 -Wp,-D_FORTIFY_SOURCE=2 -D_REENTRANT -c .../default/source/MonetDB/monetdb5/mal/mal_parser.c -fPIC -DPIC -o .libs/libmal_la-mal_parser.o
.../default/source/MonetDB/monetdb5/mal/mal_parser.c: In function 'propList':
.../default/source/MonetDB/monetdb5/mal/mal_parser.c:805:2: error: unknown type name 'MALtype'
.../default/source/MonetDB/monetdb5/mal/mal_parser.c:827:13: error: request for member 'type' in something not a structure or union
.../default/source/MonetDB/monetdb5/mal/mal_parser.c: In function 'binding':
.../default/source/MonetDB/monetdb5/mal/mal_parser.c:849:2: error: unknown type name 'MALtype'
.../default/source/MonetDB/monetdb5/mal/mal_parser.c:854:4: error: implicit declaration of function 'newMALtype' [-Werror=implicit-function-declaration]
.../default/source/MonetDB/monetdb5/mal/mal_parser.c:856:11: error: request for member 'type' in something not a structure or union
.../default/source/MonetDB/monetdb5/mal/mal_parser.c:867:11: error: request for member 'type' in something not a structure or union
.../default/source/MonetDB/monetdb5/mal/mal_parser.c:867:45: error: request for member 'type' in something not a structure or union
.../default/source/MonetDB/monetdb5/mal/mal_parser.c:867:57: error: request for member 'col' in something not a structure or union
.../default/source/MonetDB/monetdb5/mal/mal_parser.c:867:90: error: request for member 'col' in something not a structure or union
.../default/source/MonetDB/monetdb5/mal/mal_parser.c:869:11: error: request for member 'type' in something not a structure or union
.../default/source/MonetDB/monetdb5/mal/mal_parser.c:877:10: error: request for member 'type' in something not a structure or union
.../default/source/MonetDB/monetdb5/mal/mal_parser.c: In function 'term':
.../default/source/MonetDB/monetdb5/mal/mal_parser.c:902:2: error: unknown type name 'MALtype'
.../default/source/MonetDB/monetdb5/mal/mal_parser.c:905:3: error: too few arguments to function 'fndConstant'
.../default/source/MonetDB/monetdb5/mal/mal_instruction.h:274:16: note: declared here
.../default/source/MonetDB/monetdb5/mal/mal_parser.c:910:22: error: request for member 'type' in something not a structure or union
.../default/source/MonetDB/monetdb5/mal/mal_parser.c:912:12: error: request for member 'type' in something not a structure or union
.../default/source/MonetDB/monetdb5/mal/mal_parser.c:912:47: error: request for member 'type' in something not a structure or union
.../default/source/MonetDB/monetdb5/mal/mal_parser.c:912:59: error: request for member 'col' in something not a structure or union
.../default/source/MonetDB/monetdb5/mal/mal_parser.c:912:93: error: request for member 'col' in something not a structure or union
.../default/source/MonetDB/monetdb5/mal/mal_parser.c:920:54: error: request for member 'type' in something not a structure or union
.../default/source/MonetDB/monetdb5/mal/mal_parser.c:935:21: error: request for member 'type' in something not a structure or union
.../default/source/MonetDB/monetdb5/mal/mal_parser.c:956:20: error: request for member 'type' in something not a structure or union
.../default/source/MonetDB/monetdb5/mal/mal_parser.c: In function 'fcnHeader':
.../default/source/MonetDB/monetdb5/mal/mal_parser.c:1129:2: error: unknown type name 'MALtype'
.../default/source/MonetDB/monetdb5/mal/mal_parser.c:1221:3: error: 'type' undeclared (first use in this function)
.../default/source/MonetDB/monetdb5/mal/mal_parser.c:1221:3: note: each undeclared identifier is reported only once for each function it appears in
.../default/source/MonetDB/monetdb5/mal/mal_parser.c:1129:10: error: unused variable 'tpe' [-Werror=unused-variable]
.../default/source/MonetDB/monetdb5/mal/mal_parser.c: In function 'parseAssign':
.../default/source/MonetDB/monetdb5/mal/mal_parser.c:1572:6: error: unused variable 'idx' [-Werror=unused-variable]
cc1: all warnings being treated as errors
make[5]: *** [libmal_la-mal_parser.lo] Error 1
make[5]: Leaving directory `...default/builds/_/monetdb5/mal'
make[4]: *** [all] Error 2
make[4]: Leaving directory `...default/builds/_/monetdb5/mal'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `...default/builds/_/monetdb5'
make[2]: *** [all] Error 2
make[2]: Leaving directory `...default/builds/_/monetdb5'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `...default/builds/_'
make: *** [all] Error 2
## Comment 17142
Date: 2012-04-21 12:11:26 +0200
From: @mlkersten
oops.... too early
backout changeset for the time being.
## Comment 17143
Date: 2012-04-21 13:15:28 +0200
From: @grobian
Better provide the missing bits (MALtype). I couldn't fix that one.
## Comment 17144
Date: 2012-04-21 14:00:52 +0200
From: @mlkersten
Cause was a compile/Mtest run without the bootstrap.
Fix in progress, may be checked in late tonight
(with a partial de-Mx mal_interpreter)
## Comment 17145
Date: 2012-04-22 10:28:59 +0200
From: @mlkersten
The problem should be fixed. A reboot is needed.
## Comment 17147
Date: 2012-04-23 21:47:09 +0200
From: @drstmane
Compilation appears to be fixed.
Thanks.
## Comment 18058
Date: 2012-11-27 13:34:48 +0100
From: @yzchang
Compilation issue, no need to add a test
| mal_parser.c fails to compile | https://api.github.com/repos/MonetDB/MonetDB/issues/3070/comments | 0 | 2020-11-30T12:09:55Z | 2024-06-27T11:56:14Z | https://github.com/MonetDB/MonetDB/issues/3070 | 753,424,839 | 3,070 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-04-19 01:47:01 +0200
From: @skinkie
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes
Last updated: 2012-04-25 15:25:48 +0200
## Comment 17136
Date: 2012-04-19 01:47:01 +0200
From: @skinkie
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.142 Safari/535.19
Build Identifier:
I'm trying the following pretty trivial join.
select * from localservicegrouppasstime, destination where localservicegrouppasstime.dataownercode = destination.dataownercode and localservicegrouppasstime.destinationcode = destination.destinationcode limit 10;
It results in:
operation failed Operands not synced on head
What does it mean?
Reproducible: Always
### Steps to Reproduce:
Get the sql dump from original database ~450MB; http://kv7.openov.nl/sql/dump.sql.gz
mclient -i /tmp/dump.sql [this step already fails for me now, so reported bug #3068]
select * from localservicegrouppasstime, destination where localservicegrouppasstime.dataownercode = destination.dataownercode and localservicegrouppasstime.destinationcode = destination.destinationcode limit 10;
Retested with latest tip using an old dbfarm. Originally failed from a mserver of april. Import of the database did not finish.
## Comment 17137
Date: 2012-04-19 07:35:26 +0200
From: @skinkie
Loading finished, bug can be reproduced using above steps.
## Comment 17156
Date: 2012-04-25 15:25:48 +0200
From: @njnes
seems to work on Apr2012
| Operands not synced on head | https://api.github.com/repos/MonetDB/MonetDB/issues/3069/comments | 0 | 2020-11-30T12:09:53Z | 2024-06-28T07:23:16Z | https://github.com/MonetDB/MonetDB/issues/3069 | 753,424,801 | 3,069 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-04-19 01:45:43 +0200
From: @skinkie
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes
Last updated: 2012-04-25 15:28:50 +0200
## Comment 17135
Date: 2012-04-19 01:45:43 +0200
From: @skinkie
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.142 Safari/535.19
Build Identifier:
I'm trying to load a msqldump to reproduce on the latest tip of MonetDB.
/opt/monetdb-april/bin/mclient -p 60017 -i /tmp/dump.sql
auto commit mode: off
operation successful (1.846ms)
auto commit mode: off
operation successful (1.277ms)
operation successful (1.205ms)
280 affected rows (161.029ms)
operation successful (161.076ms)
734 affected rows (391.274ms)
operation successful (391.307ms)
8 affected rows (18.000ms)
operation successful (18.026ms)
7091 affected rows (3.5s)
operation successful (3.5s)
7093 affected rows (2.5s)
operation successful (2.5s)
It seems:
COPY 4085153 RECORDS INTO "sys"."localservicegrouppasstime" FROM stdin USING DELIMITERS '\t','\n','"';
Is taking a huge amount of time to compute.
Alternatively I have tried:
cat /tmp/dump.sql | /opt/monetdb-april/bin/mclient -p 60017
...which is not working any faster either.
On this mentioned table there is (obviously) a constraint;
CONSTRAINT "localservicegrouppasstime_dataownercode_localservicelevelcode_lineplanningnumber_journeynumber_fortifynumber_userstopcode_userstopordernumber_pkey" PRIMARY KEY ("dataownercode", "localservicelevelcode", "lineplanningnumber", "journeynumber", "fortifynumber", "userstopcode", "userstopordernumber")
I have tried if removing it has any impact, it seems not.
File can be fetched from: http://kv7.openov.nl/sql/dump.sql.gz
Reproducible: Always
Tip.
## Comment 17138
Date: 2012-04-19 07:36:30 +0200
From: @skinkie
Loading did finish, just takes extremely long.
## Comment 17139
Date: 2012-04-19 08:13:49 +0200
From: @skinkie
Now I start to doubt. I think this wasn't loaded...
## Comment 17157
Date: 2012-04-25 15:28:50 +0200
From: @njnes
Just run on my laptop, takes about 1 minute.
| Loading msqldump of 4121334 lines in total takes ages | https://api.github.com/repos/MonetDB/MonetDB/issues/3068/comments | 0 | 2020-11-30T12:09:50Z | 2024-06-28T07:23:16Z | https://github.com/MonetDB/MonetDB/issues/3068 | 753,424,765 | 3,068 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-04-16 15:44:54 +0200
From: sgpi <<sgpipub>>
To: GDK devs <<bugs-common>>
Version: 11.11.5 (Jul2012)
CC: @mlkersten, @drstmane
Blocker for: #3094
Last updated: 2012-07-21 18:34:34 +0200
## Comment 17131
Date: 2012-04-16 15:44:54 +0200
From: sgpi <<sgpipub>>
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)
Build Identifier: Dec2011 / Dec2011SP2 / Apr2012
MonetDB hangs after submitting many queries and each query creates hash in real memory. Hashes were not freed when working memory is low.
Reproducible: Always
### Steps to Reproduce:
1. MonetDB Dec2011SP2 or Apr2012, 23GB server memory, Solaris x86
2. Test database with 14 tables (table_1..table_14), each table has 40 columns (col_1..col_40) and ~17 000 000 records.
3. For simplicity the test algorithm can be reduced to a loop:
for (i=1;i<=14;i++)
for (j=1;j<=40;j++)
select count(*) from table_i where col_j=12345;
Typical select took few seconds (5-10s).
Each select creates new hash but old hashes are kept in memory (tested by running select sum(hash) from storage();).
After a while system is going to hang (rsstarget=20530332897. rss = 18740 MB)
Next query executes properly but it takes >3000 s.
Why GDK can't free unused hashes to free memory?
mserver5 --version
MonetDB 5 server v11.9.0 (64-bit, 64-bit oids)
This is an unreleased version
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2012 MonetDB B.V., all rights reserved
Visit http://www.monetdb.org/ for further information
Found 23.5GiB available memory, 4 available cpu cores
Libraries:
libpcre: 7.8 2008-09-05 (compiled with 7.8)
openssl: OpenSSL 1.0.0e 6 Sep 2011 (compiled with OpenSSL 1.0.0e 6 Sep 2011)
libxml2: 2.7.6 (compiled with 2.7.6)
Compiled by: @mdb (i386-pc-solaris2.11)
Compilation: gcc -m64 -g -Wall -Wextra -W -Werror-implicit-function-declaration -Wpointer-arith -Wdeclaration-after-statement -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 -Wp,-D_FORTIFY_SOURCE=2
Linking : /usr/ccs/bin/ld
output from mserver5 --memory
...
MT_mmap_trim(19579 MB): rss = 18740 MB
MT_mmap_save_tile: msync(bat/47/4705.tail,off=130M,0,SYNC)...
MT_mmap_save_tile: msync(bat/47/4705.tail,tile=130M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/45/4512.tail,off=136M,0,SYNC)...
MT_mmap_save_tile: msync(bat/45/4512.tail,tile=136M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/32/3254.tail,off=128M,0,SYNC)...
MT_mmap_save_tile: msync(bat/32/3254.tail,tile=128M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/51/5121.theap,off=174M,0,SYNC)...
MT_mmap_save_tile: msync(bat/51/5121.theap,tile=174M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/47/4721.theap,off=178M,0,SYNC)...
MT_mmap_save_tile: msync(bat/47/4721.theap,tile=178M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/45/4526.theap,off=178M,0,SYNC)...
MT_mmap_save_tile: msync(bat/45/4526.theap,tile=178M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/43/4330.theap,off=160M,0,SYNC)...
MT_mmap_save_tile: msync(bat/43/4330.theap,tile=160M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/37/3726.theap,off=174M,0,SYNC)...
MT_mmap_save_tile: msync(bat/37/3726.theap,tile=174M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/35/3507.theap,off=172M,0,SYNC)...
MT_mmap_save_tile: msync(bat/35/3507.theap,tile=172M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/32/3270.theap,off=179M,0,SYNC)...
MT_mmap_save_tile: msync(bat/32/3270.theap,tile=179M,0M,SYNC) = 22 (0ms)
GDKvmtrim(load=high, rsstarget=20530332897, GDK_mmap_minsize=268435456)
MT_mmap_trim(19579 MB): rss = 18741 MB
MT_mmap_save_tile: msync(bat/47/4705.tail,off=130M,0,SYNC)...
MT_mmap_save_tile: msync(bat/47/4705.tail,tile=130M,0M,SYNC) = 22 (1ms)
MT_mmap_save_tile: msync(bat/45/4512.tail,off=136M,0,SYNC)...
MT_mmap_save_tile: msync(bat/45/4512.tail,tile=136M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/32/3254.tail,off=128M,0,SYNC)...
MT_mmap_save_tile: msync(bat/32/3254.tail,tile=128M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/51/5121.theap,off=174M,0,SYNC)...
MT_mmap_save_tile: msync(bat/51/5121.theap,tile=174M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/47/4721.theap,off=178M,0,SYNC)...
MT_mmap_save_tile: msync(bat/47/4721.theap,tile=178M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/45/4526.theap,off=178M,0,SYNC)...
MT_mmap_save_tile: msync(bat/45/4526.theap,tile=178M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/43/4330.theap,off=160M,0,SYNC)...
MT_mmap_save_tile: msync(bat/43/4330.theap,tile=160M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/37/3726.theap,off=174M,0,SYNC)...
MT_mmap_save_tile: msync(bat/37/3726.theap,tile=174M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/35/3507.theap,off=172M,0,SYNC)...
MT_mmap_save_tile: msync(bat/35/3507.theap,tile=172M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/32/3270.theap,off=179M,0,SYNC)...
MT_mmap_save_tile: msync(bat/32/3270.theap,tile=179M,0M,SYNC) = 22 (0ms)
GDKvmtrim(load=high, rsstarget=20530332897, GDK_mmap_minsize=268435456)
MT_mmap_trim(19579 MB): rss = 18741 MB
MT_mmap_save_tile: msync(bat/47/4705.tail,off=130M,0,SYNC)...
MT_mmap_save_tile: msync(bat/47/4705.tail,tile=130M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/45/4512.tail,off=136M,0,SYNC)...
MT_mmap_save_tile: msync(bat/45/4512.tail,tile=136M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/32/3254.tail,off=128M,0,SYNC)...
MT_mmap_save_tile: msync(bat/32/3254.tail,tile=128M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/51/5121.theap,off=174M,0,SYNC)...
MT_mmap_save_tile: msync(bat/51/5121.theap,tile=174M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/47/4721.theap,off=178M,0,SYNC)...
MT_mmap_save_tile: msync(bat/47/4721.theap,tile=178M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/45/4526.theap,off=178M,0,SYNC)...
MT_mmap_save_tile: msync(bat/45/4526.theap,tile=178M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/43/4330.theap,off=160M,0,SYNC)...
MT_mmap_save_tile: msync(bat/43/4330.theap,tile=160M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/37/3726.theap,off=174M,0,SYNC)...
MT_mmap_save_tile: msync(bat/37/3726.theap,tile=174M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/35/3507.theap,off=172M,0,SYNC)...
MT_mmap_save_tile: msync(bat/35/3507.theap,tile=172M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/32/3270.theap,off=179M,0,SYNC)...
MT_mmap_save_tile: msync(bat/32/3270.theap,tile=179M,0M,SYNC) = 22 (0ms)
GDKvmtrim(load=high, rsstarget=20530332897, GDK_mmap_minsize=268435456)
MT_mmap_trim(19579 MB): rss = 18740 MB
MT_mmap_save_tile: msync(bat/47/4705.tail,off=130M,0,SYNC)...
MT_mmap_save_tile: msync(bat/47/4705.tail,tile=130M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/45/4512.tail,off=136M,0,SYNC)...
MT_mmap_save_tile: msync(bat/45/4512.tail,tile=136M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/32/3254.tail,off=128M,0,SYNC)...
MT_mmap_save_tile: msync(bat/32/3254.tail,tile=128M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/51/5121.theap,off=174M,0,SYNC)...
MT_mmap_save_tile: msync(bat/51/5121.theap,tile=174M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/47/4721.theap,off=178M,0,SYNC)...
MT_mmap_save_tile: msync(bat/47/4721.theap,tile=178M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/45/4526.theap,off=178M,0,SYNC)...
MT_mmap_save_tile: msync(bat/45/4526.theap,tile=178M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/43/4330.theap,off=160M,0,SYNC)...
MT_mmap_save_tile: msync(bat/43/4330.theap,tile=160M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/37/3726.theap,off=174M,0,SYNC)...
MT_mmap_save_tile: msync(bat/37/3726.theap,tile=174M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/35/3507.theap,off=172M,0,SYNC)...
MT_mmap_save_tile: msync(bat/35/3507.theap,tile=172M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/32/3270.theap,off=179M,0,SYNC)...
MT_mmap_save_tile: msync(bat/32/3270.theap,tile=179M,0M,SYNC) = 22 (0ms)
GDKvmtrim(load=high, rsstarget=20530332897, GDK_mmap_minsize=268435456)
MT_mmap_trim(19579 MB): rss = 18741 MB
MT_mmap_save_tile: msync(bat/47/4705.tail,off=130M,0,SYNC)...
MT_mmap_save_tile: msync(bat/47/4705.tail,tile=130M,0M,SYNC) = 22 (1ms)
MT_mmap_save_tile: msync(bat/45/4512.tail,off=136M,0,SYNC)...
MT_mmap_save_tile: msync(bat/45/4512.tail,tile=136M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/32/3254.tail,off=128M,0,SYNC)...
MT_mmap_save_tile: msync(bat/32/3254.tail,tile=128M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/51/5121.theap,off=174M,0,SYNC)...
MT_mmap_save_tile: msync(bat/51/5121.theap,tile=174M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/47/4721.theap,off=178M,0,SYNC)...
MT_mmap_save_tile: msync(bat/47/4721.theap,tile=178M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/45/4526.theap,off=178M,0,SYNC)...
MT_mmap_save_tile: msync(bat/45/4526.theap,tile=178M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/43/4330.theap,off=160M,0,SYNC)...
MT_mmap_save_tile: msync(bat/43/4330.theap,tile=160M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/37/3726.theap,off=174M,0,SYNC)...
MT_mmap_save_tile: msync(bat/37/3726.theap,tile=174M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/35/3507.theap,off=172M,0,SYNC)...
MT_mmap_save_tile: msync(bat/35/3507.theap,tile=172M,0M,SYNC) = 22 (0ms)
MT_mmap_save_tile: msync(bat/32/3270.theap,off=179M,0,SYNC)...
MT_mmap_save_tile: msync(bat/32/3270.theap,tile=179M,0M,SYNC) = 22 (0ms)
GDKvmtrim(load=high, rsstarget=20530332897, GDK_mmap_minsize=268435456)
MT_mmap_trim(19579 MB): rss = 18739 MB
MT_mmap_save_tile: msync(bat/47/4705.tail,off=130M,0,SYNC)...
....
and backtrace
(gdb) thread apply all backtrace
[New LWP 9 ]
[New LWP 8 ]
[New LWP 7 ]
[New LWP 6 ]
[New LWP 22 ]
[New LWP 4 ]
[New LWP 3 ]
[New LWP 2 ]
[New Thread 2 (LWP 2)]
[New Thread 3 (LWP 3)]
[New Thread 4 (LWP 4)]
[New Thread 6 ]
[New Thread 7 ]
[New Thread 8 ]
[New Thread 9 ]
[New Thread 22 (LWP 22)]
Thread 18 (Thread 22 (LWP 22)):
0 0xfffffd7ff81344c2 in BAThash (b=0x481748, masksize=0) at gdk_search.mx:513
1 0xfffffd7ff80c1d28 in BAT_hashselect (b=0x481748, bn=0x12a4680, tl=0x13e6fb0) at gdk_batop.mx:999
2 0xfffffd7ff80d8413 in BAT_select_ (b=0x481720, tl=0x13e6fb0, th=0x13e6fb0, li=1 '\001', hi=1 '\001', tail=0 '\0', anti=0 '\0', preserve_order=0 '\0')
at gdk_batop.mx:1268
3 0xfffffd7ff80d94a6 in BATuselect (b=0x481720, h=0x13e6fb0, t=0x0) at gdk_batop.mx:1344
4 0xfffffd7ff9389c24 in CMDuselect1 (result=0xfffffd7ffd5ff2e0, b=0x481720, value=0x13e6fb0) at algebra.mx:1417
5 0xfffffd7ff93916d6 in ALGuselect1 (result=0x1d29336c0, bid=0x1d29336b0, value=0x13e6fb0) at algebra.mx:2257
6 0xfffffd7ff8b025bb in runMALsequence (cntxt=0x4ca180, mb=0x1d2921920, startpc=1, stoppc=0, stk=0x1d29334b0, env=0x0, pcicaller=0x0) at mal_interpreter.mx:1958
7 0xfffffd7ff8ae51d5 in callMAL (cntxt=0x4ca180, mb=0x1d2921920, env=0xfffffd7ffd5ffd00, argv=0xfffffd7ffd5ffda0, debug=0 '\0') at mal_interpreter.mx:423
8 0xfffffd7ffe0569cf in SQLexecutePrepared (c=0x4ca180, be=0x131cd90, q=0x1d2921770) at sql_scenario.c:1642
9 0xfffffd7ffe056cb9 in SQLengineIntern (c=0x4ca180, be=0x131cd90) at sql_scenario.c:1695
10 0xfffffd7ffe05731b in SQLengine (c=0x4ca180) at sql_scenario.c:1821
11 0xfffffd7ff8ad0a08 in runPhase (c=0x4ca180, phase=4) at mal_scenario.c:522
12 0xfffffd7ff8ad0c04 in runScenarioBody (c=0x4ca180) at mal_scenario.c:573
13 0xfffffd7ff8ad0e11 in runScenario (c=0x4ca180) at mal_scenario.c:601
14 0xfffffd7ff8ad1ed5 in MSserveClient (dummy=0x4ca180) at mal_session.c:438
15 0xfffffd7fff0b22ad in _thrp_setup () from /lib/64/libc.so.1
16 0xfffffd7fff0b2550 in ?? () from /lib/64/libc.so.1
17 0x0000000000000000 in ?? ()
Thread 17 (Thread 9 ):
0 0xfffffd7fff0b2597 in __lwp_park () from /lib/64/libc.so.1
1 0xfffffd7fff0a553a in sema_wait_impl () from /lib/64/libc.so.1
2 0xfffffd7fff0a56c0 in sema_wait () from /lib/64/libc.so.1
3 0xfffffd7fff09a0cc in sem_wait () from /lib/64/libc.so.1
4 0xfffffd7ff8b0c4dc in q_dequeue (q=0x13fed60) at mal_interpreter.mx:874
5 0xfffffd7ff8b1825d in runDFLOWworker (t=0x1402e78) at mal_interpreter.mx:1087
6 0xfffffd7fff0b22ad in _thrp_setup () from /lib/64/libc.so.1
7 0xfffffd7fff0b2550 in ?? () from /lib/64/libc.so.1
8 0x0000000000000000 in ?? ()
Thread 16 (Thread 8 ):
0 0xfffffd7fff0b2597 in __lwp_park () from /lib/64/libc.so.1
1 0xfffffd7fff0a553a in sema_wait_impl () from /lib/64/libc.so.1
2 0xfffffd7fff0a56c0 in sema_wait () from /lib/64/libc.so.1
3 0xfffffd7fff09a0cc in sem_wait () from /lib/64/libc.so.1
4 0xfffffd7ff8b0c4dc in q_dequeue (q=0x13fed60) at mal_interpreter.mx:874
5 0xfffffd7ff8b1825d in runDFLOWworker (t=0x1402e50) at mal_interpreter.mx:1087
6 0xfffffd7fff0b22ad in _thrp_setup () from /lib/64/libc.so.1
7 0xfffffd7fff0b2550 in ?? () from /lib/64/libc.so.1
8 0x0000000000000000 in ?? ()
Thread 15 (Thread 7 ):
0 0xfffffd7fff0b2597 in __lwp_park () from /lib/64/libc.so.1
1 0xfffffd7fff0a553a in sema_wait_impl () from /lib/64/libc.so.1
2 0xfffffd7fff0a56c0 in sema_wait () from /lib/64/libc.so.1
3 0xfffffd7fff09a0cc in sem_wait () from /lib/64/libc.so.1
4 0xfffffd7ff8b0c4dc in q_dequeue (q=0x13fed60) at mal_interpreter.mx:874
5 0xfffffd7ff8b1825d in runDFLOWworker (t=0x1402e28) at mal_interpreter.mx:1087
6 0xfffffd7fff0b22ad in _thrp_setup () from /lib/64/libc.so.1
7 0xfffffd7fff0b2550 in ?? () from /lib/64/libc.so.1
8 0x0000000000000000 in ?? ()
Thread 14 (Thread 6 ):
0 0xfffffd7fff0b2597 in __lwp_park () from /lib/64/libc.so.1
1 0xfffffd7fff0a553a in sema_wait_impl () from /lib/64/libc.so.1
2 0xfffffd7fff0a56c0 in sema_wait () from /lib/64/libc.so.1
3 0xfffffd7fff09a0cc in sem_wait () from /lib/64/libc.so.1
4 0xfffffd7ff8b0c4dc in q_dequeue (q=0x13fed60) at mal_interpreter.mx:874
5 0xfffffd7ff8b1825d in runDFLOWworker (t=0x1402e00) at mal_interpreter.mx:1087
6 0xfffffd7fff0b22ad in _thrp_setup () from /lib/64/libc.so.1
7 0xfffffd7fff0b2550 in ?? () from /lib/64/libc.so.1
8 0x0000000000000000 in ?? ()
Thread 13 (Thread 4 (LWP 4)):
0 0xfffffd7fff0bb3ea in __pollsys () from /lib/64/libc.so.1
1 0xfffffd7fff0a43f5 in _pollsys () from /lib/64/libc.so.1
2 0xfffffd7fff062bed in pselect () from /lib/64/libc.so.1
3 0xfffffd7fff06306c in select () from /lib/64/libc.so.1
4 0xfffffd7ff78803d1 in MT_sleep_ms (ms=30000) at gdk_posix.c:1680
5 0xfffffd7ffe17156f in store_manager () at store.c:1530
6 0xfffffd7ffe0ea37b in mvc_logmanager () at sql_mvc.c:151
7 0xfffffd7fff0b22ad in _thrp_setup () from /lib/64/libc.so.1
8 0xfffffd7fff0b2550 in ?? () from /lib/64/libc.so.1
9 0x0000000000000000 in ?? ()
Thread 12 (Thread 3 (LWP 3)):
0 0xfffffd7fff0bb3ea in __pollsys () from /lib/64/libc.so.1
1 0xfffffd7fff0a43f5 in _pollsys () from /lib/64/libc.so.1
2 0xfffffd7fff062bed in pselect () from /lib/64/libc.so.1
3 0xfffffd7fff06306c in select () from /lib/64/libc.so.1
4 0xfffffd7ff985e292 in SERVERlistenThread (Sock=0x1089980) at mal_mapi.mx:512
5 0xfffffd7fff0b22ad in _thrp_setup () from /lib/64/libc.so.1
6 0xfffffd7fff0b2550 in ?? () from /lib/64/libc.so.1
7 0x0000000000000000 in ?? ()
Thread 11 (Thread 2 (LWP 2)):
0 0xfffffd7fff0bb3ea in __pollsys () from /lib/64/libc.so.1
1 0xfffffd7fff0a43f5 in _pollsys () from /lib/64/libc.so.1
2 0xfffffd7fff062bed in pselect () from /lib/64/libc.so.1
3 0xfffffd7fff06306c in select () from /lib/64/libc.so.1
4 0xfffffd7ff78803d1 in MT_sleep_ms (ms=50) at gdk_posix.c:1680
5 0xfffffd7ff82e336b in GDKvmtrim (limit=0xfffffd7ff8779a18) at gdk_utils.mx:1559
6 0xfffffd7fff0b22ad in _thrp_setup () from /lib/64/libc.so.1
7 0xfffffd7fff0b2550 in ?? () from /lib/64/libc.so.1
8 0x0000000000000000 in ?? ()
Thread 10 (LWP 2 ):
0 0xfffffd7fff0bb3ea in __pollsys () from /lib/64/libc.so.1
1 0xfffffd7fff0a43f5 in _pollsys () from /lib/64/libc.so.1
2 0xfffffd7fff062bed in pselect () from /lib/64/libc.so.1
3 0xfffffd7fff06306c in select () from /lib/64/libc.so.1
4 0xfffffd7ff78803d1 in MT_sleep_ms (ms=50) at gdk_posix.c:1680
5 0xfffffd7ff82e336b in GDKvmtrim (limit=0xfffffd7ff8779a18) at gdk_utils.mx:1559
6 0xfffffd7fff0b22ad in _thrp_setup () from /lib/64/libc.so.1
7 0xfffffd7fff0b2550 in ?? () from /lib/64/libc.so.1
8 0x0000000000000000 in ?? ()
Thread 9 (LWP 3 ):
0 0xfffffd7fff0bb3ea in __pollsys () from /lib/64/libc.so.1
1 0xfffffd7fff0a43f5 in _pollsys () from /lib/64/libc.so.1
2 0xfffffd7fff062bed in pselect () from /lib/64/libc.so.1
3 0xfffffd7fff06306c in select () from /lib/64/libc.so.1
4 0xfffffd7ff985e292 in SERVERlistenThread (Sock=0x1089980) at mal_mapi.mx:512
5 0xfffffd7fff0b22ad in _thrp_setup () from /lib/64/libc.so.1
6 0xfffffd7fff0b2550 in ?? () from /lib/64/libc.so.1
7 0x0000000000000000 in ?? ()
Thread 8 (LWP 4 ):
0 0xfffffd7fff0bb3ea in __pollsys () from /lib/64/libc.so.1
1 0xfffffd7fff0a43f5 in _pollsys () from /lib/64/libc.so.1
2 0xfffffd7fff062bed in pselect () from /lib/64/libc.so.1
3 0xfffffd7fff06306c in select () from /lib/64/libc.so.1
4 0xfffffd7ff78803d1 in MT_sleep_ms (ms=30000) at gdk_posix.c:1680
5 0xfffffd7ffe17156f in store_manager () at store.c:1530
6 0xfffffd7ffe0ea37b in mvc_logmanager () at sql_mvc.c:151
7 0xfffffd7fff0b22ad in _thrp_setup () from /lib/64/libc.so.1
8 0xfffffd7fff0b2550 in ?? () from /lib/64/libc.so.1
9 0x0000000000000000 in ?? ()
Thread 7 (LWP 22 ):
0 0xfffffd7ff81344c2 in BAThash (b=0x481748, masksize=0) at gdk_search.mx:513
1 0xfffffd7ff80c1d28 in BAT_hashselect (b=0x481748, bn=0x12a4680, tl=0x13e6fb0) at gdk_batop.mx:999
2 0xfffffd7ff80d8413 in BAT_select_ (b=0x481720, tl=0x13e6fb0, th=0x13e6fb0, li=1 '\001', hi=1 '\001', tail=0 '\0', anti=0 '\0', preserve_order=0 '\0')
at gdk_batop.mx:1268
3 0xfffffd7ff80d94a6 in BATuselect (b=0x481720, h=0x13e6fb0, t=0x0) at gdk_batop.mx:1344
4 0xfffffd7ff9389c24 in CMDuselect1 (result=0xfffffd7ffd5ff2e0, b=0x481720, value=0x13e6fb0) at algebra.mx:1417
5 0xfffffd7ff93916d6 in ALGuselect1 (result=0x1d29336c0, bid=0x1d29336b0, value=0x13e6fb0) at algebra.mx:2257
6 0xfffffd7ff8b025bb in runMALsequence (cntxt=0x4ca180, mb=0x1d2921920, startpc=1, stoppc=0, stk=0x1d29334b0, env=0x0, pcicaller=0x0) at mal_interpreter.mx:1958
7 0xfffffd7ff8ae51d5 in callMAL (cntxt=0x4ca180, mb=0x1d2921920, env=0xfffffd7ffd5ffd00, argv=0xfffffd7ffd5ffda0, debug=0 '\0') at mal_interpreter.mx:423
8 0xfffffd7ffe0569cf in SQLexecutePrepared (c=0x4ca180, be=0x131cd90, q=0x1d2921770) at sql_scenario.c:1642
9 0xfffffd7ffe056cb9 in SQLengineIntern (c=0x4ca180, be=0x131cd90) at sql_scenario.c:1695
10 0xfffffd7ffe05731b in SQLengine (c=0x4ca180) at sql_scenario.c:1821
11 0xfffffd7ff8ad0a08 in runPhase (c=0x4ca180, phase=4) at mal_scenario.c:522
12 0xfffffd7ff8ad0c04 in runScenarioBody (c=0x4ca180) at mal_scenario.c:573
13 0xfffffd7ff8ad0e11 in runScenario (c=0x4ca180) at mal_scenario.c:601
14 0xfffffd7ff8ad1ed5 in MSserveClient (dummy=0x4ca180) at mal_session.c:438
15 0xfffffd7fff0b22ad in _thrp_setup () from /lib/64/libc.so.1
16 0xfffffd7fff0b2550 in ?? () from /lib/64/libc.so.1
17 0x0000000000000000 in ?? ()
Thread 6 (LWP 6 ):
0 0xfffffd7fff0b2597 in __lwp_park () from /lib/64/libc.so.1
1 0xfffffd7fff0a553a in sema_wait_impl () from /lib/64/libc.so.1
2 0xfffffd7fff0a56c0 in sema_wait () from /lib/64/libc.so.1
3 0xfffffd7fff09a0cc in sem_wait () from /lib/64/libc.so.1
4 0xfffffd7ff8b0c4dc in q_dequeue (q=0x13fed60) at mal_interpreter.mx:874
5 0xfffffd7ff8b1825d in runDFLOWworker (t=0x1402e00) at mal_interpreter.mx:1087
6 0xfffffd7fff0b22ad in _thrp_setup () from /lib/64/libc.so.1
7 0xfffffd7fff0b2550 in ?? () from /lib/64/libc.so.1
8 0x0000000000000000 in ?? ()
Thread 5 (LWP 7 ):
0 0xfffffd7fff0b2597 in __lwp_park () from /lib/64/libc.so.1
1 0xfffffd7fff0a553a in sema_wait_impl () from /lib/64/libc.so.1
2 0xfffffd7fff0a56c0 in sema_wait () from /lib/64/libc.so.1
3 0xfffffd7fff09a0cc in sem_wait () from /lib/64/libc.so.1
4 0xfffffd7ff8b0c4dc in q_dequeue (q=0x13fed60) at mal_interpreter.mx:874
5 0xfffffd7ff8b1825d in runDFLOWworker (t=0x1402e28) at mal_interpreter.mx:1087
6 0xfffffd7fff0b22ad in _thrp_setup () from /lib/64/libc.so.1
7 0xfffffd7fff0b2550 in ?? () from /lib/64/libc.so.1
8 0x0000000000000000 in ?? ()
Thread 4 (LWP 8 ):
0 0xfffffd7fff0b2597 in __lwp_park () from /lib/64/libc.so.1
1 0xfffffd7fff0a553a in sema_wait_impl () from /lib/64/libc.so.1
2 0xfffffd7fff0a56c0 in sema_wait () from /lib/64/libc.so.1
3 0xfffffd7fff09a0cc in sem_wait () from /lib/64/libc.so.1
4 0xfffffd7ff8b0c4dc in q_dequeue (q=0x13fed60) at mal_interpreter.mx:874
5 0xfffffd7ff8b1825d in runDFLOWworker (t=0x1402e50) at mal_interpreter.mx:1087
6 0xfffffd7fff0b22ad in _thrp_setup () from /lib/64/libc.so.1
7 0xfffffd7fff0b2550 in ?? () from /lib/64/libc.so.1
8 0x0000000000000000 in ?? ()
Thread 3 (LWP 9 ):
0 0xfffffd7fff0b2597 in __lwp_park () from /lib/64/libc.so.1
1 0xfffffd7fff0a553a in sema_wait_impl () from /lib/64/libc.so.1
2 0xfffffd7fff0a56c0 in sema_wait () from /lib/64/libc.so.1
3 0xfffffd7fff09a0cc in sem_wait () from /lib/64/libc.so.1
4 0xfffffd7ff8b0c4dc in q_dequeue (q=0x13fed60) at mal_interpreter.mx:874
5 0xfffffd7ff8b1825d in runDFLOWworker (t=0x1402e78) at mal_interpreter.mx:1087
6 0xfffffd7fff0b22ad in _thrp_setup () from /lib/64/libc.so.1
7 0xfffffd7fff0b2550 in ?? () from /lib/64/libc.so.1
8 0x0000000000000000 in ?? ()
Thread 2 (Thread 1 (LWP 1)):
0 0xfffffd7fff0bb4fa in __read () from /lib/64/libc.so.1
1 0xfffffd7fff0a2023 in read () from /lib/64/libc.so.1
2 0xfffffd7ffcf46c02 in rl_getc () from /usr/lib/64/libreadline.so.5
3 0xfffffd7ffcf46bc6 in rl_read_key () from /usr/lib/64/libreadline.so.5
4 0xfffffd7ffcf1afcc in readline_internal_char () from /usr/lib/64/libreadline.so.5
5 0xfffffd7ffcf1ab35 in readline () from /usr/lib/64/libreadline.so.5
6 0xfffffd7ff8ac14cb in getConsoleInput (c=0x4c9ee0, prompt=0x4c0fc0 ">", linemode=0, exit_on_error=1) at mal_readline.c:333
7 0xfffffd7ff8ac1bac in readConsole (cntxt=0x4c9ee0) at mal_readline.c:492
8 0xfffffd7ff8ad2115 in MALreader (c=0x4c9ee0) at mal_session.c:501
9 0xfffffd7ff8ad0a08 in runPhase (c=0x4c9ee0, phase=0) at mal_scenario.c:522
10 0xfffffd7ff8ad0b12 in runScenarioBody (c=0x4c9ee0) at mal_scenario.c:559
11 0xfffffd7ff8ad0e11 in runScenario (c=0x4c9ee0) at mal_scenario.c:601
12 0xfffffd7ff8ad1ed5 in MSserveClient (dummy=0x4c9ee0) at mal_session.c:438
13 0x0000000000404099 in main (argc=23, av=0xfffffd7fffdffa08) at mserver5.c:596
Thread 1 (LWP 1 ):
0 0xfffffd7fff0bb4fa in __read () from /lib/64/libc.so.1
1 0xfffffd7fff0a2023 in read () from /lib/64/libc.so.1
2 0xfffffd7ffcf46c02 in rl_getc () from /usr/lib/64/libreadline.so.5
3 0xfffffd7ffcf46bc6 in rl_read_key () from /usr/lib/64/libreadline.so.5
4 0xfffffd7ffcf1afcc in readline_internal_char () from /usr/lib/64/libreadline.so.5
5 0xfffffd7ffcf1ab35 in readline () from /usr/lib/64/libreadline.so.5
6 0xfffffd7ff8ac14cb in getConsoleInput (c=0x4c9ee0, prompt=0x4c0fc0 ">", linemode=0, exit_on_error=1) at mal_readline.c:333
7 0xfffffd7ff8ac1bac in readConsole (cntxt=0x4c9ee0) at mal_readline.c:492
8 0xfffffd7ff8ad2115 in MALreader (c=0x4c9ee0) at mal_session.c:501
9 0xfffffd7ff8ad0a08 in runPhase (c=0x4c9ee0, phase=0) at mal_scenario.c:522
10 0xfffffd7ff8ad0b12 in runScenarioBody (c=0x4c9ee0) at mal_scenario.c:559
11 0xfffffd7ff8ad0e11 in runScenario (c=0x4c9ee0) at mal_scenario.c:601
12 0xfffffd7ff8ad1ed5 in MSserveClient (dummy=0x4c9ee0) at mal_session.c:438
13 0x0000000000404099 in main (argc=23, av=0xfffffd7fffdffa08) at mserver5.c:596
## Comment 17148
Date: 2012-04-25 10:40:38 +0200
From: @sjoerdmullender
Heaps (including the ones used for hashes) are allocated using memory mapped files when they are over a certain size. I thought that size was much lower than it appears to be. I think that is the big problem here.
At least on my system (Fedora 16 Linux, 8 cores, 16 GB memory), when I create an integer column with 17000000 rows, the hash table that is created for the point (single value) select is too small for the system to choose a memory mapped file. Instead, the space is just allocated on the process heap (i.e. using malloc). The fact that all hash tables are malloced means that we have very little control over swapping them out. We would have that control if they were memory mapped.
For the present case, one could argue that hash tables shouldn't be used since each column is only queried once, but that is not the reasoning. The reasoning is, we need to do a scan anyway, so we might as well create a hash so that subsequent point selects can be handled more quickly.
The reasoning behind not using a memory mapped file for the hash table is that it is apparently quite expensive to get rid of the hash table since when we unmap the memory region, the Linux kernel (at least back then, and possibly other O/S'es as well) insists on writing the data to disk, after which we unlink the file (I don't think you can first delete the file on Windows).
When, as in this case, memory gets filled up, we need to free up memory. The GDKvmtrim thread is responsible for telling the O/S that certain parts of memory mapped files aren't needed in the near future so that the O/S can free up that memory. It also calls a function BBPtrim which flushes BATs to disk. However, BBPtrim is only called when the memory load is "extreme", and in your case, the memory load is merely "high". Whether the load is considered "high" or "extreme" is a function of the process's resident set size (RSS, see ps -ly output on Solaris).
We already discussed this a bit internally. We need to take a good look at this whole memory allocation and memory mapping business, and possibly come up with a new strategy that works on modern operating systems.
By the way, we do not currently have a Solaris 11 system to test this on. We do have Solaris 10, but that doesn't have posix_fadvise and posix_madvise which we use to tell the kernel what we want done with the memory regions and files.
## Comment 17149
Date: 2012-04-25 11:22:41 +0200
From: @sjoerdmullender
Can you try the following:
Edit gdk/gdk_utils.mx and near the bottom of the function GDKinit change the assignment to GDK_mmap_minsize to just set the value to 0 (instead of the complex formula it is now). Leave GDK_mem_bigsize alone.
Note there are several assignments to both these variables in this function, but the last one is the one that matters.
If this has a positive effect, I'd be interested in the effect when you disable the GDKvmtrim thread in addition to the above change: run the server with the option
--set gdk_vmtrim=no
## Comment 17161
Date: 2012-04-26 16:20:53 +0200
From: @sjoerdmullender
Changeset [4c7c8a446bc9](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4c7c8a446bc9) 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=4c7c8a446bc9](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=4c7c8a446bc9)
Changeset description:
Experimental checkin: lower limit for all heaps of persistent bats.
This works on Linux, but I want to find out whether this works on
other systems as well.
This is a potential fix for bug #3067: at least on Linux, this seems to
have the desired effect.
What this change does is to lower the limit for when we use memory
mapped files for heaps (in the case of the bug, the heap for hashes)
to REMAP_PAGE_SIZE (16 kiB on Linux, 64 kiB on Windows) from something
much, much larger. This has the effect that, even though the test
described in the bug report uses lots of hash tables that are not
thrown away, they do not use swap space, and will hopefully not cause
thrashing.
## Comment 17162
Date: 2012-04-26 21:28:51 +0200
From: sgpi <<sgpipub>>
(In reply to comment 3)
> Changeset [4c7c8a446bc9](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4c7c8a446bc9) 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=4c7c8a446bc9](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=4c7c8a446bc9)
>
> Changeset description:
>
> Experimental checkin: lower limit for all heaps of persistent bats.
> This works on Linux, but I want to find out whether this works on
> other systems as well.
> This is a potential fix for bug #3067: at least on Linux, this seems to
> have the desired effect.
> What this change does is to lower the limit for when we use memory
> mapped files for heaps (in the case of the bug, the heap for hashes)
> to REMAP_PAGE_SIZE (16 kiB on Linux, 64 kiB on Windows) from something
> much, much larger. This has the effect that, even though the test
> described in the bug report uses lots of hash tables that are not
> thrown away, they do not use swap space, and will hopefully not cause
> thrashing.
Thanks for your reply.
I've done some testing.
****************************************************************************
Test 1: mserver5 from the current Apr2012 branch (including latest changeset 4c7c8a446bc9)
Results: almost all queries hangs (I waited few minutes)
****************************************************************************
Test 2: mserver5 from current Apr2012 branch (including latest changeset 4c7c8a446bc9) without GDKvmtrim thread (--set gdk_vmtrim=no)
Results: first query veeery slow (3 - 4 minutes, CPU thread at 100%), but repeating same query is very fast (4ms)
---
Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased)
Database: MonetDB v11.9.0 (unreleased), 'mapi:monetdb://mdb:50000/db'
Type \q to quit, \? for a list of available commands
auto commit mode: on
sql>select count(*) from "test" where "ID"=13;
+------+
| L1 |
+======+
| 0 |
+------+
1 tuple (4m 13s)
sql>select count(*) from "test" where "ID"=1;
+------+
| L1 |
+======+
| 0 |
+------+
1 tuple (4.420ms)
sql>select count(*) from "test" where "ID"=122;
+------+
| L1 |
+======+
| 0 |
+------+
1 tuple (4.909ms)
****************************************************************************
Test 3: mserver5 from current Apr2012 branch (including latest changeset 4c7c8a446bc9) but without GDKvmtrim thread (--set gdk_vmtrim=no) and with mentioned change in gdk/gdk_utils.mx (GDK_mmap_minsize=0)
Results: same as in the test 2
****************************************************************************
summary:
Fast queries are queries with sorted BAT.
Creating the hash is now very expensive operation...
From performance point of view these results are unnacceptable.
BTW. On Apr2012 branch I cannot query storage():
sql>select * from storage() where "hashsize">0;
invalid/unknown response from server, ignoring output
? GDKmemchk (memcur=12760800,memmax=20530332897) (vmcur=134021120,vmmax=4398046511104)
TypeException:user.s1_1[5]:'sql.storage' undefined in: (_8:bat[:oid,:str], _9:bat[:oid,:str], _10:bat[:oid,:str], _11:bat[:oid,:str], _12:bat[:oid,:lng], _13:bat[:oid,:lng], _14:bat[:oid,:int], _15:bat[:oid,:lng], _16:bat[:oid,:lng]) := sql.storage()
39000!program contains errors
Is this "normal" ?
regards,
MG
## Comment 17164
Date: 2012-04-26 21:44:20 +0200
From: @drstmane
Thanks!
I filed an extra bug report for storage(); cf. bug #3072 .
## Comment 17180
Date: 2012-04-27 11:56:02 +0200
From: sgpi <<sgpipub>>
Next few results from nightly testing (conditions same as in the test 3)
select count(*) from "test_0" where "col_0"=11051837;
+------+
| L1 |
+======+
| 0 |
+------+
1 tuple
real 0m0.126s
user 0m0.021s
sys 0m0.038s
select count(*) from "test_0" where "col_3"=11051837;
+------+
| L1 |
+======+
| 0 |
+------+
1 tuple
real 61m15.314s
user 0m0.022s
sys 0m0.040s
select count(*) from "test_1" where "col_3"=11051837;
+------+
| L1 |
+======+
| 0 |
+------+
1 tuple
real 115m13.408s
user 0m0.022s
sys 0m0.039s
select count(*) from "test_2" where "col_3"=11051837;
+------+
| L1 |
+======+
| 0 |
+------+
1 tuple
real 4m13.242s
user 0m0.022s
sys 0m0.042s
select count(*) from "test_3" where "col_3"=11051837;
+------+
| L1 |
+======+
| 0 |
+------+
1 tuple
real 5m31.314s
user 0m0.022s
sys 0m0.039s
select count(*) from "test_4" where "col_3"=11051837;
+------+
| L1 |
+======+
| 1 |
+------+
1 tuple
real 310m7.809s
user 0m0.022s
sys 0m0.039s
-------------------------------------------------------------------
I'm trying to find out what consumes the real time.
Query hangs but CPU is idle
CPU states: 98.0% idle, 0.0% user, 1.9% kernel, 0.0% iowait, 0.0% swap
Kernel: 607 ctxsw, 164 trap, 1217 intr, 101 syscall, 81 flt, 264 pgout
Memory: 23G phys mem, 3490M free mem, 5120M total swap, 5120M free swap
PID USERNAME NLWP PRI NICE SIZE RES STATE TIME CPU COMMAND
25629 root 8 59 0 3621M 184M sleep 52:23 0.13% mserver5
Truss doesn't help:
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/3: pollsys(0xFFFFFD7FFC9FFEA0, 0, 0xFFFFFD7FFC9FFF20, 0x00000000) (sleeping...)
/1: read(0, 0xFFFFFD7FFFDFECAC, 1) (sleeping...)
/6: lwp_park(0x00000000, 0) (sleeping...)
/8: lwp_park(0x00000000, 0) (sleeping...)
/5: lwp_park(0x00000000, 0) (sleeping...)
/7: lwp_park(0x00000000, 0) (sleeping...)
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/3: pollsys(0xFFFFFD7FFC9FFEA0, 0, 0xFFFFFD7FFC9FFF20, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/3: pollsys(0xFFFFFD7FFC9FFEA0, 0, 0xFFFFFD7FFC9FFF20, 0x00000000) (sleeping...)
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/3: pollsys(0xFFFFFD7FFC9FFEA0, 0, 0xFFFFFD7FFC9FFF20, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/3: pollsys(0xFFFFFD7FFC9FFEA0, 0, 0xFFFFFD7FFC9FFF20, 0x00000000) (sleeping...)
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
/2: pollsys(0xFFFFFD7FFE7FDE30, 1, 0xFFFFFD7FFE7FDEE0, 0x00000000) = 0
Backtrace:
(gdb) thread apply all backtrace
[New LWP 8 ]
[New LWP 7 ]
[New LWP 6 ]
[New LWP 5 ]
[New LWP 30 ]
[New LWP 3 ]
[New LWP 2 ]
[New Thread 2 (LWP 2)]
[New Thread 3 (LWP 3)]
[New Thread 5 ]
[New Thread 6 ]
[New Thread 7 ]
[New Thread 8 ]
[New Thread 30 (LWP 30)]
Thread 16 (Thread 30 (LWP 30)):
0 0xfffffd7ff1b409bf in BAThash (b=0xc1a0f8, masksize=0) at gdk_search.mx:352
1 0xfffffd7ff1ace22a in BAT_hashselect (b=0xc1a0f8, bn=0x1ac1c00, tl=0x1ac1100) at gdk_batop.mx:999
2 0xfffffd7ff1ae492f in BAT_select_ (b=0xc1a0d0, tl=0x1ac1100, th=0x1ac1100, li=1 '\001', hi=1 '\001', tail=0 '\0',
anti=0 '\0', preserve_order=0 '\0') at gdk_batop.mx:1268
3 0xfffffd7ff1ae5a03 in BATuselect (b=0xc1a0d0, h=0x1ac1100, t=0x0) at gdk_batop.mx:1344
4 0xfffffd7ff2d9dd71 in CMDuselect1 (result=0xfffffd7ffc5ff2e0, b=0xc1a0d0, value=0x1ac1100) at algebra.mx:1417
5 0xfffffd7ff2da5e55 in ALGuselect1 (result=0x1ac1270, bid=0x1ac1260, value=0x1ac1100) at algebra.mx:2257
6 0xfffffd7ff2513e1a in runMALsequence (cntxt=0xc592f0, mb=0x19a5760, startpc=1, stoppc=0, stk=0x1ac1060, env=0x0,
pcicaller=0x0) at mal_interpreter.mx:1958
7 0xfffffd7ff24f6a27 in callMAL (cntxt=0xc592f0, mb=0x19a5760, env=0xfffffd7ffc5ffd00, argv=0xfffffd7ffc5ffda0,
debug=0 '\0') at mal_interpreter.mx:423
8 0xfffffd7ffea56c4b in SQLexecutePrepared (c=0xc592f0, be=0x18de120, q=0x19a55b0) at sql_scenario.c:1642
9 0xfffffd7ffea56f42 in SQLengineIntern (c=0xc592f0, be=0x18de120) at sql_scenario.c:1695
10 0xfffffd7ffea575be in SQLengine (c=0xc592f0) at sql_scenario.c:1821
11 0xfffffd7ff24e1a20 in runPhase (c=0xc592f0, phase=4) at mal_scenario.c:522
12 0xfffffd7ff24e1c29 in runScenarioBody (c=0xc592f0) at mal_scenario.c:573
13 0xfffffd7ff24e1e43 in runScenario (c=0xc592f0) at mal_scenario.c:601
14 0xfffffd7ff24e2f62 in MSserveClient (dummy=0xc592f0) at mal_session.c:438
15 0xfffffd7fff0b22ad in _thrp_setup () from /lib/64/libc.so.1
16 0xfffffd7fff0b2550 in ?? () from /lib/64/libc.so.1
17 0x0000000000000000 in ?? ()
Thread 15 (Thread 8 ):
0 0xfffffd7fff0b2597 in __lwp_park () from /lib/64/libc.so.1
1 0xfffffd7fff0a553a in sema_wait_impl () from /lib/64/libc.so.1
2 0xfffffd7fff0a56c0 in sema_wait () from /lib/64/libc.so.1
3 0xfffffd7fff09a0cc in sem_wait () from /lib/64/libc.so.1
4 0xfffffd7ff251ddb0 in q_dequeue (q=0x1a84080) at mal_interpreter.mx:874
5 0xfffffd7ff2529b58 in runDFLOWworker (t=0x1a88198) at mal_interpreter.mx:1087
6 0xfffffd7fff0b22ad in _thrp_setup () from /lib/64/libc.so.1
7 0xfffffd7fff0b2550 in ?? () from /lib/64/libc.so.1
8 0x0000000000000000 in ?? ()
Thread 14 (Thread 7 ):
0 0xfffffd7fff0b2597 in __lwp_park () from /lib/64/libc.so.1
1 0xfffffd7fff0a553a in sema_wait_impl () from /lib/64/libc.so.1
2 0xfffffd7fff0a56c0 in sema_wait () from /lib/64/libc.so.1
3 0xfffffd7fff09a0cc in sem_wait () from /lib/64/libc.so.1
4 0xfffffd7ff251ddb0 in q_dequeue (q=0x1a84080) at mal_interpreter.mx:874
5 0xfffffd7ff2529b58 in runDFLOWworker (t=0x1a88170) at mal_interpreter.mx:1087
6 0xfffffd7fff0b22ad in _thrp_setup () from /lib/64/libc.so.1
7 0xfffffd7fff0b2550 in ?? () from /lib/64/libc.so.1
8 0x0000000000000000 in ?? ()
Thread 13 (Thread 6 ):
0 0xfffffd7fff0b2597 in __lwp_park () from /lib/64/libc.so.1
1 0xfffffd7fff0a553a in sema_wait_impl () from /lib/64/libc.so.1
2 0xfffffd7fff0a56c0 in sema_wait () from /lib/64/libc.so.1
3 0xfffffd7fff09a0cc in sem_wait () from /lib/64/libc.so.1
4 0xfffffd7ff251ddb0 in q_dequeue (q=0x1a84080) at mal_interpreter.mx:874
5 0xfffffd7ff2529b58 in runDFLOWworker (t=0x1a88148) at mal_interpreter.mx:1087
6 0xfffffd7fff0b22ad in _thrp_setup () from /lib/64/libc.so.1
7 0xfffffd7fff0b2550 in ?? () from /lib/64/libc.so.1
8 0x0000000000000000 in ?? ()
Thread 12 (Thread 5 ):
0 0xfffffd7fff0b2597 in __lwp_park () from /lib/64/libc.so.1
1 0xfffffd7fff0a553a in sema_wait_impl () from /lib/64/libc.so.1
2 0xfffffd7fff0a56c0 in sema_wait () from /lib/64/libc.so.1
3 0xfffffd7fff09a0cc in sem_wait () from /lib/64/libc.so.1
4 0xfffffd7ff251ddb0 in q_dequeue (q=0x1a84080) at mal_interpreter.mx:874
5 0xfffffd7ff2529b58 in runDFLOWworker (t=0x1a88120) at mal_interpreter.mx:1087
6 0xfffffd7fff0b22ad in _thrp_setup () from /lib/64/libc.so.1
7 0xfffffd7fff0b2550 in ?? () from /lib/64/libc.so.1
8 0x0000000000000000 in ?? ()
Thread 11 (Thread 3 (LWP 3)):
0 0xfffffd7fff0bb3ea in __pollsys () from /lib/64/libc.so.1
1 0xfffffd7fff0a43f5 in _pollsys () from /lib/64/libc.so.1
2 0xfffffd7fff062bed in pselect () from /lib/64/libc.so.1
3 0xfffffd7fff06306c in select () from /lib/64/libc.so.1
4 0xfffffd7ff1280b35 in MT_sleep_ms (ms=30000) at gdk_posix.c:1688
5 0xfffffd7ffeb7657f in store_manager () at store.c:1530
6 0xfffffd7ffeaed0ac in mvc_logmanager () at sql_mvc.c:151
7 0xfffffd7fff0b22ad in _thrp_setup () from /lib/64/libc.so.1
8 0xfffffd7fff0b2550 in ?? () from /lib/64/libc.so.1
9 0x0000000000000000 in ?? ()
Thread 10 (Thread 2 (LWP 2)):
0 0xfffffd7fff0bb3ea in __pollsys () from /lib/64/libc.so.1
1 0xfffffd7fff0a43f5 in _pollsys () from /lib/64/libc.so.1
2 0xfffffd7fff062bed in pselect () from /lib/64/libc.so.1
3 0xfffffd7fff06306c in select () from /lib/64/libc.so.1
4 0xfffffd7ff327b2f9 in SERVERlistenThread (Sock=0x1818bf0) at mal_mapi.mx:512
5 0xfffffd7fff0b22ad in _thrp_setup () from /lib/64/libc.so.1
6 0xfffffd7fff0b2550 in ?? () from /lib/64/libc.so.1
7 0x0000000000000000 in ?? ()
Thread 9 (LWP 2 ):
0 0xfffffd7fff0bb3ea in __pollsys () from /lib/64/libc.so.1
1 0xfffffd7fff0a43f5 in _pollsys () from /lib/64/libc.so.1
2 0xfffffd7fff062bed in pselect () from /lib/64/libc.so.1
3 0xfffffd7fff06306c in select () from /lib/64/libc.so.1
4 0xfffffd7ff327b2f9 in SERVERlistenThread (Sock=0x1818bf0) at mal_mapi.mx:512
5 0xfffffd7fff0b22ad in _thrp_setup () from /lib/64/libc.so.1
6 0xfffffd7fff0b2550 in ?? () from /lib/64/libc.so.1
7 0x0000000000000000 in ?? ()
Thread 8 (LWP 3 ):
0 0xfffffd7fff0bb3ea in __pollsys () from /lib/64/libc.so.1
1 0xfffffd7fff0a43f5 in _pollsys () from /lib/64/libc.so.1
2 0xfffffd7fff062bed in pselect () from /lib/64/libc.so.1
3 0xfffffd7fff06306c in select () from /lib/64/libc.so.1
4 0xfffffd7ff1280b35 in MT_sleep_ms (ms=30000) at gdk_posix.c:1688
5 0xfffffd7ffeb7657f in store_manager () at store.c:1530
6 0xfffffd7ffeaed0ac in mvc_logmanager () at sql_mvc.c:151
7 0xfffffd7fff0b22ad in _thrp_setup () from /lib/64/libc.so.1
8 0xfffffd7fff0b2550 in ?? () from /lib/64/libc.so.1
9 0x0000000000000000 in ?? ()
Thread 7 (LWP 30 ):
0 0xfffffd7ff1b409bf in BAThash (b=0xc1a0f8, masksize=0) at gdk_search.mx:352
1 0xfffffd7ff1ace22a in BAT_hashselect (b=0xc1a0f8, bn=0x1ac1c00, tl=0x1ac1100) at gdk_batop.mx:999
2 0xfffffd7ff1ae492f in BAT_select_ (b=0xc1a0d0, tl=0x1ac1100, th=0x1ac1100, li=1 '\001', hi=1 '\001', tail=0 '\0',
anti=0 '\0', preserve_order=0 '\0') at gdk_batop.mx:1268
3 0xfffffd7ff1ae5a03 in BATuselect (b=0xc1a0d0, h=0x1ac1100, t=0x0) at gdk_batop.mx:1344
4 0xfffffd7ff2d9dd71 in CMDuselect1 (result=0xfffffd7ffc5ff2e0, b=0xc1a0d0, value=0x1ac1100) at algebra.mx:1417
5 0xfffffd7ff2da5e55 in ALGuselect1 (result=0x1ac1270, bid=0x1ac1260, value=0x1ac1100) at algebra.mx:2257
6 0xfffffd7ff2513e1a in runMALsequence (cntxt=0xc592f0, mb=0x19a5760, startpc=1, stoppc=0, stk=0x1ac1060, env=0x0,
pcicaller=0x0) at mal_interpreter.mx:1958
7 0xfffffd7ff24f6a27 in callMAL (cntxt=0xc592f0, mb=0x19a5760, env=0xfffffd7ffc5ffd00, argv=0xfffffd7ffc5ffda0,
debug=0 '\0') at mal_interpreter.mx:423
8 0xfffffd7ffea56c4b in SQLexecutePrepared (c=0xc592f0, be=0x18de120, q=0x19a55b0) at sql_scenario.c:1642
9 0xfffffd7ffea56f42 in SQLengineIntern (c=0xc592f0, be=0x18de120) at sql_scenario.c:1695
10 0xfffffd7ffea575be in SQLengine (c=0xc592f0) at sql_scenario.c:1821
11 0xfffffd7ff24e1a20 in runPhase (c=0xc592f0, phase=4) at mal_scenario.c:522
12 0xfffffd7ff24e1c29 in runScenarioBody (c=0xc592f0) at mal_scenario.c:573
13 0xfffffd7ff24e1e43 in runScenario (c=0xc592f0) at mal_scenario.c:601
14 0xfffffd7ff24e2f62 in MSserveClient (dummy=0xc592f0) at mal_session.c:438
15 0xfffffd7fff0b22ad in _thrp_setup () from /lib/64/libc.so.1
16 0xfffffd7fff0b2550 in ?? () from /lib/64/libc.so.1
17 0x0000000000000000 in ?? ()
Thread 6 (LWP 5 ):
0 0xfffffd7fff0b2597 in __lwp_park () from /lib/64/libc.so.1
1 0xfffffd7fff0a553a in sema_wait_impl () from /lib/64/libc.so.1
2 0xfffffd7fff0a56c0 in sema_wait () from /lib/64/libc.so.1
3 0xfffffd7fff09a0cc in sem_wait () from /lib/64/libc.so.1
4 0xfffffd7ff251ddb0 in q_dequeue (q=0x1a84080) at mal_interpreter.mx:874
5 0xfffffd7ff2529b58 in runDFLOWworker (t=0x1a88120) at mal_interpreter.mx:1087
6 0xfffffd7fff0b22ad in _thrp_setup () from /lib/64/libc.so.1
7 0xfffffd7fff0b2550 in ?? () from /lib/64/libc.so.1
8 0x0000000000000000 in ?? ()
Thread 5 (LWP 6 ):
0 0xfffffd7fff0b2597 in __lwp_park () from /lib/64/libc.so.1
1 0xfffffd7fff0a553a in sema_wait_impl () from /lib/64/libc.so.1
2 0xfffffd7fff0a56c0 in sema_wait () from /lib/64/libc.so.1
3 0xfffffd7fff09a0cc in sem_wait () from /lib/64/libc.so.1
4 0xfffffd7ff251ddb0 in q_dequeue (q=0x1a84080) at mal_interpreter.mx:874
5 0xfffffd7ff2529b58 in runDFLOWworker (t=0x1a88148) at mal_interpreter.mx:1087
6 0xfffffd7fff0b22ad in _thrp_setup () from /lib/64/libc.so.1
7 0xfffffd7fff0b2550 in ?? () from /lib/64/libc.so.1
8 0x0000000000000000 in ?? ()
Thread 4 (LWP 7 ):
0 0xfffffd7fff0b2597 in __lwp_park () from /lib/64/libc.so.1
1 0xfffffd7fff0a553a in sema_wait_impl () from /lib/64/libc.so.1
2 0xfffffd7fff0a56c0 in sema_wait () from /lib/64/libc.so.1
3 0xfffffd7fff09a0cc in sem_wait () from /lib/64/libc.so.1
4 0xfffffd7ff251ddb0 in q_dequeue (q=0x1a84080) at mal_interpreter.mx:874
5 0xfffffd7ff2529b58 in runDFLOWworker (t=0x1a88170) at mal_interpreter.mx:1087
6 0xfffffd7fff0b22ad in _thrp_setup () from /lib/64/libc.so.1
7 0xfffffd7fff0b2550 in ?? () from /lib/64/libc.so.1
8 0x0000000000000000 in ?? ()
Thread 3 (LWP 8 ):
0 0xfffffd7fff0b2597 in __lwp_park () from /lib/64/libc.so.1
1 0xfffffd7fff0a553a in sema_wait_impl () from /lib/64/libc.so.1
2 0xfffffd7fff0a56c0 in sema_wait () from /lib/64/libc.so.1
3 0xfffffd7fff09a0cc in sem_wait () from /lib/64/libc.so.1
4 0xfffffd7ff251ddb0 in q_dequeue (q=0x1a84080) at mal_interpreter.mx:874
5 0xfffffd7ff2529b58 in runDFLOWworker (t=0x1a88198) at mal_interpreter.mx:1087
6 0xfffffd7fff0b22ad in _thrp_setup () from /lib/64/libc.so.1
7 0xfffffd7fff0b2550 in ?? () from /lib/64/libc.so.1
8 0x0000000000000000 in ?? ()
Thread 2 (Thread 1 (LWP 1)):
0 0xfffffd7fff0bb4fa in __read () from /lib/64/libc.so.1
1 0xfffffd7fff0a2023 in read () from /lib/64/libc.so.1
2 0xfffffd7ff8ab6c02 in rl_getc () from /usr/lib/64/libreadline.so.5
3 0xfffffd7ff8ab6bc6 in rl_read_key () from /usr/lib/64/libreadline.so.5
4 0xfffffd7ff8a8afcc in readline_internal_char () from /usr/lib/64/libreadline.so.5
5 0xfffffd7ff8a8ab35 in readline () from /usr/lib/64/libreadline.so.5
6 0xfffffd7ff24d2051 in getConsoleInput (c=0xc59050, prompt=0xc50130 ">", linemode=0, exit_on_error=1)
at mal_readline.c:333
7 0xfffffd7ff24d273f in readConsole (cntxt=0xc59050) at mal_readline.c:492
8 0xfffffd7ff24e31c9 in MALreader (c=0xc59050) at mal_session.c:501
9 0xfffffd7ff24e1a20 in runPhase (c=0xc59050, phase=0) at mal_scenario.c:522
10 0xfffffd7ff24e1b37 in runScenarioBody (c=0xc59050) at mal_scenario.c:559
11 0xfffffd7ff24e1e43 in runScenario (c=0xc59050) at mal_scenario.c:601
12 0xfffffd7ff24e2f62 in MSserveClient (dummy=0xc59050) at mal_session.c:438
13 0x0000000000404a39 in main (argc=25, av=0xfffffd7fffdff9e8) at mserver5.c:596
Thread 1 (LWP 1 ):
0 0xfffffd7fff0bb4fa in __read () from /lib/64/libc.so.1
1 0xfffffd7fff0a2023 in read () from /lib/64/libc.so.1
2 0xfffffd7ff8ab6c02 in rl_getc () from /usr/lib/64/libreadline.so.5
3 0xfffffd7ff8ab6bc6 in rl_read_key () from /usr/lib/64/libreadline.so.5
4 0xfffffd7ff8a8afcc in readline_internal_char () from /usr/lib/64/libreadline.so.5
5 0xfffffd7ff8a8ab35 in readline () from /usr/lib/64/libreadline.so.5
6 0xfffffd7ff24d2051 in getConsoleInput (c=0xc59050, prompt=0xc50130 ">", linemode=0, exit_on_error=1)
at mal_readline.c:333
7 0xfffffd7ff24d273f in readConsole (cntxt=0xc59050) at mal_readline.c:492
8 0xfffffd7ff24e31c9 in MALreader (c=0xc59050) at mal_session.c:501
9 0xfffffd7ff24e1a20 in runPhase (c=0xc59050, phase=0) at mal_scenario.c:522
10 0xfffffd7ff24e1b37 in runScenarioBody (c=0xc59050) at mal_scenario.c:559
11 0xfffffd7ff24e1e43 in runScenario (c=0xc59050) at mal_scenario.c:601
12 0xfffffd7ff24e2f62 in MSserveClient (dummy=0xc59050) at mal_session.c:438
13 0x0000000000404a39 in main (argc=25, av=0xfffffd7fffdff9e8) at mserver5.c:596
0 0xfffffd7fff0bb4fa in __read () from /lib/64/libc.so.1
## Comment 17181
Date: 2012-04-27 13:42:06 +0200
From: sgpi <<sgpipub>>
Ok, I found that the last problem with low cpu usage during query (strictly speaking - during creating hash on disk) might be due to insufficient disk space (filesystem silently grows, only ~250MB were free). I fixed this.
It seems that creating hash on disk is not an option.
Can you shed some light on indexing topic?
I wonder how permanent indexes are implemented in monetdb. I can see no benefit from creating an index for single column.
## Comment 17183
Date: 2012-04-27 14:17:14 +0200
From: sgpi <<sgpipub>>
(In reply to comment 7)
> I wonder how permanent indexes are implemented in monetdb. I can see no benefit
> from creating an index for single column.
sql>select * from storage() where "hashsize">0;
+--------+-----------+-------------+----------+----------+----------+-------+----------+-----------+--------+
| schema | table | column | location | count | capacity | width | size | hashsize | sorted |
+========+===========+=============+==========+==========+==========+=======+==========+===========+========+
| sys | functions | id | 01/127 | 1147 | 4096 | 4 | 16384 | 131072 | false |
| sys | auths | name | 07/722 | 3 | 256 | 1 | 10496 | 10240 | false |
+--------+-----------+-------------+----------+----------+----------+-------+----------+-----------+--------+
sql>create index test29 on "test_29"("test_3");
operation successful (15.7s)
sql>select count(*) from "test_29" where "test_3"=31321;
+------+
| L1 |
+======+
| 0 |
+------+
1 tuple (26m 8s)
sql>select * from storage() where "hashsize">0;
+--------+-----------+-------------+----------+----------+----------+-------+----------+-----------+--------+
| schema | table | column | location | count | capacity | width | size | hashsize | sorted |
+========+===========+=============+==========+==========+==========+=======+==========+===========+========+
| sys | functions | id | 01/127 | 1147 | 4096 | 4 | 16384 | 131072 | false |
| sys | auths | name | 07/722 | 3 | 256 | 1 | 10496 | 10240 | false |
| sys | test_29 | test_3 | 51/5137 | 16682461 | 16711680 | 4 | 66846720 | 267911168 | false |
+--------+-----------+-------------+----------+----------+----------+-------+----------+-----------+--------+
## Comment 17184
Date: 2012-04-27 14:18:06 +0200
From: @grobian
Do you use ZFS for the storage area? We just conducted some experiments, and ZFS performed really really bad, compared to UFS. Some googling suggests that mmap on top of a ZFS volume is not really performant. This is at least true for what we see (Solaris 10).
## Comment 17189
Date: 2012-04-27 14:30:04 +0200
From: sgpi <<sgpipub>>
Yes, I'm using ZFS.
## Comment 17190
Date: 2012-04-27 15:26:08 +0200
From: @sjoerdmullender
(In reply to comment 4)
> I've done some testing.
>
> ****************************************************************************
> Test 1: mserver5 from the current Apr2012 branch (including latest changeset
> 4c7c8a446bc9)
>
> Results: almost all queries hangs (I waited few minutes)
>
>
> ****************************************************************************
> Test 2: mserver5 from current Apr2012 branch (including latest changeset
> 4c7c8a446bc9) without GDKvmtrim thread (--set gdk_vmtrim=no)
>
> Results: first query veeery slow (3 - 4 minutes, CPU thread at 100%), but
> repeating same query is very fast (4ms)
It appears that combining mmap and a zfs file system on Solaris is a very bad idea. See e.g. <http://mail.opensolaris.org/pipermail/zfs-discuss/2009-July/029349.html>.
MonetDB uses memory mapped files extensively, and my patch makes that "worse" by switching over even sooner (i.e. for smaller files that belong to persistent BATs).
I also did a test: on a zfs file system, a single point select on a 17 milion row column took 25 minutes. On a ufs file system on the same machine, it took 10 seconds.
## Comment 17217
Date: 2012-05-03 14:49:59 +0200
From: @sjoerdmullender
Can you try the latest Apr2012 version but with --set gdk_vmtrim=no?
The main points are:
- vmtrim thread disabled (thanks to the option)
- BBPtrim enabled
- hashes allocated using malloc
On Solaris, we seem to be using posix_madvise incorrectly. Solaris is much more proactive about memory use than Linux, so the advise actually does something. For this reason especially, it is important that the hashes are allocated using malloc.
Solaris maintains information about how much malloc allocates. This can be retrieved using the mallinfo call. This call was disabled, but is now enabled. We use the information in BBPtrim to decide on whether to free memory. In other words, with mallinfo working and enabled, we now actually free memory (including the hashes) when we're using too much (the amount is 0.815 of total discovered memory but can be set with --set gdk_mem_maxsize=bytes).
As to allocating the hashes. Whether a hash is created in the first place, and whether that hash is allocated using malloc or a memory mapped file depends on the amount of memory and the number of threads the server is allowed to use (defaults to the number of CPUs/cores). From your original report I infer that in your case hashes were allocated using malloc (which is what we want--at least for now). If they are allocated using memory mapped files, you could lower the number of threads using --set gdk_nr_threads=threads which will raise the limit below which hashes are allocated using malloc.
I have been able to run the whole sequence to completion on a Solaris 10 system with just disabling vmtrim (and on this machine lowering the number of threads).
## Comment 17220
Date: 2012-05-05 14:33:59 +0200
From: sgpi <<sgpipub>>
While doing tests I encountered a crash due to lack of free space.
I freed some space (>4GB) but server can't start anymore because of segmentation fault.
Starting server without sql_logs contents is also not possible.
How to recover my test database?
Error:
28534 Segmentation Fault (core dumped) /usr/local/bin/mserver5 --memory --set gdk_vmtrim=no --set gdk_dbfarm=/mdbpool/dbfarm --dbname=db --set
merovingian_uri=mapi:monetdb://mdb:50000/db --set mapi_open=false --set mapi_port=0 --set mapi_usock=/mdbpool/dbfarm/db/.mapi.sock --set monet_vault_key=/mdbpool/dbfarm/db/.vaultkey --set gdk_nr_threads=4 --set max_clients=64 --set sql_optimizer=default_pipe --set monet_daemon=no
Diagnostics:
root@mdb:/mdbpool/dbfarm/db/sql_logs/sql ls -l
total 4
-rw-r--r-- 1 root root 11 May 5 11:45 log
-rw-r--r-- 1 root root 2 May 5 13:49 log.74
root@mdb:/mdbpool/dbfarm/db/sql_logs/sql od -x log
0000000 3530 3032 3130 0a0a 3437 000a
0000013
root@mdb:/mdbpool/dbfarm/db/sql_logs/sql od -x log.74
0000000 04d2
0000002
log file: (cat merovingian.log |grep "ERR db")
2012-05-05 09:44:58 ERR db[27335]: !FATAL: BBPinit: could not write bat/BBP.dir
2012-05-05 09:45:00 ERR db[27336]: !FATAL: BBPinit: cannot properly process bat/BACKUP.
2012-05-05 09:45:02 ERR db[27339]: !FATAL: BBPinit: cannot properly process bat/BACKUP.
2012-05-05 09:45:03 ERR db[27341]: !FATAL: BBPinit: cannot properly process bat/BACKUP.
2012-05-05 09:45:05 ERR db[27342]: !FATAL: BBPinit: cannot properly process bat/BACKUP.
2012-05-05 09:45:06 ERR db[27344]: !FATAL: BBPinit: cannot properly process bat/BACKUP.
2012-05-05 09:45:07 ERR db[27345]: !FATAL: BBPinit: cannot properly process bat/BACKUP.
2012-05-05 09:45:09 ERR db[27347]: !FATAL: BBPinit: cannot properly process bat/BACKUP.
2012-05-05 09:45:11 ERR db[27350]: !FATAL: BBPinit: cannot properly process bat/BACKUP.
2012-05-05 09:45:13 ERR db[27351]: !FATAL: BBPinit: cannot properly process bat/BACKUP.
2012-05-05 09:45:16 ERR db[27356]: !FATAL: BBPinit: cannot properly process bat/BACKUP.
2012-05-05 09:45:17 ERR db[27363]: !failed to open file: No space left on device (/mdbpool/dbfarm/db/.scen)
2012-05-05 11:26:03 ERR db[28462]: !FATAL: BBPinit: could not write bat/BBP.dir
2012-05-05 11:26:08 ERR db[28466]: !mvc_init: unable to create system tables
gdb:
Program received signal SIGSEGV, Segmentation fault.
0xfffffd7ff57258b9 in logger_new (debug=0, fn=0xfffffd7ffebccb90 "sql", logdir=0xfffffd7ffebae918 "sql_logs", dbname=0xbc0530 "db", version=52001,
prefuncp=0xfffffd7ffeb8e09b <bl_preversion>, postfuncp=0xfffffd7ffeb8e26f <bl_postversion>) at gdk_logger.c:1111
1111 BATloop(b, p, q) {
## Comment 17229
Date: 2012-05-07 15:28:29 +0200
From: sgpi <<sgpipub>>
I managed to find the problem. Bat files for sql_catalog (/bat/01/104.*) were missing (WHY?).
After recovering these files from very old backup finally the server is started.
Could you implement checking of free space? It seems that lack of space might cause lot of problems, even on static database (queries only).
Could you add more informative error messages, please?
## Comment 17230
Date: 2012-05-07 17:01:56 +0200
From: sgpi <<sgpipub>>
I can confirm that disabling vmtrim thread helps when hashes were allocated by malloc.
But when hashes are allocated via memory mapped files (HEAPcacheFind (14/1416.thash) 264568832 1 0) query hangs.
I did tests on ZFS and UFS filesystems and BEHAVIOUR IS THE SAME (query hangs).
HEAPcacheFind (11/1111.thash)177012736 1 0
root@mdb:/mdbpool/dbfarm/db/bat/14 ls -l /ufspool/dbfarm/db/bat/11/1111.thash
-rw-r--r-- 1 root root 177012736 May 7 16:55 /ufspool/dbfarm/db/bat/11/1111.thash
root@mdb:/ufspool/dbfarm/db/bat df -k /dev/dsk/c5t1d0s0
Filesystem 1024-blocks Used Available Capacity Mounted on
/dev/dsk/c5t1d0s0 49229567 28375513 20361759 59% /ufspool
root@mdb:/ufspool/dbfarm/db/bat fstyp /dev/dsk/c5t1d0s0
ufs
## Comment 17231
Date: 2012-05-07 17:03:13 +0200
From: @sjoerdmullender
Changeset [1b007b309a89](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1b007b309a89) 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=1b007b309a89](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=1b007b309a89)
Changeset description:
Experimental new memory monitoring and freeing implementation.
In this version we monitor the resident set size (RSS) of the server.
As long as the RSS grows with the amount of memory that is allocated
(both with malloc and using memory mapped files), all is well. But
when RSS shrinks while memory allocation grows, we run BBPtrim to free
up memory.
Together with not using (posix_)madvise, this results in a healthy use
of practically all memory on both Solaris and Linux, at least in the
small tests that I have run.
This is hopefully a fix for bug #3067.
## Comment 17232
Date: 2012-05-07 17:28:40 +0200
From: @sjoerdmullender
We've done more analysis and experimentation and have come up with a new (and hopefully better) way of fixing the problem. The current fix is only in the "default" branch. Can you test this fix?
We realized that Solaris (unlike Linux) is pro-active when it comes to memory management. When you tell the kernel (through madvise/posix_madvise) that memory will be accessed sequentially (and we do that all over the place), Solaris will actively free up memory of memory pages that you've gone over. This is not what we want. All we want to tell the kernel is to go ahead and prefetch pages. Disabling the advise causes the server to actually use the available memory.
In addition, the way we were controlling the amount of memory we were using was distinguishing between malloced memory and memory mapped pages. The code was acting as if the latter didn't matter.
The latest patch tries to monitor the amount of memory by only looking at what the kernel tells us is the resident set size (rss) of the process. As long as it increases, we can continue. But when the rss decreases even when we allocate more memory, we've reached a system-imposed maximum (even if it's only a temporary limit). So then it is time to clean up. The clean up frees BATs that hadn't been used the longest, together with their hashes. The query that triggers the cleanup will of course be slower, but we should not get in a situation where we use so much memory that we start thrashing (as probably happened in your original report).
## Comment 17238
Date: 2012-05-08 14:49:53 +0200
From: sgpi <<sgpipub>>
Generally I'm very impressed with the current implementation in default branch.
I SEE NO HANGS ANYMORE, EVEN WHEN HASHES ARE IN FILES ON ZFS FILESYSTEM :)
However I have two minor issues/questions:
1. When I run tests with memory limit (--set gdk_mem_maxsize=2000000000 --set gdk_vmtrim=yes --set gdk_nr_threads=20 )
and with lack of space on disk I encountered error:
GDK reported error.
HEAPalloc: Insufficient space for HEAP of 268435456 bytes.
Maybe GDK should free some space and retry allocation (there were hashes on disk)
2. After tests with memory limit (--set gdk_mem_maxsize=2000000000) I see differences in reporting the memory usage :
mserver5 says:
GDKmemchk (memcur=1163673200,memmax=2000000000) (vmcur=41568174080,vmmax=4398046511104)
...
alloc = 39389486192 +0 rss = 16180645888 +0
and
sql>select sum("hashsize") from storage() where "hashsize">0;
+------------+
| L1 |
+============+
| 9197463552 |
+------------+
1 tuple (55.660ms)
sql>select "location","size","hashsize" from storage() where "hashsize">0;
+----------+-----------+-----------+
| location | size | hashsize |
+==========+===========+===========+
| 07/722 | 10496 | 10240 |
| 12/1234 | 162398208 | 265289728 |
| 15/1566 | 65142784 | 264503296 |
| 17/1756 | 155058176 | 260046848 |
| 20/2002 | 62914560 | 260046848 |
| 21/2175 | 75104256 | 125829120 |
| 22/2221 | 28966912 | 125042688 |
| 24/2414 | 53215232 | 74448896 |
| 24/2440 | 20054016 | 174325760 |
| 26/2633 | 46661632 | 68157440 |
| 26/2657 | 17039360 | 168296448 |
| 30/3033 | 75890688 | 185335808 |
| 30/3052 | 181665792 | 285999104 |
| 30/3076 | 75890688 | 688652288 |
| 32/3271 | 166854656 | 269484032 |
| 33/3315 | 67239936 | 671350784 |
| 35/3510 | 161480704 | 264241152 |
| 35/3534 | 64880640 | 263979008 |
| 37/3727 | 163184640 | 265289728 |
| 37/3753 | 65404928 | 265027584 |
| 41/4106 | 25952256 | 68681728 |
| 41/4125 | 66453504 | 119013376 |
| 41/4151 | 25952256 | 119013376 |
| 43/4331 | 152567808 | 257949696 |
| 43/4355 | 61472768 | 257163264 |
| 11/1111 | 71696384 | 176947200 |
| 45/4527 | 171835392 | 277610496 |
| 45/4553 | 71696384 | 680263680 |
| 47/4722 | 169476096 | 271581184 |
| 47/4746 | 68288512 | 673447936 |
| 51/5105 | 133562368 | 141950976 |
| 51/5117 | 158859264 | 268435456 |
| 51/5122 | 164888576 | 268435456 |
| 51/5137 | 66846720 | 267911168 |
| 51/5143 | 66846720 | 135790592 |
| 51/5146 | 66846720 | 267911168 |
+----------+-----------+-----------+
36 tuples (65.015ms)
Solaris says:
Memory: 23G phys mem, 717M free mem, 5120M total swap, 5120M free swap
PID USERNAME NLWP PRI NICE SIZE RES STATE TIME CPU COMMAND
1242 root 24 59 0 39G 15G sleep 5:28 0.02% mserver5
Note: Resident size - 15G
Hashes:
root@mdb:/mdbpool/dbfarm find . -name *.thash -exec ls -lt {} \;
-rw-r--r-- 1 root root 671350784 May 8 10:45 ./db/bat/33/3315.thash
-rw-r--r-- 1 root root 265355264 May 8 10:39 ./db/bat/12/1234.thash
-rw-r--r-- 1 root root 260112384 May 8 10:38 ./db/bat/20/2002.thash
-rw-r--r-- 1 root root 264568832 May 8 10:43 ./db/bat/15/1566.thash
-rw-r--r-- 1 root root 258015232 May 8 10:44 ./db/bat/43/4331.thash
-rw-r--r-- 1 root root 0 May 8 10:34 ./db/bat/43/4330.thash
-rw-r--r-- 1 root root 257228800 May 8 10:45 ./db/bat/43/4355.thash
-rw-r--r-- 1 root root 185401344 May 8 10:29 ./db/bat/30/3033.thash
-rw-r--r-- 1 root root 285999104 May 8 10:45 ./db/bat/30/3052.thash
-rw-r--r-- 1 root root 688652288 May 8 10:45 ./db/bat/30/3076.thash
-rw-r--r-- 1 root root 271646720 May 8 10:40 ./db/bat/47/4722.thash
-rw-r--r-- 1 root root 673447936 May 8 10:45 ./db/bat/47/4746.thash
-rw-r--r-- 1 root root 177012736 May 8 10:28 ./db/bat/11/1111.thash
-rw-r--r-- 1 root root 174391296 May 8 10:38 ./db/bat/24/2440.thash
-rw-r--r-- 1 root root 265355264 May 8 10:39 ./db/bat/37/3727.thash
-rw-r--r-- 1 root root 265093120 May 8 10:46 ./db/bat/37/3753.thash
-rw-r--r-- 1 root root 264306688 May 8 10:39 ./db/bat/35/3510.thash
-rw-r--r-- 1 root root 264044544 May 8 10:38 ./db/bat/35/3534.thash
-rw-r--r-- 1 root root 267976704 May 8 10:39 ./db/bat/51/5146.thash
-rw-r--r-- 1 root root 268500992 May 8 10:40 ./db/bat/51/5122.thash
-rw-r--r-- 1 root root 268500992 May 8 10:37 ./db/bat/51/5117.thash
-rw-r--r-- 1 root root 267976704 May 8 10:33 ./db/bat/51/5137.thash
-rw-r--r-- 1 root root 269549568 May 8 10:39 ./db/bat/32/3271.thash
-rw-r--r-- 1 root root 680263680 May 8 10:45 ./db/bat/45/4553.thash
-rw-r--r-- 1 root root 277610496 May 8 10:44 ./db/bat/45/4527.thash
-rw-r--r-- 1 root root 260112384 May 8 10:39 ./db/bat/17/1756.thash
SUM - 8 052 473 856 bytes
So RSS is 16GB but hashes takes only 9GB. What about missing ~7GB?
## Comment 17239
Date: 2012-05-08 15:28:18 +0200
From: @sjoerdmullender
(In reply to comment 18)
> Generally I'm very impressed with the current implementation in default branch.
>
> I SEE NO HANGS ANYMORE, EVEN WHEN HASHES ARE IN FILES ON ZFS FILESYSTEM :)
I'm glad the major problems were solved.
The ZFS file system seems to be a problem in Solaris 10 (which we have available), but perhaps not in Solaris 11 (which we don't have). We will be experimenting also with OpenIndiana which is hopefully reasonably close to Solaris 11.
> However I have two minor issues/questions:
> 1. When I run tests with memory limit (--set gdk_mem_maxsize=2000000000 --set
> gdk_vmtrim=yes --set gdk_nr_threads=20 )
> and with lack of space on disk I encountered error:
> GDK reported error.
> HEAPalloc: Insufficient space for HEAP of 268435456 bytes.
>
> Maybe GDK should free some space and retry allocation (there were hashes on
> disk)
Running out of disk space is still a weak point. I think that merits a separate bug report.
The algorithm that determines whether a point select should use a hash, and if so, whether that hash should be malloced or memory mapped could be improved to also look at the available disk space.
There is a problem with memory mapped files. When we want to create a new memory mapped file of a certain size, we create the file, seek to the size and write a byte. This creates a file with a (large) hole. This file is then mapped into memory. Then, if there isn't enough free disk space, the server can get a bus error or segmentation violation when the system runs out of disk space when it writes into the memory mapped region, even if the memory map succeeded. This is quite hard to deal with, especially if another process uses up disk space after the file was memory mapped.
> 2. After tests with memory limit (--set gdk_mem_maxsize=2000000000) I see
> differences in reporting the memory usage :
With the current algorithm we don't do much with gdk_mem_maxsize. It is used to determine whether a point select should use a hash (if there is only little memory available, we don't bother with the hash but just scan). It is also used in the algorithm that trims back the memory use of the server, but I haven't studied how it is used there exactly.
Perhaps we should also initiate a trim when the rss reaches gdk_mem_maxsize, especially if it was set by the user.
> mserver5 says:
> GDKmemchk (memcur=1163673200,memmax=2000000000)
> (vmcur=41568174080,vmmax=4398046511104)
> ...
> alloc = 39389486192 +0 rss = 16180645888 +0
>
> and
>
> sql>select sum("hashsize") from storage() where "hashsize">0;
> +------------+
> | L1 |
> +============+
> | 9197463552 |
> +------------+
> 1 tuple (55.660ms)
>
> sql>select "location","size","hashsize" from storage() where "hashsize">0;
> +----------+-----------+-----------+
> | location | size | hashsize |
> +==========+===========+===========+
> | 07/722 | 10496 | 10240 |
> | 12/1234 | 162398208 | 265289728 |
> | 15/1566 | 65142784 | 264503296 |
> | 17/1756 | 155058176 | 260046848 |
> | 20/2002 | 62914560 | 260046848 |
> | 21/2175 | 75104256 | 125829120 |
> | 22/2221 | 28966912 | 125042688 |
> | 24/2414 | 53215232 | 74448896 |
> | 24/2440 | 20054016 | 174325760 |
> | 26/2633 | 46661632 | 68157440 |
> | 26/2657 | 17039360 | 168296448 |
> | 30/3033 | 75890688 | 185335808 |
> | 30/3052 | 181665792 | 285999104 |
> | 30/3076 | 75890688 | 688652288 |
> | 32/3271 | 166854656 | 269484032 |
> | 33/3315 | 67239936 | 671350784 |
> | 35/3510 | 161480704 | 264241152 |
> | 35/3534 | 64880640 | 263979008 |
> | 37/3727 | 163184640 | 265289728 |
> | 37/3753 | 65404928 | 265027584 |
> | 41/4106 | 25952256 | 68681728 |
> | 41/4125 | 66453504 | 119013376 |
> | 41/4151 | 25952256 | 119013376 |
> | 43/4331 | 152567808 | 257949696 |
> | 43/4355 | 61472768 | 257163264 |
> | 11/1111 | 71696384 | 176947200 |
> | 45/4527 | 171835392 | 277610496 |
> | 45/4553 | 71696384 | 680263680 |
> | 47/4722 | 169476096 | 271581184 |
> | 47/4746 | 68288512 | 673447936 |
> | 51/5105 | 133562368 | 141950976 |
> | 51/5117 | 158859264 | 268435456 |
> | 51/5122 | 164888576 | 268435456 |
> | 51/5137 | 66846720 | 267911168 |
> | 51/5143 | 66846720 | 135790592 |
> | 51/5146 | 66846720 | 267911168 |
> +----------+-----------+-----------+
> 36 tuples (65.015ms)
>
>
> Solaris says:
> Memory: 23G phys mem, 717M free mem, 5120M total swap, 5120M free swap
> PID USERNAME NLWP PRI NICE SIZE RES STATE TIME CPU COMMAND
> 1242 root 24 59 0 39G 15G sleep 5:28 0.02% mserver5
>
> Note: Resident size - 15G
>
> Hashes:
> root@mdb:/mdbpool/dbfarm find . -name *.thash -exec ls -lt {} \;
> -rw-r--r-- 1 root root 671350784 May 8 10:45 ./db/bat/33/3315.thash
> -rw-r--r-- 1 root root 265355264 May 8 10:39 ./db/bat/12/1234.thash
> -rw-r--r-- 1 root root 260112384 May 8 10:38 ./db/bat/20/2002.thash
> -rw-r--r-- 1 root root 264568832 May 8 10:43 ./db/bat/15/1566.thash
> -rw-r--r-- 1 root root 258015232 May 8 10:44 ./db/bat/43/4331.thash
> -rw-r--r-- 1 root root 0 May 8 10:34 ./db/bat/43/4330.thash
> -rw-r--r-- 1 root root 257228800 May 8 10:45 ./db/bat/43/4355.thash
> -rw-r--r-- 1 root root 185401344 May 8 10:29 ./db/bat/30/3033.thash
> -rw-r--r-- 1 root root 285999104 May 8 10:45 ./db/bat/30/3052.thash
> -rw-r--r-- 1 root root 688652288 May 8 10:45 ./db/bat/30/3076.thash
> -rw-r--r-- 1 root root 271646720 May 8 10:40 ./db/bat/47/4722.thash
> -rw-r--r-- 1 root root 673447936 May 8 10:45 ./db/bat/47/4746.thash
> -rw-r--r-- 1 root root 177012736 May 8 10:28 ./db/bat/11/1111.thash
> -rw-r--r-- 1 root root 174391296 May 8 10:38 ./db/bat/24/2440.thash
> -rw-r--r-- 1 root root 265355264 May 8 10:39 ./db/bat/37/3727.thash
> -rw-r--r-- 1 root root 265093120 May 8 10:46 ./db/bat/37/3753.thash
> -rw-r--r-- 1 root root 264306688 May 8 10:39 ./db/bat/35/3510.thash
> -rw-r--r-- 1 root root 264044544 May 8 10:38 ./db/bat/35/3534.thash
> -rw-r--r-- 1 root root 267976704 May 8 10:39 ./db/bat/51/5146.thash
> -rw-r--r-- 1 root root 268500992 May 8 10:40 ./db/bat/51/5122.thash
> -rw-r--r-- 1 root root 268500992 May 8 10:37 ./db/bat/51/5117.thash
> -rw-r--r-- 1 root root 267976704 May 8 10:33 ./db/bat/51/5137.thash
> -rw-r--r-- 1 root root 269549568 May 8 10:39 ./db/bat/32/3271.thash
> -rw-r--r-- 1 root root 680263680 May 8 10:45 ./db/bat/45/4553.thash
> -rw-r--r-- 1 root root 277610496 May 8 10:44 ./db/bat/45/4527.thash
> -rw-r--r-- 1 root root 260112384 May 8 10:39 ./db/bat/17/1756.thash
>
> SUM - 8 052 473 856 bytes
>
> So RSS is 16GB but hashes takes only 9GB. What about missing ~7GB?
There are also the data files (extension .tail and .theap) as well as smaller hash heaps that aren't memory mapped and so don't have a representation in the file system.
## Comment 17240
Date: 2012-05-09 10:54:10 +0200
From: sgpi <<sgpipub>>
(In reply to comment 19)
> > SUM - 8 052 473 856 bytes
> >
> > So RSS is 16GB but hashes takes only 9GB. What about missing ~7GB?
>
> There are also the data files (extension .tail and .theap) as well as smaller
> hash heaps that aren't memory mapped and so don't have a representation in the
> file system.
I'm afraid that the problem is more serious. While doing continuous tests I encountered Solaris error "Not enough space". Error arises in the fifth repetition of the test in the loop.
Errors from test:
GDKerror:!ERROR: GDKmallocmax: failed for 671350784 bytes
mclient: fatal: /usr/lib/64/libssp.so.0: Resource temporarily unavailable
2767 Segmentation Fault (core dumped) mclient -d db -e -i -s "$LINE"
fork: Not enough space
Mserver5 says:
----------------------------------------------------
BBPTRIM: no more unload candidates!
BBPTRIM_EXIT: memsize=25526075392,vmsize=26197491712
alloc = 688040856 +0 rss = 18784256 +0
----------------------------------------------------
top says:
Memory: 23G phys mem, 934M free mem, 5120M total swap, 2000M free swap
PID USERNAME NLWP PRI NICE SIZE RES STATE TIME CPU COMMAND
1920 root 8 59 0 24G 18M sleep 30:27 0.02% mserver5
----------------------------------------------------
Solaris detailed memory usage:
echo ::memstat | mdb -k
Page Summary Pages MB %Tot
------------ ---------------- ---------------- ----
Kernel 413549 1615 7%
ZFS File Data 2563 10 0%
Anon 5490612 21447 89%
Exec and libs 706 2 0%
Page cache 6840 26 0%
Free (cachelist) 219171 856 4%
Free (freelist) 14557 56 0%
Total 6147998 24015
Physical 6147997 24015
-----------------------------------------------------------
But when I quitted (still running) mserver5 process (via \q) Solaris started to work well.
top says:
Memory: 23G phys mem, 22G free mem, 5120M total swap, 5107M free swap
----------------------------------------------------
Solaris detailed memory usage:
root@mdb:~ echo ::memstat | mdb -k
Page Summary Pages MB %Tot
------------ ---------------- ---------------- ----
Kernel 427683 1670 7%
ZFS File Data 3224 12 0%
Anon 22167 86 0%
Exec and libs 803 3 0%
Page cache 3124 12 0%
Free (cachelist) 178364 696 3%
Free (freelist) 5512633 21533 90%
Total 6147998 24015
Physical 6147997 24015
---------------------------------------------------------------
It seems to me that some kind of memory is not freed in the trimming process.
## Comment 17242
Date: 2012-05-09 16:30:44 +0200
From: @sjoerdmullender
I had already started looking into what BBPtrim does exactly before your latest comment, and I have since found a pretty serious bug in its operation. That bug should now be fixed (changeset [65522fd01d7c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=65522fd01d7c) in Apr2012 branch, changeset [513cc2701933](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=513cc2701933) in default branch).
The fix may not fix everything, but it should certainly improve selection of the bats to evict during trimming.
Now we need to look more at the heuristics. For instance, should we also trim if virtual memory is much larger than rss, even if rss is growing? Should we look at the total malloced memory (as opposed to memory mapped) and if that is (much) larger than physical memory or rss also trim? The rationale here is that malloced memory ends up in swap space.
## Comment 17247
Date: 2012-05-09 23:05:00 +0200
From: sgpi <<sgpipub>>
(In reply to comment 21)
> I had already started looking into what BBPtrim does exactly before your latest
> comment, and I have since found a pretty serious bug in its operation. That
> bug should now be fixed (changeset [65522fd01d7c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=65522fd01d7c) in Apr2012 branch, changeset
> [513cc2701933](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=513cc2701933) in default branch).
> The fix may not fix everything, but it should certainly improve selection of
> the bats to evict during trimming.
>
Indeed, there must be something else.
I tested latest changset in the default branch and behaviour hasn't changed much.
GDKerror:!ERROR: GDKmallocmax: failed for 680263680 bytes
BBPTRIM: no more unload candidates!
BBPTRIM_EXIT: memsize=25054019584,vmsize=25811025920
alloc = 775259944 +0 rss = 3762475008 +2600960
root@mdb:/ echo ::memstat | mdb -k
Page Summary Pages MB %Tot
------------ ---------------- ---------------- ----
Kernel 426745 1666 7%
ZFS File Data 9653 37 0%
Anon 5507049 21511 90%
Exec and libs 625 2 0%
Page cache 99169 387 2%
Free (cachelist) 50712 198 1%
Free (freelist) 54045 211 1%
Total 6147998 24015
Physical 6147997 24015
It should be noted that each test iteration takes longer...
Test iteration 1 - 6m:42s
Test iteration 2 - 7m:20s
Test iteration 3 - 8m:37s
Test iteration 4 - 10m:20s
Test iteration 5 - 18m
Test iteration 6 - 59m
Test iteration 7 - ? still running...
I can add observation - in subsequent tests there is less hashes allocated and there is less RSS memory allocated to mserver5.
## Comment 17249
Date: 2012-05-10 16:45:56 +0200
From: @sjoerdmullender
What is your current testcase? Is there a way in which I could try to reproduce your latest problems?
My latest set of patches should improve memory management a bit again, but since I haven't yet been able to reproduce the problem with "no more unload candidates" I can't be sure whether it's going to help.
BBPtrim now sets half the current RSS as its target (i.e. it aims at freeing memory until that much is left). Also, now it counts the hash tables as memory allocated on behalf of a bat. This latter change should be visible in the lines with "TRIMSELECT: unload" when you enable debugmask 4 in a higher bytes count than before.
When you get the situation that there are no more unload candidates, what BBPTRIM output did you get. I'm interested in everything from BBPTRIM_ENTER until BBPTRIM_EXIT. If possible, please attach it to the bug report.
## Comment 17250
Date: 2012-05-11 00:57:37 +0200
From: sgpi <<sgpipub>>
(In reply to comment 23)
> What is your current testcase? Is there a way in which I could try to
> reproduce your latest problems?
Testcase is described in the orginal bug report: test consist of (many) point selects, each select is run using separate mclient invocation, run test in a loop (10 repetitions).
>
> My latest set of patches should improve memory management a bit again, but
> since I haven't yet been able to reproduce the problem with "no more unload
> candidates" I can't be sure whether it's going to help.
No, it's not help too much. Still performance degradation on subsequent test repetitions ... and finally "Not enough space".
> When you get the situation that there are no more unload candidates, what
> BBPTRIM output did you get. I'm interested in everything from BBPTRIM_ENTER
> until BBPTRIM_EXIT. If possible, please attach it to the bug report.
I'm attaching the last 40% of the log produced by mserver5 (--memory switch).
Message "Not enough space" while trying to run mclient corresponds to the end of the log.
## Comment 17251
Date: 2012-05-11 01:02:32 +0200
From: sgpi <<sgpipub>>
Created attachment 106
memory allocation trace
> Attached file: [memory_allocation_log.zip](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3067_memory_allocation_log.zip_106) (application/octet-stream, 411115 bytes)
> Description: memory allocation trace
## Comment 17258
Date: 2012-05-15 15:35:50 +0200
From: @sjoerdmullender
I have not yet been able to reproduce the malloc fails. I guess my problems in reproducing this is that Linux malloc behaves very differently from Solaris malloc, and the Solaris systems I have access to have very limiting specs. One has lots of cores, lots of memory, but is very slow, another only has 2 GB of memory. The third system with slightly more reasonable specs has just become available again, so I'll be trying that now.
One thing you might try is to attach a debugger when the malloc fails and from the debugger call the function BBPdump() (in gdb this is done by giving the command
call BBPdump()
at the (gdb) prompt).
This should result in a table on mserver5's output with information about all BATs known to the system, including their memory use. Can you attach that output to the report please?
## Comment 17259
Date: 2012-05-15 18:27:09 +0200
From: sgpi <<sgpipub>>
(In reply to comment 26)
> One thing you might try is to attach a debugger when the malloc fails and from
> the debugger call the function BBPdump() (in gdb this is done by giving the
> command
> call BBPdump()
> at the (gdb) prompt).
> This should result in a table on mserver5's output with information about all
> BATs known to the system, including their memory use. Can you attach that
> output to the report please?
I'm attaching BBPdump() output. Call was made when the system hangs.
echo ::memstat | mdb -k
Page Summary Pages MB %Tot
------------ ---------------- ---------------- ----
Kernel 391254 1528 6%
ZFS File Data 2615 10 0%
Anon 5444528 21267 89%
Exec and libs 1710 6 0%
Page cache 170561 666 3%
Free (cachelist) 97591 381 2%
Free (freelist) 39739 155 1%
## Comment 17260
Date: 2012-05-15 18:28:35 +0200
From: sgpi <<sgpipub>>
Created attachment 107
BBPdump() output
> Attached file: [bbpdump.txt](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3067_bbpdump.txt_107) (text/plain, 157407 bytes)
> Description: BBPdump() output
## Comment 17263
Date: 2012-05-17 08:25:33 +0200
From: @sjoerdmullender
I just realized that I fixed a deadlock situation that can occur in tight memory situations. Did you test with changeset 26e3a3be0f67? If not, can you make sure that that changeset is also included?
I don't see anything wrong with the latest dumps you attached. The BBPdump shows there are plenty of BATs that can be trimmed. The memory allocation trace shows that there are indeed places where there is a message "no more unload candidates", but it then goes ahead and finds more. This is totally consistent with the code.
Today is the start of a long weekend. I'll be mostly off-line until Monday.
## Comment 17271
Date: 2012-05-22 17:45:19 +0200
From: sgpi <<sgpipub>>
I'm attaching output from latest test (mdb_test_log.zip).
Test was done with yesterday's state of the "default" branch.
Server has 16GiB RAM.
Look at line 30245 - there is a check for the current hashsize which occupy only 267MB but subsequent point select query fails with error "GDKerror:!ERROR: GDKmallocmax: failed for 133169152 bytes".
My thoughts are as follows:
a) there is a memory leak somewhere in mserver5 (GDK?)
b) after many hash loads/unloads there is memory fragmentation which prevents allocating large memory chunks from heap
I prepared a graph (mserver5_memory_allocation_over_time.gif) which illustrates that initially RSS goes near the limit (~14GB) but after trimming it never reaches 10GB. Why?
I would like to emphasize again that in addition to problems with memory allocation there is a huge degradation of performance with each new iteration of the test.
Below are start and stop times for subsequent iterations.
Test 1
begin: Mon May 21 12:15:34 CEST 2012
end: Mon May 21 12:25:26 CEST 2012
Test 2
begin: Mon May 21 12:25:26 CEST 2012
end: Mon May 21 12:42:00 CEST 2012
Test 3
begin: Mon May 21 12:42:00 CEST 2012
end: Mon May 21 12:59:07 CEST 2012
Test 4
begin: Mon May 21 12:59:07 CEST 2012
end: Mon May 21 13:13:24 CEST 2012
Test 5
begin: Mon May 21 13:13:24 CEST 2012
end: Mon May 21 13:33:38 CEST 2012
Test 6
begin: Mon May 21 13:33:38 CEST 2012
end: Mon May 21 13:59:49 CEST 2012
Test 7
begin: Mon May 21 13:59:49 CEST 2012
end: Mon May 21 14:28:12 CEST 2012
Test 8
begin: Mon May 21 14:28:13 CEST 2012
end: Mon May 21 15:48:30 CEST 2012
Test 9
begin: Mon May 21 15:48:31 CEST 2012
end: Mon May 21 16:33:28 CEST 2012
Test 10
begin: Mon May 21 16:33:29 CEST 2012
end: Mon May 21 17:12:47 CEST 2012
Test 11
begin: Mon May 21 17:12:48 CEST 2012
end: Mon May 21 18:04:18 CEST 2012
Test 12
begin: Mon May 21 18:04:19 CEST 2012
end: Mon May 21 19:08:42 CEST 2012
Test 13
begin: Mon May 21 19:08:43 CEST 2012
end: Mon May 21 20:11:17 CEST 2012
Test 14
begin: Mon May 21 20:11:17 CEST 2012
end: Mon May 21 20:59:36 CEST 2012
Test 15
begin: Mon May 21 20:59:37 CEST 2012
end: Mon May 21 21:57:10 CEST 2012
Test 16
begin: Mon May 21 21:57:11 CEST 2012
end: Mon May 21 23:08:13 CEST 2012
Test 17
begin: Mon May 21 23:08:14 CEST 2012
end: Tue May 22 00:14:00 CEST 2012
Test 18
begin: Tue May 22 00:14:01 CEST 2012
end: Tue May 22 01:08:20 CEST 2012
Test 19
begin: Tue May 22 01:08:21 CEST 2012
end: Tue May 22 02:07:40 CEST 2012
Test 20
begin: Tue May 22 02:07:41 CEST 2012
end: Tue May 22 03:17:21 CEST 2012
During the test Solaris has reported few times about lack of memory (Resource temporarily unavailable, fork: Not enough space), however I see no errors in --memory diagnostics output (I can send you the complete log on request, 10.4MB rar file ).
How can I help further in the diagnostics?
## Comment 17272
Date: 2012-05-22 17:46:54 +0200
From: sgpi <<sgpipub>>
Created attachment 109
mdb_test_log.zip
> Attached file: [mdb_test_log.zip](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3067_mdb_test_log.zip_109) (application/octet-stream, 59084 bytes)
> Description: mdb_test_log.zip
## Comment 17273
Date: 2012-05-22 17:47:44 +0200
From: sgpi <<sgpipub>>
Created attachment 110
mserver5_memory_allocation_over_time.gif
> Attached file: [mserver5_memory_allocation_over_time.gif](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3067_mserver5_memory_allocation_over_time.gif_110) (image/gif, 209747 bytes)
> Description: mserver5_memory_allocation_over_time.gif
## Comment 17274
Date: 2012-05-22 22:36:28 +0200
From: @sjoerdmullender
(In reply to comment 30)
> During the test Solaris has reported few times about lack of memory (Resource
> temporarily unavailable, fork: Not enough space), however I see no errors in
> --memory diagnostics output (I can send you the complete log on request, 10.4MB
> rar file ).
Yes, I would like to get the log. I'm not sure how large files are allowed to be in the mail system, and attaching it to this report is maybe a bit much. Can you make it available through a link? You can send the link privately.
> How can I help further in the diagnostics?
I wish I knew.
Memory fragmentation does seem like a likely cause of the current problems. The description of the behavior matches that. From the full memory log I should be able to construct a memory map (if the log contains the GDKmalloc, GDKfree, etc. lines it should contain enough information for that). I still have scripts to help me with that.
## Comment 17281
Date: 2012-05-24 15:03:54 +0200
From: @sjoerdmullender
Changeset [96dbe2d01a83](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=96dbe2d01a83) 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=96dbe2d01a83](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=96dbe2d01a83)
Changeset description:
Reinstate GDKvmalloc. This is a partial backout of changesets [5ee4cc736169](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5ee4cc736169) and [b6e70864037e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b6e70864037e)
GDKvmalloc and friends are now static functions in gdk_utils.c. They
are used on non-glibc systems for larger allocations (default: >= 1MiB).
This is hopefully the final fix for bug #3067.
On Solaris we found that memory fragmentation became a real issue.
This is solved partially by using libumem (previous changeset), and
partially by using anonymous mmap. Memory fragmentation becomes an
issue when a large chunk of memory is to be allocated, but the system
break (sbrk()) cannot be increased anymore, e.g. because too much
memory has already been committed to processes by the OS, and no large
enough contiguous piece of memory is available on the process heap.
Memory mapped files (anonymous or otherwise) don't use the same
address space and so don't increase the break. The only concern then
is that enough memory is available in the system, but since all large
chunks are memory mapped, we don't waste as much space on the process
heap. Also, when the memory is freed, the memory is returned to the
system and not kept allocated to the process as part of the process
heap.
On Linux (and presumable any other system that uses glibc), malloc
itself already uses this same trick for larger allocations, so we
don't have to do it.
## Comment 17282
Date: 2012-05-24 15:06:38 +0200
From: @sjoerdmullender
I just committed some changes that hopefully finally put this baby to rest.
The first is a change in configure to use libumem if available.
The second is an attempt to reduce memory fragemtation by using anonymous mmap for larger allocations. It was something we used to do but removed since it wasn't needed on Linux. But removing is was short-sighted, since as we have seen, non-Linux systems don't necessarily use the same implementation of malloc.
## Comment 17287
Date: 2012-05-25 12:17:36 +0200
From: sgpi <<sgpipub>>
(In reply to comment 35)
> I just committed some changes that hopefully finally put this baby to rest.
> The first is a change in configure to use libumem if available.
> The second is an attempt to reduce memory fragemtation by using anonymous mmap
> for larger allocations. It was something we used to do but removed since it
> wasn't needed on Linux. But removing is was short-sighted, since as we have
> seen, non-Linux systems don't necessarily use the same implementation of
> malloc.
I tried Jul2012 branch with no luck.
Core was generated by `/usr/local/bin/mserver5 --set gdk_dbfarm=/mdbpool/dbfarm --dbname=db --set mero'.
Program terminated with signal 11, Segmentation fault.
[New process 658838 ]
0 0xfffffd7fff0d24f4 in strcpy () from /lib/64/libc.so.1
(gdb) 0 0xfffffd7fff0d24f4 in strcpy () from /lib/64/libc.so.1
1 0xfffffd7ff88858cb in HEAPalloc (h=0x26d46b0, nitems=19234816, itemsize=8) at gdk_heap.c:300
2 0xfffffd7ff92696be in HASHnew (hp=0x26d46b0, tpe=5, size=18972672, mask=262144) at gdk_search.mx:333
3 0xfffffd7ff926a042 in BAThash (b=0xdce848, masksize=0) at gdk_search.mx:459
4 0xfffffd7ff91f8af1 in BAT_hashselect (b=0xdce848, bn=0x25d4c20, tl=0x25e90c0) at gdk_batop.mx:1023
5 0xfffffd7ff920f0f2 in BAT_select_ (b=0xdce820, tl=0x25e90c0, th=0x25e90c0, li=1 '\001', hi=1 '\001', tail=0 '\0', anti=0 '\0', preserve_order=0 '\0') at gdk_batop.mx:1292
6 0xfffffd7ff9210369 in BATuselect (b=0xdce820, h=0x25e90c0, t=0x0) at gdk_batop.mx:1383
7 0xfffffd7ffa1cb2ca in CMDuselect1 (result=0xfffffd7ffd9ff040, b=0xdce820, value=0x25e90c0) at algebra.mx:1422
8 0xfffffd7ffa1d377e in ALGuselect1 (result=0x25e9140, bid=0x25e90f0, value=0x25e90c0) at algebra.mx:2269
9 0xfffffd7ff9946ee2 in runMALsequence (cntxt=0xe1f2d0, mb=0x26fbf00, startpc=1, stoppc=0, stk=0x25e9020, env=0x0, pcicaller=0x0) at mal_interpreter.mx:1983
10 0xfffffd7ff993c583 in callMAL (cntxt=0xe1f2d0, mb=0x26fbf00, env=0xfffffd7ffd9ffcc0, argv=0xfffffd7ffd9ffd60, debug=0 '\0') at mal_interpreter.mx:422
11 0xfffffd7ff85d7229 in SQLexecutePrepared (c=0xe1f2d0, be=0x10667e0, q=0x26d6900) at sql_scenario.c:1703
12 0xfffffd7ff85d7520 in SQLengineIntern (c=0xe1f2d0, be=0x10667e0) at sql_scenario.c:1756
13 0xfffffd7ff85d7b9f in SQLengine (c=0xe1f2d0) at sql_scenario.c:1882
14 0xfffffd7ff99377f8 in runPhase (c=0xe1f2d0, phase=4) at mal_scenario.c:522
15 0xfffffd7ff9937a01 in runScenarioBody (c=0xe1f2d0) at mal_scenario.c:573
16 0xfffffd7ff9937c1b in runScenario (c=0xe1f2d0) at mal_scenario.c:601
17 0xfffffd7ff9938d3a in MSserveClient (dummy=0xe1f2d0) at mal_session.c:438
18 0xfffffd7ff894c37b in wrapper_routine (data=0xfffffd7ffe1fdc90) at gdk_system.c:559
19 0xfffffd7fff1622ad in _thrp_setup () from /lib/64/libc.so.1
20 0xfffffd7fff162550 in ?? () from /lib/64/libc.so.1
21 0x0000000000000000 in ?? ()
On default branch I have problems with concurrency (when new concurrent mclient is connecting).
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 160 (LWP 160)]
0xfffffd7ffb589172 in clear_delta (tr=0x5c227c0, bat=0x141adfdb0) at bat_storage.c:1063
1063 sz += BATcount(b);
(gdb) backtrace
0 0xfffffd7ffb589172 in clear_delta (tr=0x5c227c0, bat=0x141adfdb0) at bat_storage.c:1063
1 0xfffffd7ffb589371 in clear_col (tr=0x5c227c0, c=0x1ac921c20) at bat_storage.c:1096
2 0xfffffd7ffb57ebb2 in sql_trans_clear_table (tr=0x5c227c0, t=0x1ac921ae0) at store.c:4014
3 0xfffffd7ffb5822c5 in sql_session_reset (s=0x59d7f90, ac=1) at store.c:4816
4 0xfffffd7ffb582138 in sql_session_create (stk=0, ac=1) at store.c:4783
5 0xfffffd7ffb4ebc87 in mvc_create (clientid=3, stk=0, debug=0, rs=0x5e0ca90, ws=0x5e02290) at sql_mvc.c:435
6 0xfffffd7ffb4522ad in SQLinitClient (c=0xfc1830) at sql_scenario.c:515
7 0xfffffd7ffd957844 in runPhase (c=0xfc1830, phase=5) at mal_scenario.c:522
8 0xfffffd7ffd957926 in runScenarioBody (c=0xfc1830) at mal_scenario.c:556
9 0xfffffd7ffd957c67 in runScenario (c=0xfc1830) at mal_scenario.c:601
10 0xfffffd7ffd958d86 in MSserveClient (dummy=0xfc1830) at mal_session.c:438
11 0xfffffd7ffc974e58 in wrapper_routine (data=0xfffffd7ffa9fdc90) at gdk_system.c:559
12 0xfffffd7fff1522ad in _thrp_setup () from /lib/64/libc.so.1
13 0xfffffd7fff152550 in ?? () from /lib/64/libc.so.1
14 0x0000000000000000 in ?? ()
## Comment 17288
Date: 2012-05-25 14:49:18 +0200
From: @sjoerdmullender
(In reply to comment 36)
> (In reply to comment 35)
> > I just committed some changes that hopefully finally put this baby to rest.
> > The first is a change in configure to use libumem if available.
> > The second is an attempt to reduce memory fragemtation by using anonymous mmap
> > for larger allocations. It was something we used to do but removed since it
> > wasn't needed on Linux. But removing is was short-sighted, since as we have
> > seen, non-Linux systems don't necessarily use the same implementation of
> > malloc.
>
> I tried Jul2012 branch with no luck.
>
>
> Core was generated by `/usr/local/bin/mserver5 --set gdk_dbfarm=/mdbpool/dbfarm
> --dbname=db --set mero'.
> Program terminated with signal 11, Segmentation fault.
> [New process 658838 ]
> 0 0xfffffd7fff0d24f4 in strcpy () from /lib/64/libc.so.1
> (gdb) 0 0xfffffd7fff0d24f4 in strcpy () from /lib/64/libc.so.1
> 1 0xfffffd7ff88858cb in HEAPalloc (h=0x26d46b0, nitems=19234816, itemsize=8)
> at gdk_heap.c:300
This one I fixed less than an hour ago.
> On default branch I have problems with concurrency (when new concurrent mclient
> is connecting).
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 160 (LWP 160)]
> 0xfffffd7ffb589172 in clear_delta (tr=0x5c227c0, bat=0x141adfdb0) at
> bat_storage.c:1063
> 1063 sz += BATcount(b);
Which version are you testing here (output of "hg id")?
Niels fixed a bug in that file (bat_storage.c) yesterday which makes that the line you quoted here is actually line 1066 instead of 1063.
I haven't been able to reproduce this (yet?).
## Comment 17289
Date: 2012-05-25 15:38:23 +0200
From: sgpi <<sgpipub>>
(In reply to comment 37)
> > Program received signal SIGSEGV, Segmentation fault.
> > [Switching to Thread 160 (LWP 160)]
> > 0xfffffd7ffb589172 in clear_delta (tr=0x5c227c0, bat=0x141adfdb0) at
> > bat_storage.c:1063
> > 1063 sz += BATcount(b);
>
> Which version are you testing here (output of "hg id")?
> Niels fixed a bug in that file (bat_storage.c) yesterday which makes that the
> line you quoted here is actually line 1066 instead of 1063.
>
> I haven't been able to reproduce this (yet?).
I tested default branch on 23 May so you are right, line 1066.
I just did a retest with
hg id
[1fa699a45490](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1fa699a45490) tip
and I have another one...
Program terminated with signal 11, Segmentation fault.
0 0xfffffd7fff0d0fd6 in strcmp () from /lib/64/libc.so.1
(gdb) bt
0 0xfffffd7fff0d0fd6 in strcmp () from /lib/64/libc.so.1
1 0xfffffd7ff70471af in PropertyIndex (name=0xfffffd7ff7cbc484 "stableProp") at mal_properties.c:302
2 0xfffffd7ff7b933a8 in optimizerInit () at opt_prelude.c:460
3 0xfffffd7ff5cf87b6 in initSQLreferences () at sql_gencode.c:113
4 0xfffffd7ff5cf32a3 in SQLinitClient (c=0xe23580) at sql_scenario.c:544
5 0xfffffd7ff70579f4 in runPhase (c=0xe23580, phase=5) at mal_scenario.c:522
6 0xfffffd7ff7057ad6 in runScenarioBody (c=0xe23580) at mal_scenario.c:556
7 0xfffffd7ff7057e17 in runScenario (c=0xe23580) at mal_scenario.c:601
8 0xfffffd7ff7058f36 in MSserveClient (dummy=0xe23580) at mal_session.c:438
9 0xfffffd7ff606c377 in wrapper_routine (data=0xfffffd7ffdffdc90) at gdk_system.c:559
10 0xfffffd7fff1622ad in _thrp_setup () from /lib/64/libc.so.1
11 0xfffffd7fff162550 in ?? () from /lib/64/libc.so.1
12 0x0000000000000000 in ?? ()
## Comment 17290
Date: 2012-05-25 18:38:51 +0200
From: sgpi <<sgpipub>>
I have managed to reproduce this issue for "tip" tag (1fa699a45490 tip).
Core was generated by `/usr/local/bin/mserver5 --set gdk_dbfarm=/mdbpool/dbfarm --dbname=db --set mero'.
Program terminated with signal 11, Segmentation fault.
0 0xfffffd7ff5e2ce57 in clear_delta (tr=0x25f5900, bat=0x29149e0) at bat_storage.c:1066
1066 sz += BATcount(b);
(gdb) bt
0 0xfffffd7ff5e2ce57 in clear_delta (tr=0x25f5900, bat=0x29149e0) at bat_storage.c:1066
1 0xfffffd7ff5e2d056 in clear_col (tr=0x25f5900, c=0x241dc20) at bat_storage.c:1099
2 0xfffffd7ff5e22861 in sql_trans_clear_table (tr=0x25f5900, t=0x241dae0) at store.c:4014
3 0xfffffd7ff5e25f74 in sql_session_reset (s=0x26ecc00, ac=1) at store.c:4816
4 0xfffffd7ff5e25de7 in sql_session_create (stk=0, ac=1) at store.c:4783
5 0xfffffd7ff5d8f90a in mvc_create (clientid=3, stk=0, debug=0, rs=0x25e9bd0, ws=0x25d05c0) at sql_mvc.c:435
6 0xfffffd7ff5cf309d in SQLinitClient (c=0xe1f830) at sql_scenario.c:515
7 0xfffffd7ff70579f4 in runPhase (c=0xe1f830, phase=5) at mal_scenario.c:522
8 0xfffffd7ff7057ad6 in runScenarioBody (c=0xe1f830) at mal_scenario.c:556
9 0xfffffd7ff7057e17 in runScenario (c=0xe1f830) at mal_scenario.c:601
10 0xfffffd7ff7058f36 in MSserveClient (dummy=0xe1f830) at mal_session.c:438
11 0xfffffd7ff606c377 in wrapper_routine (data=0xfffffd7ffe1fdc90) at gdk_system.c:559
12 0xfffffd7fff1622ad in _thrp_setup () from /lib/64/libc.so.1
13 0xfffffd7fff162550 in ?? () from /lib/64/libc.so.1
14 0x0000000000000000 in ?? ()
## Comment 17307
Date: 2012-05-30 14:24:48 +0200
From: @sjoerdmullender
I just cannot repdroduce this latest crash. This makes debugging quite difficult.
How easy is it for you to reproduce the crash?
In order to debug this a bit remotely, I have a few questions: How full is your disk when the crash happens? What are the other threads doing (stack traces)? What is the value of `b', and if not NULL, of *b? What is the value of *bat. Let n be the value of ABS(bat->ibid), what is the value of BBP[n/8192][n%8192]? (I'm assuming a 64-bit architecture, for 32 bit use 2048.)
## Comment 17308
Date: 2012-05-30 14:54:11 +0200
From: sgpi <<sgpipub>>
(In reply to comment 40)
> I just cannot repdroduce this latest crash. This makes debugging quite
> difficult.
In my opinion the problem is with concurrency...
> How easy is it for you to reproduce the crash?
>
It's easy :(
> In order to debug this a bit remotely, I have a few questions: How full is
> your disk when the crash happens?
Free space is not an issue.
df -k
Filesystem 1024-blocks Used Available Capacity Mounted on
mdbpool/dbfarm1 97800192 34424928 5008083 88% /mdbpool/dbfarm
> What are the other threads doing (stack
> traces)? What is the value of `b', and if not NULL, of *b? What is the value
> of *bat. Let n be the value of ABS(bat->ibid), what is the value of
> BBP[n/8192][n%8192]? (I'm assuming a 64-bit architecture, for 32 bit use
> 2048.)
Here you go
(gdb) bt
0 0xfffffd7ff5e2ce57 in clear_delta (tr=0x25f5900, bat=0x29149e0) at bat_storage.c:1066
1 0xfffffd7ff5e2d056 in clear_col (tr=0x25f5900, c=0x241dc20) at bat_storage.c:1099
2 0xfffffd7ff5e22861 in sql_trans_clear_table (tr=0x25f5900, t=0x241dae0) at store.c:4014
3 0xfffffd7ff5e25f74 in sql_session_reset (s=0x26ecc00, ac=1) at store.c:4816
4 0xfffffd7ff5e25de7 in sql_session_create (stk=0, ac=1) at store.c:4783
5 0xfffffd7ff5d8f90a in mvc_create (clientid=3, stk=0, debug=0, rs=0x25e9bd0, ws=0x25d05c0) at sql_mvc.c:435
6 0xfffffd7ff5cf309d in SQLinitClient (c=0xe1f830) at sql_scenario.c:515
7 0xfffffd7ff70579f4 in runPhase (c=0xe1f830, phase=5) at mal_scenario.c:522
8 0xfffffd7ff7057ad6 in runScenarioBody (c=0xe1f830) at mal_scenario.c:556
9 0xfffffd7ff7057e17 in runScenario (c=0xe1f830) at mal_scenario.c:601
10 0xfffffd7ff7058f36 in MSserveClient (dummy=0xe1f830) at mal_session.c:438
11 0xfffffd7ff606c377 in wrapper_routine (data=0xfffffd7ffe1fdc90) at gdk_system.c:559
---Type <return> to continue, or q <return> to quit---
12 0xfffffd7fff1622ad in _thrp_setup () from /lib/64/libc.so.1
13 0xfffffd7fff162550 in ?? () from /lib/64/libc.so.1
14 0x0000000000000000 in ?? ()
(gdb) p b
$1 = (BAT *) 0x0
(gdb) p *bat
$2 = {name = 0x2a2dd10 "tmp__tables_id", bid = 0, ibase = 0, ibid = 8217, ubid = 0, cnt = 0, cached = 0x0}
(gdb) p BBP[8217/8192][8217%8192]
$3 = {cache = {0x26ede20, 0x26ede48}, logical = {0x2a2dce0 "tmp_20031", 0x2a2dcb0 "tmpr_20031"}, bak = {
0x2a2dce0 "tmp_20031", 0x0}, next = {0, 0}, desc = 0x26ede20, physical = 0x2a2dc80 "02/00/20031", options = 0x0,
refs = 0, lrefs = 1, lastused = 23370992, status = 1}
(gdb) thread apply all backtrace
Thread 12 (process 6052908 ):
0 0xfffffd7fff1625c4 in __lwp_unpark () from /lib/64/libc.so.1
1 0xfffffd7fff155aa6 in sema_post () from /lib/64/libc.so.1
2 0xfffffd7fff14a080 in sem_post () from /lib/64/libc.so.1
3 0xfffffd7ff707e14e in DFLOWscheduler (flow=0xfbacd0) at mal_interpreter.mx:1296
4 0xfffffd7ff707ecb3 in runMALdataflow (cntxt=0xe1f580, mb=0x2a473a0, startpc=12, stoppc=26, stk=0x2656020,
env=0x0, pcicaller=0xfc1640) at mal_interpreter.mx:1439
5 0xfffffd7ff7b12df6 in MALstartDataflow (cntxt=0xe1f580, mb=0x2a473a0, stk=0x2656020, pci=0xfc1640)
at language.mx:275
6 0xfffffd7ff7065dcb in runMALsequence (cntxt=0xe1f580, mb=0x2a473a0, startpc=1, stoppc=0, stk=0x2656020, env=0x0,
pcicaller=0x0) at mal_interpreter.mx:2158
---Type <return> to continue, or q <return> to quit---
7 0xfffffd7ff705c77f in callMAL (cntxt=0xe1f580, mb=0x2a473a0, env=0xfffffd78eb9ffcc0, argv=0xfffffd78eb9ffd60,
debug=0 '\0') at mal_interpreter.mx:422
8 0xfffffd7ff5cf7229 in SQLexecutePrepared (c=0xe1f580, be=0x10667e0, q=0x26cc840) at sql_scenario.c:1703
9 0xfffffd7ff5cf7520 in SQLengineIntern (c=0xe1f580, be=0x10667e0) at sql_scenario.c:1756
10 0xfffffd7ff5cf7b9f in SQLengine (c=0xe1f580) at sql_scenario.c:1882
11 0xfffffd7ff70579f4 in runPhase (c=0xe1f580, phase=4) at mal_scenario.c:522
12 0xfffffd7ff7057bfd in runScenarioBody (c=0xe1f580) at mal_scenario.c:573
13 0xfffffd7ff7057e17 in runScenario (c=0xe1f580) at mal_scenario.c:601
14 0xfffffd7ff7058f36 in MSserveClient (dummy=0xe1f580) at mal_session.c:438
15 0xfffffd7ff606c377 in wrapper_routine (data=0xfffffd7ffe1fdc90) at gdk_system.c:559
16 0xfffffd7fff1622ad in _thrp_setup () from /lib/64/libc.so.1
17 0xfffffd7fff162550 in ?? () from /lib/64/libc.so.1
---Type <return> to continue, or q <return> to quit---
18 0x0000000000000000 in ?? ()
Thread 11 (process 5987372 ):
0 0xfffffd7ff698a456 in BAThash (b=0xdd7248, masksize=0) at gdk_search.mx:483
1 0xfffffd7ff6918aed in BAT_hashselect (b=0xdd7248, bn=0x28f5020, tl=0x26d28c0) at gdk_batop.mx:1023
2 0xfffffd7ff692f0ee in BAT_select_ (b=0xdd7220, tl=0x26d28c0, th=0x26d28c0, li=1 '\001', hi=1 '\001', tail=0 '\0',
anti=0 '\0', preserve_order=0 '\0') at gdk_batop.mx:1292
3 0xfffffd7ff6930365 in BATuselect (b=0xdd7220, h=0x26d28c0, t=0x0) at gdk_batop.mx:1383
4 0xfffffd7ff78eb493 in CMDuselect1 (result=0xfffffd7ffd9ff040, b=0xdd7220, value=0x26d28c0) at algebra.mx:1422
5 0xfffffd7ff78f3947 in ALGuselect1 (result=0x26d2940, bid=0x26d28f0, value=0x26d28c0) at algebra.mx:2269
6 0xfffffd7ff70670de in runMALsequence (cntxt=0xe1f2d0, mb=0x2908d40, startpc=1, stoppc=0, stk=0x26d2820, env=0x0,
pcicaller=0x0) at mal_interpreter.mx:1983
---Type <return> to continue, or q <return> to quit---
7 0xfffffd7ff705c77f in callMAL (cntxt=0xe1f2d0, mb=0x2908d40, env=0xfffffd7ffd9ffcc0, argv=0xfffffd7ffd9ffd60,
debug=0 '\0') at mal_interpreter.mx:422
8 0xfffffd7ff5cf7229 in SQLexecutePrepared (c=0xe1f2d0, be=0x25f4a20, q=0x26d1cb0) at sql_scenario.c:1703
9 0xfffffd7ff5cf7520 in SQLengineIntern (c=0xe1f2d0, be=0x25f4a20) at sql_scenario.c:1756
10 0xfffffd7ff5cf7b9f in SQLengine (c=0xe1f2d0) at sql_scenario.c:1882
11 0xfffffd7ff70579f4 in runPhase (c=0xe1f2d0, phase=4) at mal_scenario.c:522
12 0xfffffd7ff7057bfd in runScenarioBody (c=0xe1f2d0) at mal_scenario.c:573
13 0xfffffd7ff7057e17 in runScenario (c=0xe1f2d0) at mal_scenario.c:601
14 0xfffffd7ff7058f36 in MSserveClient (dummy=0xe1f2d0) at mal_session.c:438
15 0xfffffd7ff606c377 in wrapper_routine (data=0xfffffd7ffe1fdc90) at gdk_system.c:559
16 0xfffffd7fff1622ad in _thrp_setup () from /lib/64/libc.so.1
17 0xfffffd7fff162550 in ?? () from /lib/64/libc.so.1
---Type <return> to continue, or q <return> to quit---
18 0x0000000000000000 in ?? ()
Thread 10 (process 744492 ):
0 0xfffffd7fff162597 in __lwp_park () from /lib/64/libc.so.1
1 0xfffffd7fff15553a in sema_wait_impl () from /lib/64/libc.so.1
2 0xfffffd7fff1556c0 in sema_wait () from /lib/64/libc.so.1
3 0xfffffd7fff14a0cc in sem_wait () from /lib/64/libc.so.1
4 0xfffffd7ff70753a1 in q_dequeue (q=0x148caa0) at mal_interpreter.mx:865
5 0xfffffd7ff707cf2d in runDFLOWworker (t=0x21ee158) at mal_interpreter.mx:1068
6 0xfffffd7ff606c377 in wrapper_routine (data=0xfffffd7ffd9fee90) at gdk_system.c:559
7 0xfffffd7fff1622ad in _thrp_setup () from /lib/64/libc.so.1
8 0xfffffd7fff162550 in ?? () from /lib/64/libc.so.1
---Type <return> to continue, or q <return> to quit---
9 0x0000000000000000 in ?? ()
Thread 9 (process 678956 ):
0 0xfffffd7fff162597 in __lwp_park () from /lib/64/libc.so.1
1 0xfffffd7fff15553a in sema_wait_impl () from /lib/64/libc.so.1
2 0xfffffd7fff1556c0 in sema_wait () from /lib/64/libc.so.1
3 0xfffffd7fff14a0cc in sem_wait () from /lib/64/libc.so.1
4 0xfffffd7ff70753a1 in q_dequeue (q=0x148caa0) at mal_interpreter.mx:865
5 0xfffffd7ff707cf2d in runDFLOWworker (t=0x21ee130) at mal_interpreter.mx:1068
6 0xfffffd7ff606c377 in wrapper_routine (data=0xfffffd7ffd9fee90) at gdk_system.c:559
7 0xfffffd7fff1622ad in _thrp_setup () from /lib/64/libc.so.1
8 0xfffffd7fff162550 in ?? () from /lib/64/libc.so.1
---Type <return> to continue, or q <return> to quit---
9 0x0000000000000000 in ?? ()
Thread 8 (process 613420 ):
0 0xfffffd7fff162597 in __lwp_park () from /lib/64/libc.so.1
1 0xfffffd7fff15553a in sema_wait_impl () from /lib/64/libc.so.1
2 0xfffffd7fff1556c0 in sema_wait () from /lib/64/libc.so.1
3 0xfffffd7fff14a0cc in sem_wait () from /lib/64/libc.so.1
4 0xfffffd7ff70753a1 in q_dequeue (q=0x148caa0) at mal_interpreter.mx:865
5 0xfffffd7ff707cf2d in runDFLOWworker (t=0x21ee108) at mal_interpreter.mx:1068
6 0xfffffd7ff606c377 in wrapper_routine (data=0xfffffd7ffd9fee90) at gdk_system.c:559
7 0xfffffd7fff1622ad in _thrp_setup () from /lib/64/libc.so.1
8 0xfffffd7fff162550 in ?? () from /lib/64/libc.so.1
---Type <return> to continue, or q <return> to quit---
9 0x0000000000000000 in ?? ()
Thread 7 (process 547884 ):
0 0xfffffd7fff162597 in __lwp_park () from /lib/64/libc.so.1
1 0xfffffd7fff15553a in sema_wait_impl () from /lib/64/libc.so.1
2 0xfffffd7fff1556c0 in sema_wait () from /lib/64/libc.so.1
3 0xfffffd7fff14a0cc in sem_wait () from /lib/64/libc.so.1
4 0xfffffd7ff70753a1 in q_dequeue (q=0x148caa0) at mal_interpreter.mx:865
5 0xfffffd7ff707cf2d in runDFLOWworker (t=0x21ee0e0) at mal_interpreter.mx:1068
6 0xfffffd7ff606c377 in wrapper_routine (data=0xfffffd7ffd9fee90) at gdk_system.c:559
7 0xfffffd7fff1622ad in _thrp_setup () from /lib/64/libc.so.1
8 0xfffffd7fff162550 in ?? () from /lib/64/libc.so.1
---Type <return> to continue, or q <return> to quit---
9 0x0000000000000000 in ?? ()
Thread 6 (process 351276 ):
0 0xfffffd7fff162597 in __lwp_park () from /lib/64/libc.so.1
1 0xfffffd7fff15bcf0 in cond_sleep_queue () from /lib/64/libc.so.1
2 0xfffffd7fff15bfae in cond_wait_queue () from /lib/64/libc.so.1
3 0xfffffd7fff15c3ec in cond_wait_common () from /lib/64/libc.so.1
4 0xfffffd7fff15c67b in __cond_timedwait () from /lib/64/libc.so.1
5 0xfffffd7fff15c6c5 in cond_timedwait () from /lib/64/libc.so.1
6 0xfffffd7ffe6c3b68 in umem_update_thread () from /lib/64/libumem.so.1
7 0xfffffd7fff1622ad in _thrp_setup () from /lib/64/libc.so.1
8 0xfffffd7fff162550 in ?? () from /lib/64/libc.so.1
---Type <return> to continue, or q <return> to quit---
9 0x0000000000000000 in ?? ()
Thread 5 (process 285740 ):
0 0xfffffd7fff16b3ea in __pollsys () from /lib/64/libc.so.1
1 0xfffffd7fff1543f5 in _pollsys () from /lib/64/libc.so.1
2 0xfffffd7fff112bed in pselect () from /lib/64/libc.so.1
3 0xfffffd7fff11306c in select () from /lib/64/libc.so.1
4 0xfffffd7ff607021a in MT_sleep_ms (ms=30000) at gdk_posix.c:1737
5 0xfffffd7ff5e188a2 in store_manager () at store.c:1533
6 0xfffffd7ff5d8e925 in mvc_logmanager () at sql_mvc.c:151
7 0xfffffd7ff606c377 in wrapper_routine (data=0xfffffd7fffdfe150) at gdk_system.c:559
8 0xfffffd7fff1622ad in _thrp_setup () from /lib/64/libc.so.1
---Type <return> to continue, or q <return> to quit---
9 0xfffffd7fff162550 in ?? () from /lib/64/libc.so.1
10 0x0000000000000000 in ?? ()
Thread 4 (process 220204 ):
0 0xfffffd7fff16b3ea in __pollsys () from /lib/64/libc.so.1
1 0xfffffd7fff1543f5 in _pollsys () from /lib/64/libc.so.1
2 0xfffffd7fff112bed in pselect () from /lib/64/libc.so.1
3 0xfffffd7fff11306c in select () from /lib/64/libc.so.1
4 0xfffffd7ff7ac42bd in SERVERlistenThread (Sock=0x231a920) at mal_mapi.c:215
5 0xfffffd7ff606c377 in wrapper_routine (data=0xfffffd7fffdfe070) at gdk_system.c:559
6 0xfffffd7fff1622ad in _thrp_setup () from /lib/64/libc.so.1
7 0xfffffd7fff162550 in ?? () from /lib/64/libc.so.1
---Type <return> to continue, or q <return> to quit---
8 0x0000000000000000 in ?? ()
Thread 3 (process 154668 ):
0 0xfffffd7fff16b3ea in __pollsys () from /lib/64/libc.so.1
1 0xfffffd7fff1543f5 in _pollsys () from /lib/64/libc.so.1
2 0xfffffd7fff112bed in pselect () from /lib/64/libc.so.1
3 0xfffffd7fff11306c in select () from /lib/64/libc.so.1
4 0xfffffd7ff607021a in MT_sleep_ms (ms=50) at gdk_posix.c:1737
5 0xfffffd7ff5fab0cc in GDKvmtrim (limit=0xfffffd7ff6d988c0) at gdk_utils.c:1136
6 0xfffffd7ff606c377 in wrapper_routine (data=0xfffffd7fffdfee80) at gdk_system.c:559
7 0xfffffd7fff1622ad in _thrp_setup () from /lib/64/libc.so.1
8 0xfffffd7fff162550 in ?? () from /lib/64/libc.so.1
---Type <return> to continue, or q <return> to quit---
9 0x0000000000000000 in ?? ()
Thread 2 (process 89132 ):
0 0xfffffd7fff16b4fa in __read () from /lib/64/libc.so.1
1 0xfffffd7fff152023 in read () from /lib/64/libc.so.1
2 0xfffffd7ffc7b6c02 in rl_getc () from /usr/lib/64/libreadline.so.5
3 0xfffffd7ffc7b6bc6 in rl_read_key () from /usr/lib/64/libreadline.so.5
4 0xfffffd7ffc78afcc in readline_internal_char () from /usr/lib/64/libreadline.so.5
5 0xfffffd7ffc78ab35 in readline () from /usr/lib/64/libreadline.so.5
6 0xfffffd7ff7047f4f in getConsoleInput (c=0xe1f020, prompt=0xe17da0 ">", linemode=0, exit_on_error=1)
at mal_readline.c:333
7 0xfffffd7ff704863d in readConsole (cntxt=0xe1f020) at mal_readline.c:492
---Type <return> to continue, or q <return> to quit---
8 0xfffffd7ff705919d in MALreader (c=0xe1f020) at mal_session.c:501
9 0xfffffd7ff70579f4 in runPhase (c=0xe1f020, phase=0) at mal_scenario.c:522
10 0xfffffd7ff7057b0b in runScenarioBody (c=0xe1f020) at mal_scenario.c:559
11 0xfffffd7ff7057e17 in runScenario (c=0xe1f020) at mal_scenario.c:601
12 0xfffffd7ff7058f36 in MSserveClient (dummy=0xe1f020) at mal_session.c:438
13 0x0000000000404a8d in main (argc=22, av=0xfffffd7fffdffa18) at mserver5.c:596
Thread 1 (process 6118444 ):
0 0xfffffd7ff5e2ce57 in clear_delta (tr=0x25f5900, bat=0x29149e0) at bat_storage.c:1066
1 0xfffffd7ff5e2d056 in clear_col (tr=0x25f5900, c=0x241dc20) at bat_storage.c:1099
2 0xfffffd7ff5e22861 in sql_trans_clear_table (tr=0x25f5900, t=0x241dae0) at store.c:4014
3 0xfffffd7ff5e25f74 in sql_session_reset (s=0x26ecc00, ac=1) at store.c:4816
---Type <return> to continue, or q <return> to quit---
4 0xfffffd7ff5e25de7 in sql_session_create (stk=0, ac=1) at store.c:4783
5 0xfffffd7ff5d8f90a in mvc_create (clientid=3, stk=0, debug=0, rs=0x25e9bd0, ws=0x25d05c0) at sql_mvc.c:435
6 0xfffffd7ff5cf309d in SQLinitClient (c=0xe1f830) at sql_scenario.c:515
7 0xfffffd7ff70579f4 in runPhase (c=0xe1f830, phase=5) at mal_scenario.c:522
8 0xfffffd7ff7057ad6 in runScenarioBody (c=0xe1f830) at mal_scenario.c:556
9 0xfffffd7ff7057e17 in runScenario (c=0xe1f830) at mal_scenario.c:601
10 0xfffffd7ff7058f36 in MSserveClient (dummy=0xe1f830) at mal_session.c:438
11 0xfffffd7ff606c377 in wrapper_routine (data=0xfffffd7ffe1fdc90) at gdk_system.c:559
12 0xfffffd7fff1622ad in _thrp_setup () from /lib/64/libc.so.1
13 0xfffffd7fff162550 in ?? () from /lib/64/libc.so.1
14 0x0000000000000000 in ?? ()
(gdb)
## Comment 17309
Date: 2012-05-30 15:14:19 +0200
From: sgpi <<sgpipub>>
(In reply to comment 41)
the second case
0 0xfffffd7ff5e2ce57 in clear_delta (tr=0x27e1c20, bat=0x2358df0) at bat_storage.c:1066
1066 sz += BATcount(b);
(gdb) bt
0 0xfffffd7ff5e2ce57 in clear_delta (tr=0x27e1c20, bat=0x2358df0) at bat_storage.c:1066
1 0xfffffd7ff5e2d056 in clear_col (tr=0x27e1c20, c=0x2401c20) at bat_storage.c:1099
2 0xfffffd7ff5e22861 in sql_trans_clear_table (tr=0x27e1c20, t=0x2401ae0) at store.c:4014
3 0xfffffd7ff5e25f74 in sql_session_reset (s=0x2779530, ac=1) at store.c:4816
4 0xfffffd7ff5e25de7 in sql_session_create (stk=0, ac=1) at store.c:4783
5 0xfffffd7ff5d8f90a in mvc_create (clientid=3, stk=0, debug=0, rs=0x27d61d0, ws=0x27b2650) at sql_mvc.c:435
6 0xfffffd7ff5cf309d in SQLinitClient (c=0xe19830) at sql_scenario.c:515
7 0xfffffd7ff70579f4 in runPhase (c=0xe19830, phase=5) at mal_scenario.c:522
8 0xfffffd7ff7057ad6 in runScenarioBody (c=0xe19830) at mal_scenario.c:556
9 0xfffffd7ff7057e17 in runScenario (c=0xe19830) at mal_scenario.c:601
10 0xfffffd7ff7058f36 in MSserveClient (dummy=0xe19830) at mal_session.c:438
11 0xfffffd7ff606c377 in wrapper_routine (data=0xfffffd7ffdffdc90) at gdk_system.c:559
12 0xfffffd7fff1622ad in _thrp_setup () from /lib/64/libc.so.1
13 0xfffffd7fff162550 in ?? () from /lib/64/libc.so.1
14 0x0000000000000000 in ?? ()
(gdb) p b
$1 = (BAT *) 0x0
(gdb) p *bat
$2 = {name = 0x2368bc0 "tmp__tables_id", bid = 0, ibase = 0, ibid = 8197, ubid = 0, cnt = 0, cached = 0x0}
(gdb) p BBP[8197/8192][8197%8192]
$3 = {cache = {0x27dca20, 0x27dca48}, logical = {0x23687d0 "tmp_20005", 0x2368800 "tmpr_20005"}, bak = {
0x23687d0 "tmp_20005", 0x0}, next = {0, 0}, desc = 0x27dca20, physical = 0x2368860 "02/00/20005", options = 0x0,
refs = 0, lrefs = 1, lastused = 23411471, status = 1}
(gdb) thread apply all backtrace
Thread 12 (process 4657878 ):
0 0xfffffd7fff162597 in __lwp_park () from /lib/64/libc.so.1
1 0xfffffd7fff159cda in mutex_lock_queue () from /lib/64/libc.so.1
2 0xfffffd7fff15a7ad in mutex_lock_impl () from /lib/64/libc.so.1
3 0xfffffd7fff15a8e4 in pthread_mutex_lock () from /lib/64/libc.so.1
4 0xfffffd7ff698995f in BAThash (b=0xde9e48, masksize=0) at gdk_search.mx:392
5 0xfffffd7ff6918aed in BAT_hashselect (b=0xde9e48, bn=0x27dc820, tl=0x27aa8c0) at gdk_batop.mx:1023
6 0xfffffd7ff692f0ee in BAT_select_ (b=0xde9e20, tl=0x27aa8c0, th=0x27aa8c0, li=1 '\001', hi=1 '\001', tail=0 '\0',
anti=0 '\0', preserve_order=0 '\0') at gdk_batop.mx:1292
7 0xfffffd7ff6930365 in BATuselect (b=0xde9e20, h=0x27aa8c0, t=0x0) at gdk_batop.mx:1383
8 0xfffffd7ff78eb493 in CMDuselect1 (result=0xfffffd7ffd7ff040, b=0xde9e20, value=0x27aa8c0) at algebra.mx:1422
9 0xfffffd7ff78f3947 in ALGuselect1 (result=0x27aa940, bid=0x27aa8f0, value=0x27aa8c0) at algebra.mx:2269
10 0xfffffd7ff70670de in runMALsequence (cntxt=0xe19580, mb=0x27fa100, startpc=1, stoppc=0, stk=0x27aa820, env=0x0,
pcicaller=0x0) at mal_interpreter.mx:1983
11 0xfffffd7ff705c77f in callMAL (cntxt=0xe19580, mb=0x27fa100, env=0xfffffd7ffd7ffcc0, argv=0xfffffd7ffd7ffd60,
debug=0 '\0') at mal_interpreter.mx:422
12 0xfffffd7ff5cf7229 in SQLexecutePrepared (c=0xe19580, be=0x247e0e0, q=0x23165e0) at sql_scenario.c:1703
13 0xfffffd7ff5cf7520 in SQLengineIntern (c=0xe19580, be=0x247e0e0) at sql_scenario.c:1756
14 0xfffffd7ff5cf7b9f in SQLengine (c=0xe19580) at sql_scenario.c:1882
15 0xfffffd7ff70579f4 in runPhase (c=0xe19580, phase=4) at mal_scenario.c:522
16 0xfffffd7ff7057bfd in runScenarioBody (c=0xe19580) at mal_scenario.c:573
17 0xfffffd7ff7057e17 in runScenario (c=0xe19580) at mal_scenario.c:601
18 0xfffffd7ff7058f36 in MSserveClient (dummy=0xe19580) at mal_session.c:438
19 0xfffffd7ff606c377 in wrapper_routine (data=0xfffffd7ffdffdc90) at gdk_system.c:559
20 0xfffffd7fff1622ad in _thrp_setup () from /lib/64/libc.so.1
21 0xfffffd7fff162550 in ?? () from /lib/64/libc.so.1
22 0x0000000000000000 in ?? ()
Thread 11 (process 4592342 ):
0 0xfffffd7ff698a456 in BAThash (b=0xde9e48, masksize=0) at gdk_search.mx:483
1 0xfffffd7ff6918aed in BAT_hashselect (b=0xde9e48, bn=0x27dce20, tl=0x27cb0c0) at gdk_batop.mx:1023
2 0xfffffd7ff692f0ee in BAT_select_ (b=0xde9e20, tl=0x27cb0c0, th=0x27cb0c0, li=1 '\001', hi=1 '\001', tail=0 '\0',
anti=0 '\0', preserve_order=0 '\0') at gdk_batop.mx:1292
3 0xfffffd7ff6930365 in BATuselect (b=0xde9e20, h=0x27cb0c0, t=0x0) at gdk_batop.mx:1383
4 0xfffffd7ff78eb493 in CMDuselect1 (result=0xfffffd7ffd3ff040, b=0xde9e20, value=0x27cb0c0) at algebra.mx:1422
5 0xfffffd7ff78f3947 in ALGuselect1 (result=0x27cb140, bid=0x27cb0f0, value=0x27cb0c0) at algebra.mx:2269
6 0xfffffd7ff70670de in runMALsequence (cntxt=0xe192d0, mb=0x27fa1e0, startpc=1, stoppc=0, stk=0x27cb020, env=0x0,
---Type <return> to continue, or q <return> to quit---
pcicaller=0x0) at mal_interpreter.mx:1983
7 0xfffffd7ff705c77f in callMAL (cntxt=0xe192d0, mb=0x27fa1e0, env=0xfffffd7ffd3ffcc0, argv=0xfffffd7ffd3ffd60,
debug=0 '\0') at mal_interpreter.mx:422
8 0xfffffd7ff5cf7229 in SQLexecutePrepared (c=0xe192d0, be=0x247e560, q=0x27b23e0) at sql_scenario.c:1703
9 0xfffffd7ff5cf7520 in SQLengineIntern (c=0xe192d0, be=0x247e560) at sql_scenario.c:1756
10 0xfffffd7ff5cf7b9f in SQLengine (c=0xe192d0) at sql_scenario.c:1882
11 0xfffffd7ff70579f4 in runPhase (c=0xe192d0, phase=4) at mal_scenario.c:522
12 0xfffffd7ff7057bfd in runScenarioBody (c=0xe192d0) at mal_scenario.c:573
13 0xfffffd7ff7057e17 in runScenario (c=0xe192d0) at mal_scenario.c:601
14 0xfffffd7ff7058f36 in MSserveClient (dummy=0xe192d0) at mal_session.c:438
15 0xfffffd7ff606c377 in wrapper_routine (data=0xfffffd7ffdffdc90) at gdk_system.c:559
16 0xfffffd7fff1622ad in _thrp_setup () from /lib/64/libc.so.1
17 0xfffffd7fff162550 in ?? () from /lib/64/libc.so.1
18 0x0000000000000000 in ?? ()
Thread 10 (process 2036438 ):
0 0xfffffd7fff162597 in __lwp_park () from /lib/64/libc.so.1
1 0xfffffd7fff15553a in sema_wait_impl () from /lib/64/libc.so.1
2 0xfffffd7fff1556c0 in sema_wait () from /lib/64/libc.so.1
3 0xfffffd7fff14a0cc in sem_wait () from /lib/64/libc.so.1
4 0xfffffd7ff70753a1 in q_dequeue (q=0x14efee0) at mal_interpreter.mx:865
5 0xfffffd7ff707cf2d in runDFLOWworker (t=0x27a8e18) at mal_interpreter.mx:1068
6 0xfffffd7ff606c377 in wrapper_routine (data=0xfffffd7ffd3fee90) at gdk_system.c:559
7 0xfffffd7fff1622ad in _thrp_setup () from /lib/64/libc.so.1
8 0xfffffd7fff162550 in ?? () from /lib/64/libc.so.1
9 0x0000000000000000 in ?? ()
Thread 9 (process 1970902 ):
0 0xfffffd7fff162597 in __lwp_park () from /lib/64/libc.so.1
1 0xfffffd7fff15553a in sema_wait_impl () from /lib/64/libc.so.1
2 0xfffffd7fff1556c0 in sema_wait () from /lib/64/libc.so.1
3 0xfffffd7fff14a0cc in sem_wait () from /lib/64/libc.so.1
4 0xfffffd7ff70753a1 in q_dequeue (q=0x14efee0) at mal_interpreter.mx:865
5 0xfffffd7ff707cf2d in runDFLOWworker (t=0x27a8df0) at mal_interpreter.mx:1068
6 0xfffffd7ff606c377 in wrapper_routine (data=0xfffffd7ffd3fee90) at gdk_system.c:559
7 0xfffffd7fff1622ad in _thrp_setup () from /lib/64/libc.so.1
8 0xfffffd7fff162550 in ?? () from /lib/64/libc.so.1
9 0x0000000000000000 in ?? ()
---Type <return> to continue, or q <return> to quit---
Thread 8 (process 1905366 ):
0 0xfffffd7fff162597 in __lwp_park () from /lib/64/libc.so.1
1 0xfffffd7fff15553a in sema_wait_impl () from /lib/64/libc.so.1
2 0xfffffd7fff1556c0 in sema_wait () from /lib/64/libc.so.1
3 0xfffffd7fff14a0cc in sem_wait () from /lib/64/libc.so.1
4 0xfffffd7ff70753a1 in q_dequeue (q=0x14efee0) at mal_interpreter.mx:865
5 0xfffffd7ff707cf2d in runDFLOWworker (t=0x27a8dc8) at mal_interpreter.mx:1068
6 0xfffffd7ff606c377 in wrapper_routine (data=0xfffffd7ffd3fee90) at gdk_system.c:559
7 0xfffffd7fff1622ad in _thrp_setup () from /lib/64/libc.so.1
8 0xfffffd7fff162550 in ?? () from /lib/64/libc.so.1
9 0x0000000000000000 in ?? ()
Thread 7 (process 1839830 ):
0 0xfffffd7fff162597 in __lwp_park () from /lib/64/libc.so.1
1 0xfffffd7fff15553a in sema_wait_impl () from /lib/64/libc.so.1
2 0xfffffd7fff1556c0 in sema_wait () from /lib/64/libc.so.1
3 0xfffffd7fff14a0cc in sem_wait () from /lib/64/libc.so.1
4 0xfffffd7ff70753a1 in q_dequeue (q=0x14efee0) at mal_interpreter.mx:865
5 0xfffffd7ff707cf2d in runDFLOWworker (t=0x27a8da0) at mal_interpreter.mx:1068
6 0xfffffd7ff606c377 in wrapper_routine (data=0xfffffd7ffd3fee90) at gdk_system.c:559
7 0xfffffd7fff1622ad in _thrp_setup () from /lib/64/libc.so.1
8 0xfffffd7fff162550 in ?? () from /lib/64/libc.so.1
9 0x0000000000000000 in ?? ()
Thread 6 (process 660182 ):
0 0xfffffd7fff16b3ea in __pollsys () from /lib/64/libc.so.1
1 0xfffffd7fff1543f5 in _pollsys () from /lib/64/libc.so.1
2 0xfffffd7fff112bed in pselect () from /lib/64/libc.so.1
3 0xfffffd7fff11306c in select () from /lib/64/libc.so.1
4 0xfffffd7ff607021a in MT_sleep_ms (ms=30000) at gdk_posix.c:1737
5 0xfffffd7ff5e188a2 in store_manager () at store.c:1533
6 0xfffffd7ff5d8e925 in mvc_logmanager () at sql_mvc.c:151
7 0xfffffd7ff606c377 in wrapper_routine (data=0xfffffd7fffdfe120) at gdk_system.c:559
8 0xfffffd7fff1622ad in _thrp_setup () from /lib/64/libc.so.1
9 0xfffffd7fff162550 in ?? () from /lib/64/libc.so.1
10 0x0000000000000000 in ?? ()
---Type <return> to continue, or q <return> to quit---
Thread 5 (process 266966 ):
0 0xfffffd7fff16b3ea in __pollsys () from /lib/64/libc.so.1
1 0xfffffd7fff1543f5 in _pollsys () from /lib/64/libc.so.1
2 0xfffffd7fff112bed in pselect () from /lib/64/libc.so.1
3 0xfffffd7fff11306c in select () from /lib/64/libc.so.1
4 0xfffffd7ff7ac42bd in SERVERlistenThread (Sock=0x2158920) at mal_mapi.c:215
5 0xfffffd7ff606c377 in wrapper_routine (data=0xfffffd7fffdfe040) at gdk_system.c:559
6 0xfffffd7fff1622ad in _thrp_setup () from /lib/64/libc.so.1
7 0xfffffd7fff162550 in ?? () from /lib/64/libc.so.1
8 0x0000000000000000 in ?? ()
Thread 4 (process 201430 ):
0 0xfffffd7fff162597 in __lwp_park () from /lib/64/libc.so.1
1 0xfffffd7fff15bcf0 in cond_sleep_queue () from /lib/64/libc.so.1
2 0xfffffd7fff15bfae in cond_wait_queue () from /lib/64/libc.so.1
3 0xfffffd7fff15c3ec in cond_wait_common () from /lib/64/libc.so.1
4 0xfffffd7fff15c67b in __cond_timedwait () from /lib/64/libc.so.1
5 0xfffffd7fff15c6c5 in cond_timedwait () from /lib/64/libc.so.1
6 0xfffffd7ffe6c3b68 in umem_update_thread () from /lib/64/libumem.so.1
7 0xfffffd7fff1622ad in _thrp_setup () from /lib/64/libc.so.1
8 0xfffffd7fff162550 in ?? () from /lib/64/libc.so.1
9 0x0000000000000000 in ?? ()
Thread 3 (process 135894 ):
0 0xfffffd7fff16b3ea in __pollsys () from /lib/64/libc.so.1
1 0xfffffd7fff1543f5 in _pollsys () from /lib/64/libc.so.1
2 0xfffffd7fff112bed in pselect () from /lib/64/libc.so.1
3 0xfffffd7fff11306c in select () from /lib/64/libc.so.1
4 0xfffffd7ff607021a in MT_sleep_ms (ms=50) at gdk_posix.c:1737
5 0xfffffd7ff5fab0cc in GDKvmtrim (limit=0xfffffd7ff6d988c0) at gdk_utils.c:1136
6 0xfffffd7ff606c377 in wrapper_routine (data=0xfffffd7fffdfee50) at gdk_system.c:559
7 0xfffffd7fff1622ad in _thrp_setup () from /lib/64/libc.so.1
8 0xfffffd7fff162550 in ?? () from /lib/64/libc.so.1
9 0x0000000000000000 in ?? ()
Thread 2 (process 70358 ):
0 0xfffffd7fff16b3ea in __pollsys () from /lib/64/libc.so.1
1 0xfffffd7fff1543f5 in _pollsys () from /lib/64/libc.so.1
---Type <return> to continue, or q <return> to quit---
2 0xfffffd7fff112bed in pselect () from /lib/64/libc.so.1
3 0xfffffd7fff11306c in select () from /lib/64/libc.so.1
4 0xfffffd7ff607021a in MT_sleep_ms (ms=5000) at gdk_posix.c:1737
5 0x0000000000404aa3 in main (argc=22, av=0xfffffd7fffdff9e8) at mserver5.c:600
Thread 1 (process 4723414 ):
0 0xfffffd7ff5e2ce57 in clear_delta (tr=0x27e1c20, bat=0x2358df0) at bat_storage.c:1066
1 0xfffffd7ff5e2d056 in clear_col (tr=0x27e1c20, c=0x2401c20) at bat_storage.c:1099
2 0xfffffd7ff5e22861 in sql_trans_clear_table (tr=0x27e1c20, t=0x2401ae0) at store.c:4014
3 0xfffffd7ff5e25f74 in sql_session_reset (s=0x2779530, ac=1) at store.c:4816
4 0xfffffd7ff5e25de7 in sql_session_create (stk=0, ac=1) at store.c:4783
5 0xfffffd7ff5d8f90a in mvc_create (clientid=3, stk=0, debug=0, rs=0x27d61d0, ws=0x27b2650) at sql_mvc.c:435
6 0xfffffd7ff5cf309d in SQLinitClient (c=0xe19830) at sql_scenario.c:515
7 0xfffffd7ff70579f4 in runPhase (c=0xe19830, phase=5) at mal_scenario.c:522
8 0xfffffd7ff7057ad6 in runScenarioBody (c=0xe19830) at mal_scenario.c:556
9 0xfffffd7ff7057e17 in runScenario (c=0xe19830) at mal_scenario.c:601
10 0xfffffd7ff7058f36 in MSserveClient (dummy=0xe19830) at mal_session.c:438
11 0xfffffd7ff606c377 in wrapper_routine (data=0xfffffd7ffdffdc90) at gdk_system.c:559
12 0xfffffd7fff1622ad in _thrp_setup () from /lib/64/libc.so.1
13 0xfffffd7fff162550 in ?? () from /lib/64/libc.so.1
14 0x0000000000000000 in ?? ()
## Comment 17310
Date: 2012-05-30 15:16:15 +0200
From: @mlkersten
Is the problem reproducable when you deploy the minimal_pipe optimizer?
## Comment 17312
Date: 2012-05-30 15:58:15 +0200
From: sgpi <<sgpipub>>
(In reply to comment 43)
> Is the problem reproducable when you deploy the minimal_pipe optimizer?
Yes, it is.
## Comment 17313
Date: 2012-05-30 16:00:36 +0200
From: @sjoerdmullender
One more value: what is BBPsize?
## Comment 17314
Date: 2012-05-30 16:54:58 +0200
From: sgpi <<sgpipub>>
(In reply to comment 45)
> One more value: what is BBPsize?
(gdb) bt
0 0xfffffd7ff5e2ce57 in clear_delta (tr=0x264c990, bat=0x1037170) at bat_storage.c:1066
1 0xfffffd7ff5e2d056 in clear_col (tr=0x264c990, c=0x28a4c20) at bat_storage.c:1099
2 0xfffffd7ff5e22861 in sql_trans_clear_table (tr=0x264c990, t=0x28a4ae0) at store.c:4014
3 0xfffffd7ff5e25f74 in sql_session_reset (s=0x25d6590, ac=1) at store.c:4816
4 0xfffffd7ff5e25de7 in sql_session_create (stk=0, ac=1) at store.c:4783
5 0xfffffd7ff5d8f90a in mvc_create (clientid=2, stk=0, debug=0, rs=0x26bf990, ws=0x264cd40) at sql_mvc.c:435
6 0xfffffd7ff5cf309d in SQLinitClient (c=0xe26580) at sql_scenario.c:515
7 0xfffffd7ff70579f4 in runPhase (c=0xe26580, phase=5) at mal_scenario.c:522
8 0xfffffd7ff7057ad6 in runScenarioBody (c=0xe26580) at mal_scenario.c:556
9 0xfffffd7ff7057e17 in runScenario (c=0xe26580) at mal_scenario.c:601
10 0xfffffd7ff7058f36 in MSserveClient (dummy=0xe26580) at mal_session.c:438
11 0xfffffd7ff606c377 in wrapper_routine (data=0xfffffd7ffdffdc90) at gdk_system.c:559
12 0xfffffd7fff1622ad in _thrp_setup () from /lib/64/libc.so.1
13 0xfffffd7fff162550 in ?? () from /lib/64/libc.so.1
14 0x0000000000000000 in ?? ()
(gdb) p b
$2 = (BAT *) 0x0
(gdb) p *bat
$3 = {name = 0x26b5cb0 "tmp__tables_id", bid = 0, ibase = 0, ibid = 8205, ubid = 0, cnt = 0, cached = 0x0}
(gdb) p BBP[8205/8192][8205%8192]
$4 = {cache = {0x2680020, 0x2680048}, logical = {0x1e585c0 "tmp_20015", 0x25683e0 "tmpr_20015"}, bak = {
0x1e585c0 "tmp_20015", 0x0}, next = {0, 0}, desc = 0x2680020, physical = 0x25f03e0 "02/00/20015", options = 0x0,
refs = 0, lrefs = 1, lastused = 23540050, status = 1}
(gdb) p BBPsize
$5 = 8246
(gdb) thread apply all backtrace
Thread 7 (process 5903962 ):
0 0xfffffd7ff6bb0872 in batfetchjoin (l=0x25f6448, r=0x2585e20, estimate=453, swap=0 '\0', hitalways=0 '\0')
at gdk_relop.mx:856
1 0xfffffd7ff6bbb11e in batjoin (l=0x25f6448, r=0x2585e20, estimate=9223372036854775807, swap=0 '\0')
at gdk_relop.mx:1486
2 0xfffffd7ff6bbb476 in BATleftjoin (l=0x25f6448, r=0x2585e20, estimate=9223372036854775807) at gdk_relop.mx:1544
3 0xfffffd7ff78ec5ec in CMDleftjoin (result=0xfffffd7ffd7fefe0, left=0x25f6448, right=0x2585e20,
estimate=0xfffffd7ffd7ff040) at algebra.mx:1560
4 0xfffffd7ff78f6e1c in ALGleftjoinestimate (result=0x107f350, lid=0x107f2d0, rid=0x107f340,
estimate=0xfffffd7ffd7ff040) at algebra.mx:2796
5 0xfffffd7ff78f6f98 in ALGleftjoin (result=0x107f350, lid=0x107f2d0, rid=0x107f340) at algebra.mx:2816
6 0xfffffd7ff70670de in runMALsequence (cntxt=0xe262d0, mb=0x26ec9c0, startpc=1, stoppc=0, stk=0x107f060, env=0x0,
pcicaller=0x0) at mal_interpreter.mx:1983
7 0xfffffd7ff705c77f in callMAL (cntxt=0xe262d0, mb=0x26ec9c0, env=0xfffffd7ffd7ffcc0, argv=0xfffffd7ffd7ffd60,
debug=0 '\0') at mal_interpreter.mx:422
8 0xfffffd7ff5cf7229 in SQLexecutePrepared (c=0xe262d0, be=0x2358b60, q=0x264cad0) at sql_scenario.c:1703
9 0xfffffd7ff5cf7520 in SQLengineIntern (c=0xe262d0, be=0x2358b60) at sql_scenario.c:1756
10 0xfffffd7ff5cf7b9f in SQLengine (c=0xe262d0) at sql_scenario.c:1882
11 0xfffffd7ff70579f4 in runPhase (c=0xe262d0, phase=4) at mal_scenario.c:522
12 0xfffffd7ff7057bfd in runScenarioBody (c=0xe262d0) at mal_scenario.c:573
13 0xfffffd7ff7057e17 in runScenario (c=0xe262d0) at mal_scenario.c:601
14 0xfffffd7ff7058f36 in MSserveClient (dummy=0xe262d0) at mal_session.c:438
15 0xfffffd7ff606c377 in wrapper_routine (data=0xfffffd7ffdffdc90) at gdk_system.c:559
16 0xfffffd7fff1622ad in _thrp_setup () from /lib/64/libc.so.1
17 0xfffffd7fff162550 in ?? () from /lib/64/libc.so.1
18 0x0000000000000000 in ?? ()
Thread 6 (process 333402 ):
0 0xfffffd7fff16b3ea in __pollsys () from /lib/64/libc.so.1
1 0xfffffd7fff1543f5 in _pollsys () from /lib/64/libc.so.1
2 0xfffffd7fff112bed in pselect () from /lib/64/libc.so.1
3 0xfffffd7fff11306c in select () from /lib/64/libc.so.1
4 0xfffffd7ff607021a in MT_sleep_ms (ms=30000) at gdk_posix.c:1737
5 0xfffffd7ff5e188a2 in store_manager () at store.c:1533
6 0xfffffd7ff5d8e925 in mvc_logmanager () at sql_mvc.c:151
7 0xfffffd7ff606c377 in wrapper_routine (data=0xfffffd7fffdfe150) at gdk_system.c:559
8 0xfffffd7fff1622ad in _thrp_setup () from /lib/64/libc.so.1
9 0xfffffd7fff162550 in ?? () from /lib/64/libc.so.1
10 0x0000000000000000 in ?? ()
Thread 5 (process 267866 ):
0 0xfffffd7fff16b3ea in __pollsys () from /lib/64/libc.so.1
1 0xfffffd7fff1543f5 in _pollsys () from /lib/64/libc.so.1
2 0xfffffd7fff112bed in pselect () from /lib/64/libc.so.1
3 0xfffffd7fff11306c in select () from /lib/64/libc.so.1
4 0xfffffd7ff7ac42bd in SERVERlistenThread (Sock=0x20ce920) at mal_mapi.c:215
5 0xfffffd7ff606c377 in wrapper_routine (data=0xfffffd7fffdfe070) at gdk_system.c:559
6 0xfffffd7fff1622ad in _thrp_setup () from /lib/64/libc.so.1
7 0xfffffd7fff162550 in ?? () from /lib/64/libc.so.1
8 0x0000000000000000 in ?? ()
---Type <return> to continue, or q <return> to quit---
Thread 4 (process 202330 ):
0 0xfffffd7fff162597 in __lwp_park () from /lib/64/libc.so.1
1 0xfffffd7fff15bcf0 in cond_sleep_queue () from /lib/64/libc.so.1
2 0xfffffd7fff15bfae in cond_wait_queue () from /lib/64/libc.so.1
3 0xfffffd7fff15c3ec in cond_wait_common () from /lib/64/libc.so.1
4 0xfffffd7fff15c67b in __cond_timedwait () from /lib/64/libc.so.1
5 0xfffffd7fff15c6c5 in cond_timedwait () from /lib/64/libc.so.1
6 0xfffffd7ffe6c3b68 in umem_update_thread () from /lib/64/libumem.so.1
7 0xfffffd7fff1622ad in _thrp_setup () from /lib/64/libc.so.1
8 0xfffffd7fff162550 in ?? () from /lib/64/libc.so.1
9 0x0000000000000000 in ?? ()
Thread 3 (process 136794 ):
0 0xfffffd7fff16b3ea in __pollsys () from /lib/64/libc.so.1
1 0xfffffd7fff1543f5 in _pollsys () from /lib/64/libc.so.1
2 0xfffffd7fff112bed in pselect () from /lib/64/libc.so.1
3 0xfffffd7fff11306c in select () from /lib/64/libc.so.1
4 0xfffffd7ff607021a in MT_sleep_ms (ms=50) at gdk_posix.c:1737
5 0xfffffd7ff5fab0cc in GDKvmtrim (limit=0xfffffd7ff6d988c0) at gdk_utils.c:1136
6 0xfffffd7ff606c377 in wrapper_routine (data=0xfffffd7fffdfee80) at gdk_system.c:559
7 0xfffffd7fff1622ad in _thrp_setup () from /lib/64/libc.so.1
8 0xfffffd7fff162550 in ?? () from /lib/64/libc.so.1
9 0x0000000000000000 in ?? ()
Thread 2 (process 71258 ):
0 0xfffffd7fff16b4fa in __read () from /lib/64/libc.so.1
1 0xfffffd7fff152023 in read () from /lib/64/libc.so.1
2 0xfffffd7ffc7b6c02 in rl_getc () from /usr/lib/64/libreadline.so.5
3 0xfffffd7ffc7b6bc6 in rl_read_key () from /usr/lib/64/libreadline.so.5
4 0xfffffd7ffc78afcc in readline_internal_char () from /usr/lib/64/libreadline.so.5
5 0xfffffd7ffc78ab35 in readline () from /usr/lib/64/libreadline.so.5
6 0xfffffd7ff7047f4f in getConsoleInput (c=0xe26020, prompt=0xe17da0 ">", linemode=0, exit_on_error=1)
at mal_readline.c:333
7 0xfffffd7ff704863d in readConsole (cntxt=0xe26020) at mal_readline.c:492
8 0xfffffd7ff705919d in MALreader (c=0xe26020) at mal_session.c:501
9 0xfffffd7ff70579f4 in runPhase (c=0xe26020, phase=0) at mal_scenario.c:522
10 0xfffffd7ff7057b0b in runScenarioBody (c=0xe26020) at mal_scenario.c:559
11 0xfffffd7ff7057e17 in runScenario (c=0xe26020) at mal_scenario.c:601
12 0xfffffd7ff7058f36 in MSserveClient (dummy=0xe26020) at mal_session.c:438
13 0x0000000000404a8d in main (argc=22, av=0xfffffd7fffdffa18) at mserver5.c:596
Thread 1 (process 5969498 ):
0 0xfffffd7ff5e2ce57 in clear_delta (tr=0x264c990, bat=0x1037170) at bat_storage.c:1066
1 0xfffffd7ff5e2d056 in clear_col (tr=0x264c990, c=0x28a4c20) at bat_storage.c:1099
2 0xfffffd7ff5e22861 in sql_trans_clear_table (tr=0x264c990, t=0x28a4ae0) at store.c:4014
3 0xfffffd7ff5e25f74 in sql_session_reset (s=0x25d6590, ac=1) at store.c:4816
4 0xfffffd7ff5e25de7 in sql_session_create (stk=0, ac=1) at store.c:4783
5 0xfffffd7ff5d8f90a in mvc_create (clientid=2, stk=0, debug=0, rs=0x26bf990, ws=0x264cd40) at sql_mvc.c:435
6 0xfffffd7ff5cf309d in SQLinitClient (c=0xe26580) at sql_scenario.c:515
7 0xfffffd7ff70579f4 in runPhase (c=0xe26580, phase=5) at mal_scenario.c:522
---Type <return> to continue, or q <return> to quit---
8 0xfffffd7ff7057ad6 in runScenarioBody (c=0xe26580) at mal_scenario.c:556
9 0xfffffd7ff7057e17 in runScenario (c=0xe26580) at mal_scenario.c:601
10 0xfffffd7ff7058f36 in MSserveClient (dummy=0xe26580) at mal_session.c:438
11 0xfffffd7ff606c377 in wrapper_routine (data=0xfffffd7ffdffdc90) at gdk_system.c:559
12 0xfffffd7fff1622ad in _thrp_setup () from /lib/64/libc.so.1
13 0xfffffd7fff162550 in ?? () from /lib/64/libc.so.1
14 0x0000000000000000 in ?? ()
## Comment 17315
Date: 2012-05-31 10:31:26 +0200
From: @sjoerdmullender
Do you have any GLOBAL TEMPORARY tables in your schema?
It looks like the crash happens inside the code that cleans those up.
What is the other thread doing at the time of the crash? Did it (or any other thread you may have had) do anything with any of those temporary tables (assuming the first question is answered affirmatively)?
## Comment 17316
Date: 2012-05-31 11:57:22 +0200
From: sgpi <<sgpipub>>
(In reply to comment 47)
> Do you have any GLOBAL TEMPORARY tables in your schema?
> It looks like the crash happens inside the code that cleans those up.
> What is the other thread doing at the time of the crash? Did it (or any other
> thread you may have had) do anything with any of those temporary tables
> (assuming the first question is answered affirmatively)?
I have no global temporary tables (btw. how to check this for sure?), other thread is a simple point select.
## Comment 17317
Date: 2012-05-31 15:22:34 +0200
From: @sjoerdmullender
(In reply to comment 48)
> (In reply to comment 47)
> > Do you have any GLOBAL TEMPORARY tables in your schema?
> > It looks like the crash happens inside the code that cleans those up.
> > What is the other thread doing at the time of the crash? Did it (or any other
> > thread you may have had) do anything with any of those temporary tables
> > (assuming the first question is answered affirmatively)?
>
> I have no global temporary tables (btw. how to check this for sure?), other
> thread is a simple point select.
The answer was actually already in some of the previous comments. The bat involved is the insertions bat (bat->ibid) for the id column in the tmp._tables table (bat->name == "tmp__tables_id").
To answer your question, you can see global temporary tables with the query
select * from sys.tables where schema_id = (select id from sys.schemas where name = 'tmp');
The tables with the names _tables, _columns, keys, idxs, triggers, and objects are created by the system.
Unfortunately, having the answer doesn't bring me any closer to the solution.
## Comment 17319
Date: 2012-05-31 16:04:29 +0200
From: @sjoerdmullender
Let's keep this bug focused on the memory management issues. The discussion about the crash when attaching a new client can be continued in bug #3094.
## Comment 17321
Date: 2012-05-31 19:36:51 +0200
From: sgpi <<sgpipub>>
(In reply to comment 50)
> Let's keep this bug focused on the memory management issues. The discussion
> about the crash when attaching a new client can be continued in bug #3094.
OK, I have few additional questions in the memory/hash management area
1. Reusing temp hashes
When mserver5 starts it cleans some temp files but no .thash files.
Is it possible to reuse this hash data by server? It seems that it always generates new hash, even if .thash file already exists (and was generated by previous server instance).
2. What exactly is the index in MonetDB?
Is it hint to create hash? I see no difference in terms of performance whether the index is present or not.
Worse that I managed somehow to create duplicated indexes (id) and mclient's describe command is inconsistent with results of the below query:
sql>select * from idxs i,_tables t where t.id=i.table_id order by i.id,table_id;
+------+----------+------+----------------------+------+--------------+-----------+-------+------+--------+---------------+----------+
| id | table_id | type | name | id | name | schema_id | query | type | system | commit_action | readonly |
+======+==========+======+======================+======+==============+===========+=======+======+========+===============+==========+
| 5201 | 5207 | 0 | queryhistory_id_pkey | 5207 | queryhistory | 2000 | null | 0 | true | 0 | false |
| 5211 | 5221 | 1 | callhistory_id_fkey | 5221 | callhistory | 2000 | null | 0 | true | 0 | false |
| 6580 | 5924 | 0 | test | 5924 | B20120219 | 2000 | null | 0 | false | 0 | false |
| 6580 | 5924 | 0 | test | 5924 | B20120219 | 2000 | null | 0 | false | 0 | false |
| 6581 | 6404 | 0 | test29 | 6404 | B20120229 | 2000 | null | 0 | false | 0 | false |
| 6581 | 6404 | 0 | test29 | 6404 | B20120229 | 2000 | null | 0 | false | 0 | false |
| 6582 | 6356 | 0 | test28 | 6356 | B20120228 | 2000 | null | 0 | false | 0 | false |
| 6583 | 6308 | 0 | test27 | 6308 | B20120227 | 2000 | null | 0 | false | 0 | false |
| 6584 | 5876 | 0 | test18 | 5876 | B20120218 | 2000 | null | 0 | false | 0 | false |
+------+----------+------+----------------------+------+--------------+-----------+-------+------+--------+---------------+----------+
9 tuples (11.615ms)
sql>select * from storage() where "table"='B20120219';
+--------+-----------+---------------------+-------------+---------+----------+-------+----------+----------+--------+
| schema | table | column | location | count | capacity | width | size | hashsize | sorted |
+========+===========+=====================+=============+=========+==========+=======+==========+==========+========+
...
| sys | B20120219 | test | 01/71/17122 | 4990260 | 4997120 | 8 | 39976960 | 0 | true |
| sys | B20120219 | test | 01/71/17122 | 4990260 | 4997120 | 8 | 39976960 | 0 | true |
+--------+-----------+---------------------+-------------+---------+----------+-------+----------+----------+--------+
48 tuples (1.1s)
sql>\d "sys.B20120219"
CREATE TABLE "sys"."B20120219" (
...
"TEST_ID" INTEGER,
...
);
CREATE INDEX "test" ON "sys"."B20120219" ("TEST_ID");
CREATE INDEX "test" ON "sys"."B20120219" ("TEST_ID");
CREATE INDEX "test" ON "sys"."B20120219" ("TEST_ID");
CREATE INDEX "test" ON "sys"."B20120219" ("TEST_ID");
sql>
Why 4?
I see bat file 01/71/17122.tail but I don't know when it may be used.
Execution plan prints some info on this index but I don't know how to read this correctly.
sql>plan select count(*) from "B20120227" where "CDR_ID"=231;
+----------------------------------------------------------------------------------------------------------------------------------------------+
| rel |
+==============================================================================================================================================+
| project ( |
| | group by ( |
| | | select ( |
| | | | table(sys.B20120227) [ B20120227.COL1, B20120227.TEST_ID, B20120227.%TID% NOT NULL, B20120227.%test27 NOT NULL HASHIDX ] COUNT |
| | | ) [ B20120227.TEST_ID = int[smallint "231"] ] |
| | ) [ ] [ sys.count() NOT NULL as L1 ] |
| ) [ L1 NOT NULL ] |
+----------------------------------------------------------------------------------------------------------------------------------------------+
3. I observed that inserting new records to table removes hashes from that table. Is it true?
## Comment 17322
Date: 2012-05-31 19:55:44 +0200
From: sgpi <<sgpipub>>
(In reply to comment 51)
> 3. I observed that inserting new records to table removes hashes from that
> table. Is it true?
When I tried to do some testing for this behaviour I hit another bug.
sql>select count(*) from "B20120224" where "TEST_ID"=231;
+------+
| L1 |
+======+
| 0 |
+------+
1 tuple (4.9s) <<< creating hash
sql>select count(*) from "B20120224" where "TEST_ID"=4294569;
+------+
| L1 |
+======+
| 1 |
+------+
1 tuple (2.536ms) <<< hash used
sql>create table t24 as select * from "B20120224" limit 10 with data;
operation successful (857.827ms)
sql>select count(*) from t24;
+------+
| L1 |
+======+
| 10 |
+------+
1 tuple (2.534ms)
sql>insert into "B20120224" select * from t24;
Object not found <<< Is this expected ??? I have to list all columns, right?
sql>insert into "B20120224" ("COL_1","TEST_ID") select "COL_1","TEST_ID" from t24;
...
ERROR = !Connection terminated
0 0xfffffd7ff690754d in BATappend (b=0x287e920, n=0x267ce20, force=1 '\001') at gdk_batop.mx:459
459 ALIGNapp(b, "BATappend", force);
(gdb) bt
0 0xfffffd7ff690754d in BATappend (b=0x287e920, n=0x267ce20, force=1 '\001') at gdk_batop.mx:459
1 0xfffffd7ff5e2a0ea in delta_append_bat (bat=0x24fe5e0, i=0x267ce20) at bat_storage.c:274
2 0xfffffd7ff5e2a2ee in append_col (tr=0x2489e80, c=0x24e9a40, i=0x267ce20, tpe=4) at bat_storage.c:307
3 0xfffffd7ff5d0e99c in mvc_append_wrap (cntxt=0xe262d0, mb=0x255e020, stk=0x278d020, pci=0x278f0a0) at sql.mx:3200
4 0xfffffd7ff7065dcb in runMALsequence (cntxt=0xe262d0, mb=0x255e020, startpc=1, stoppc=0, stk=0x278d020, env=0x0, pcicaller=0x0) at mal_interpreter.mx:2158
5 0xfffffd7ff705c77f in callMAL (cntxt=0xe262d0, mb=0x255e020, env=0xfffffd7ffd7ffcc0, argv=0xfffffd7ffd7ffd60, debug=0 '\0') at mal_interpreter.mx:422
6 0xfffffd7ff5cf7229 in SQLexecutePrepared (c=0xe262d0, be=0x1491620, q=0x2489de0) at sql_scenario.c:1703
7 0xfffffd7ff5cf7520 in SQLengineIntern (c=0xe262d0, be=0x1491620) at sql_scenario.c:1756
8 0xfffffd7ff5cf7b9f in SQLengine (c=0xe262d0) at sql_scenario.c:1882
9 0xfffffd7ff70579f4 in runPhase (c=0xe262d0, phase=4) at mal_scenario.c:522
10 0xfffffd7ff7057bfd in runScenarioBody (c=0xe262d0) at mal_scenario.c:573
11 0xfffffd7ff7057e17 in runScenario (c=0xe262d0) at mal_scenario.c:601
12 0xfffffd7ff7058f36 in MSserveClient (dummy=0xe262d0) at mal_session.c:438
13 0xfffffd7ff606c377 in wrapper_routine (data=0xfffffd7ffdffdc90) at gdk_system.c:559
14 0xfffffd7fff1622ad in _thrp_setup () from /lib/64/libc.so.1
15 0xfffffd7fff162550 in ?? () from /lib/64/libc.so.1
16 0x0000000000000000 in ?? ()
(gdb) p b
$1 = (BAT *) 0x287e920
(gdb) p *b
$2 = {batCacheid = 1601203572, H = 0xdbdbdbdbdbdb0033, T = 0xdbdbdbdbdbdbdbdb, P = 0x16ba6fd000000030,
U = 0xdbdbdbdbdbdbdbdb}
(gdb) p *n
$3 = {batCacheid = 8030, H = 0x267ce70, T = 0x267cf00, P = 0x267cf90, U = 0x267cfa8}
## Comment 17323
Date: 2012-06-01 10:53:07 +0200
From: @sjoerdmullender
(In reply to comment 52)
> (gdb) p *b
> $2 = {batCacheid = 1601203572, H = 0xdbdbdbdbdbdb0033, T = 0xdbdbdbdbdbdbdbdb,
> P = 0x16ba6fd000000030,
> U = 0xdbdbdbdbdbdbdbdb}
I haven't analyzed any of this, but these pointer values point out something important: b points to memory that has been freed. The 0xdb pattern is written by GDKfree just before the memory is handed over to the system free(). (GDKmalloc writes 0xbd to just allocated memory to catch bugs when memory is not initialized.)
Together with what's now bug #3094, I'm seriously starting to worry about whether locking works on Solaris, or whether there are other compiler issues.
In both cases, the value for b is the result of a call
b = temp_descriptor(bat->ibid);
This increments the reference count on the bat identified by the argument, makes sure the bat is loaded into memory, and then returns a pointer to it. The reference counting is done while locked. If given a valid argument, and if there is still memory left to be allocated, this should not return NULL, and it should absolutely never return a pointer to already freed memory.
What is the value of *bat, and again the value of BBP[n/8192][n%8192] with n=ABS(bat->ibid)? Also, what is the value of *BBP[n/8192][n%8192].desc?
## Comment 17324
Date: 2012-06-01 11:01:53 +0200
From: @mlkersten
is it possible to run the experiment with valgrind?
That could indicate the location of the free and the unexpected access
## Comment 17325
Date: 2012-06-01 11:03:57 +0200
From: @sjoerdmullender
(In reply to comment 51)
> 1. Reusing temp hashes
> When mserver5 starts it cleans some temp files but no .thash files.
> Is it possible to reuse this hash data by server? It seems that it always
> generates new hash, even if .thash file already exists (and was generated by
> previous server instance).
We thought about this recently, but it's a bit too complicated, at least for a quick fix. The hash heap has to be consistent with the current contents of the column, but the value on disk should be consistent with the committed contents of the column. Those can differ. And anyway, a database server shouldn't have to be restarted frequently, so caching non-essential information between restarts isn't a high priority. (Making sure restarts are indeed not necessary is a much higher priority.)
What would make more sense to try to do is to keep the hashes around when a bat is unloaded and reuse the hashes when the bat is loaded again (in the same server session). Currently that is not done. In your test of repeatedly doing point selects, but doing them so far apart that the bats get unloaded because of memory pressure, that should speed up subsequent selects.
## Comment 17326
Date: 2012-06-01 11:27:17 +0200
From: @sjoerdmullender
(In reply to comment 51)
> 2. What exactly is the index in MonetDB?
Indexes are saved but not used. They are saved so that a dump can dump them.
> Is it hint to create hash? I see no difference in terms of performance whether
> the index is present or not.
> Worse that I managed somehow to create duplicated indexes (id) and mclient's
> describe command is inconsistent with results of the below query:
The query that mclient does to create the index create statements for your table would be:
SELECT "i"."name", "k"."name", "kc"."nr", "c"."name" FROM "sys"."idxs" AS "i" LEFT JOIN "sys"."keys" AS "k" ON "i"."name" = "k"."name", "sys"."objects" AS "kc", "sys"."_columns" AS "c", "sys"."schemas" "s", "sys"."_tables" AS "t" WHERE "i"."table_id" = "t"."id" AND "i"."id" = "kc"."id" AND "t"."id" = "c"."table_id" AND "kc"."name" = "c"."name" AND ("k"."type" IS NULL OR "k"."type" = 1) AND "t"."schema_id" = "s"."id" AND "s"."name" = 'sys' AND "t"."name" = 'B20120219' ORDER BY "i"."name", "kc"."nr";
> sql>\d "sys.B20120219"
> CREATE TABLE "sys"."B20120219" (
> ...
> "TEST_ID" INTEGER,
> ...
> );
> CREATE INDEX "test" ON "sys"."B20120219" ("TEST_ID");
> CREATE INDEX "test" ON "sys"."B20120219" ("TEST_ID");
> CREATE INDEX "test" ON "sys"."B20120219" ("TEST_ID");
> CREATE INDEX "test" ON "sys"."B20120219" ("TEST_ID");
> sql>
>
> Why 4?
It creates a new index for each row where kc.nr is 0.
Perhaps there is a join condition missing that causes duplicate rows? But that's hard to say without the contents of all relevant tables.
> I see bat file 01/71/17122.tail but I don't know when it may be used.
> Execution plan prints some info on this index but I don't know how to read this
> correctly.
That file would be the contents of the column itself.
I also don't know how to read it.
>
> sql>plan select count(*) from "B20120227" where "CDR_ID"=231;
> 3. I observed that inserting new records to table removes hashes from that
> table. Is it true?
That may well be correct. The server deletes hash tables for various reasons, although sometimes it will update a hash table for certain types of changes.
## Comment 17327
Date: 2012-06-01 13:13:02 +0200
From: sgpi <<sgpipub>>
(In reply to comment 53)
>
> What is the value of *bat, and again the value of BBP[n/8192][n%8192] with
> n=ABS(bat->ibid)? Also, what is the value of *BBP[n/8192][n%8192].desc?
(gdb) p *'delta_append_bat'::bat
$11 = {name = 0x145c9a0 "sys_B20120224_COL_4", bid = 2260, ibase = 15354880, ibid = 8302, ubid = 7807,
cnt = 15354890, cached = 0x0}
(gdb) p BBP[8302/8192][8302%8192]
$12 = {cache = {0x264a220, 0x264a248}, logical = {0x2868bc0 "tmp_20156", 0x27a4b00 "tmpr_20156"}, bak = {
0x2868bc0 "tmp_20156", 0x0}, next = {8301, 0}, desc = 0x264a220, physical = 0x2868b90 "02/01/20156",
options = 0x0, refs = 1, lrefs = 1, lastused = 23611486, status = 1}
(gdb) p *BBP[8302/8192][8302%8192].desc
$13 = {B = {batCacheid = 8302, H = 0x264a270, T = 0x264a300, P = 0x264a390, U = 0x264a3a8}, BM = {batCacheid = -8302,
H = 0x264a300, T = 0x264a270, P = 0x264a390, U = 0x264a3a8}, H = {id = 0xfffffd7ff6cb7b80 "h", width = 0,
type = 0 '\0', shift = 0 '\0', varsized = 1, key = 1, dense = 0, nonil = 1, nil = 0, sorted = 1, revsorted = 1,
align = 0, nokey = {0, 0}, nosorted = 0, norevsorted = 0, nodense = 0, seq = 15354880, heap = {maxsize = 0,
free = 0, size = 0, base = 0x0, filename = 0x0, storage = 0 '\0', copied = 0, hashash = 0, forcemap = 0,
newstorage = 0 '\0', dirty = 0 '\0', parentid = 0}, vheap = 0x0, hash = 0x0, props = 0x0}, T = {
id = 0xfffffd7ff6cb7b82 "t", width = 1, type = 2 '\002', shift = 0 '\0', varsized = 0, key = 1, dense = 0,
nonil = 1, nil = 0, sorted = 1, revsorted = 1, align = 2136592, nokey = {0, 0}, nosorted = 0, norevsorted = 0,
nodense = 0, seq = 0, heap = {maxsize = 256, free = 0, size = 256, base = 0x25c6e20 'Ű' <repeats 200 times>...,
filename = 0x2c0d7a0 "02/01/20156.tail", storage = 0 '\0', copied = 0, hashash = 0, forcemap = 0,
newstorage = 0 '\0', dirty = 0 '\0', parentid = 0}, vheap = 0x0, hash = 0x0, props = 0x0}, P = {tid = 7,
stamp = 3929, copiedtodisk = 0, dirty = 1, dirtyflushed = 0, descdirty = 1, lview = 0, set = 0, restricted = 0,
persistence = 1, unused = 0, sharecnt = 0, map_head = 0 '\0', map_tail = 0 '\0', map_hheap = 0 '\0',
map_theap = 0 '\0'}, U = {deleted = 0, first = 0, inserted = 0, count = 0, capacity = 256}}
## Comment 17328
Date: 2012-06-01 13:37:24 +0200
From: sgpi <<sgpipub>>
After this last crash
0 0xfffffd7ff690754d in BATappend (b=0x287e920, n=0x267ce20, force=1 '\001') at gdk_batop.mx:459
459 ALIGNapp(b, "BATappend", force);
I'm unable to open database. Any hints, please?
0 0xfffffd7ff696d1b8 in BATconst (b=0x0, tailtype=12, v=0xfffffd7ff6cafc18) at gdk_batop.mx:2698
2698 BUN cnt = BATcount(b);
(gdb) bt
0 0xfffffd7ff696d1b8 in BATconst (b=0x0, tailtype=12, v=0xfffffd7ff6cafc18) at gdk_batop.mx:2698
1 0xfffffd7ff5e2b25d in copyBat (i=8234, type=12, seq=0) at bat_storage.c:578
2 0xfffffd7ff5e2b5ac in create_col (tr=0x1d26480, c=0x1f0b100) at bat_storage.c:626
3 0xfffffd7ff5e16900 in bootstrap_create_column (tr=0x1d26480, t=0x1f0ae80, name=0xfffffd7ff5e6e794 "name", sqltype=0xfffffd7ff5e6eb2e "varchar", digits=1024) at store.c:1109
4 0xfffffd7ff5e17c9e in store_init (debug=0, store=store_bat, logdir=0xfffffd7ff5e51108 "sql_logs", dbname=0xbf3030 "db", stk=0) at store.c:1381
5 0xfffffd7ff5d8e1ae in mvc_init (dbname=0xbf3030 "db", debug=0, store=store_bat, stk=0) at sql_mvc.c:51
6 0xfffffd7ff5cf1b87 in SQLinit () at sql_scenario.c:237
7 0xfffffd7ff5cf17f0 in SQLprelude () at sql_scenario.c:166
8 0xfffffd7ff7066ff2 in runMALsequence (cntxt=0xe2c020, mb=0xbd2e20, startpc=1, stoppc=0, stk=0xe69020, env=0x0, pcicaller=0x0) at mal_interpreter.mx:1976
9 0xfffffd7ff705c2da in runMAL (cntxt=0xe2c020, mb=0xbd2e20, startpc=1, mbcaller=0x0, env=0x0, pcicaller=0x0) at mal_interpreter.mx:332
10 0xfffffd7ff7059bed in MALengine (c=0xe2c020) at mal_session.c:631
11 0xfffffd7ff705802e in malBootstrap () at mal_session.c:73
12 0xfffffd7ff700eaea in mal_init () at mal.c:247
13 0x000000000040487f in main (argc=22, av=0xfffffd7fffdffa18) at mserver5.c:564
## Comment 17329
Date: 2012-06-01 14:43:59 +0200
From: @sjoerdmullender
Again the result of a call to temp_descriptor returns something unexpected. This time the call is inside the function copyBat, using the parameter i of the copyBat invocation. So the same questions: what are the values of
BBP[i/8192][i%8192] and BBP[i/8192][i%8192].desc (where i=8234)?
## Comment 17330
Date: 2012-06-01 14:55:46 +0200
From: sgpi <<sgpipub>>
(In reply to comment 59)
> Again the result of a call to temp_descriptor returns something unexpected.
> This time the call is inside the function copyBat, using the parameter i of the
> copyBat invocation. So the same questions: what are the values of
> BBP[i/8192][i%8192] and BBP[i/8192][i%8192].desc (where i=8234)?
(gdb) p BBP[8234/8192][8234%8192]
$1 = {cache = {0xebb020, 0xebb048}, logical = {0xf00740 "tmp_20052", 0xf00710 "tmpr_20052"}, bak = {0xf00740 "tmp_20052", 0x0}, next = {0, 0}, desc = 0xebb020,
physical = 0xf006e0 "02/00/20052", options = 0x0, refs = 0, lrefs = 1, lastused = 23611097, status = 1}
(gdb) p BBP[8234/8192][8234%8192].desc
$2 = (BATstore *) 0xebb020
(gdb) p *BBP[8234/8192][8234%8192].desc
$3 = {B = {batCacheid = 8234, H = 0xebb070, T = 0xebb100, P = 0xebb190, U = 0xebb1a8}, BM = {batCacheid = -8234, H = 0xebb100, T = 0xebb070, P = 0xebb190, U = 0xebb1a8}, H = {
id = 0xfffffd7ff6cb7b80 "h", width = 0, type = 0 '\0', shift = 0 '\0', varsized = 1, key = 1, dense = 0, nonil = 1, nil = 0, sorted = 1, revsorted = 1, align = 0, nokey = {0,
0}, nosorted = 0, norevsorted = 0, nodense = 0, seq = 0, heap = {maxsize = 0, free = 0, size = 0, base = 0x0, filename = 0x0, storage = 0 '\0', copied = 0, hashash = 0,
forcemap = 0, newstorage = 0 '\0', dirty = 0 '\0', parentid = 0}, vheap = 0x0, hash = 0x0, props = 0x0}, T = {id = 0xfffffd7ff6cb7b82 "t", width = 4, type = 5 '\005',
shift = 2 '\002', varsized = 0, key = 0, dense = 0, nonil = 1, nil = 0, sorted = 1, revsorted = 1, align = 2145824, nokey = {0, 0}, nosorted = 0, norevsorted = 0, nodense = 0,
seq = 0, heap = {maxsize = 4096, free = 0, size = 4096, base = 0x11933e0 "", filename = 0xf5bb20 "02/00/20052.tail", storage = 0 '\0', copied = 0, hashash = 0, forcemap = 0,
newstorage = 0 '\0', dirty = 0 '\0', parentid = 0}, vheap = 0x0, hash = 0x0, props = 0x0}, P = {tid = 2, stamp = 67, copiedtodisk = 0, dirty = 1, dirtyflushed = 0,
descdirty = 1, lview = 0, set = 0, restricted = 1, persistence = 1, unused = 0, sharecnt = 0, map_head = 0 '\0', map_tail = 0 '\0', map_hheap = 0 '\0', map_theap = 0 '\0'},
U = {deleted = 0, first = 0, inserted = 0, count = 0, capacity = 1024}}
## Comment 17331
Date: 2012-06-01 14:56:27 +0200
From: @sjoerdmullender
(In reply to comment 57)
> (In reply to comment 53)
> >
> > What is the value of *bat, and again the value of BBP[n/8192][n%8192] with
> > n=ABS(bat->ibid)? Also, what is the value of *BBP[n/8192][n%8192].desc?
>
> (gdb) p *'delta_append_bat'::bat
>
> $11 = {name = 0x145c9a0 "sys_B20120224_COL_4", bid = 2260, ibase = 15354880,
> ibid = 8302, ubid = 7807,
> cnt = 15354890, cached = 0x0}
>
> (gdb) p BBP[8302/8192][8302%8192]
> $12 = {cache = {0x264a220, 0x264a248}, logical = {0x2868bc0 "tmp_20156",
> 0x27a4b00 "tmpr_20156"}, bak = {
> 0x2868bc0 "tmp_20156", 0x0}, next = {8301, 0}, desc = 0x264a220, physical =
> 0x2868b90 "02/01/20156",
> options = 0x0, refs = 1, lrefs = 1, lastused = 23611486, status = 1}
According to comment 52, b is equal to 0x287e920, and according to the code, b=temp_descriptor(bat->ibid). bat->ibid=8302, so b *should* be equal to BBP[8302/8192][8302%8192].cache[0], i.e. 0x264a220. Clearly it is not.
I'm wondering, and this is more a question towards Niels. Could it be that delta_append_bat is called in multiple threads at the same time for the same sql_delta* value?
## Comment 17335
Date: 2012-06-05 10:06:20 +0200
From: @sjoerdmullender
These crashes should be discussed in bug #3094. They look closely related.
## Comment 17343
Date: 2012-06-06 12:27:00 +0200
From: @sjoerdmullender
What is the situation now with respect to the memory problems?
## Comment 17345
Date: 2012-06-06 15:06:03 +0200
From: sgpi <<sgpipub>>
(In reply to comment 63)
> What is the situation now with respect to the memory problems?
Looks pretty good but I still testing...
For now I have one observation that memory trimming is veeery expensive.
Typical query time is 3-12s (because of creating new hash) but when trimming occurs all queries hangs for longer time (70-100s).
How to further diagnose this behaviour?
## Comment 17547
Date: 2012-07-21 18:34:34 +0200
From: @grobian
All of these improvements are in Jul2012.
Please open a new bug for new problems. Perhaps we need to see if we can make the trimming less intrusive if it continues to be a problem for you.
| MonetDB hangs at high hash load | https://api.github.com/repos/MonetDB/MonetDB/issues/3067/comments | 0 | 2020-11-30T12:09:43Z | 2024-06-27T11:56:11Z | https://github.com/MonetDB/MonetDB/issues/3067 | 753,424,686 | 3,067 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-04-13 23:41:48 +0200
From: Andrew Duffey <<aduffey>>
To: SQL devs <<bugs-sql>>
Version: 11.7.9 (Dec2011-SP2) [obsolete]
CC: @njnes
Last updated: 2012-04-25 15:43:15 +0200
## Comment 17130
Date: 2012-04-13 23:41:48 +0200
From: Andrew Duffey <<aduffey>>
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.79 Safari/535.11
Build Identifier:
We have successfully compiled MonetDB on Fedora, but
compilation fails on Debian 7 with the following warnings/errors:
stream.c: In function 'stream_gzread':
stream.c:650:2: error: passing argument 1 of 'gzeof' from incompatible
pointer type [-Werror]
/usr/include/zlib.h:1452:21: note: expected 'gzFile' but argument is
of type 'struct gzFile_s **'
stream.c:651:3: error: passing argument 1 of 'gzread' from
incompatible pointer type [-Werror]
/usr/include/zlib.h:1290:21: note: expected 'gzFile' but argument is
of type 'struct gzFile_s **'
stream.c: In function 'stream_gzwrite':
stream.c:664:3: error: passing argument 1 of 'gzwrite' from
incompatible pointer type [-Werror]
/usr/include/zlib.h:1318:21: note: expected 'gzFile' but argument is
of type 'struct gzFile_s **'
stream.c: In function 'stream_gzclose':
stream.c:674:3: error: passing argument 1 of 'gzclose' from
incompatible pointer type [-Werror]
/usr/include/zlib.h:1488:24: note: expected 'gzFile' but argument is
of type 'struct gzFile_s **'
stream.c: In function 'stream_gzflush':
stream.c:682:3: error: passing argument 1 of 'gzflush' from
incompatible pointer type [-Werror]
/usr/include/zlib.h:1389:21: note: expected 'gzFile' but argument is
of type 'struct gzFile_s **'
stream.c: In function 'open_gzstream':
stream.c:694:10: error: assignment from incompatible pointer type [-Werror]
stream.c: In function 'open_gzrstream':
stream.c:713:6: error: passing argument 1 of 'gzread' from
incompatible pointer type [-Werror]
/usr/include/zlib.h:1290:21: note: expected 'gzFile' but argument is
of type 'struct gzFile_s **'
stream.c: In function 'open_gzwstream_':
stream.c:730:3: error: passing argument 1 of 'gzwrite' from
incompatible pointer type [-Werror]
/usr/include/zlib.h:1318:21: note: expected 'gzFile' but argument is
of type 'struct gzFile_s **'
cc1: all warnings being treated as errors
Looking at common/stream/stream.c, it seems that a gzFile* is being
passed as the first argument to zlib functions, whereas the zlib
functions are defined in zlib.h as accepting a gzFile (no pointer). On
Fedora, the compiler doesn't complain, likely because gzFile is
typedef'ed as a void* (indirectly through voidp) in zlib.h:
typedef voidp gzFile; /* opaque gzip file descriptor */
On Debian, gzFile is typedef'ed differently:
typedef struct gzFile_s *gzFile; /* semi-opaque gzip file descriptor */
It looks like stream.c may be using zlib incorrectly.
Reproducible: Always
### Steps to Reproduce:
1. Attempt to build MonetDB on Debian 7.
### Actual Results:
The build fails.
### Expected Results:
The build should succeed.
Building from default (as of a few days ago) and the Dec2011_SP2_release tag both fail.
## Comment 17158
Date: 2012-04-25 15:43:15 +0200
From: @njnes
Indeed in 1.2.6 of zlib the type of gzFile changed. But the stream.c seems to expect gzFile to be a structure, which isn't correct. So for 1.2.6 and older its now been fixed by removing the extra *'s.
| Compilation fails due to invalid zlib args in stream.c on Debian 7 | https://api.github.com/repos/MonetDB/MonetDB/issues/3066/comments | 0 | 2020-11-30T12:09:40Z | 2024-06-27T11:56:10Z | https://github.com/MonetDB/MonetDB/issues/3066 | 753,424,660 | 3,066 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-04-05 11:19:39 +0200
From: George Garbis <<ggarbis>>
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes
Last updated: 2012-04-25 15:11:04 +0200
## Comment 17114
Date: 2012-04-05 11:19:39 +0200
From: George Garbis <<ggarbis>>
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:11.0) Gecko/20100101 Firefox/11.0
Build Identifier: [85af94b906ba](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=85af94b906ba) (Apr2012)
If the WHERE clause of a DELETE/UPDATE statement starts with a constant condition (e.g., 1=1 AND ...) then mserver5 crashes because of a segmentation fault
Reproducible: Always
### Steps to Reproduce:
1. CREATE TABLE t(c INTEGER);
2. INSERT INTO t values(1),(2);
3. DELETE FROM t WHERE (1=1 AND c=2);
### Actual Results:
mserver5 crashes when third statement (DELETE) is posed
### Expected Results:
Delete a row of table t
If "1=1" is replaced with "(1=1 or 1=1)" the statement is performed flawlessly
## Comment 17115
Date: 2012-04-05 11:48:12 +0200
From: @sjoerdmullender
Changeset [88aa9e3f55fc](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=88aa9e3f55fc) 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=88aa9e3f55fc](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=88aa9e3f55fc)
Changeset description:
Added test for bug #3065.
## Comment 17155
Date: 2012-04-25 15:11:04 +0200
From: @njnes
problem was fixed some time ago by fixes in the join/select handling
| crash if DELETE statement with WHERE clause with constant condition is posed | https://api.github.com/repos/MonetDB/MonetDB/issues/3065/comments | 0 | 2020-11-30T12:09:38Z | 2024-06-27T11:56:09Z | https://github.com/MonetDB/MonetDB/issues/3065 | 753,424,634 | 3,065 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-03-28 03:59:44 +0200
From: @skinkie
To: SQL devs <<bugs-sql>>
Version: -- development
Last updated: 2012-04-05 13:58:47 +0200
## Comment 17110
Date: 2012-03-28 03:59:44 +0200
From: @skinkie
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.33 Safari/535.19
Build Identifier:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffeba9d700 (LWP 20495)]
0x00007fffec57be54 in rel_crossproduct (sa=0x12defb0, l=0x18e68f0, r=0x0, join=op_join) at rel_select.c:579
579 rel->nrcols = l->nrcols + r->nrcols;
(gdb) bt
0 0x00007fffec57be54 in rel_crossproduct (sa=0x12defb0, l=0x18e68f0, r=0x0, join=op_join) at rel_select.c:579
1 0x00007fffec5a56d2 in order_joins (sql=0x17ac190, rels=0x18e5620, exps=0x18debf0) at rel_optimizer.c:827
2 0x00007fffec5a5e40 in reorder_join (sql=0x17ac190, rel=0x18de160) at rel_optimizer.c:968
3 0x00007fffec5a6066 in rel_join_order (changes=0x7fffeba9cac4, sql=0x17ac190, rel=0x18de160) at rel_optimizer.c:1020
4 0x00007fffec5b81b3 in rewrite (sql=0x17ac190, rel=0x18de160, rewriter=0x7fffec5a5fc8 <rel_join_order>, has_changes=0x7fffeba9cbbc) at rel_optimizer.c:5350
5 0x00007fffec5b80fb in rewrite (sql=0x17ac190, rel=0x18e1910, rewriter=0x7fffec5a5fc8 <rel_join_order>, has_changes=0x7fffeba9cbbc) at rel_optimizer.c:5337
6 0x00007fffec5b80fb in rewrite (sql=0x17ac190, rel=0x18e32c0, rewriter=0x7fffec5a5fc8 <rel_join_order>, has_changes=0x7fffeba9cbbc) at rel_optimizer.c:5337
7 0x00007fffec5b8a3e in _rel_optimizer (sql=0x17ac190, rel=0x18e32c0, level=0) at rel_optimizer.c:5503
8 0x00007fffec5b8cd1 in rel_optimizer (sql=0x17ac190, rel=0x18e32c0) at rel_optimizer.c:5547
9 0x00007fffec4ebd39 in sql_symbol2relation (c=0x17ac190, sym=0x18db210) at sql.mx:1641
10 0x00007fffec4db4b0 in SQLparser (c=0x66a9e8) at sql_scenario.c:1435
11 0x00007ffff6de427d in runPhase (c=0x66a9e8, phase=1) at mal_scenario.c:522
12 0x00007ffff6de43d8 in runScenarioBody (c=0x66a9e8) at mal_scenario.c:564
13 0x00007ffff6de4682 in runScenario (c=0x66a9e8) at mal_scenario.c:601
14 0x00007ffff6de5748 in MSserveClient (dummy=0x66a9e8) at mal_session.c:438
15 0x00007ffff350ad0c in start_thread () from /lib64/libpthread.so.0
16 0x00007ffff3250d7d in clone () from /lib64/libc.so.6
Reproducible: Always
### Steps to Reproduce:
CREATE TABLE "sys"."pegrval" (
"version" DECIMAL(2) NOT NULL,
"implicit" BOOLEAN NOT NULL,
"dataownercode" VARCHAR(10) NOT NULL,
"organizationalunitcode" VARCHAR(10) NOT NULL,
"periodgroupcode" VARCHAR(10) NOT NULL,
"validfrom" DATE NOT NULL,
"validthru" DATE NOT NULL,
CONSTRAINT "pegrval_dataownercode_organizationalunitcode_periodgroupcode_validfrom_pkey" PRIMARY KEY ("dataownercode", "organizationalunitcode", "periodgroupcode", "validfrom"),
CONSTRAINT "pegrval_dataownercode_organizationalunitcode_fkey" FOREIGN KEY ("dataownercode", "organizationalunitcode") REFERENCES "sys"."orun" ("dataownercode", "organizationalunitcode")
);
CREATE TABLE "sys"."pujo" (
"version" DECIMAL(2) NOT NULL,
"implicit" BOOLEAN NOT NULL,
"dataownercode" VARCHAR(10) NOT NULL,
"timetableversioncode" VARCHAR(10) NOT NULL,
"organizationalunitcode" VARCHAR(10) NOT NULL,
"periodgroupcode" VARCHAR(10) NOT NULL,
"specificdaycode" VARCHAR(10) NOT NULL,
"daytype" SMALLINT NOT NULL,
"lineplanningnumber" VARCHAR(10) NOT NULL,
"journeynumber" DECIMAL(6) NOT NULL,
"timedemandgroupcode" VARCHAR(10) NOT NULL,
"journeypatterncode" VARCHAR(10) NOT NULL,
"departuretime" TIMESTAMP NOT NULL,
"wheelchairaccessible" BOOLEAN NOT NULL,
"dataownerisoperator" BOOLEAN NOT NULL,
"doc_lpn_jpc" VARCHAR(32),
"doc_lpn_jpc_tdgc" VARCHAR(43),
CONSTRAINT "pujo_dataownercode_timetableversioncode_organizationalunitcode_periodgroupcode_specificdaycode_daytype_lineplanningnumber_journeynumber_pkey" PRIMARY KEY ("dataownercode", "timetableversioncode", "organizationalunitcode", "periodgroupcode", "specificdaycode", "daytype", "lineplanningnumber", "journeynumber"),
CONSTRAINT "pujo_dataownercode_lineplanningnumber_journeypatterncode_timedemandgroupcode_fkey" FOREIGN KEY ("dataownercode", "lineplanningnumber", "journeypatterncode", "timedemandgroupcode") REFERENCES "sys"."timdemgrp" ("dataownercode", "lineplanningnumber", "journeypatterncode", "timedemandgroupcode"),
CONSTRAINT "pujo_dataownercode_organizationalunitcode_timetableversioncode_periodgroupcode_specificdaycode_fkey" FOREIGN KEY ("dataownercode", "organizationalunitcode", "timetableversioncode", "periodgroupcode", "specificdaycode") REFERENCES "sys"."tive" ("dataownercode", "organizationalunitcode", "timetableversioncode", "periodgroupcode", "specificdaycode")
);
CREATE TABLE "sys"."excopday" (
"version" DECIMAL(2) NOT NULL,
"implicit" BOOLEAN NOT NULL,
"dataownercode" VARCHAR(10) NOT NULL,
"organizationalunitcode" VARCHAR(10) NOT NULL,
"validdate" TIMESTAMP NOT NULL,
"daytypeason" DECIMAL(7) NOT NULL,
"specificdaycode" VARCHAR(10) NOT NULL,
"periodgroupcode" VARCHAR(10),
"description" VARCHAR(255),
CONSTRAINT "excopday_dataownercode_organizationalunitcode_validdate_pkey" PRIMARY KEY ("dataownercode", "organizationalunitcode", "validdate"),
CONSTRAINT "excopday_dataownercode_periodgroupcode_fkey" FOREIGN KEY ("dataownercode", "periodgroupcode") REFERENCES "sys"."pegr" ("dataownercode", "periodgroupcode"),
CONSTRAINT "excopday_dataownercode_specificdaycode_fkey" FOREIGN KEY ("dataownercode", "specificdaycode") REFERENCES "sys"."specday" ("dataownercode", "specificdaycode")
);
select p.dataownercode||'|'||p.timetableversioncode||'|'||p.organizationalunitcode||'|'||p.periodgroupcode||'|'||p.specificdaycode||'|'||p.daytype from pegrval, pujo as p, excopday where
excopday.dataownercode = p.dataownercode and
excopday.specificdaycode = p.specificdaycode and
pegrval.dataownercode = p.dataownercode and
pegrval.organizationalunitcode = p.organizationalunitcode and
pegrval.periodgroupcode = p.periodgroupcode and
bit_and(p.daytype, power(2,dayofweek(validdate))) = power(2,dayofweek(validdate)) and
cast(validdate as date) >= pegrval.validfrom and cast(validdate as date) <= pegrval.validthru limit 10;
Latest tip.
## Comment 17111
Date: 2012-03-28 04:11:36 +0200
From: @skinkie
It doesn't crash if the bit_and is omitted.
## Comment 17112
Date: 2012-03-28 08:30:23 +0200
From: @grobian
Stefan, you can use
info locals
to perhaps get some more information on variables (and hence why the crash).
## Comment 17113
Date: 2012-03-28 08:56:50 +0200
From: @skinkie
(In reply to comment 2)
> Stefan, you can use
>
> info locals
>
> to perhaps get some more information on variables (and hence why the crash).
rogram received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffeba9d700 (LWP 20581)]
0x00007fffec57be54 in rel_crossproduct (sa=0x12defb0, l=0x18e68f0, r=0x0,
join=op_join) at rel_select.c:579
579 rel->nrcols = l->nrcols + r->nrcols;
(gdb) info locals
rel = 0x18e6a10
(gdb) print l
$1 = (sql_rel *) 0x18e68f0
(gdb) print r
$2 = (sql_rel *) 0x0
(gdb) list
574 rel->l = l;
575 rel->r = r;
576 rel->op = join;
577 rel->exps = NULL;
578 rel->card = CARD_MULTI;
579 rel->nrcols = l->nrcols + r->nrcols;
580 return rel;
581 }
up
827 top = rel_crossproduct(sql->sa, top, r, op_join);
## Comment 17116
Date: 2012-04-05 13:09:14 +0200
From: @sjoerdmullender
The test can not be reproduced since several tables are missing:
"sys"."orun", "sys"."timdemgrp", "sys"."tive", "sys"."pegr", "sys"."specday".
Please provide them, or provide a test that doesn't need these tables.
## Comment 17120
Date: 2012-04-05 13:31:55 +0200
From: @skinkie
(In reply to comment 4)
> The test can not be reproduced since several tables are missing:
> "sys"."orun", "sys"."timdemgrp", "sys"."tive", "sys"."pegr", "sys"."specday".
> Please provide them, or provide a test that doesn't need these tables.
I'll do so quickly, it seems that this dataset gets 'more open' by the day. In that case I'll just provide a database dump, which this query can be run upon. If this doesn't work today, I'll send you the import in private.
## Comment 17125
Date: 2012-04-05 13:58:47 +0200
From: @sjoerdmullender
Please, no database dumps if they can be avoided. Please construct something small it at all possible.
| Segmentation fault; rel_crossproduct rel->nrcols = l->nrcols + r->nrcols; | https://api.github.com/repos/MonetDB/MonetDB/issues/3064/comments | 0 | 2020-11-30T12:09:35Z | 2024-06-27T11:56:08Z | https://github.com/MonetDB/MonetDB/issues/3064 | 753,424,609 | 3,064 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-03-15 16:29:32 +0100
From: Erietta Liarou <<Erietta.Liarou>>
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes, @drstmane
Last updated: 2012-05-25 12:58:45 +0200
## Comment 17082
Date: 2012-03-15 16:29:32 +0100
From: Erietta Liarou <<Erietta.Liarou>>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_7; en-us) AppleWebKit/533.21.1 (KHTML, like Gecko) Version/5.0.5 Safari/533.21.1
Build Identifier:
mserver does not load datacell functions when restarted on an old database
Reproducible: Always
### Steps to Reproduce:
0. remove demo database from /dbfarm
1. mserver5 --dbname=demo
2. >sql.start();
3. >select * from datacell.queries();
4. >\q
5. mserver5 --dbname=demo
6. >sql.start();
7. >select * from datacell.queries();
### Actual Results:
>select * from datacell.queries();
!SELECT: no such operator 'queries'
### Expected Results:
>select * from datacell.queries();
&1 0 0 8 0
% ., ., ., ., ., ., ., . table_name
% nme, status, seen, cycles, events, time, error, def name
% clob, clob, timestamp, int, int, bigint, clob, clob type
% 0, 0, 26, 1, 1, 1, 0, 0 length
## Comment 17083
Date: 2012-03-15 17:13:34 +0100
From: @grobian
not limited to datacell, udf.reverse doesn't work either
## Comment 17089
Date: 2012-03-15 19:36:28 +0100
From: @drstmane
IMHO, files in createdb are only executed on creation of a newly create database.
Of course, between release, we should provide an upgrade path.
This is most probably no available for datacell --- but then, datacell has never been released formally --- and might indeed also not correctly exist for UDF.
I'll check the latter tomorrow ...
## Comment 17117
Date: 2012-04-05 13:23:44 +0200
From: @sjoerdmullender
Stefan's and Fabian's comments are, I'm afraid, not relevant. As Erietta says, if you start with a non-existing database which gets initialized when the server starts first up, the query works. If you then stop the server and start it again on the already initialized database, the query does not work.
The problem doesn't have to do anything with upgrades.
## Comment 17118
Date: 2012-04-05 13:27:34 +0200
From: @sjoerdmullender
By the way, I can reproduce the problem, even though when the server is started the second time, I get:
sql>select f.* from functions f, schemas s where f.name = 'queries' and f.schema_id = s.id and s.name = 'datacell';
+------+---------+--------------------+----------+-------+------+-------+------+
| id | name | func | mod | sql | type | side_ | sche |
: : : : : : : effec : ma_i :
: : : : : : : t : d :
+======+=========+====================+==========+=======+======+=======+======+
| 5897 | queries | create function da | datacell | true | 1 | false | 5803 |
: : : tacell.queries() : : : : : :
: : : returns table( nme : : : : : :
: : : string, status st : : : : : :
: : : ring, seen times...> : : : : :
+------+---------+--------------------+----------+-------+------+-------+------+
1 tuple (5.560ms) !1 field truncated!
## Comment 17119
Date: 2012-04-05 13:28:58 +0200
From: @grobian
my comment still stands, I can reproduce with udf.reverse -- thus making the problem non-datacell specific ;) I changed the subject, see history.
## Comment 17159
Date: 2012-04-25 15:50:51 +0200
From: @njnes
fabian could you show howto reproduce this using udf.reverse?
## Comment 17203
Date: 2012-05-01 11:00:11 +0200
From: @grobian
I can't reproduce any more, select udf.reverse('bla') works fine now.
## Comment 17205
Date: 2012-05-02 09:40:02 +0200
From: @grobian
The problem only occurs with datacell. I've done quite some patching, but all in vain. I suspect that the definition of datacell.queries is not available somehow. Hence I moved definitions of datacell before sql, but that didn't help either (with fixing the runtime symbol lookup problems).
## Comment 17207
Date: 2012-05-02 11:52:43 +0200
From: @njnes
the table returning functions require a 'table definition'. These are stored in the _tables table. Somehow with private schema's this goes wrong.
## Comment 17208
Date: 2012-05-02 11:56:28 +0200
From: @njnes
it seems the tables types are stored in the sys._tables table instead of the datacell tables table.
## Comment 17209
Date: 2012-05-02 13:36:18 +0200
From: @njnes
properly store the functions return type into the tables table in the schema of the function
## Comment 17210
Date: 2012-05-02 13:54:08 +0200
From: @njnes
correction, all return types should stay in the sys.tables table (only tmp also
has a tmp.tables table). Now we correctly lookup the return types / tables in the sys schema.
## Comment 17211
Date: 2012-05-02 16:00:14 +0200
From: @njnes
Changeset [4abb5d147a2d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4abb5d147a2d) 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=4abb5d147a2d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=4abb5d147a2d)
Changeset description:
added test for bug #3063
fixed bug by using sys schema for all table return types
| datacell functions no longer work after restart of database | https://api.github.com/repos/MonetDB/MonetDB/issues/3063/comments | 0 | 2020-11-30T12:09:33Z | 2024-06-27T11:56:07Z | https://github.com/MonetDB/MonetDB/issues/3063 | 753,424,580 | 3,063 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-03-15 16:06:39 +0100
From: Erietta Liarou <<Erietta.Liarou>>
To: SQL devs <<bugs-sql>>
Version: -- development
Duplicates: #2526
Last updated: 2012-03-15 18:17:59 +0100
## Comment 17081
Date: 2012-03-15 16:06:39 +0100
From: Erietta Liarou <<Erietta.Liarou>>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_7; en-us) AppleWebKit/533.21.1 (KHTML, like Gecko) Version/5.0.5 Safari/533.21.1
Build Identifier:
start mserver5
>create table datacell.tmp(id integer);
>select datacell.tmp.id from datacell.tmp;
!TODO: column names of level >= 3
Reproducible: Always
### Steps to Reproduce:
1.mserver5
2.>sql.start();
3.>create table datacell.tmp(id integer);
4.>select datacell.tmp.id from datacell.tmp;
### Actual Results:
!TODO: column names of level >= 3
### Expected Results:
&1 10 0 1 0
% datacell.tmp table_name
% id name
% int type
% 1 length
## Comment 17087
Date: 2012-03-15 18:17:59 +0100
From: @sjoerdmullender
*** This bug has been marked as a duplicate of bug #2526 ***
| complain if column name exceeds level 2 | https://api.github.com/repos/MonetDB/MonetDB/issues/3062/comments | 0 | 2020-11-30T12:09:31Z | 2024-06-28T07:23:16Z | https://github.com/MonetDB/MonetDB/issues/3062 | 753,424,556 | 3,062 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-03-15 13:49:46 +0100
From: @skinkie
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @romulogoncalves, @njnes
Last updated: 2012-11-27 16:43:07 +0100
## Comment 17079
Date: 2012-03-15 13:49:46 +0100
From: @skinkie
User-Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.11 Safari/535.19
Build Identifier:
Notice the difference between "as bedrijfsnaam" and "as bedrijfsnaama" second output is expected.
sql>select naam, vestigingsplaats from (select distinct kvks, upper(bedrijfsnaam) as bedrijfsnaam, upper(plaats) as plaats from kvk where (sub = 0 or sub is NULL)) as kvk, anbi where naam = bedrijfsnaam and vestigingsplaats = plaats limit 10;
+---------------------------------------+------------------+
| naam | vestigingsplaats |
+=======================================+==================+
| STICHTING WERELDWINKEL 'T HARDE | 'T HARDE |
| STICHTING SCHOONHEID ZONDER WREEDHEID | 'S-GRAVENHAGE |
| STICHTING NEDERLAND-LENGASITI | AMSTERDAM |
+---------------------------------------+------------------+
3 tuples (47.8s)
sql>select naam, vestigingsplaats from (select distinct kvks, upper(bedrijfsnaam) as bedrijfsnaama, upper(plaats) as plaatsa from kvk where (sub = 0 or sub is NULL)) as kvk, anbi where naam = bedrijfsnaama and vestigingsplaats = plaatsa limit 10;
+-------------------------------------------------------+------------------+
| naam | vestigingsplaats |
+=======================================================+==================+
| JAHWEH PASSIE KERKEN | MEPPEL |
| STICHTING WERKPRO | GRONINGEN |
| DE MARE, STICHTING OPENBAAR BASISONDERWIJS SALLAND | RAALTE |
| DE TWENTSE SCHOUWBURG N.V. | ENSCHEDE |
| STICHTING IXTA NOA | ZUTPHEN |
| STICHTING PALLAS | UDEN |
| STICHTING KEIZER KAREL PODIA | NIJMEGEN |
| MOSALIRA STICHTING VOOR LEREN, ONDERWIJS EN OPVOEDING | MAASTRICHT |
| STICHTING CARBOON | HEERLEN |
| GEMEENTE VENLO | VENLO |
+-------------------------------------------------------+------------------+
10 tuples (21.8s)
Reproducible: Always
## Comment 17132
Date: 2012-04-16 21:46:23 +0200
From: @njnes
Stefan
Could you add the schema's and possibly some data, such that we can repeat the problem.
## Comment 18155
Date: 2012-11-27 16:43:07 +0100
From: @romulogoncalves
Is it working for the latest version?
Lets us know so we can close the bug.
| AS alias wrongfully assigned in join, if alias was present as normal columnname | https://api.github.com/repos/MonetDB/MonetDB/issues/3061/comments | 0 | 2020-11-30T12:09:28Z | 2024-06-27T11:56:05Z | https://github.com/MonetDB/MonetDB/issues/3061 | 753,424,531 | 3,061 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-03-15 08:12:12 +0100
From: irares
To: SQL devs <<bugs-sql>>
Version: -- development
Last updated: 2012-04-05 13:39:31 +0200
## Comment 17072
Date: 2012-03-15 08:12:12 +0100
From: irares
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)
Build Identifier: Dec 2011-SP1
Extremely slow INSERT speed through JDBC (200 rows / second). Postgres does
6000 rows / sec.
I have a migration code in Java which uses PreparedStatements to copy a table from Postgres to Monet. Autocommit is OFF, we use batches of 1000 rows and do the commit at the end of import. It takes about 46 seconds to import 10k rows. Our customers have around 1.5m records in that table, so migrating to Monet is off the table until that is fixed.
What is strange is that I met a similar speed problem 6 months ago with a Core2 Duo 2.4 Ghz using HDD, now I am using a six-core i7 @ 4ghz with SSD, yet the speed is esentially the same. The more rows are imported, the slower it goes.
I have also tried COPY INTO but that hanged after a while.
If you need any extra info, please ask.
Reproducible: Always
## Comment 17073
Date: 2012-03-15 08:41:56 +0100
From: @grobian
can you share your schema, or give some insights on constraints that are in place?
## Comment 17078
Date: 2012-03-15 13:27:00 +0100
From: irares
Hello Fabian,
I sent the files directly to your email address.
Regards,
Rares
## Comment 17080
Date: 2012-03-15 15:22:13 +0100
From: @sjoerdmullender
This may well have been fixed by today's changeset [cd849937fc9d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=cd849937fc9d) (on Dec2011 branch) which has already been propagated to the other branches.
Can you try this?
## Comment 17121
Date: 2012-04-05 13:39:31 +0200
From: @sjoerdmullender
Please test and report.
| Extremely slow INSERT speed through JDBC (200 rows / second) | https://api.github.com/repos/MonetDB/MonetDB/issues/3060/comments | 0 | 2020-11-30T12:09:26Z | 2024-06-27T11:56:04Z | https://github.com/MonetDB/MonetDB/issues/3060 | 753,424,514 | 3,060 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-03-14 01:03:11 +0100
From: Babis <<charnik>>
To: SQL devs <<bugs-sql>>
Version: 11.7.5 (Dec2011) [obsolete]
CC: charnik, @njnes
Last updated: 2012-04-25 15:03:22 +0200
## Comment 17069
Date: 2012-03-14 01:03:11 +0100
From: Babis <<charnik>>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/534.53.11 (KHTML, like Gecko) Version/5.1.3 Safari/534.53.10
Build Identifier: Dec2011
This bug affects set operators INTERSECT and EXCEPT when combined with count or projection. While the operators calculate the correct results, a count(*) on the result (or projection on a column of the result) returns an incorrect value. Operators UNION and UNION ALL work fine.
Reproducible: Always
### Steps to Reproduce:
The bug can be reproduced as follows:
- Create two tables R and S as
CREATE TABLE "sys"."r" (
"u" INTEGER NOT NULL,
"v" INTEGER NOT NULL,
"r" INTEGER NOT NULL
);
COPY 10 RECORDS INTO "sys"."r" FROM stdin USING DELIMITERS '\t','\n','"';
0 1 3
0 2 3
3 2 2
3 1 16
2 1 255
1 0 3
2 0 3
2 3 2
1 3 64
1 2 255
CREATE TABLE "sys"."s" (
"u" INTEGER NOT NULL,
"v" INTEGER NOT NULL,
"r" INTEGER NOT NULL
);
COPY 12 RECORDS INTO "sys"."s" FROM stdin USING DELIMITERS '\t','\n','"';
2 1 28
3 1 16
1 2 100
0 1 3
0 2 3
3 2 2
1 3 64
1 0 3
2 0 3
2 3 2
3 0 1
0 3 1
- Case of INTERSECT:
sql> SELECT * FROM ((SELECT * FROM S) INTERSECT (SELECT * FROM R)) as inter;
+------+------+------+
| u | v | r |
+======+======+======+
| 3 | 1 | 16 |
| 0 | 1 | 3 |
| 0 | 2 | 3 |
| 3 | 2 | 2 |
| 1 | 3 | 64 |
| 1 | 0 | 3 |
| 2 | 0 | 3 |
| 2 | 3 | 2 |
+------+------+------+
8 tuples (10.221ms)
-- correct result
sql> SELECT count(*) FROM ((SELECT * FROM S) INTERSECT (SELECT * FROM R)) as inter;
+------+
| L11 |
+======+
| 12 |
+------+
1 tuple (5.814ms)
-- incorrect result (should have been 8 instead of 12)
- Case of EXCEPT
sql> SELECT * FROM ((SELECT * FROM S) EXCEPT (SELECT * FROM R)) as diff;
+------+------+------+
| u | v | r |
+======+======+======+
| 2 | 1 | 28 |
| 1 | 2 | 100 |
| 3 | 0 | 1 |
| 0 | 3 | 1 |
+------+------+------+
4 tuples (10.819ms)
-- correct result
sql> SELECT count(*) FROM ((SELECT * FROM S) EXCEPT (SELECT * FROM R)) as diff;
+------+
| L13 |
+======+
| 0 |
+------+
1 tuple (6.140ms)
-- incorrect result (should have been 4 instead of 0)
- Projecting on result of INTERSECT
sql> SELECT inter.u FROM ((SELECT * FROM S) INTERSECT (SELECT * FROM R)) as inter;
+------+
| u |
+======+
| 2 |
| 3 |
| 1 |
| 0 |
| 0 |
| 3 |
| 1 |
| 1 |
| 2 |
| 2 |
| 3 |
| 0 |
+------+
12 tuples (6.011ms)
-- incorrect (should have returned 8 tuples)
- Projecting on result of EXCEPT
sql> SELECT u FROM ((SELECT * FROM S) EXCEPT (SELECT * FROM R)) as diff;
+---+
| u |
+===+
+---+
0 tuples (6.250ms)
-- incorrect (should have returned 4 tuples)
SELECT diff.u FROM ((SELECT * FROM S) EXCEPT (SELECT * FROM R)) as diff;
+---+
| u |
+===+
+---+
0 tuples (6.153ms)
-- incorrect (same as above)
Projecting on two columns still gives a wrong result.
- Dropping the last column
sql> alter table r drop column r;
sql> alter table s drop column r;
- Case for INTERSECT
sql> SELECT * FROM ((SELECT * FROM S) INTERSECT (SELECT * FROM R)) as inter;
+------+------+
| u | v |
+======+======+
| 2 | 1 |
| 3 | 1 |
| 1 | 2 |
| 0 | 1 |
| 0 | 2 |
| 3 | 2 |
| 1 | 3 |
| 1 | 0 |
| 2 | 0 |
| 2 | 3 |
+------+------+
10 tuples (7.240ms)
-- correct result
sql> SELECT count(*) FROM ((SELECT * FROM S) INTERSECT (SELECT * FROM R)) as inter;
+------+
| L21 |
+======+
| 12 |
+------+
1 tuple (4.256ms)
-- incorrect result (should have been 10 instead of 12)
- Case of EXCEPT
sql> SELECT * FROM ((SELECT * FROM S) EXCEPT (SELECT * FROM R)) as diff;
+------+------+
| u | v |
+======+======+
| 3 | 0 |
| 0 | 3 |
+------+------+
2 tuples (6.986ms)
-- correct result
sql> SELECT count(*) FROM ((SELECT * FROM S) EXCEPT (SELECT * FROM R)) as diff;
+------+
| L22 |
+======+
| 0 |
+------+
1 tuple (4.512ms)
-- incorrect result (should have been 2 instead of 0)
- Projecting on result of INTERSECT
sql> SELECT inter.u FROM ((SELECT * FROM S) INTERSECT (SELECT * FROM R)) as inter;
+------+
| u |
+======+
| 2 |
| 3 |
| 1 |
| 0 |
| 0 |
| 3 |
| 1 |
| 1 |
| 2 |
| 2 |
| 3 |
| 0 |
+------+
12 tuples (4.972ms)
-- incorrect result (should have returned 10 tuples instead of 12)
- Projecting on result of EXCEPT
sql> SELECT u FROM ((SELECT * FROM S) EXCEPT (SELECT * FROM R)) as diff;
+---+
| u |
+===+
+---+
0 tuples (4.703ms)
-- incorrect (should have returned 2 tuples instead of 0)
- Dropping the last column
sql> alter table r drop column v;
sql> alter table s drop column v;
sql> select distinct * from r;
+------+
| u |
+======+
| 0 |
| 3 |
| 2 |
| 1 |
+------+
4 tuples (1.737ms)
sql> select distinct * from s;
+------+
| u |
+======+
| 2 |
| 3 |
| 1 |
| 0 |
+------+
4 tuples (1.768ms)
- Case of INTERSECT
sql> SELECT * FROM ((SELECT * FROM S) INTERSECT (SELECT * FROM R)) as inter;
+------+
| u |
+======+
| 0 |
| 3 |
| 2 |
| 1 |
+------+
4 tuples (3.620ms)
-- correct result
sql> SELECT u FROM ((SELECT * FROM S) INTERSECT (SELECT * FROM R)) as inter;
+------+
| u |
+======+
| 0 |
| 3 |
| 2 |
| 1 |
+------+
4 tuples (3.653ms)
-- correct result
- Case of EXCEPT
sql> SELECT * FROM ((SELECT * FROM S) EXCEPT (SELECT * FROM R)) as diff;
+---+
| u |
+===+
+---+
0 tuples (3.761ms)
-- correct result
sql> SELECT u FROM ((SELECT * FROM S) EXCEPT (SELECT * FROM R)) as diff;
+---+
| u |
+===+
+---+
0 tuples (4.087ms)
-- correct result
## Comment 17070
Date: 2012-03-14 09:20:29 +0100
From: Babis <<charnik>>
Another interesting behavior is the following:
sql> SELECT u FROM ((SELECT * FROM S) INTERSECT (SELECT * FROM R)) as inter;
+------+
| u |
+======+
| 2 |
| 3 |
| 1 |
| 0 |
| 0 |
| 3 |
| 1 |
| 1 |
| 2 |
| 2 |
| 3 |
| 0 |
+------+
12 tuples (8.212ms)
- - incorrect (should have returned 8 tuples instead of 12)
sql> SELECT u FROM ((SELECT * FROM R) INTERSECT (SELECT * FROM S)) as inter;
+------+
| u |
+======+
| 0 |
| 0 |
| 3 |
| 3 |
| 2 |
| 1 |
| 2 |
| 2 |
| 1 |
| 1 |
+------+
10 tuples (5.562ms)
- - incorrect (should have returned 8 tuples instead of 10)
The observation is that if we swap the intersected relations, then projecting is like projection only in the first relation disregarding the computed intersection.
Actually the plan when projecting to a column seems wrong: first the projection on u from S is computed, then there is a distinct project * on R, and afterwards, these two intermediate results (which have different number of tuples) are intersected (which is not what the semantics of intersect is).
## Comment 17107
Date: 2012-03-16 16:54:26 +0100
From: Babis <<charnik>>
Created attachment 103
Test (.sql, stable.out, stable.err) for this bug
> Attached file: [test.Bug-3059.patch](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3059_test.Bug-3059.patch_103) (text/plain, 564 bytes)
> Description: Test (.sql, stable.out, stable.err) for this bug
## Comment 17108
Date: 2012-03-16 16:58:44 +0100
From: Babis <<charnik>>
Created attachment 104
CORRECT (ignore the previous): Test (.sql, stable.out, stable.err) for this bug
Correct patch!
The patch is to be applied on the Apr2012 branch (since Dec2011 has been closed). It contains a test scenario (like the one described above).
> Attached file: [test.Bug-3059.patch](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3059_test.Bug-3059.patch_104) (text/plain, 8921 bytes)
> Description: CORRECT (ignore the previous): Test (.sql, stable.out, stable.err) for this bug
## Comment 17122
Date: 2012-04-05 13:49:08 +0200
From: Babis <<charnik>>
Changeset [09c87067f42a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=09c87067f42a) made by Babis Nikolaou <charnik@di.uoa.gr> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=09c87067f42a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=09c87067f42a)
Changeset description:
Added test for bug #3059
## Comment 17123
Date: 2012-04-05 13:49:11 +0200
From: Babis <<charnik>>
Changeset [130c5eb89f99](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=130c5eb89f99) made by Babis Nikolaou <charnik@di.uoa.gr> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=130c5eb89f99](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=130c5eb89f99)
Changeset description:
Added test for bug #3059
## Comment 17151
Date: 2012-04-25 15:00:10 +0200
From: @njnes
Changeset [64ed1c560295](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=64ed1c560295) 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=64ed1c560295](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=64ed1c560295)
Changeset description:
fixed bugs 3047 and 3059
3047 failed because of a bug in the handling of "IN" with correlation and
values on the left side.
3059 failed because the to many column expressions were removed in case of
set operators
Added out put for bug #3048, which runs fine without the m5 joinpath optimizer
## Comment 17154
Date: 2012-04-25 15:03:22 +0200
From: @njnes
fixed, the dce optimzer removed to many columns
| Incorrect results in SQL set operators INTERSECT and EXCEPT | https://api.github.com/repos/MonetDB/MonetDB/issues/3059/comments | 0 | 2020-11-30T12:09:24Z | 2024-06-27T11:56:03Z | https://github.com/MonetDB/MonetDB/issues/3059 | 753,424,486 | 3,059 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-03-13 23:15:11 +0100
From: @skinkie
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes
Last updated: 2012-04-16 22:36:42 +0200
## Comment 17068
Date: 2012-03-13 23:15:11 +0100
From: @skinkie
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.33 Safari/535.19
Build Identifier:
sql>create table kvk_bag_rad (bag_nummeraanduiding numeric(16,0), kvk bigint, x numeric(9,9), y numeric(9,9));
operation successful (12.325ms)
sql>copy 2016830 records into kvk_bag_rad from '/home/skinkie/bag_kvk_rad2.csv' using delimiters '|', '\n';
value '0.908650400' from line 1 field 4 not inserted, expecting type decimal(9,9)
failed to import table
sql>create table kvk_bag_rad2 (bag_nummeraanduiding numeric(16,0), kvk bigint, x double, y double);
operation successful (3.874ms)
sql>copy 2016830 records into kvk_bag_rad2 from '/home/skinkie/bag_kvk_rad2.csv' using delimiters '|', '\n';
2016830 affected rows (5.2s)
sql>insert into kvk_bag_rad select * from kvk_bag_rad2;
2016830 affected rows (1.8s)
sql>select * from kvk_bag_rad2 limit 1;
+----------------------+--------------+--------------------------+--------------------------+
| bag_nummeraanduiding | kvk | x | y |
+======================+==============+==========================+==========================+
| 518200000664318 | 505254170000 | 0.074460144000000006 | 0.90865039999999997 |
+----------------------+--------------+--------------------------+--------------------------+
1 tuple (8.813ms)
sql>select * from kvk_bag_rad limit 1;
+----------------------+--------------+-------------+-------------+
| bag_nummeraanduiding | kvk | x | y |
+======================+==============+=============+=============+
| 518200000664318 | 505254170000 | 0.074460144 | 0.908650400 |
+----------------------+--------------+-------------+-------------+
1 tuple (8.692ms)
Reproducible: Always
## Comment 17124
Date: 2012-04-05 13:55:23 +0200
From: @sjoerdmullender
I'm not sure what the standard says, but both these work:
- using decimal(10,9) instead of decimal(9,9)
- using .908650400 instead of 0.908650400
Note that 0.908650400 has 10 digits, 9 of which are behind the decimal point.
## Comment 17133
Date: 2012-04-16 22:36:42 +0200
From: @njnes
as stated by sjoerd the decimal requires 10 digits.
| DECIMAL not imported correctly? | https://api.github.com/repos/MonetDB/MonetDB/issues/3058/comments | 0 | 2020-11-30T12:09:22Z | 2024-06-28T07:23:16Z | https://github.com/MonetDB/MonetDB/issues/3058 | 753,424,462 | 3,058 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-03-12 12:57:53 +0100
From: @bartscheers
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes
Last updated: 2012-04-25 15:02:31 +0200
## Comment 17063
Date: 2012-03-12 12:57:53 +0100
From: @bartscheers
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20100101 Firefox/10.0.1
Build Identifier: Dec2011 release
A comparison in where clause causes a crash of mserver5. The where clause evaluates a dot product (multiplication of cartesian coordinates of a source pair) and a cosine value of a sql function that converts degrees to radians). The latter has an input argument from a table that is in the join.
Reproducible: Always
### Steps to Reproduce:
/*
Sorry, comments are in Dutch
Query selecteert de ids van de bronnen in de runningcatalog, die een associatie
hebben met de bronnen uit de extractedsources van image 2.
Er wordt gecheckt op matches die binnen de zone(s), decl, en ra liggen.
Een laatste check gebeurt door de eis dat het inproduct van de cartesische coordinaten
van het paar binnen een straal van cos(radians(bmaj)) ligt.
Elk image heeft een bmaj, im0.imageid is primary key, x.image_id is for.key.
*/
create table im
(imageid int
,ds_id int
,bmaj double
,primary key (imageid)
)
;
create table xtr
(xtrsrcid int
,image_id int
,zone int
,ra double
,decl double
,ra_err double
,decl_err double
,x double
,y double
,z double
,primary key (xtrsrcid)
,foreign key (image_id) references images (imageid)
)
;
/* If you use the default schema, degrees and radians might be defined already */
CREATE FUNCTION degrees(r DOUBLE) RETURNS DOUBLE
BEGIN
RETURN r * 180 / PI();
END;
CREATE FUNCTION radians(d DOUBLE) RETURNS DOUBLE
BEGIN
RETURN d * PI() / 180;
END;
CREATE FUNCTION alpha(theta DOUBLE, decl DOUBLE) RETURNS DOUBLE
BEGIN
IF ABS(decl) + theta > 89.9 THEN
RETURN 180;
ELSE
RETURN DEGREES(ABS(ATAN(SIN(RADIANS(theta)) / SQRT(ABS(COS(RADIANS(decl - theta)) * COS(RADIANS(decl + theta))))))) ;
END IF ;
END
;
create table rc
(xtrsrc_id int
,ds_id int
,wm_ra double
,wm_decl double
,wm_ra_err double
,wm_decl_err double
,x double
,y double
,z double
)
;
insert into rc values (1, 1, 331.79744325500002, 43.448623302500003, 0.11882242138100001, 0.116043821024, 0.63980334843300002, -0.34309630504999999, 0.68770386126299998);
insert into im values (2,1,0.0063888886943499999);
insert into xtr values (1, 2, 43, 331.79750356540063, 43.448645530624432, 0.45809725743310992, 0.48429103640614812, 0.6398034744584673, -0.34309550549403994, 0.68770414291369697);
/*Deze query gaat goed*/
select t.xtrsrc_id
from (SELECT r.xtrsrc_id
,r.x * x.x + r.y * x.y + r.z * x.z AS dist
,COS(RADIANS(im0.bmaj)) AS dist_lim
FROM rc r
,xtr x
,im im0
WHERE x.image_id = 2
AND x.image_id = im0.imageid
AND im0.ds_id = r.ds_id
AND x.zone BETWEEN CAST(FLOOR(r.wm_decl - im0.bmaj) as integer)
AND CAST(FLOOR(r.wm_decl - im0.bmaj) as integer)
AND x.decl BETWEEN r.wm_decl - im0.bmaj
AND r.wm_decl + im0.bmaj
AND x.ra BETWEEN r.wm_ra - alpha(im0.bmaj, r.wm_decl)
AND r.wm_ra + alpha(im0.bmaj, r.wm_decl)
) t
where t.dist > t.dist_lim
;
/*
Deze crasht mserver.
In gdb geeft onderstaande query:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f97ccd29700 (LWP 13124)]
0x00007f97cdc055d1 in rel_crossproduct (sa=0x7f97c0099130, l=0x7f97c0162140, r=0x0, join=op_join) at ../../../MonetDB-11.7.5/sql/server/rel_select.c:583
583 rel->nrcols = l->nrcols + r->nrcols;
*/
SELECT r.xtrsrc_id
FROM rc r
,xtr x
,im im0
WHERE x.image_id = 2
AND x.image_id = im0.imageid
AND im0.ds_id = r.ds_id
AND x.zone BETWEEN CAST(FLOOR(r.wm_decl - im0.bmaj) as integer)
AND CAST(FLOOR(r.wm_decl - im0.bmaj) as integer)
AND x.decl BETWEEN r.wm_decl - im0.bmaj
AND r.wm_decl + im0.bmaj
AND x.ra BETWEEN r.wm_ra - alpha(im0.bmaj, r.wm_decl)
AND r.wm_ra + alpha(im0.bmaj, r.wm_decl)
AND r.x * x.x + r.y * x.y + r.z * x.z > COS(RADIANS(im0.bmaj))
;
### Actual Results:
First query runs fine, second terminates mserver5
### Expected Results:
Both produce same result.
## Comment 17126
Date: 2012-04-05 14:38:27 +0200
From: @sjoerdmullender
Changeset [b624c3e45441](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b624c3e45441) 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=b624c3e45441](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b624c3e45441)
Changeset description:
Added test for bug #3057.
## Comment 17140
Date: 2012-04-19 22:21:39 +0200
From: @njnes
Changeset [e3edab0a4bb5](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e3edab0a4bb5) 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=e3edab0a4bb5](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=e3edab0a4bb5)
Changeset description:
fix bug #3057 (improved join reordering code)
## Comment 17153
Date: 2012-04-25 15:02:31 +0200
From: @njnes
fixed by handling multiple foreign key joins properly
| comparison in where clause (left-side multiplication, right-side cosine and sql function with column argument) crashes mserver5 | https://api.github.com/repos/MonetDB/MonetDB/issues/3057/comments | 0 | 2020-11-30T12:09:19Z | 2024-06-27T11:56:01Z | https://github.com/MonetDB/MonetDB/issues/3057 | 753,424,440 | 3,057 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-03-09 18:03:10 +0100
From: @sjoerdmullender
To: SQL devs <<bugs-sql>>
Version: -- development
Last updated: 2012-05-01 09:06:34 +0200
## Comment 17061
Date: 2012-03-09 18:03:10 +0100
From: @sjoerdmullender
A new SQL function has appeared in the catalog. This function needs to be added to the catalog when upgrading a database to this version.
This is a blocking issue for when this branch becomes a release (July 2012?).
## Comment 17195
Date: 2012-04-27 17:15:03 +0200
From: @sjoerdmullender
Changeset [9519f89e3723](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9519f89e3723) 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=9519f89e3723](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=9519f89e3723)
Changeset description:
Provide update for new alpha function.
This also fixes bug #3056.
| alpha function needs to be added during database update | https://api.github.com/repos/MonetDB/MonetDB/issues/3056/comments | 0 | 2020-11-30T12:09:17Z | 2024-06-27T11:56:00Z | https://github.com/MonetDB/MonetDB/issues/3056 | 753,424,417 | 3,056 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-03-09 17:47:53 +0100
From: papv
To: SQL devs <<bugs-sql>>
Version: -- development
Last updated: 2012-11-27 15:58:30 +0100
## Comment 17060
Date: 2012-03-09 17:47:53 +0100
From: papv
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11
Build Identifier:
The SQL Reference document states that we can use transactions in stored procedures. Nevertheless, this proved to be impossible. I did the following in the stored procedures:
a. START TRANSACTION;
sql_statements
COMMIT;
b. sql_statements
COMMIT;
As a result while loading the stored procedure i got as output:
a. Statement 'START' is not a valid flow control statement
b. Statement 'START' is not a valid flow control statement
ps: sometimes (i could not identify them) i got nothing as output. Neither "operation successful" nor an error about sql syntax and procedure not successfully loaded.
Reproducible: Always
## Comment 17548
Date: 2012-07-21 18:36:05 +0200
From: @grobian
Niels, this sounds like a feature request. Is there a chance we will implement this? If not, we better RESOLVED/WONTFIX.
| 'not valid flow control statement' error when trying to handle transactions in stored procedures | https://api.github.com/repos/MonetDB/MonetDB/issues/3055/comments | 0 | 2020-11-30T12:09:15Z | 2024-06-28T07:23:15Z | https://github.com/MonetDB/MonetDB/issues/3055 | 753,424,386 | 3,055 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-03-09 07:10:13 +0100
From: @drstmane
To: Documentation maintainers <<bugs-docs>>
Version: unspecified
Last updated: 2012-03-09 08:44:35 +0100
## Comment 17057
Date: 2012-03-09 07:10:13 +0100
From: @drstmane
summary says it all.
## Comment 17059
Date: 2012-03-09 08:44:01 +0100
From: @grobian
gave the page an alias under the Documentation directory (the menu is matched on the URL the page comes from)
| http://www.monetdb.org/Documentation/msqldump removes left-hand side navigation menu | https://api.github.com/repos/MonetDB/MonetDB/issues/3054/comments | 0 | 2020-11-30T12:09:13Z | 2024-06-27T11:55:58Z | https://github.com/MonetDB/MonetDB/issues/3054 | 753,424,368 | 3,054 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-03-09 07:04:38 +0100
From: @drstmane
To: Documentation maintainers <<bugs-docs>>
Version: unspecified
Last updated: 2012-03-09 08:33:35 +0100
## Comment 17056
Date: 2012-03-09 07:04:38 +0100
From: @drstmane
summary says it all.
## Comment 17058
Date: 2012-03-09 08:33:35 +0100
From: @grobian
Cut and paste error, I assume. Thanks for noticing!
| http://www.monetdb.org/Documentation/monetdbd-man-page shows mserver5 man page iso. monetdbd man page | https://api.github.com/repos/MonetDB/MonetDB/issues/3053/comments | 0 | 2020-11-30T12:09:11Z | 2024-06-27T11:55:57Z | https://github.com/MonetDB/MonetDB/issues/3053 | 753,424,345 | 3,053 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-03-07 12:02:46 +0100
From: Simon Brodt <<simon.brodt>>
To: clients devs <<bugs-clients>>
Version: -- development
Last updated: 2012-03-16 14:56:55 +0100
## Comment 17053
Date: 2012-03-07 12:02:46 +0100
From: Simon Brodt <<simon.brodt>>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20100101 Firefox/10.0.2
Build Identifier: MonetDB 5 server v11.7.7 "Dec2011-SP1" Compiled for x86_64-pc-winnt/64bit with 64bit OIDs dynamically linked -- JDBC Driver 2.1
SQLException on rollback returns SQLSTATE "22000" insted of "40000".
Reproducible: Always
### Steps to Reproduce:
Try reading and writing to a table at the same time with a sufficently high frequency (not very high).
### Actual Results:
SQLSTATE "22000"
### Expected Results:
SQLSTATE "40000"
Probably the relevant section of the monetdb jdbc log:
RD 1331116498816: inserting prompt
TD 1331116498816: write final block: 60 bytes
TX 1331116498816: sSELECT get_value_for('hello_d_world_meta','tuple_id_seq');;
RD 1331116498817: read final block: 101 bytes
RX 1331116498817: &1 0 1 1 1
% . table_name
% get_value_for_single_value name
% bigint type
% 3 length
[ 816 ]
RD 1331116498817: inserting prompt
TD 1331116498817: write final block: 289 bytes
TX 1331116498817: sUPDATE "hello_d_world_meta"."queries"
SET "last_round" = '43',
"output_min_time_value_1" = '786',
"output_min_time_value_2" = '784',
"output_min_time_value_3" = '1331116498673',
"input_min_time_value_1" = '815',
"input_min_time_value_2" = '1331116498786'
WHERE "id" = '4'
;;
RD 1331116498861: read final block: 95 bytes
RX 1331116498861: &2 1 -1
!COMMIT: transaction is aborted because of concurency conflicts, will ROLLBACK instead
RD 1331116498861: inserting prompt
TD 1331116499657: write final block: 83 bytes
TX 1331116499657: sUPDATE
"meta"."program_insts"
SET "state" = 'LOCKED'
WHERE
"id" = '4'
;;
RD 1331116499661: read final block: 8 bytes
RX 1331116499661: &2 1 -1
## Comment 17054
Date: 2012-03-07 12:30:25 +0100
From: @grobian
Indeed. Server doesn't provide an error code, so the driver falls back to some default one.
## Comment 17055
Date: 2012-03-07 13:34:52 +0100
From: @grobian
Changeset [cba537e56f14](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=cba537e56f14) made by Fabian Groffen <fabian@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=cba537e56f14](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=cba537e56f14)
Changeset description:
mvc_commit: send SQLSTATE 40000 for transaction aborts
Because I don't know any specifics, send generic "transaction rollback"
SQLSTATE on commit failures for bug #3052.
## Comment 17102
Date: 2012-03-16 14:56:55 +0100
From: @grobian
Released in Dec2011-SP2
| Wrong Error Code on Rollback Exception | https://api.github.com/repos/MonetDB/MonetDB/issues/3052/comments | 0 | 2020-11-30T12:09:08Z | 2024-06-27T11:55:56Z | https://github.com/MonetDB/MonetDB/issues/3052 | 753,424,317 | 3,052 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-03-07 11:32:21 +0100
From: @drstmane
To: MonetDB5 devs <<bugs-monetdb5>>
Version: -- development
CC: @yzchang
Last updated: 2012-11-27 13:47:29 +0100
## Comment 17052
Date: 2012-03-07 11:32:21 +0100
From: @drstmane
tests modules/mal/compress & optimizer/inline07 fail in Apr2012 branch since changeset [fcf282c602dc](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fcf282c602dc) "implemented corr(elation) which required multi column aggregates" (http://dev.monetdb.org/hg/MonetDB/rev/fcf282c602dc):
http://monetdb.cwi.nl/testweb/tests/43454:fe6468cef2b0/GNU-Fedora-x86_64-propcheck-assert/monetdb5/mTests/modules/mal/compress.out.diff.html
"
!MALException:io.printf:operation failed Illegal type in param 1.
"
http://monetdb.cwi.nl/testweb/tests/43454:fe6468cef2b0/GNU-Fedora-x86_64-propcheck-assert/monetdb5/mTests/optimizer/inline07.out.diff.html
"
!TypeException:user.foo[3]:type mismatch dbl := int
"
## Comment 17064
Date: 2012-03-12 15:15:49 +0100
From: @sjoerdmullender
Changeset [3932d60767ce](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3932d60767ce) 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=3932d60767ce](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=3932d60767ce)
Changeset description:
Fix function resolution.
When adding a type-specific function as a modified "clone" of a
polymorphic function, add it just before the "cloned" function and not
at the start of the list. This makes that the order of function
resolution for default return types will stay the same.
This fixes bug #3051.
## Comment 17065
Date: 2012-03-13 10:13:29 +0100
From: @sjoerdmullender
The tests seem to work now.
## Comment 18062
Date: 2012-11-27 13:47:29 +0100
From: @yzchang
This is about existing tests
| tests modules/mal/compress & optimizer/inline07 fail in Apr2012 branch since changeset fcf282c602dc | https://api.github.com/repos/MonetDB/MonetDB/issues/3051/comments | 0 | 2020-11-30T12:09:06Z | 2024-06-27T11:55:55Z | https://github.com/MonetDB/MonetDB/issues/3051 | 753,424,296 | 3,051 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-03-07 00:04:44 +0100
From: @skinkie
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes
Last updated: 2012-03-07 08:49:50 +0100
## Comment 17050
Date: 2012-03-07 00:04:44 +0100
From: @skinkie
User-Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.11 Safari/535.19
Build Identifier:
This issue might have been reported before.
CREATE TABLE "sys"."kvk_import" (
"kvks" INTEGER,
"bedrijfsnaam" VARCHAR(512),
"kvk" BIGINT,
"vestigingsnummer" BIGINT,
"adres" VARCHAR(255),
"postcode" VARCHAR(10),
"plaats" VARCHAR(32),
"type" VARCHAR(14),
"status" VARCHAR(256)
);
CREATE TABLE "sys"."anbi" (
"naam" VARCHAR(256),
"bekend" VARCHAR(256),
"vestigingsplaats" VARCHAR(64),
"beschikking" DATE,
"einddatum" DATE,
"intrekking" DATE,
"kvks" INTEGER
);
update anbi set kvks = (select kvks from kvk_import where lower(bedrijfsnaam) = lower(naam) and lower(plaats) = lower(vestigingsplaats));
mserver5: rel_exp.c:362: exp_column: Assertion `cname' failed.
Program received signal SIGABRT, Aborted.
[Switching to Thread 0x7fffeaaef700 (LWP 6690)]
0x00007ffff2f4fac5 in raise () from /lib64/libc.so.6
(gdb) bt
0 0x00007ffff2f4fac5 in raise () from /lib64/libc.so.6
1 0x00007ffff2f50f46 in abort () from /lib64/libc.so.6
2 0x00007ffff2f4884e in __assert_fail_base () from /lib64/libc.so.6
3 0x00007ffff2f48910 in __assert_fail () from /lib64/libc.so.6
4 0x00007fffeb5f17a4 in exp_column (sa=0x11efaa0, rname=0x0, cname=0x0, t=0x1480ce8, card=2, has_nils=1, intern=0) at rel_exp.c:362
5 0x00007fffeb5ceeab in rel_groupby (sa=0x11efaa0, l=0x14800f0, groupbyexps=0x1481990) at rel_select.c:889
6 0x00007fffeb5df27e in rel_select_exp (sql=0x139e670, rel=0x1480990, outer=0x147d900, sn=0x147d690, ek=...) at rel_select.c:4806
7 0x00007fffeb5e06bd in rel_query (sql=0x139e670, rel=0x147e680, sq=0x147d690, toplevel=0, ek=...) at rel_select.c:5081
8 0x00007fffeb5e1e25 in rel_subquery (sql=0x139e670, rel=0x147e680, sq=0x147d690, ek=...) at rel_select.c:5437
9 0x00007fffeb5ddc5d in rel_value_exp2 (sql=0x139e670, rel=0x7fffeaaeeaa0, se=0x147d690, f=3, ek=..., is_last=0x7fffeaaee984) at rel_select.c:4429
10 0x00007fffeb5ddf7d in rel_value_exp (sql=0x139e670, rel=0x7fffeaaeeaa0, se=0x147d690, f=3, ek=...) at rel_select.c:4492
11 0x00007fffeb5de06b in column_exp (sql=0x139e670, rel=0x7fffeaaeeaa0, column_e=0x147d790, f=3) at rel_select.c:4505
12 0x00007fffeb5de2dd in rel_column_exp (sql=0x139e670, rel=0x7fffeaaeeaa0, column_e=0x147d790, f=3) at rel_select.c:4549
13 0x00007fffeb5e6058 in update_table (sql=0x139e670, qname=0x147c8c0, assignmentlist=0x147d7b0, opt_where=0x0) at rel_updates.c:840
14 0x00007fffeb5e86d8 in rel_updates (sql=0x139e670, s=0x147d8b0) at rel_updates.c:1350
15 0x00007fffeb5cbd78 in rel_semantic (sql=0x139e670, s=0x147d8b0) at rel_semantic.c:222
16 0x00007fffeb53dc75 in sql_symbol2relation (c=0x139e670, sym=0x147d8b0) at sql.mx:1629
17 0x00007fffeb52d446 in SQLparser (c=0x63cc88) at sql_scenario.c:1435
18 0x00007ffff6b1e8d1 in runPhase (c=0x63cc88, phase=1) at mal_scenario.c:522
19 0x00007ffff6b1ea2c in runScenarioBody (c=0x63cc88) at mal_scenario.c:564
20 0x00007ffff6b1ecd6 in runScenario (c=0x63cc88) at mal_scenario.c:601
21 0x00007ffff6b1fd9c in MSserveClient (dummy=0x63cc88) at mal_session.c:438
22 0x00007ffff32b0cfc in start_thread () from /lib64/libpthread.so.0
23 0x00007ffff2ff6d7d in clone () from /lib64/libc.so.6
If some data is required... you know who reported it :)
Reproducible: Always
Tip
## Comment 17051
Date: 2012-03-07 08:49:50 +0100
From: @njnes
fixed on default, please test (with data).
## Comment 17062
Date: 2012-03-11 21:07:38 +0100
From: @njnes
Changeset [4a7598d5e858](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4a7598d5e858) 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=4a7598d5e858](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=4a7598d5e858)
Changeset description:
fix bug #3050, ie name all columns of an intermediate relation
| update statement results in abort | https://api.github.com/repos/MonetDB/MonetDB/issues/3050/comments | 0 | 2020-11-30T12:09:04Z | 2024-06-27T11:55:54Z | https://github.com/MonetDB/MonetDB/issues/3050 | 753,424,268 | 3,050 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-03-06 16:28:02 +0100
From: Freddy <<freddy_priyatna>>
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @drstmane
Last updated: 2012-04-05 15:01:08 +0200
## Comment 17042
Date: 2012-03-06 16:28:02 +0100
From: Freddy <<freddy_priyatna>>
User-Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.11 (KHTML, like Gecko) Ubuntu/11.10 Chromium/17.0.963.56 Chrome/17.0.963.56 Safari/535.11
Build Identifier: MonetDB 5 server v11.7.5 "Dec2011" (32-bit, 32-bit oids)
I suspect that the problem is the true condition of the join
Reproducible: Always
### Steps to Reproduce:
SELECT *
FROM (select label from product where nr=2) p left join
((select o.nr as onr, o.price, v.nr as vnr, v.label from offer o, vendor v where 2=o.product AND
o.vendor=v.nr AND v.country='GB' AND o."validTo">'2008-07-01') ov right join
(select r.nr as rnr, r.title, pn.nr as pnnr, pn.name, r.rating1, r.rating2 from review r, person pn where r.product=2 AND
r.person=pn.nr) rpn on (1=1)) on (1=1);
### Actual Results:
TypeException:user.s946_1[472]:'algebra.leftjoin' undefined in: _639:any := algebra.leftjoin(_324:any, _638:any)
TypeException:user.s946_1[474]:'bat.append' undefined in: _641:any := bat.append(_640:bat[:oid,:int], _639:any, _637:bit)
TypeException:user.s946_1[475]:'bat.append' undefined in: _642:any := bat.append(_641:any, _614:any, _637:bit)
39000!program contains errors
SQLState: null
ErrorCode: 0
## Comment 17045
Date: 2012-03-06 17:16:06 +0100
From: @drstmane
Could you possibly provide us with all info to reproduce this, i.e., the required DDL (create table, etc.) statements?
Preferably not the whole 14 MB SQL DDL plus data (insert statements) available from http://dl.dropbox.com/u/531378/bsbm/bsbm250k-monetdb-ddl.zip, but the minimal set of pure DDL (create table) statements required for this bug?
Thanks!
## Comment 17048
Date: 2012-03-06 17:30:50 +0100
From: Freddy <<freddy_priyatna>>
The create table statements can be downloaded from : http://dl.dropbox.com/u/531378/bsbm/bsbm250k-monetdb-ddl%28create-table%29.zip
## Comment 17127
Date: 2012-04-05 15:01:08 +0200
From: @sjoerdmullender
I cannot reproduce the problem on either the Dec2011 nor the Apr2012 branch. I've first tried using just the DDL statements, but I also tried the full database.
Is this still a problem? If so, please reopen with more specific instructions on how to reproduce the problem.
| (Probably) join with true condition | https://api.github.com/repos/MonetDB/MonetDB/issues/3049/comments | 0 | 2020-11-30T12:09:01Z | 2024-06-28T07:23:15Z | https://github.com/MonetDB/MonetDB/issues/3049 | 753,424,231 | 3,049 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-03-06 16:26:20 +0100
From: Freddy <<freddy_priyatna>>
To: SQL devs <<bugs-sql>>
Version: 11.13.3 (Oct2012)
CC: @njnes, @drstmane
Last updated: 2013-01-22 09:29:06 +0100
## Comment 17041
Date: 2012-03-06 16:26:20 +0100
From: Freddy <<freddy_priyatna>>
User-Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.11 (KHTML, like Gecko) Ubuntu/11.10 Chromium/17.0.963.56 Chrome/17.0.963.56 Safari/535.11
Build Identifier: MonetDB 5 server v11.7.5 "Dec2011" (32-bit, 32-bit oids)
It seems that MonetDB can't process both of the 2 last lines of the query. But if I comment either one of the last 2 lines, it's ok.
Reproducible: Always
### Steps to Reproduce:
SELECT distinct p.nr, p.label
FROM product p, product po,
(Select distinct pfp1.product FROM productfeatureproduct pfp1,
(SELECT "productFeature" FROM productfeatureproduct WHERE product=2) pfp2
WHERE pfp2."productFeature"=pfp1."productFeature") pfp
WHERE p.nr=pfp.product AND po.nr=2 AND p.nr <> po.nr
AND p."propertyNum1" < (po."propertyNum1"+120) AND p."propertyNum1" > (po."propertyNum1"-120)
AND p."propertyNum2" < (po."propertyNum2"+170) AND p."propertyNum2" > (po."propertyNum2"-170)
### Actual Results:
Error: TypeException:user.s945_1[155]:'algebra.join' undefined in: _267:bat[:oid,:int] := algebra.join(_266:bat[:oid,:void], _115:bat[:oid,:int])
39000!program contains errors
SQLState: null
ErrorCode: 0
## Comment 17044
Date: 2012-03-06 17:15:59 +0100
From: @drstmane
Could you possibly provide us with all info to reproduce this, i.e., the required DDL (create table, etc.) statements?
Preferably not the whole 14 MB SQL DDL plus data (insert statements) available from http://dl.dropbox.com/u/531378/bsbm/bsbm250k-monetdb-ddl.zip, but the minimal set of pure DDL (create table) statements required for this bug?
Thanks!
## Comment 17047
Date: 2012-03-06 17:30:41 +0100
From: Freddy <<freddy_priyatna>>
The create table statements can be downloaded from : http://dl.dropbox.com/u/531378/bsbm/bsbm250k-monetdb-ddl%28create-table%29.zip
## Comment 17128
Date: 2012-04-05 15:06:23 +0200
From: @sjoerdmullender
Changeset [6e01ec1907d2](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6e01ec1907d2) 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=6e01ec1907d2](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=6e01ec1907d2)
Changeset description:
Added test for bug #3048. Output to be provided.
## Comment 17150
Date: 2012-04-25 15:00:10 +0200
From: @njnes
Changeset [64ed1c560295](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=64ed1c560295) 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=64ed1c560295](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=64ed1c560295)
Changeset description:
fixed bugs 3047 and 3059
3047 failed because of a bug in the handling of "IN" with correlation and
values on the left side.
3059 failed because the to many column expressions were removed in case of
set operators
Added out put for bug #3048, which runs fine without the m5 joinpath optimizer
## Comment 17186
Date: 2012-04-27 14:21:53 +0200
From: @njnes
alternative solution is to removed the virtual id function signatures (like bug #3073)
*** This bug has been marked as a duplicate of bug #3073 ***
## Comment 17462
Date: 2012-07-14 08:54:38 +0200
From: @drstmane
re-opened and assigned to Jul2012 as test has been failing for long with Apr2012, Jul2012 & default, with
QUERY = SELECT distinct p.nr, p.label
FROM product p, product po,
(Select distinct pfp1.product FROM productfeatureproduct pfp1,
(SELECT "productFeature" FROM productfeatureproduct WHERE product=2) pfp2
WHERE pfp2."productFeature"=pfp1."productFeature") pfp
WHERE p.nr=pfp.product AND po.nr=2 AND p.nr <> po.nr
AND p."propertyNum1" < (po."propertyNum1"+120) AND p."propertyNum1" >
(po."propertyNum1"-120)
AND p."propertyNum2" < (po."propertyNum2"+170) AND p."propertyNum2" >
(po."propertyNum2"-170);
ERROR = !TypeException:user.s0_1[96]:'algebra.join' undefined in: _198:bat[:oid,:int] := algebra.join(_190:bat[:oid,:void], _191:bat[:oid,:int])
!program contains errors
cf.,
http://monetdb.cwi.nl/testweb/web/testgrid.php?serial=44501:b490b640b431&module=sql&targets=&order=platform,arch,compiler
http://monetdb.cwi.nl/testweb/tests/44501:b490b640b431/GNU-Fedora-x86_64-propcheck-assert/sql/mTests/test/BugTracker-2012/multiple-arithmetic-operations.Bug-3048.err.diff.html
http://monetdb.cwi.nl/testweb/web/testgrid.php?serial=44603:a04c99a2b437&module=sql&targets=&order=platform,arch,compiler
http://monetdb.cwi.nl/testweb/tests/44603:a04c99a2b437/GNU-Fedora-x86_64-propcheck-assert/sql/mTests/test/BugTracker-2012/multiple-arithmetic-operations.Bug-3048.err.diff.html
## Comment 17673
Date: 2012-08-24 14:55:53 +0200
From: @sjoerdmullender
Jul2012-SP1 has been released.
## Comment 17793
Date: 2012-10-11 10:56:51 +0200
From: @grobian
This bug still exists on Oct2012 branch on all platforms.
http://monetdb.cwi.nl/testweb/web/testgrid.php?serial=45660:2d08000a18dd&module=sql&tstlimit=test/BugTracker-2012
A fix would be nice.
## Comment 17958
Date: 2012-11-20 13:26:41 +0100
From: @grobian
another occurrence, which seems to be the same problem:
RD 1353412923544: read final block: 171 bytes
RX 1353412923544: !TypeException:user.s983_1[393]:'algebra.join' undefined
in: _804:bat[:oid,:lng] := algebra.join(_783:bat[:oid,:void],
_798:bat[:oid,:lng])
!39000!program contains errors
## Comment 18016
Date: 2012-11-26 19:23:23 +0100
From: @njnes
fixed, ie added the missing signature. Only on oct2012 as on default this is no longer possible (headless).
## Comment 18361
Date: 2013-01-22 09:29:06 +0100
From: @sjoerdmullender
Oct2012-SP3 has been released.
| algebra.join undefined when using multiple arithmetic operations in SQL where-clause | https://api.github.com/repos/MonetDB/MonetDB/issues/3048/comments | 0 | 2020-11-30T12:08:58Z | 2024-06-27T11:55:52Z | https://github.com/MonetDB/MonetDB/issues/3048 | 753,424,195 | 3,048 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-03-06 16:23:13 +0100
From: Freddy <<freddy_priyatna>>
To: SQL devs <<bugs-sql>>
Version: 11.7.5 (Dec2011) [obsolete]
CC: @njnes, @drstmane
Last updated: 2012-04-25 15:03:57 +0200
## Comment 17040
Date: 2012-03-06 16:23:13 +0100
From: Freddy <<freddy_priyatna>>
User-Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.11 (KHTML, like Gecko) Ubuntu/11.10 Chromium/17.0.963.56 Chrome/17.0.963.56 Safari/535.11
Build Identifier: MonetDB 5 server v11.7.5 "Dec2011" (32-bit, 32-bit oids) MonetDB 5 server v11.7.5 "Dec2011" (32-bit, 32-bit oids)
MonetDB seems can't refer to an alias of a parent table alias in the subquery
Reproducible: Always
### Steps to Reproduce:
SELECT p.nr, p.label
FROM product p, producttypeproduct ptp
WHERE p.nr=ptp.product
AND "productType"=35
AND "propertyNum1">500
AND "propertyNum3"<2000
AND 168 IN (SELECT "productFeature" FROM productfeatureproduct WHERE productfeatureproduct.product=p.nr)
AND 147 NOT IN (SELECT "productFeature" FROM productfeatureproduct WHERE product=p.nr)
### Actual Results:
Error: 42S22!SELECT: no such column 'p.nr'
SQLState: null
ErrorCode: 0
## Comment 17043
Date: 2012-03-06 17:15:55 +0100
From: @drstmane
Could you possibly provide us with all info to reproduce this, i.e., the required DDL (create table, etc.) statements?
Preferably not the whole 14 MB SQL DDL plus data (insert statements) available from http://dl.dropbox.com/u/531378/bsbm/bsbm250k-monetdb-ddl.zip, but the minimal set of pure DDL (create table) statements required for this bug?
Thanks!
## Comment 17046
Date: 2012-03-06 17:30:29 +0100
From: Freddy <<freddy_priyatna>>
The create table statements can be downloaded from : http://dl.dropbox.com/u/531378/bsbm/bsbm250k-monetdb-ddl%28create-table%29.zip
## Comment 17129
Date: 2012-04-05 15:09:58 +0200
From: @sjoerdmullender
Changeset [721b12c92f98](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=721b12c92f98) 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=721b12c92f98](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=721b12c92f98)
Changeset description:
Added test for bug #3047. Output to be provided.
## Comment 17152
Date: 2012-04-25 15:00:10 +0200
From: @njnes
Changeset [64ed1c560295](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=64ed1c560295) 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=64ed1c560295](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=64ed1c560295)
Changeset description:
fixed bugs 3047 and 3059
3047 failed because of a bug in the handling of "IN" with correlation and
values on the left side.
3059 failed because the to many column expressions were removed in case of
set operators
Added out put for bug #3048, which runs fine without the m5 joinpath optimizer
| refering to parent table alias in subquery | https://api.github.com/repos/MonetDB/MonetDB/issues/3047/comments | 0 | 2020-11-30T12:08:55Z | 2024-06-27T11:55:51Z | https://github.com/MonetDB/MonetDB/issues/3047 | 753,424,162 | 3,047 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-03-01 14:42:20 +0100
From: Viktor Rosenfeld <<24hesk>>
To: SQL devs <<bugs-sql>>
Version: 11.7.7 (Dec2011-SP1) [obsolete]
CC: @njnes
Last updated: 2012-05-25 12:58:46 +0200
## Comment 17036
Date: 2012-03-01 14:42:20 +0100
From: Viktor Rosenfeld <<24hesk>>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11
Build Identifier:
mserver5 terminates with a segmentation fault when executing the attached query. The error occurs even if the required tables are empty or if one requests a MAL plan with explain. The segfault occurs in bin_find_column at rel_bin.c:98. A backtrace is attached. There is no assertion when compiled with --enable-assert.
Reproducible: Always
### Steps to Reproduce:
1. run mserver5, connect with mclient
2. create tables using create-schema.sql
3. run the query in test-query.sql
### Actual Results:
MAPI = monetdb@localhost:50000
ACTION= read_line
QUERY = SELECT
count(*)
FROM
(
SELECT DISTINCT
node1.id AS id1, node2.id AS id2, node1.toplevel_corpus
FROM
node AS node1, rank AS rank1, component AS component1,
node AS node2, rank AS rank2, component AS component2
WHERE
component1.id = component2.id AND
component1.name IS NULL AND
component1.type = 'd' AND
component2.name IS NULL AND
component2.type = 'd' AND
rank1.component_ref = component1.id AND
rank1.node_ref = node1.id AND
rank1.pre = rank2.parent AND
rank2.component_ref = component2.id AND
rank2.node_ref = node2.id
) AS solutions;
ERROR = !Connection terminated
### Expected Results:
+------+
| L6 |
+======+
| 0 |
+------+
1 tuple
The query returns the expected result, if the predicate
component1.id = component2.id
or, alternatively, if one removes the OTHER predicates on component:
component1.name IS NULL AND
component1.type = 'd' AND
component2.name IS NULL AND
component2.type = 'd' AND
There is no output in merovingian.log.
$ mserver5 --version
MonetDB 5 server v11.7.7 "Dec2011-SP1" (64-bit, 64-bit oids)
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2012 MonetDB B.V., all rights reserved
Visit http://www.monetdb.org/ for further information
Found 252.4GiB available memory, 24 available cpu cores
Libraries:
libpcre: 7.9 2009-04-11 (compiled with 7.9)
openssl: OpenSSL 0.9.8k 25 Mar 2009 (compiled with OpenSSL 0.9.8k 25 Mar 2009)
libxml2: 2.7.3 (compiled with 2.7.3)
Compiled by: rosenfel@moos (x86_64-unknown-linux-gnu)
Compilation: gcc -g
Linking : /usr/x86_64-suse-linux/bin/ld -m elf_x86_64
## Comment 17037
Date: 2012-03-01 14:44:19 +0100
From: Viktor Rosenfeld <<24hesk>>
Created attachment 100
SQL to create required schema
> Attached file: [create-schema.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3046_create-schema.sql_100) (text/plain, 1643 bytes)
> Description: SQL to create required schema
## Comment 17038
Date: 2012-03-01 14:44:52 +0100
From: Viktor Rosenfeld <<24hesk>>
Created attachment 101
test query causing mserver5 to crash
> Attached file: [test-query.sql](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3046_test-query.sql_101) (text/plain, 643 bytes)
> Description: test query causing mserver5 to crash
## Comment 17039
Date: 2012-03-01 14:45:55 +0100
From: Viktor Rosenfeld <<24hesk>>
Created attachment 102
Backtrace of the crash
> Attached file: [backtrace](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3046_backtrace_102) (text/plain, 2580 bytes)
> Description: Backtrace of the crash
## Comment 17066
Date: 2012-03-13 10:15:15 +0100
From: @sjoerdmullender
A crash of mserver5 is unlikely to be a problem with monetdbd, so changing the product.
## Comment 17067
Date: 2012-03-13 10:22:53 +0100
From: @sjoerdmullender
Changeset [2fb290ca2b74](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2fb290ca2b74) 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=2fb290ca2b74](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=2fb290ca2b74)
Changeset description:
Added test for bug #3046.
The server does indeed crash.
## Comment 17188
Date: 2012-04-27 14:24:27 +0200
From: @njnes
has been fixed by recent changes, in the join handling/relational to binary conversion.
| mserver5 terminates with segmentation fault | https://api.github.com/repos/MonetDB/MonetDB/issues/3046/comments | 0 | 2020-11-30T12:08:53Z | 2024-06-27T11:55:50Z | https://github.com/MonetDB/MonetDB/issues/3046 | 753,424,134 | 3,046 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-02-28 12:41:39 +0100
From: @grobian
To: MonetDB5 devs <<bugs-monetdb5>>
Version: 11.7.5 (Dec2011) [obsolete]
CC: @yzchang
Last updated: 2012-11-27 13:59:02 +0100
## Comment 17020
Date: 2012-02-28 12:41:39 +0100
From: @grobian
The following piece of code produces a failure when run with --debug=10 (propcheck):
b := bat.new(:oid, :bte);
b := bat.append(b, 100:bte);
b := bat.append(b, 105:bte);
b := bat.append(b, 100:bte);
b := bat.append(b, 105:bte);
b := bat.append(b, 115:bte);
io.print(b);
c := algebra.project(0@0,b);
io.print(c);
It results in:
-----------------
h t name
void bte type
-----------------
[ 0@0, 100 ]
[ 1@0, 105 ]
[ 2@0, 100 ]
[ 3@0, 105 ]
[ 4@0, 115 ]
!GDKerror:!ERROR: BATpropcheck: BAT tmpr_1136(-606)[bte,oid] with 5 tuples was incorrectly marked sorted!
!ERROR: BATpropcheck: BAT tmpr_1136(-606)[bte,oid] with 5 tuples remains marked radix-clustered on 32 bits; not checked!
## Comment 17021
Date: 2012-02-28 13:25:55 +0100
From: @sjoerdmullender
Changeset [e06f9ca778bc](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e06f9ca778bc) 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=e06f9ca778bc](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=e06f9ca778bc)
Changeset description:
Reuse implementation in GDK for algebra.project + add test for bug #3045.
algebra.project does basically what BATconst does, so use that to do
the work.
Thid also fixes bug #3045.
## Comment 17022
Date: 2012-02-28 13:29:03 +0100
From: @sjoerdmullender
Fixed.
## Comment 17100
Date: 2012-03-16 14:56:54 +0100
From: @grobian
Released in Dec2011-SP2
## Comment 18063
Date: 2012-11-27 13:59:02 +0100
From: @yzchang
Test already added in monetdb5/tests/BugTracker/Tests/algebra_project.Bug-3045
| algebra.project(0@0,bat) fails at propcheck | https://api.github.com/repos/MonetDB/MonetDB/issues/3045/comments | 0 | 2020-11-30T12:08:51Z | 2024-06-27T11:55:49Z | https://github.com/MonetDB/MonetDB/issues/3045 | 753,424,111 | 3,045 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-02-27 09:35:36 +0100
From: Gatis Ozolins <<g.ozolins>>
To: SQL devs <<bugs-sql>>
Version: -- development
CC: duc, k.vitols, @njnes
Last updated: 2016-04-11 11:46:49 +0200
## Comment 17004
Date: 2012-02-27 09:35:36 +0100
From: Gatis Ozolins <<g.ozolins>>
User-Agent: Mozilla/5.0 (Windows; Windows NT 6.1; rv:10.0) Gecko/20100101 Firefox/9.0
Build Identifier: Dec2011
In procedures and functions it should be possible to catch errors, similar like in PL/pgSQL (http://www.postgresql.org/docs/current/static/plpgsql-control-structures.htmlPLPGSQL-ERROR-TRAPPING)
Reproducible: Always
## Comment 17005
Date: 2012-02-27 12:42:28 +0100
From: @njnes
EXCEPTION isn't part of the SQL spec's
## Comment 17006
Date: 2012-02-27 13:20:25 +0100
From: Gatis Ozolins <<g.ozolins>>
So if you are following SQL/PSM, then it would be possible to get value of SQLSTATE. Also it would be possible to catch and process errors with DECLARE CONTINUE HANDLER and DECLARE EXIT HANDLER.
It seems that this is not implemented.
create function sqlstate_test(x int)
returns int
begin
declare r int;
declare continue handler for sqlstate '01002'
set r = r + 1;
declare continue handler for sqlstate '01003'
set r = r + 2;
set r = 0;
if (x > 0) then
signal sqlstate '01002';
elsif (x < 0) then
signal sqlstate '01003';
end if;
return r;
end;
## Comment 17146
Date: 2012-04-23 21:37:15 +0200
From: karlis <<k.vitols>>
Any idea when this feature might be implemented?
## Comment 17549
Date: 2012-07-21 18:39:06 +0200
From: @grobian
(In reply to comment 3)
> Any idea when this feature might be implemented?
this is absolutely not likely to be implemented anywhere near soon
| Exception handling in procedures and functions | https://api.github.com/repos/MonetDB/MonetDB/issues/3044/comments | 0 | 2020-11-30T12:08:49Z | 2024-06-28T13:40:52Z | https://github.com/MonetDB/MonetDB/issues/3044 | 753,424,091 | 3,044 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-02-24 17:38:55 +0100
From: Gatis Ozolins <<g.ozolins>>
To: SQL devs <<bugs-sql>>
Version: 11.7.5 (Dec2011) [obsolete]
CC: @njnes
Last updated: 2012-03-16 14:56:51 +0100
## Comment 16990
Date: 2012-02-24 17:38:55 +0100
From: Gatis Ozolins <<g.ozolins>>
User-Agent: Mozilla/5.0 (Windows; Windows NT 6.1; rv:10.0) Gecko/20100101 Firefox/9.0
Build Identifier: Dec2011
This should be valid SQL
Reproducible: Always
### Steps to Reproduce:
SELECT * FROM (
WITH x AS (SELECT 1)
SELECT * FROM x
) y
### Actual Results:
42000!syntax error, unexpected WITH in: "select *
from (with"
### Expected Results:
1
## Comment 16993
Date: 2012-02-25 09:45:17 +0100
From: @njnes
Changeset [c0f7bbcff9ec](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c0f7bbcff9ec) 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=c0f7bbcff9ec](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=c0f7bbcff9ec)
Changeset description:
added with in 'derived tables' see bug #3043
## Comment 17092
Date: 2012-03-16 14:56:51 +0100
From: @grobian
Released in Dec2011-SP2
| WITH clause is not allowed in derived table | https://api.github.com/repos/MonetDB/MonetDB/issues/3043/comments | 0 | 2020-11-30T12:08:47Z | 2024-06-27T11:55:47Z | https://github.com/MonetDB/MonetDB/issues/3043 | 753,424,055 | 3,043 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-02-24 10:08:45 +0100
From: @grobian
To: MonetDB5 devs <<bugs-monetdb5>>
Version: 11.9.7 (Apr2012-SP2) [obsolete]
CC: @yzchang
Last updated: 2012-11-27 14:02:00 +0100
## Comment 16988
Date: 2012-02-24 10:08:45 +0100
From: @grobian
For the reference, Clang complains about our code (as well as headers from other packages we don't control).
http://monetdb.cwi.nl/testweb/logs/43252:cd8cc2e8fd60/Cla-Fedora-x86_64-propcheck/make.html
We should review if we want to change things for Clang here, and/or if it perhaps points out something useful.
## Comment 17031
Date: 2012-02-29 10:41:40 +0100
From: @sjoerdmullender
Changeset [163ca6fe5738](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=163ca6fe5738) 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=163ca6fe5738](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=163ca6fe5738)
Changeset description:
Fixed a lot of complaints from Clang-3.0.
This fixes as much of bug #3042 as is reasonable.
Many changes are to use the C preprocessor to disable pieces of code
instead of using the C construct if (0) ...
Also, don't put code after functions that don't return.
## Comment 17488
Date: 2012-07-17 14:41:59 +0200
From: @grobian
Warningless Clang compilation is not of interest to us (mostly due to the amount of hints/false positives).
## Comment 18065
Date: 2012-11-27 14:02:00 +0100
From: @yzchang
Compilation issues, no need to add test
| Clang-3.0 has numerous complaints about our code | https://api.github.com/repos/MonetDB/MonetDB/issues/3042/comments | 0 | 2020-11-30T12:08:45Z | 2024-06-28T13:40:52Z | https://github.com/MonetDB/MonetDB/issues/3042 | 753,424,032 | 3,042 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-02-23 15:41:05 +0100
From: Gatis Ozolins <<g.ozolins>>
To: SQL devs <<bugs-sql>>
Version: 11.7.5 (Dec2011) [obsolete]
CC: @njnes
Last updated: 2012-02-29 10:34:22 +0100
## Comment 16983
Date: 2012-02-23 15:41:05 +0100
From: Gatis Ozolins <<g.ozolins>>
User-Agent: Mozilla/5.0 (Windows; Windows NT 6.1; rv:10.0) Gecko/20100101 Firefox/9.0
Build Identifier: Dec2011
Only happens if first left join is subquery and is followed by another left join.
Reproducible: Always
### Steps to Reproduce:
Create sample data:
CREATE TABLE emp (
empno int,
ename varchar(10),
job varchar(9),
mgr int,
hiredate date,
sal decimal(7,2),
comm decimal(7,2),
deptno int
);
INSERT INTO emp VALUES (7369,'SMITH','CLERK',7902,'1980-12-17',800.00,NULL,20);
INSERT INTO emp VALUES (7499,'ALLEN','SALESMAN',7698,'1981-02-20',1600.00,300.00,30);
INSERT INTO emp VALUES (7521,'WARD','SALESMAN',7698,'1981-02-22',1250.00,500.00,30);
INSERT INTO emp VALUES (7566,'JONES','MANAGER',7839,'1981-04-02',2975.00,NULL,20);
INSERT INTO emp VALUES (7654,'MARTIN','SALESMAN',7698,'1981-09-28',1250.00,1400.00,30);
INSERT INTO emp VALUES (7698,'BLAKE','MANAGER',7839,'1981-05-01',2850.00,NULL,30);
INSERT INTO emp VALUES (7782,'CLARK','MANAGER',7839,'1981-06-09',2450.00,NULL,10);
INSERT INTO emp VALUES (7788,'SCOTT','ANALYST',7566,'1982-12-09',3000.00,NULL,20);
INSERT INTO emp VALUES (7839,'KING','PRESIDENT',NULL,'1981-11-17',5000.00,NULL,10);
INSERT INTO emp VALUES (7844,'TURNER','SALESMAN',7698,'1981-09-08',1500.00,0.00,30);
INSERT INTO emp VALUES (7876,'ADAMS','CLERK',7788,'1983-01-12',1100.00,NULL,20);
INSERT INTO emp VALUES (7900,'JAMES','CLERK',7698,'1981-12-03',950.00,NULL,30);
INSERT INTO emp VALUES (7902,'FORD','ANALYST',7566,'1981-12-03',3000.00,NULL,20);
INSERT INTO emp VALUES (7934,'MILLER','CLERK',7782,'1982-01-23',1300.00,NULL,10);
SQL:
SELECT e.job, e.ename, ep.ename, epp.ename
FROM emp e
LEFT JOIN (SELECT * FROM emp) ep ON (e.mgr = ep.empno)
LEFT JOIN emp epp ON (ep.mgr = epp.empno)
WHERE e.job = 'SALESMAN'
ORDER BY 1,2,3,4
### Actual Results:
ANALYST FORD JONES KING
ANALYST SCOTT JONES KING
CLERK ADAMS SCOTT JONES
CLERK JAMES BLAKE KING
CLERK MILLER CLARK KING
CLERK SMITH FORD JONES
MANAGER BLAKE KING <null>
MANAGER CLARK KING <null>
MANAGER JONES KING <null>
PRESIDENT KING <null> <null>
SALESMAN ALLEN BLAKE KING
SALESMAN MARTIN BLAKE KING
SALESMAN TURNER BLAKE KING
SALESMAN WARD BLAKE KING
### Expected Results:
SALESMAN ALLEN BLAKE KING
SALESMAN MARTIN BLAKE KING
SALESMAN TURNER BLAKE KING
SALESMAN WARD BLAKE KING
## Comment 16989
Date: 2012-02-24 10:30:28 +0100
From: @njnes
Changeset [9f1cd8ded319](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9f1cd8ded319) 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=9f1cd8ded319](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=9f1cd8ded319)
Changeset description:
fixed bug #3041. Make sure we push a select realy under a left join
not in a left join.
| WHERE condition ignored after 2 LEFT JOINs with subqueries | https://api.github.com/repos/MonetDB/MonetDB/issues/3041/comments | 0 | 2020-11-30T12:08:42Z | 2024-06-27T11:55:45Z | https://github.com/MonetDB/MonetDB/issues/3041 | 753,424,014 | 3,041 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-02-23 15:32:37 +0100
From: Gatis Ozolins <<g.ozolins>>
To: SQL devs <<bugs-sql>>
Version: 11.15.11 (Feb2013-SP3)
CC: @njnes, sellam
Last updated: 2015-01-28 15:59:44 +0100
## Comment 16982
Date: 2012-02-23 15:32:37 +0100
From: Gatis Ozolins <<g.ozolins>>
User-Agent: Mozilla/5.0 (Windows; Windows NT 6.1; rv:10.0) Gecko/20100101 Firefox/9.0
Build Identifier: Dec2011
According to: https://en.wikipedia.org/wiki/Null_%28SQL%29
In grouping and sorting "any two values that are equal to one another, or any two Nulls" should be "not distinct".
Reproducible: Always
### Steps to Reproduce:
select null
EXCEPT
select null
### Actual Results:
<null>
### Expected Results:
0 rows
## Comment 17212
Date: 2012-05-02 21:09:34 +0200
From: @njnes
The except is implemented as a combination of binary algebra group, count and join. The Group/count has the proper (in this case) NULL handling (ie non-distinct). For join this isn't the case as for normal relational joins the NULL != NULL should hold.
We need to investigate if the join code could be made proper NULL semantics aware.
## Comment 17690
Date: 2012-08-24 14:56:04 +0200
From: @sjoerdmullender
Jul2012-SP1 has been released.
## Comment 18200
Date: 2012-11-28 13:45:35 +0100
From: sellam
Changeset [7af551ae9f42](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7af551ae9f42) made by Thibault Sellam <sellam@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=7af551ae9f42](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=7af551ae9f42)
Changeset description:
Added test for bug #3040
## Comment 19100
Date: 2013-08-28 16:27:46 +0200
From: @njnes
fixed by using the new subjoin with nil=nil semantics
## Comment 19101
Date: 2013-08-28 16:40:44 +0200
From: MonetDB Mercurial Repository <<hg>>
Changeset [974c4105edf4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=974c4105edf4) 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=974c4105edf4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=974c4105edf4)
Changeset description:
fixed bug #3040, ie use subjoin with nil = nil to fix except/intersect semantics problem.
also cleanup of sql_statement* code
## Comment 19620
Date: 2014-02-20 15:03:02 +0100
From: @sjoerdmullender
Jan2014 has been released.
## Comment 20591
Date: 2015-01-28 15:59:44 +0100
From: MonetDB Mercurial Repository <<hg>>
Changeset [f6971e8244d5](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f6971e8244d5) 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=f6971e8244d5](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=f6971e8244d5)
Changeset description:
fixed typo (ie properly pass 'nil' == 'nil' semantics, fixes old bug #3040 (null except null)
properly find sub*joins (now including theta,band,anti and range joins)
| Wrong NULL behavior in EXCEPT and INTERSECT | https://api.github.com/repos/MonetDB/MonetDB/issues/3040/comments | 0 | 2020-11-30T12:08:40Z | 2024-06-27T11:55:44Z | https://github.com/MonetDB/MonetDB/issues/3040 | 753,423,985 | 3,040 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-02-23 15:27:08 +0100
From: Gatis Ozolins <<g.ozolins>>
To: SQL devs <<bugs-sql>>
Version: 11.7.5 (Dec2011) [obsolete]
Last updated: 2012-02-23 16:07:51 +0100
## Comment 16981
Date: 2012-02-23 15:27:08 +0100
From: Gatis Ozolins <<g.ozolins>>
User-Agent: Mozilla/5.0 (Windows; Windows NT 6.1; rv:10.0) Gecko/20100101 Firefox/9.0
Build Identifier: Dec2011
When using jdbc to select data from MonetDB, sql returns wrong results. Doesn't happen if MonetDB SQL Client is used.
Reproducible: Always
### Steps to Reproduce:
select 1,10,100,1000
### Actual Results:
49 49 49 1000
### Expected Results:
1 10 100 1000
Using SQuirreL SQL Client 3.3.0 with monetdb-jdbc-2.0.jar
## Comment 16984
Date: 2012-02-23 15:48:53 +0100
From: @grobian
I have no problems here:
Welcome to the MonetDB interactive JDBC terminal!
Database: MonetDB v11.7.6, 'decprep'
Driver: MonetDB Native Driver v2.0 (Liberica 20120220 based on MCL v1.6)
Type \q to quit, \h for a list of available commands
auto commit mode: on
monetdb-> select 1,10,100,1000;
+--------------+--------------+--------------+--------------+
| single_value | single_value | single_value | single_value |
+==============+==============+==============+==============+
| 1 | 10 | 100 | 1000 |
+--------------+--------------+--------------+--------------+
1 row
monetdb->
## Comment 16985
Date: 2012-02-23 15:51:16 +0100
From: Gatis Ozolins <<g.ozolins>>
As I wrote, it works in MonetDB SQL Client, but not when using jdbc client (SQuirreL SQL Client)
## Comment 16986
Date: 2012-02-23 15:52:33 +0100
From: @grobian
I used JDBC client
## Comment 16987
Date: 2012-02-23 16:07:51 +0100
From: Gatis Ozolins <<g.ozolins>>
I think this bug in SQuirrel SQL Client 3.3.0
I just tested with DbVisualizer 8.0.8 and everything was ok
| Using JDBC treats small numbers ar characters | https://api.github.com/repos/MonetDB/MonetDB/issues/3039/comments | 0 | 2020-11-30T12:08:38Z | 2024-06-28T07:23:15Z | https://github.com/MonetDB/MonetDB/issues/3039 | 753,423,950 | 3,039 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-02-23 10:48:51 +0100
From: @drstmane
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes
Last updated: 2012-03-16 14:56:57 +0100
## Comment 16975
Date: 2012-02-23 10:48:51 +0100
From: @drstmane
Any of the commits listed here
http://monetdb.cwi.nl/testweb/logs/43229:ef8a1eddc090/incoming_commits
causes ~190 SQL tests to fail only on Darwin, FreeBSD & Solaris with error messages like
QUERY = select * from optimizer_stats() stats;
ERROR = !SELECT: no such operator 'optimizer_stats'
i.e., existing functions are not found (anymore).
In fact, everything appears to still work fine with
http://dev.monetdb.org/hg/MonetDB/rev/2baf8c2d866b
but fails with
http://dev.monetdb.org/hg/MonetDB/rev/8ee024048e42
(well, tested only with
http://dev.monetdb.org/hg/MonetDB/rev/03df27701cf7
as compilation fails in between due to missing file(s))
cf.,
http://monetdb.cwi.nl/testweb/tests/43229:ef8a1eddc090/GNU-FreeBSD-x86_64-propcheck/sql/mTests/backends/monet5/UDF/udf-reverse.err.diff.html
http://monetdb.cwi.nl/testweb/tests/43229:ef8a1eddc090/GNU-FreeBSD-x86_64-propcheck/sql/mTests/benchmarks/tpch/01.err.diff.html
http://monetdb.cwi.nl/testweb/web/testgrid.php?serial=43229:ef8a1eddc090,43200:371633e5810b&module=sql&targets=GNU-Darwin-i386-propcheck,GNU-Darwin-x86_64-propcheck,GNU-Darwin-powerpc,GNU-Fedora-x86_64-propcheck-assert,GNU-FreeBSD-x86_64-propcheck,GNU-Solaris-sparc,GNU-Solaris-sparcv9-oid32,GNU-Solaris-sparcv9&order=platform,arch,compiler&diff
See also bug #3031.
## Comment 16991
Date: 2012-02-24 18:13:28 +0100
From: @njnes
Changeset [bf32aab6ebf8](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=bf32aab6ebf8) 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=bf32aab6ebf8](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=bf32aab6ebf8)
Changeset description:
fixed problems on Darwin, FreeBSD and solaris (Bugs 3038) and Bug #3031 on windows.
## Comment 17106
Date: 2012-03-16 14:56:57 +0100
From: @grobian
Released in Dec2011-SP2
| ~190 SQL tests fail on Darwin, FreeBSD & Solaris (only) since introduction of "(extended) relational algebra" | https://api.github.com/repos/MonetDB/MonetDB/issues/3038/comments | 0 | 2020-11-30T12:08:35Z | 2024-06-27T11:55:42Z | https://github.com/MonetDB/MonetDB/issues/3038 | 753,423,923 | 3,038 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-02-22 16:20:19 +0100
From: mrunal.gawade
To: MonetDB5 devs <<bugs-monetdb5>>
Version: -- development
CC: @drstmane, @yzchang
Last updated: 2012-11-27 14:04:47 +0100
## Comment 16969
Date: 2012-02-22 16:20:19 +0100
From: mrunal.gawade
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0.1) Gecko/20100101 Firefox/9.0.1
Build Identifier: default branch-21st Feb
sql>set optimizer='optimizer.inline();optimizer.remap();optimizer.deadcode();optimizer.multiplex();optimizer.garbageCollector();optimizer.mitosis();';
operation successful (0.736ms)
>> Excerpts from Martins comment.
multiplex and garbagecollectors should be the last in the list. The system should have warned for this error. It is a bug.
Reproducible: Always
### Steps to Reproduce:
sql>set optimizer='optimizer.inline();optimizer.remap();optimizer.deadcode();optimizer.multiplex();optimizer.garbageCollector();optimizer.mitosis();';
operation successful (0.736ms)
### Expected Results:
Error message indicating, mitosis can not be added at the end of pipeline.
## Comment 16970
Date: 2012-02-22 16:40:29 +0100
From: @drstmane
See also test sql/backends/monet5/Tests/optimizers.sql that tests (some) optimizer pipeline sanity checks and failes since the introduction of the new optimizer framework:
http://monetdb.cwi.nl/testweb/tests/43242:00055a0bccb7/GNU-Fedora-x86_64-propcheck-assert/sql/mTests/backends/monet5/optimizers.err.diff.html
See also bug #3030 at http://bugs.monetdb.org/show_bug.cgi?id=3030 .
## Comment 17018
Date: 2012-02-28 09:01:19 +0100
From: @drstmane
Changeset [c1aa760065da](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c1aa760065da) made by Stefan Manegold <Stefan.Manegold@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=c1aa760065da](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=c1aa760065da)
Changeset description:
extended optimizer test to cover also bug #3037
## Comment 17019
Date: 2012-02-28 09:02:38 +0100
From: @drstmane
optimizer pipeline sanity checks appear to work, again.
## Comment 18067
Date: 2012-11-27 14:04:47 +0100
From: @yzchang
This bug is covered by the test sql/backends/monet5/Tests/optimizers.sql
| Set optimizer pipeline needs garbagecollector at end. But no error is thrown if it is not. | https://api.github.com/repos/MonetDB/MonetDB/issues/3037/comments | 0 | 2020-11-30T12:08:32Z | 2024-06-27T11:55:41Z | https://github.com/MonetDB/MonetDB/issues/3037 | 753,423,894 | 3,037 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-02-22 15:54:49 +0100
From: mrunal.gawade
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes
Last updated: 2012-03-16 14:56:53 +0100
## Comment 16968
Date: 2012-02-22 15:54:49 +0100
From: mrunal.gawade
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0.1) Gecko/20100101 Firefox/9.0.1
Build Identifier: default branch-21st Feb
I did following steps
1. Set a user defined optimizer (add mitosis to minimal_pipe)
2. Check using "select optimizer" to see its set
3. Re-set a predefined optimizer, like minimal_pipe
4. Check using "select optimizer" to see its set. However, the UI keeps on showing "user" optimizer instead of minimal_pipe
5. Disconnect the client and re-connect and try "select optimizer" and I see the minimal_pipe.
Here is the sequence.
sql>select optimizer;
+--------------+
| single_value |
+==============+
| user |
+--------------+
1 tuple (0.617ms)
sql>set optimizer='minimal_pipe';
operation successful (0.531ms)
sql>select optimizer;
+--------------+
| single_value |
+==============+
| user |
+--------------+
1 tuple (0.539ms)
sql>select optimizer;
+--------------+
| single_value |
+==============+
| user |
+--------------+
1 tuple (0.470ms)
sql>set optimizer='minimal_pipe';
operation successful (0.445ms)
sql>select optimizer;
+--------------+
| single_value |
+==============+
| user |
+--------------+
1 tuple (0.478ms)
sql>\q
bash-4.2$ mclient -dSF-100
Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased)
Database: MonetDB v11.8.0 (unreleased), 'mapi:monetdb://cologne.ins.cwi.nl:54321/SF-100'
Type \q to quit, \? for a list of available commands
auto commit mode: on
sql>select optimizer;
+--------------+
| single_value |
+==============+
| minimal_pipe |
+--------------+
1 tuple (0.517ms)
Reproducible: Always
### Steps to Reproduce:
I did following steps
1. Set a user defined optimizer (add mitosis to minimal_pipe)
2. Check using "select optimizer" to see its set
3. Re-set a predefined optimizer, like minimal_pipe
4. Check using "select optimizer" to see its set. However, the UI keeps on showing "user" optimizer instead of minimal_pipe
5. Disconnect the client and re-connect and try "select optimizer" and I see the minimal_pipe.
Here is the sequence.
sql>select optimizer;
+--------------+
| single_value |
+==============+
| user |
+--------------+
1 tuple (0.617ms)
sql>set optimizer='minimal_pipe';
operation successful (0.531ms)
sql>select optimizer;
+--------------+
| single_value |
+==============+
| user |
+--------------+
1 tuple (0.539ms)
sql>select optimizer;
+--------------+
| single_value |
+==============+
| user |
+--------------+
1 tuple (0.470ms)
sql>set optimizer='minimal_pipe';
operation successful (0.445ms)
sql>select optimizer;
+--------------+
| single_value |
+==============+
| user |
+--------------+
1 tuple (0.478ms)
sql>\q
bash-4.2$ mclient -dSF-100
Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased)
Database: MonetDB v11.8.0 (unreleased), 'mapi:monetdb://cologne.ins.cwi.nl:54321/SF-100'
Type \q to quit, \? for a list of available commands
auto commit mode: on
sql>select optimizer;
+--------------+
| single_value |
+==============+
| minimal_pipe |
+--------------+
1 tuple (0.517ms)
### Expected Results:
corret optimizer should get set
## Comment 17098
Date: 2012-03-16 14:56:53 +0100
From: @grobian
Released in Dec2011-SP2
| optimizers are not getting set correctly through set optimizer | https://api.github.com/repos/MonetDB/MonetDB/issues/3036/comments | 0 | 2020-11-30T12:08:30Z | 2024-06-27T11:55:40Z | https://github.com/MonetDB/MonetDB/issues/3036 | 753,423,884 | 3,036 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-02-21 15:14:35 +0100
From: @skinkie
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes
Last updated: 2012-02-25 19:22:52 +0100
## Comment 16966
Date: 2012-02-21 15:14:35 +0100
From: @skinkie
User-Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.11 Safari/535.19
Build Identifier:
CREATE TABLE "sys"."quays" (
"dataownercode" VARCHAR(10) NOT NULL,
"publiccode" VARCHAR(10) NOT NULL,
"stopplace" VARCHAR(32)
);
CREATE TABLE "sys"."timdemrnt" (
"dataownercode" VARCHAR(10) NOT NULL,
"userstopcodebegin" VARCHAR(10) NOT NULL
);
sql>select count(*) from sys.quays ;
+-------+
| L1 |
+=======+
| 18798 |
+-------+
1 tuple (0.926ms)
sql>select count(*) from sys.timdemrnt ;
+--------+
| L1 |
+========+
| 273423 |
+--------+
1 tuple (1.208ms)
I'm trying to join the two tables. I'll show the individual performance first:
sql>select dataownercode, publiccode from quays where quays.stopplace = 'OPENOV:57002570';
+---------------+------------+
| dataownercode | publiccode |
+===============+============+
| CXX | 57002570 |
| CXX | 57002580 |
+---------------+------------+
2 tuples (2.555ms)
sql>select count(*) from timdemrnt where userstopcodebegin IN ('57002570', '57002580') and dataownercode = 'CXX';
+------+
| L4 |
+======+
| 375 |
+------+
1 tuple (1.467ms)
trace select count(*)
from quays, timdemrnt
where
timdemrnt.dataownercode = quays.dataownercode AND
timdemrnt.userstopcodebegin = quays.publiccode AND
quays.stopplace = 'OPENOV:57002570';
+--------+----------------------------------------------------------------------------------------------------------------+
| ticks | stmt |
+========+================================================================================================================+
| 3 | X_3 := sql.mvc(); |
| 12 | X_32:bat[:oid,:str] =<tmp_1765>[273423] := sql.bind(X_3=0,"sys","timdemrnt","dataownercode",0); |
| 14 | X_41=<tmp_3544>[273423] := algebra.markT(X_32=<tmp_1765>:bat[:oid,:str][273423],40@0:oid); |
| 5 | X_35=<tmpr_1765>[273423] := bat.reverse(X_32=<tmp_1765>:bat[:oid,:str][273423]); |
| 10 | X_36=<tmp_3715>[273423] := algebra.markT(X_35=nil,40@0:oid); |
| 4 | X_37=<tmpr_3715>[273423] := bat.reverse(X_36=nil); |
| 29611 | X_38:bat[:oid,:wrd] =<tmp_3551>[273423] := batcalc.hash(X_37=nil); |
| 7 | X_42=<tmpr_3544>[273423] := bat.reverse(X_41=<tmp_3544>[273423]); |
| 15 | X_40:bat[:oid,:str] =<tmp_1770>[273423] := sql.bind(X_3=0,"sys","timdemrnt","userstopcodebegin",0); |
| 30 | X_43=<tmp_4043>[273423] := algebra.leftjoin(X_42=nil,X_40=<tmp_1770>:bat[:oid,:str][273423]); |
| 12907 | X_44:bat[:oid,:wrd] =<tmp_3715>[273423] := mkey.bulk_rotate_xor_hash(X_38=nil:bat[:oid,:wrd],22:int,X_43=nil); |
| 16 | X_13:bat[:oid,:str] =<tmp_2207>[18798] := sql.bind(X_3=0,"sys","quays","stopplace",0); |
| 625 | X_14=<tmp_4043>[2] := algebra.uselect(X_13=nil:bat[:oid,:str],A0="OPENOV:57002570"); |
| 10 | X_15=<tmp_3551>[2] := algebra.markT(X_14=nil,0@0:oid); |
| 5 | X_16=<tmpr_3551>[2] := bat.reverse(X_15=nil); |
| 8 | X_19:bat[:oid,:str] =<tmp_1354>[18798] := sql.bind(X_3=0,"sys","quays","dataownercode",0); |
| 22 | X_20=<tmp_2101>[2] := algebra.leftjoin(X_16=<tmpr_3551>[2],X_19=nil:bat[:oid,:str]); |
| 4 | X_21=<tmpr_2101>[2] := bat.reverse(X_20=<tmp_2101>[2]); |
| 8 | X_25=<tmp_4004>[2] := algebra.markT(X_20=<tmp_2101>[2],40@0:oid); |
| 8 | X_22=<tmp_4007>[2] := algebra.markT(X_21=nil,40@0:oid); |
| 5 | X_23=<tmpr_4007>[2] := bat.reverse(X_22=nil); |
| 11 | X_24:bat[:oid,:wrd] =<tmp_4037>[2] := batcalc.hash(X_23=nil); |
| 4 | X_26=<tmpr_4004>[2] := bat.reverse(X_25=<tmp_4004>[2]); |
| 7 | X_11:bat[:oid,:str] =<tmp_2223>[18798] := sql.bind(X_3=0,"sys","quays","publiccode",0); |
| 27 | X_17=<tmp_4012>[2] := algebra.leftjoin(X_16=nil,X_11=nil:bat[:oid,:str]); |
| 18 | X_27=<tmp_3551>[2] := algebra.leftjoin(X_26=nil,X_17=<tmp_4012>[2]); |
| 13 | X_28:bat[:oid,:wrd] =<tmp_3757>[2] := mkey.bulk_rotate_xor_hash(X_24=nil:bat[:oid,:wrd],22:int,X_27=nil); |
| 18 | X_29=<tmp_4037>[2] := algebra.join(X_25=nil,X_28=nil:bat[:oid,:wrd]); |
| 5 | X_30=<tmpr_4037>[2] := bat.reverse(X_29=nil); |
| 58549 | X_45:bat[:oid,:oid] =<tmp_3640>[375] := algebra.joinPath(X_41=nil,X_44=nil:bat[:oid,:wrd],X_30=nil); |
| 8 | X_46=<tmpr_3640>[375] := bat.reverse(X_45=<tmp_3640>:bat[:oid,:oid][375]); |
| 12 | X_47=<tmp_3715>[375] := algebra.markT(X_46=nil,4@0:oid); |
| 5 | X_48=<tmpr_3715>[375] := bat.reverse(X_47=nil); |
| 8 | X_50=<tmp_3544>[375] := algebra.markT(X_45=nil:bat[:oid,:oid],4@0:oid); |
| 4 | X_51=<tmpr_3544>[375] := bat.reverse(X_50=nil); |
| 61 | X_52=<tmp_4006>[375] := algebra.leftjoin(X_51=<tmpr_3544>[375],X_32=nil:bat[:oid,:str]); |
| 61 | X_49=<tmp_4024>[375] := algebra.leftjoin(X_48=<tmpr_3715>[375],X_20=nil); |
| 57 | X_53:bat[:oid,:bit] =<tmp_2764>[375] := batcalc.==(X_52=nil,X_49=nil); |
| 15 | X_54=<tmp_4022>[375] := algebra.uselect(X_53=nil:bat[:oid,:bit],true:bit); |
| 17 | X_55=<tmp_3551>[375] := algebra.semijoin(X_48=nil,X_54=<tmp_4022>[375]); |
| 72 | X_56=<tmp_4024>[375] := algebra.leftjoin(X_55=<tmp_3551>[375],X_17=nil); |
| 15 | X_57=<tmp_3715>[375] := algebra.semijoin(X_51=nil,X_54=nil); |
| 94 | X_58=<tmp_4006>[375] := algebra.leftjoin(X_57=<tmp_3715>[375],X_40=nil:bat[:oid,:str]); |
| 37 | X_59:bat[:oid,:bit] =<tmp_2764>[375] := batcalc.==(X_58=nil,X_56=nil); |
| 12 | X_60=<tmp_4022>[375] := algebra.uselect(X_59=nil:bat[:oid,:bit],true:bit); |
| 14 | X_62=<tmp_3544>[375] := algebra.semijoin(X_57=nil,X_60=<tmp_4022>[375]); |
| 6 | X_63=<tmpr_3544>[375] := bat.reverse(X_62=nil); |
| 17 | X_61=<tmp_3715>[375] := algebra.semijoin(X_55=nil,X_60=nil); |
| 26 | X_64=<tmp_2761>[375] := algebra.join(X_63=nil,X_61=nil); |
| 8 | X_65=<tmp_3640>[375] := algebra.markT(X_64=nil,0@0:oid); |
| 4 | X_66=<tmpr_3640>[375] := bat.reverse(X_65=nil); |
| 14 | X_6:bat[:oid,:bte] =<tmp_1743>[273423] := sql.bind(X_3=0,"sys","timdemrnt","version",0); |
| 21 | X_67=<tmp_2764>[375] := algebra.leftjoin(X_66=nil,X_6=nil:bat[:oid,:bte]); |
| 6 | X_68 := aggr.count(X_67=nil); |
| 12 | sql.exportValue(1,"sys.timdemrnt","L1","wrd",64,0,6,X_68=375:wrd,""); |
| 10 | end s76_9; |
| 34 | function user.s76_9(A0=nil); |
| 108826 | X_5:void := user.s76_9("OPENOV:57002570"); |
+--------+----------------------------------------------------------------------------------------------------------------+
58 tuples (120.289ms)
And the normal output:
+------+
| L1 |
+======+
| 375 |
+------+
1 tuple (101.734ms)
So my question: why does it take so much more time to do this join? When removing the dataownercode comparison, it ends up at 20.183ms.
Reproducible: Always
tip
## Comment 16995
Date: 2012-02-25 19:03:51 +0100
From: @njnes
Problem is that with 2 (and more) columns we first compute hash values over the multi column join condition.
## Comment 16996
Date: 2012-02-25 19:22:52 +0100
From: @skinkie
(In reply to comment 1)
> Problem is that with 2 (and more) columns we first compute hash values over the
> multi column join condition.
Is the hash of the foreign key already used in this case?
| Bad join performance | https://api.github.com/repos/MonetDB/MonetDB/issues/3035/comments | 0 | 2020-11-30T12:08:27Z | 2024-06-28T07:23:14Z | https://github.com/MonetDB/MonetDB/issues/3035 | 753,423,854 | 3,035 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-02-21 11:36:30 +0100
From: George Garbis <<ggarbis>>
To: SQL devs <<bugs-sql>>
Version: -- development
CC: charnik, ggarbis, @drstmane
Last updated: 2012-02-29 10:34:23 +0100
## Comment 16964
Date: 2012-02-21 11:36:30 +0100
From: George Garbis <<ggarbis>>
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:10.0.2) Gecko/20100101 Firefox/10.0.2
Build Identifier: [03600f3e6c1b](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=03600f3e6c1b) tip
A query with INNER JOIN between a table and a subquery produces mal errors. These errors concern datatypes of subquery columns.
Reproducible: Always
### Steps to Reproduce:
1. Create tables and insert values
CREATE TABLE table1 (a INTEGER);
CREATE TABLE table2 (a INTEGER, b INTEGER);
INSERT INTO table1 VALUES(1);
INSERT INTO table1 VALUES(2);
INSERT INTO table2 VALUES(2, 2);
2. Pose the problematic query
SELECT * FROM (SELECT a, 2 AS b FROM table1) t1 INNER JOIN table2 t2 ON (t1.b = t2.b);
### Actual Results:
TypeException:user.s5_1[44]:'bat.mirror' undefined in: _62:any := bat.mirror(_61:int)
TypeException:user.s5_1[46]:'algebra.join' undefined in: _64:any := algebra.join(_62:any, _63:bat[:oid,:oid])
TypeException:user.s5_1[47]:'algebra.markH' undefined in: _65:any := algebra.markH(_64:any, _66:oid)
TypeException:user.s5_1[48]:'algebra.markT' undefined in: _67:any := algebra.markT(_64:any, _66:oid)
TypeException:user.s5_1[49]:'bat.reverse' undefined in: _68:any := bat.reverse(_67:any)
TypeException:user.s5_1[50]:'algebra.join' undefined in: _69:any := algebra.join(_68:any, _61:int)
TypeException:user.s5_1[51]:'algebra.join' undefined in: _70:any := algebra.join(_65:any, _59:bat[:oid,:int])
TypeException:user.s5_1[55]:'algebra.join' undefined in: _77:any := algebra.join(_76:bat[:void,:oid], _65:any)
TypeException:user.s5_1[56]:'bat.reverse' undefined in: _78:any := bat.reverse(_77:any)
TypeException:user.s5_1[57]:'algebra.markT' undefined in: _79:any := algebra.markT(_78:any, _43:oid)
TypeException:user.s5_1[58]:'bat.reverse' undefined in: _80:any := bat.reverse(_79:any)
TypeException:user.s5_1[59]:'algebra.leftjoin' undefined in: _81:any := algebra.leftjoin(_80:any, _42:bat[:oid,:int])
TypeException:user.s5_1[64]:'algebra.project' undefined in: _86:any := algebra.project(_81:any, _83:int)
TypeException:user.s5_1[65]:'algebra.join' undefined in: _87:any := algebra.join(_86:any, _85:bat[:int,:oid])
TypeException:user.s5_1[66]:'bat.reverse' undefined in: _88:any := bat.reverse(_87:any)
TypeException:user.s5_1[67]:'algebra.markT' undefined in: _89:any := algebra.markT(_88:any, _21:oid)
TypeException:user.s5_1[68]:'bat.reverse' undefined in: _90:any := bat.reverse(_89:any)
TypeException:user.s5_1[69]:'algebra.leftjoin' undefined in: _91:any := algebra.leftjoin(_90:any, _20:bat[:oid,:int])
TypeException:user.s5_1[76]:'algebra.markT' undefined in: _103:any := algebra.markT(_87:any, _101:oid)
TypeException:user.s5_1[77]:'bat.reverse' undefined in: _104:any := bat.reverse(_103:any)
TypeException:user.s5_1[78]:'algebra.leftjoin' undefined in: _105:any := algebra.leftjoin(_104:any, _81:any)
TypeException:user.s5_1[79]:'algebra.project' undefined in: _106:any := algebra.project(_105:any, _96:bte)
TypeException:user.s5_1[86]:'algebra.leftjoin' undefined in: _113:any := algebra.leftjoin(_80:any, _59:bat[:oid,:int])
TypeException:user.s5_1[87]:'algebra.leftjoin' undefined in: _114:any := algebra.leftjoin(_104:any, _113:any)
39000!program contains errors
### Expected Results:
+------+------+------+----+
| a | b | a | b |
+======+======+======+====+
| 2 | 2 | 2 | 2 |
| 1 | 2 | 2 | 2 |
+------+------+------+----+
If a user creates a table with the results of the aforementioned query and pose the same query with the new table instead of the subquery, then query executes flawlessly and expected results are returned.
CREATE TABLE table3 (a INTEGER, b INTEGER);
INSERT INTO table3(a,b) (SELECT a, 2 AS b FROM table1);
SELECT * FROM (SELECT a, b FROM table3) t1 INNER JOIN table2 t2 ON (t1.b = t2.b);
## Comment 16974
Date: 2012-02-22 23:53:06 +0100
From: @drstmane
IMHO the problem is not the inner join, but an incorrect treatment of the constant "2 AS b" column of the sub query.
In any case, it is a bug.
## Comment 16980
Date: 2012-02-23 14:44:25 +0100
From: @njnes
Changeset [86d94f21e92c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=86d94f21e92c) 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=86d94f21e92c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=86d94f21e92c)
Changeset description:
fixed bugs 3034, 2964 2946 and 3017
The rel2bin_join didn't handle a bunch of corner cases
| INNER JOIN with Subquery produces mal errors | https://api.github.com/repos/MonetDB/MonetDB/issues/3034/comments | 0 | 2020-11-30T12:08:25Z | 2024-06-27T11:55:38Z | https://github.com/MonetDB/MonetDB/issues/3034 | 753,423,824 | 3,034 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-02-20 20:38:08 +0100
From: @drstmane
To: clients devs <<bugs-clients>>
Version: 11.15.1 (Feb2013)
CC: duc, mrunal.gawade, y.kargin
Last updated: 2013-02-19 13:17:58 +0100
## Comment 16957
Date: 2012-02-20 20:38:08 +0100
From: @drstmane
With the latest default branch (changeset ef9492865066) on Fedora 16 (optimized build):
$ cat ~/.monetdb
user=monetdb
password=monetdb
$ stethoscope
MAPI = monetdb@(null):50000
ACTION= mapi_reconnect
ERROR = !getaddrinfo failed: Name or service not known
-- connection with server mapi:monetdb://(null):50000/(null) closed
## Comment 17167
Date: 2012-04-26 23:21:30 +0200
From: @drstmane
This problem is also present in Apr2012.
What do I need to do to get stethoscope to connect to mserver5 successfully?
Shell 1:
$ mserver5 --dbname=MyDB
MonetDB 5 server v11.9.0
This is an unreleased version
Serving database 'MyDB', using 8 threads
Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically linked
Found 15.629 GiB available main-memory.
Copyright (c) 1993-July 2008 CWI.
Copyright (c) August 2008-2012 MonetDB B.V., all rights reserved
Visit http://www.monetdb.org/ for further information
Listening for connection requests on mapi:monetdb://127.0.0.1:50000/
MonetDB/GIS module loaded
MonetDB/SQL module loaded
>
Shell 2:
$ cat ~/.monetdb
user=monetdb
password=monetdb
$ stethoscope
MAPI = monetdb@(null):50000
ACTION= mapi_reconnect
ERROR = !getaddrinfo failed: Name or service not known
-- connection with server mapi:monetdb://(null):50000/(null) closed
$ stethoscope -h rome.ins.cwi.nl
MAPI = monetdb@rome.ins.cwi.nl:50000
ACTION= mapi_reconnect
ERROR = !could not connect to rome.ins.cwi.nl:50000: Connection refused
-- connection with server mapi:monetdb://rome.ins.cwi.nl:50000/(null) closed
$ stethoscope -h rome.ins.cwi.nl -u monetdb
MAPI = monetdb@rome.ins.cwi.nl:50000
ACTION= mapi_reconnect
ERROR = !could not connect to rome.ins.cwi.nl:50000: Connection refused
-- connection with server mapi:monetdb://rome.ins.cwi.nl:50000/(null) closed
$ stethoscope -h rome.ins.cwi.nl -u monetdb -P monetdb
MAPI = monetdb@rome.ins.cwi.nl:50000
ACTION= mapi_reconnect
ERROR = !could not connect to rome.ins.cwi.nl:50000: Connection refused
-- connection with server mapi:monetdb://rome.ins.cwi.nl:50000/(null) closed
$ stethoscope -h rome.ins.cwi.nl -u monetdb -P monetdb -d MyDB
MAPI = monetdb@rome.ins.cwi.nl:50000
ACTION= mapi_reconnect
ERROR = !could not connect to rome.ins.cwi.nl:50000: Connection refused
-- connection with server mapi:monetdb://rome.ins.cwi.nl:50000/MyDB closed
$ stethoscope -h rome.ins.cwi.nl -u monetdb -P monetdb -d MyDB -p 50000
MAPI = monetdb@rome.ins.cwi.nl:50000
ACTION= mapi_reconnect
ERROR = !could not connect to rome.ins.cwi.nl:50000: Connection refused
-- connection with server mapi:monetdb://rome.ins.cwi.nl:50000/MyDB closed
## Comment 17168
Date: 2012-04-26 23:32:30 +0200
From: @drstmane
hm, it appears I have to start mserver5 with --set mapi_open=true, and provide stethoscope with both host name and database name --- mclient requires none of these ...
Shell 1:
$ mserver5 --dbname=MyDB --set mapi_open=true
MonetDB 5 server v11.9.0
This is an unreleased version
Serving database 'MyDB', using 8 threads
Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically linked
Found 15.629 GiB available main-memory.
Copyright (c) 1993-July 2008 CWI.
Copyright (c) August 2008-2012 MonetDB B.V., all rights reserved
Visit http://www.monetdb.org/ for further information
Listening for connection requests on mapi:monetdb://rome.ins.cwi.nl:50000/
MonetDB/GIS module loaded
MonetDB/SQL module loaded
>
Shell 2:
$ stethoscope
MAPI = monetdb@(null):50000
ACTION= mapi_reconnect
ERROR = !getaddrinfo failed: Name or service not known
-- connection with server mapi:monetdb://(null):50000/(null) closed
$ stethoscope -h rome
MAPI = monetdb@rome:50000
ACTION= mapi_start_talking
ERROR = !request for database '(null)', but this is database 'MyDB', did you mean to connect to monetdbd instead?
-- connection with server mapi:monetdb://rome:50000/(null) closed
$ stethoscope -d MyDB
MAPI = monetdb@(null):50000
ACTION= mapi_reconnect
ERROR = !getaddrinfo failed: Name or service not known
-- connection with server mapi:monetdb://(null):50000/MyDB closed
$ stethoscope -h rome -d MyDB
-- connection with server mapi:monetdb://rome:50000/MyDB
-- profiler.activate("event");
-- profiler.activate("time");
-- profiler.activate("ticks");
-- profiler.activate("stmt");
-- profiler.activate("thread");
-- profiler.activate("start");
-- opened UDP profile stream rome.ins.cwi.nl:50010 for rome
-- profiler.setAll();
-- profiler.start();
## Comment 17177
Date: 2012-04-27 08:31:47 +0200
From: @grobian
stethoscope and mclient should/could share the same bit of connection "searching" magic to make it behave as expected when being spoiled with the (IMO luxurous) mclient behaviour
## Comment 17178
Date: 2012-04-27 08:41:09 +0200
From: @drstmane
Alternatively, we could document prominently and clearly (via `man stethoscope` and `stethoscope --help` and the error messages`) that stethoscope requires
(1) -d <dbname>
(2) -h <host>
(3) mserver5 allowing "remote" connection (--set mapi_open-true)
## Comment 17658
Date: 2012-08-24 14:50:26 +0200
From: @sjoerdmullender
Jul2012-SP1 has been released.
## Comment 17903
Date: 2012-11-07 19:28:53 +0100
From: @grobian
(In reply to comment 4)
> Alternatively, we could document prominently and clearly (via `man stethoscope`
> and `stethoscope --help` and the error messages`) that stethoscope requires
> (1) -d <dbname>
> (2) -h <host>
> (3) mserver5 allowing "remote" connection (--set mapi_open-true)
would be happy with that for the time being (perhaps fix tomograph at the same time)
## Comment 18465
Date: 2013-02-11 23:20:17 +0100
From: @drstmane
Since changesets 46250:26622b43db44 - 46262:5a1b55f4e88a (on Feb2013 branch), stethoscope (& tomograph) behave just like client to find the server (& database) to connect to. This solved this bug. Thanks go to Fabian!
Closing.
## Comment 18511
Date: 2013-02-19 13:17:58 +0100
From: @sjoerdmullender
Feb2013 has been released.
| stethoscope needs better documentation | https://api.github.com/repos/MonetDB/MonetDB/issues/3033/comments | 0 | 2020-11-30T12:08:23Z | 2024-06-27T11:55:37Z | https://github.com/MonetDB/MonetDB/issues/3033 | 753,423,803 | 3,033 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-02-20 10:01:44 +0100
From: @drstmane
To: MonetDB5 devs <<bugs-monetdb5>>
Version: -- development
CC: @yzchang
Last updated: 2012-11-27 14:07:00 +0100
## Comment 16956
Date: 2012-02-20 10:01:44 +0100
From: @drstmane
Since changeset [a7d81b543e48](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a7d81b543e48) (http://dev.monetdb.org/hg/MonetDB/rev/a7d81b543e48), numerous M5/MAL tests fail, showing only "crippled" versions of expected type exception messages, e.g.,
!TypeException:user.main[5]:'user.welcome2' undefined in: (, ) := user.welcome2()
instead of
!TypeException:user.main[5]:'user.welcome2' undefined in: (x:any, y:str) := user.welcome2(_2:int)
Cf.,
http://monetdb.cwi.nl/testweb/tests/43096:79d7e2d0c99f/GNU-Solaris-sparc/monetdb5/mTests/mal/tst019.out.diff.html
http://monetdb.cwi.nl/testweb/tests/43096:79d7e2d0c99f/GNU-Solaris-sparc/monetdb5/mTests/mal/tst007.out.diff.html
http://monetdb.cwi.nl/testweb/web/testgrid.php?serial=43229:ef8a1eddc090,43096:79d7e2d0c99f,43083:e576bc57a77d,43072:66c75606ef30&module=monetdb5,sql&targets=GNU-Fedora-x86_64-propcheck-assert,GNU-Solaris-sparc,GNU-Solaris-sparcv9-oid32,GNU-Solaris-sparcv9&order=platform,arch,compiler&diff
## Comment 17172
Date: 2012-04-27 01:10:03 +0200
From: @drstmane
This appears to be fixed, both in Apr2012_1, Apr2012 and default:
http://monetdb.cwi.nl/testweb/web/testgrid.php?serial=43870:4702495ed780&module=monetdb5
http://monetdb.cwi.nl/testweb/web/testgrid.php?serial=43950:702b55cbad26&module=monetdb5
http://monetdb.cwi.nl/testweb/web/testgrid.php?serial=43935:bd7bcdd865f7&module=monetdb5
## Comment 18068
Date: 2012-11-27 14:05:40 +0100
From: @yzchang
This is about existing tests
## Comment 18069
Date: 2012-11-27 14:07:00 +0100
From: @yzchang
This is about existing tests
| numerous M5/MAL tests fail on SunOS/Solaris as TypeExecptions do no longer show arguments in command signatures | https://api.github.com/repos/MonetDB/MonetDB/issues/3032/comments | 0 | 2020-11-30T12:08:20Z | 2024-06-27T11:55:36Z | https://github.com/MonetDB/MonetDB/issues/3032 | 753,423,763 | 3,032 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-02-20 01:06:56 +0100
From: @drstmane
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes
Last updated: 2012-03-16 14:56:51 +0100
## Comment 16954
Date: 2012-02-20 01:06:56 +0100
From: @drstmane
Any of the commits listed here
http://monetdb.cwi.nl/testweb/logs/43229:ef8a1eddc090/incoming_commits
causes virtually all SQL tests on Windows to fail with
ParseException:SQLparser:!42000!syntax error, unexpected $end in: "-- the signature is used in the kernel, don't change it
create procedure keepcall(
id wrd, -- references query plan
ctime timestamp, -- time the first statement was executed
arguments string,
xtime bigint, -- time from the first statement until result export
rtime bigint, -- time to ship the result to the client
foot bigint, -- footprint for all bats in the plan
memory bigint, -- storage size of intermediates created
tuples wrd, -- number of tuples in the result set
inblock bigint, -- nu�Dܧ�Xq�
"
Cf.,
http://monetdb.cwi.nl/testweb/tests/43229:ef8a1eddc090/Mic-Windows2008-i386-propcheck-installer/sql/mTests/backends/monet5/optimizers.err.diff.html
http://monetdb.cwi.nl/testweb/web/testgrid.php?serial=43229:ef8a1eddc090,43200:371633e5810b&module=sql&targets=GNU-Fedora-x86_64-propcheck-assert,Int-WindowsXP-i386-propcheck,Mic-Windows2008-i386-propcheck-installer,Int-Windows2008-x86_64-propcheck-oid32,Mic-Windows7-x86_64-propcheck-oid32-installer,Int-Windows7-x86_64-propcheck,Mic-Windows2008-x86_64-propcheck-installer&order=platform,arch,compiler&diff
## Comment 16976
Date: 2012-02-23 10:49:06 +0100
From: @drstmane
See also bug #3038.
## Comment 16992
Date: 2012-02-24 18:13:28 +0100
From: @njnes
Changeset [bf32aab6ebf8](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=bf32aab6ebf8) 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=bf32aab6ebf8](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=bf32aab6ebf8)
Changeset description:
fixed problems on Darwin, FreeBSD and solaris (Bugs 3038) and Bug #3031 on windows.
## Comment 17093
Date: 2012-03-16 14:56:51 +0100
From: @grobian
Released in Dec2011-SP2
| Virtually all SQL tests fail on Windows | https://api.github.com/repos/MonetDB/MonetDB/issues/3031/comments | 0 | 2020-11-30T12:08:18Z | 2024-06-27T11:55:35Z | https://github.com/MonetDB/MonetDB/issues/3031 | 753,423,744 | 3,031 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-02-20 00:36:45 +0100
From: @drstmane
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @mlkersten
Last updated: 2012-04-27 14:51:58 +0200
## Comment 16952
Date: 2012-02-20 00:36:45 +0100
From: @drstmane
Optimizer tests
sql/backends/monet5/Tests/optimizers.sql
and
sql/test/Tests/setoptimizer.sql
fail with the new optimizer framework.
In particular the following error messages seem to be unexpected:
!SyntaxException:parseError:
!';' expected
Cf.,
http://monetdb.cwi.nl/testweb/tests/43229:ef8a1eddc090/GNU-Fedora-x86_64-propcheck-assert/sql/mTests/test/setoptimizer.out.diff.html
http://monetdb.cwi.nl/testweb/tests/43229:ef8a1eddc090/GNU-Fedora-x86_64-propcheck-assert/sql/mTests/backends/monet5/optimizers.out.diff.html
http://monetdb.cwi.nl/testweb/tests/43229:ef8a1eddc090/GNU-Fedora-x86_64-propcheck-assert/sql/mTests/backends/monet5/optimizers.err.diff.html
## Comment 16971
Date: 2012-02-22 16:40:51 +0100
From: @drstmane
See also bug #3037 .
## Comment 17027
Date: 2012-02-29 00:49:39 +0100
From: @drstmane
Updated URLs:
http://monetdb.cwi.nl/testweb/tests/43369:9a4896bf69ea/GNU-Fedora-x86_64-propcheck-assert/sql/mTests/backends/monet5/optimizers.err.diff.html
http://monetdb.cwi.nl/testweb/tests/43369:9a4896bf69ea/GNU-Fedora-x86_64-propcheck-assert/sql/mTests/test/setoptimizer.err.diff.html
The remaining differences / bugs are
1)
The expected error
"
ERROR = !Syntax error detected.See documentation for details
"
now looks like
"
ERROR = !SyntaxException:parseError:
!';' expected
!Syntax error detected.See documentation for details
"
(if this is indeed intended, then we need to approve the new error message)
2)
These errors are unexpected and wrong:
"
QUERY = select optimizer;
ERROR = !SyntaxException:parseError:
!';' expected
"
Maybe "just" a non-cleared error message buffer after the above error?
## Comment 17029
Date: 2012-02-29 08:47:38 +0100
From: @mlkersten
first error is indeed as expected.
second error is indeed an open issue
## Comment 17032
Date: 2012-02-29 15:19:29 +0100
From: @drstmane
Since changeset [0b6fc034c39c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0b6fc034c39c) (http://dev.monetdb.org/hg/MonetDB/rev/0b6fc034c39c),
test sql/backends/monet5/Tests/optimizers.sql results in a crash (segfault).
## Comment 17035
Date: 2012-03-01 10:33:21 +0100
From: @drstmane
segfault appears to be fixed. thanks.
latest status is available at, e.g.,
http://monetdb.cwi.nl/testweb/tests/43387:6b7b9ede06dd/GNU-Fedora-x86_64-propcheck-assert/sql/mTests/test/setoptimizer.out.diff.html
http://monetdb.cwi.nl/testweb/tests/43387:6b7b9ede06dd/GNU-Fedora-x86_64-propcheck-assert/sql/mTests/test/setoptimizer.err.diff.html
http://monetdb.cwi.nl/testweb/tests/43387:6b7b9ede06dd/GNU-Fedora-x86_64-propcheck-assert/sql/mTests/backends/monet5/optimizers.err.diff.html
## Comment 17049
Date: 2012-03-06 18:08:11 +0100
From: @sjoerdmullender
Changeset [fe6468cef2b0](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fe6468cef2b0) 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=fe6468cef2b0](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=fe6468cef2b0)
Changeset description:
When set optimizer fails, don't change old value.
It seems reasonable to me to not change the value of the SQL optimizer
variable if there is an error setting it. This also means not
changing the optimizers() table.
Also approved new error messages.
This fixes bug #3030.
## Comment 17175
Date: 2012-04-27 01:19:06 +0200
From: @drstmane
This appears to be fixed in Apr2012_1 and Apr2012 (latest):
http://monetdb.cwi.nl/testweb/web/testgrid.php?serial=43870:4702495ed780&module=sql
http://monetdb.cwi.nl/testweb/web/testgrid.php?serial=43950:702b55cbad26&module=sql
| optimizer tests fail with new optimizer framework | https://api.github.com/repos/MonetDB/MonetDB/issues/3030/comments | 0 | 2020-11-30T12:08:15Z | 2024-06-27T11:55:34Z | https://github.com/MonetDB/MonetDB/issues/3030 | 753,423,719 | 3,030 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-02-20 00:33:10 +0100
From: @drstmane
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes
Last updated: 2012-03-16 14:56:53 +0100
## Comment 16951
Date: 2012-02-20 00:33:10 +0100
From: @drstmane
test sql/test/Dependencies/Tests/Dependencies.sql
fails after (one of?) these 4 changesets
http://dev.monetdb.org/hg/MonetDB/rev/8ee024048e42
http://dev.monetdb.org/hg/MonetDB/rev/e2d3ecc7237c
http://dev.monetdb.org/hg/MonetDB/rev/03df27701cf7
http://dev.monetdb.org/hg/MonetDB/rev/70dc90e1de2f
cf.,
http://monetdb.cwi.nl/testweb/tests/43229:ef8a1eddc090/GNU-Fedora-x86_64-propcheck-assert/sql/mTests/test/Dependencies/Dependencies.out.diff.html
## Comment 16998
Date: 2012-02-26 20:01:23 +0100
From: @njnes
Changes are to be expected as we generate code through the relational step now.
## Comment 17096
Date: 2012-03-16 14:56:53 +0100
From: @grobian
Released in Dec2011-SP2
| test sql/test/Dependencies/Tests/Dependencies.sql fails after recent changes | https://api.github.com/repos/MonetDB/MonetDB/issues/3029/comments | 0 | 2020-11-30T12:08:13Z | 2024-06-27T11:55:34Z | https://github.com/MonetDB/MonetDB/issues/3029 | 753,423,686 | 3,029 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-02-19 19:17:09 +0100
From: @skinkie
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes, @drstmane
Last updated: 2012-05-25 12:58:44 +0200
## Comment 16950
Date: 2012-02-19 19:17:09 +0100
From: @skinkie
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.33 Safari/535.19
Build Identifier:
CREATE TABLE "sys"."cache_kv1_3" (
"dataownercode" VARCHAR(10) NOT NULL,
"lineplanningnumber" VARCHAR(10) NOT NULL,
"journeypatterncode" VARCHAR(10) NOT NULL,
"journeynumber" DECIMAL(6) NOT NULL,
"timedemandgroupcode" VARCHAR(10) NOT NULL,
"daytype" SMALLINT NOT NULL,
"departuretime" TIMESTAMP NOT NULL,
"wheelchairaccessible" BOOLEAN NOT NULL,
"validfrom" DATE NOT NULL,
"validthru" DATE NOT NULL
);
select journeypatterncode from cache_kv1_3 where bit_and(cache_kv1_3.daytype, 1) = 1 and '2012-02-20' BETWEEN cache_kv1_3.validfrom AND cache_kv1_3.validthru;
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffebc75700 (LWP 21498)]
0x00007ffff569c98f in seqscan_eq_bte_bte_tloc_void_void (b=0xecbf30, bn=0xeda270, tl=0xef0b60, th=0xef0b60, str_idx=0) at gdk_scanselect_defs.mx:124
124 @7@2_bunfastins(bn, @8, @5);
(gdb) bt
0 0x00007ffff569c98f in seqscan_eq_bte_bte_tloc_void_void (b=0xecbf30, bn=0xeda270, tl=0xef0b60, th=0xef0b60, str_idx=0) at gdk_scanselect_defs.mx:124
1 0x00007ffff5ea70c8 in BAT_scanselect (b=0xecbf30, bn=0xeda270, tl=0xef0b60, th=0xef0b60, li=1 '\001', hi=1 '\001', equi=1, nequi=0, lval=1, hval=1, nocheck=0) at gdk_scanselect.mx:346
2 0x00007ffff5f14f2e in BAT_select_ (b=0xecbf30, tl=0xef0b60, th=0xef0b60, li=1 '\001', hi=1 '\001', tail=0 '\000', anti=0 '\000', preserve_order=0 '\000') at gdk_batop.mx:1272
3 0x00007ffff5f15ab7 in BATuselect (b=0xecbf30, h=0xef0b60, t=0x0) at gdk_batop.mx:1344
4 0x00007ffff73f5ec7 in CMDuselect1 (result=0x7fffebc741c0, b=0xecbf30, value=0xef0b60) at algebra.mx:1416
5 0x00007ffff73fda4f in ALGuselect1 (result=0xef09d0, bid=0xef09c0, value=0xef0b60) at algebra.mx:2263
6 0x00007ffff6b2d95d in runMALsequence (cntxt=0x666578, mb=0x110b160, startpc=1, stoppc=0, stk=0xef0770, env=0x0, pcicaller=0x0) at mal_interpreter.mx:1958
7 0x00007ffff6b1cc9c in callMAL (cntxt=0x666578, mb=0x110b160, env=0x7fffebc74be0, argv=0xdb6990, debug=0 '\000') at mal_interpreter.mx:423
8 0x00007fffec6b4108 in SQLexecutePrepared (c=0x666578, be=0xde4260, q=0x83ab80) at sql_scenario.c:1610
9 0x00007fffec6b43f0 in SQLengineIntern (c=0x666578, be=0xde4260) at sql_scenario.c:1663
10 0x00007fffec6b4992 in SQLengine (c=0x666578) at sql_scenario.c:1788
11 0x00007ffff6b08514 in runPhase (c=0x666578, phase=4) at mal_scenario.c:522
12 0x00007ffff6b0870e in runScenarioBody (c=0x666578) at mal_scenario.c:573
13 0x00007ffff6b08919 in runScenario (c=0x666578) at mal_scenario.c:601
14 0x00007ffff6b099a7 in MSserveClient (dummy=0x666578) at mal_session.c:438
15 0x00007ffff327bd0c in start_thread () from /lib64/libpthread.so.0
16 0x00007ffff2fc1d7d in clone () from /lib64/libc.so.6
Reproducible: Always
## Comment 16953
Date: 2012-02-20 00:53:44 +0100
From: @drstmane
Works fine for me, with the Dec2011 release, with the latest Dec2011 release branch (changeset b83377825264), and with the latest default branch (changeset 1f92469b8880) --- all on 64-bit Fedora Linux.
Please provide more information in case it still fails with you.
## Comment 16955
Date: 2012-02-20 01:17:06 +0100
From: @skinkie
Details were sent per mail.
## Comment 17109
Date: 2012-03-21 04:06:10 +0100
From: @skinkie
select
*
FROM cache_kv1, cache_kv1_2, cache_kv1_3, cache_kv1_4, dest WHERE
cache_kv1.doc_lpn_jpc_tdgc = cache_kv1_2.doc_lpn_jpc_tdgc and
cache_kv1.doc_lpn_jpc_tdgc = cache_kv1_3.doc_lpn_jpc_tdgc and
cache_kv1.doc_lpn_jpc_tdgc = cache_kv1_4.doc_lpn_jpc_tdgc and
cache_kv1_2.doc_dc = dest.doc_dc and
bit_and(cache_kv1_3.daytype, 8) = 8 and
'2012-03-20' BETWEEN cache_kv1_3.validfrom AND cache_kv1_3.validthru AND
cache_kv1_2.quayid = 'CXX:57330221';
0 0x00007ffff5996e03 in seqscan_eq_bte_bte_tloc_void_void (b=0x1615d00,
bn=0x1881610, tl=0x1bb9470, th=0x1bb9470, str_idx=0)
at gdk_scanselect_defs.mx:124
1 0x00007ffff61a153c in BAT_scanselect (b=0x1615d00, bn=0x1881610,
tl=0x1bb9470, th=0x1bb9470, li=1 '\001', hi=1 '\001', equi=1, nequi=0,
lval=1, hval=1, nocheck=0) at gdk_scanselect.mx:346
2 0x00007ffff620f3d8 in BAT_select_ (b=0x1615d00, tl=0x1bb9470,
th=0x1bb9470, li=1 '\001', hi=1 '\001', tail=0 '\000', anti=0 '\000',
preserve_order=0 '\000') at gdk_batop.mx:1272
3 0x00007ffff620ff61 in BATuselect (b=0x1615d00, h=0x1bb9470, t=0x0)
at gdk_batop.mx:1344
4 0x00007ffff76d88db in CMDuselect1 (result=0x7fffeba9ee10, b=0x1615d00,
value=0x1bb9470) at algebra.mx:1417
5 0x00007ffff76e039c in ALGuselect1 (result=0x1bb7bc0, bid=0x1bb7bb0,
value=0x1bb9470) at algebra.mx:2257
6 0x00007ffff6e0b12a in runMALsequence (cntxt=0x668928, mb=0x1237f50,
startpc=1, stoppc=0, stk=0x1bb7590, env=0x0, pcicaller=0x0)
at mal_interpreter.mx:1958
7 0x00007ffff6df9a14 in callMAL (cntxt=0x668928, mb=0x1237f50,
env=0x7fffeba9fbe0, argv=0x1b4aaa0, debug=0 '\000')
at mal_interpreter.mx:423
8 0x00007fffec4df158 in SQLexecutePrepared (c=0x668928, be=0xaa1710,
q=0x121c870) at sql_scenario.c:1642
9 0x00007fffec4df440 in SQLengineIntern (c=0x668928, be=0xaa1710)
at sql_scenario.c:1695
10 0x00007fffec4df9e8 in SQLengine (c=0x668928) at sql_scenario.c:1821
11 0x00007ffff6de512d in runPhase (c=0x668928, phase=4) at mal_scenario.c:522
12 0x00007ffff6de5327 in runScenarioBody (c=0x668928) at mal_scenario.c:573
13 0x00007ffff6de5532 in runScenario (c=0x668928) at mal_scenario.c:601
14 0x00007ffff6de65f8 in MSserveClient (dummy=0x668928) at mal_session.c:438
15 0x00007ffff350bd0c in start_thread () from /lib64/libpthread.so.0
16 0x00007ffff3251d7d in clone () from /lib64/libc.so.6
Its the combination of between and bit_and that fails here;
Simplified:
CREATE TABLE "sys"."cache_kv1" (
"doc_lpn_jpc_tdgc" VARCHAR(43)
);
CREATE TABLE "sys"."cache_kv1_3" (
"daytype" SMALLINT NOT NULL,
"validfrom" DATE NOT NULL,
"validthru" DATE NOT NULL,
"doc_lpn_jpc_tdgc" VARCHAR(43)
);
insert into cache_kv1 values ('1');
insert into cache_kv1_3 values (8, '2012-02-01', '2012-04-01', '1');
query works;
insert into cache_kv1_3 values (8, '2012-02-01', '2012-04-01', '2');
query works;
insert into cache_kv1 values ('4');
query works;
insert into cache_kv1_3 values (8, '2012-01-01', '2012-01-02', '1');
query works;
insert into cache_kv1_3 values (1, '2012-01-01', '2012-01-02', '1');
*failure*
select *
FROM cache_kv1, cache_kv1_3 WHERE
cache_kv1.doc_lpn_jpc_tdgc = cache_kv1_3.doc_lpn_jpc_tdgc and
bit_and(cache_kv1_3.daytype, 8) = 8 and
'2012-03-20' BETWEEN cache_kv1_3.validfrom AND cache_kv1_3.validthru;
I guess it is now easier to reproduce.
## Comment 17197
Date: 2012-04-29 20:26:40 +0200
From: @njnes
fixed. The MTIME functions now properly return oid heads with oid inputs
| Segmentation fault in seqscan_eq_bte_bte_tloc_void_void | https://api.github.com/repos/MonetDB/MonetDB/issues/3028/comments | 0 | 2020-11-30T12:08:10Z | 2024-06-27T11:55:32Z | https://github.com/MonetDB/MonetDB/issues/3028 | 753,423,662 | 3,028 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-02-19 17:56:56 +0100
From: @skinkie
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes
Last updated: 2012-05-02 21:14:11 +0200
## Comment 16940
Date: 2012-02-19 17:56:56 +0100
From: @skinkie
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.33 Safari/535.19
Build Identifier:
When starting the database in readonly mode. The \d function doesn't work any more. Restarting without --readonly fixes the issue.
sql>\d pujo
table sys.pujo is not unique, corrupt catalog?
Reproducible: Always
MonetDB 5 server v11.8.0 (64-bit, 64-bit oids)
This is an unreleased version
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2012 MonetDB B.V., all rights reserved
Visit http://www.monetdb.org/ for further information
Found 3.9GiB available memory, 1 available cpu core
Libraries:
libpcre: 8.20 2011-10-21 (compiled with 8.20)
openssl: OpenSSL 1.0.0e 6 Sep 2011 (compiled with OpenSSL 1.0.0e 6 Sep 2011)
libxml2: 2.7.8 (compiled with 2.7.8)
Compiled by: skinkie@openov_cxx (x86_64-unknown-linux-gnu)
Compilation: gcc -g -Werror -Wall -Wextra -W -Werror-implicit-function-declaration -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wformat=2 -Wno-format-nonliteral -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -fstack-protector-all -Wstack-protector -Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs -Wlogical-op -Wunreachable-code -Wp,-D_FORTIFY_SOURCE=2
Linking : /usr/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64
## Comment 16965
Date: 2012-02-21 14:46:23 +0100
From: @skinkie
I see it only happens at some tables. But not all.
## Comment 17213
Date: 2012-05-02 21:14:11 +0200
From: @njnes
unable to reproduce
| Starting with --readonly results in: table sys.pujo is not unique, corrupt catalog? | https://api.github.com/repos/MonetDB/MonetDB/issues/3027/comments | 0 | 2020-11-30T12:08:08Z | 2024-06-28T07:23:14Z | https://github.com/MonetDB/MonetDB/issues/3027 | 753,423,636 | 3,027 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-02-19 17:17:19 +0100
From: @drstmane
To: SQL devs <<bugs-sql>>
Version: -- development
Last updated: 2012-02-20 22:28:05 +0100
## Comment 16937
Date: 2012-02-19 17:17:19 +0100
From: @drstmane
This code
========
$ tail -n+2357 sql/backends/monet5/sql.mx | head -n12
static char *
create_trigger( mvc *sql, char *sname, char *tname, char *triggername, int time, int orientation, int event, char *old_name, char *new_name, char *condition, char *query)
{
sql_trigger *tri = NULL;
sql_schema *s;
sql_table *t;
if (sname && !(s = mvc_bind_schema(sql, sname)))
return sql_message("3F000!CREATE TRIGGER: no such schema '%s'", sname);
if (!schema_privs(sql->role_id, s))
return sql_message("3F000!CREATE TRIGGER: access denied for %s to schema ;'%s'", stack_get_string(sql, "current_user"), s->base.name);
========
(IMHO correctly) triggers
========
/ufs/manegold/_/Monet/HG/default/source/MonetDB/sql/backends/monet5/sql.mx: In function 'create_trigger':
/ufs/manegold/_/Monet/HG/default/source/MonetDB/sql/backends/monet5/sql.mx:2367:19: error: 's' may be used uninitialized in this function [-Werror=uninitialized]
========
I guess it's not sufficient to change
sql_schema *s;
into
sql_schema *s = NULL;
as it remains open what is supposed to happen if sname is NULL ... ?
(If that's not supposed to happen, we should assert on it before the first if statement.)
## Comment 16938
Date: 2012-02-19 17:20:31 +0100
From: @drstmane
Same here:
========
$ tail -n+2403 sql/backends/monet5/sql.mx | head -n11
static char *
drop_trigger( mvc *sql, char *sname, char *tname)
{
sql_trigger *tri = NULL;
sql_schema *s;
if (sname && !(s = mvc_bind_schema(sql, sname)))
return sql_message("3F000!DROP TRIGGER: no such schema '%s'", sname);
if (s && !schema_privs(sql->role_id, s))
return sql_message("3F000!DROP TRIGGER: access denied for %s to schema ;'%s'", stack_get_string(sql, "current_user"), s->base.name);
========
========
sql/backends/monet5/sql.mx: In function 'SQLcatalog':
sql/backends/monet5/sql.mx:2412:5: error: 's' may be used uninitialized in this function
sql/backends/monet5/sql.mx:2407:14: note: 's' was declared here
========
## Comment 16939
Date: 2012-02-19 17:35:18 +0100
From: @drstmane
Part 2 (Comment 1) fixed by Niels (changeset b97d9d436c85). Thanks!
Part 1 (Description) still open. Would this be a proper fix:
$ hg diff sql/backends/monet5/sql.mx
diff -r [b97d9d436c85](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b97d9d436c85) sql/backends/monet5/sql.mx
--- a/sql/backends/monet5/sql.mx Sun Feb 19 17:23:14 2012 +0100
+++ b/sql/backends/monet5/sql.mx Sun Feb 19 17:35:02 2012 +0100
@@ -2358,13 +2358,13 @@
create_trigger( mvc *sql, char *sname, char *tname, char *triggername, int time, int orientation, int event, char *old_name, char *new_name, char *condition, char *query)
{
sql_trigger *tri = NULL;
- sql_schema *s;
+ sql_schema *s = NULL;
sql_table *t;
if (sname && !(s = mvc_bind_schema(sql, sname)))
return sql_message("3F000!CREATE TRIGGER: no such schema '%s'", sname);
- if (!schema_privs(sql->role_id, s))
+ if (s && !schema_privs(sql->role_id, s))
return sql_message("3F000!CREATE TRIGGER: access denied for %s to schema ;'%s'", stack_get_string(sql, "current_user"), s->base.name);
if ((tri = mvc_bind_trigger(sql, s, triggername )) != NULL)
return sql_message("3F000!CREATE TRIGGER: name '%s' already in use", triggername);
?
## Comment 16949
Date: 2012-02-19 19:09:06 +0100
From: @drstmane
Changeset [6763a1f90376](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6763a1f90376) made by Stefan Manegold <Stefan.Manegold@cwi.nl> in the MonetDB repo, refers to this bug.
For complete details, see [http//devmonetdborg/hg/MonetDB?cmd=changeset;node=6763a1f90376](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=6763a1f90376)
Changeset description:
provisional fix of bug #3026; needs to be verified by Niels
## Comment 16958
Date: 2012-02-20 22:28:05 +0100
From: @drstmane
Finally fixed by http://dev.monetdb.org/hg/MonetDB/rev/eefe1208e214 .
| sql/backends/monet5/sql.mx:2367:19: error: 's' may be used uninitialized in this function | https://api.github.com/repos/MonetDB/MonetDB/issues/3026/comments | 0 | 2020-11-30T12:08:05Z | 2024-06-27T11:55:31Z | https://github.com/MonetDB/MonetDB/issues/3026 | 753,423,608 | 3,026 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-02-19 16:46:33 +0100
From: @drstmane
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes
Last updated: 2012-02-19 16:56:52 +0100
## Comment 16935
Date: 2012-02-19 16:46:33 +0100
From: @drstmane
parent: 43216:e2d3ecc7237c tip
fix crash and approved output
branch: default
commit: (clean)
update: (current)
make[5]: Entering directory `/net/rome.ins.cwi.nl/export/scratch2/manegold/.rig./scratch0/Monet/HG/default/builds/_/sql/server'
make[5]: *** No rule to make target `rel_psm.h', needed by `libsqlserver_la-rel_semantic.lo'. Stop.
## Comment 16936
Date: 2012-02-19 16:55:37 +0100
From: @njnes
files are added now
| compilation fails with "No rule to make target `rel_psm.h', needed by `libsqlserver_la-rel_semantic.lo'." | https://api.github.com/repos/MonetDB/MonetDB/issues/3025/comments | 0 | 2020-11-30T12:08:02Z | 2024-06-27T11:55:30Z | https://github.com/MonetDB/MonetDB/issues/3025 | 753,423,569 | 3,025 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-02-19 14:28:26 +0100
From: @drstmane
To: SQL devs <<bugs-sql>>
Version: -- development
Last updated: 2012-02-19 19:00:49 +0100
## Comment 16934
Date: 2012-02-19 14:28:26 +0100
From: @drstmane
Two SQL tests crash after recent changes; cf.,
http://monetdb.cwi.nl/testweb/tests/43200:371633e5810b/GNU-Fedora-x86_64-dist/sql/mTests/test/BugTracker-2008/too_may_nested_operators.SF-2102167.err.diff.html
http://monetdb.cwi.nl/testweb/tests/43200:371633e5810b/GNU-Fedora-x86_64-dist/sql/mTests/test/Triggers/recursive_triggers.err.diff.html
These tests still worked fine with changeset [f9c5a3db97d4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f9c5a3db97d4) (http://dev.monetdb.org/hg/MonetDB/rev/f9c5a3db97d4).
These tests fail as reported above since changeset [7682a645a9d8](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7682a645a9d8) (http://dev.monetdb.org/hg/MonetDB/rev/7682a645a9d8).
Which of the 8 changesets in between
(
http://dev.monetdb.org/hg/MonetDB/rev/4cd57c761234
http://dev.monetdb.org/hg/MonetDB/rev/78c1f0deb9a5
http://dev.monetdb.org/hg/MonetDB/rev/6333a37c8a6e
http://dev.monetdb.org/hg/MonetDB/rev/242f47f56c01
http://dev.monetdb.org/hg/MonetDB/rev/d241f79dd5fa
http://dev.monetdb.org/hg/MonetDB/rev/19db48c96891
http://dev.monetdb.org/hg/MonetDB/rev/12729694986a
http://dev.monetdb.org/hg/MonetDB/rev/537258f70b0a
)
triggers the failure is unclear, as either compilation fails, or tesing fails with a crash (segfault, assertion, abort).
## Comment 16948
Date: 2012-02-19 19:00:49 +0100
From: @drstmane
Appear to be fixed by one of
http://dev.monetdb.org/hg/MonetDB/rev/8ee024048e42
http://dev.monetdb.org/hg/MonetDB/rev/e2d3ecc7237c
http://dev.monetdb.org/hg/MonetDB/rev/03df27701cf7
http://dev.monetdb.org/hg/MonetDB/rev/70dc90e1de2f
| SQL tests crash after recent changes | https://api.github.com/repos/MonetDB/MonetDB/issues/3024/comments | 0 | 2020-11-30T12:08:00Z | 2024-06-27T11:55:29Z | https://github.com/MonetDB/MonetDB/issues/3024 | 753,423,542 | 3,024 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-02-19 14:03:36 +0100
From: @drstmane
To: SQL devs <<bugs-sql>>
Version: -- development
Last updated: 2012-04-27 14:51:58 +0200
## Comment 16933
Date: 2012-02-19 14:03:36 +0100
From: @drstmane
Several SQL tests, among which most of the geom test, now fail with expected error messages going (IMHO incorrectly) to stdout instead of stderr.
With changeset [f9c5a3db97d4](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f9c5a3db97d4) these tests still worked fine.
Since changeset [7682a645a9d8](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7682a645a9d8) these tests fail as reported above.
Which of the 6 changesets in between triggers the failer is unclear, as either compilation fails, or tesing fails with a crash (segfault, assertion, abort).
Cf., e.g.,
http://monetdb.cwi.nl/testweb/tests/43200:371633e5810b/GNU-Fedora-x86_64-dist/sql/mTests/test/BugDay_2005-11-09_2.9.3/hang_on_copy_into.SF-1100504.out.diff.html
http://monetdb.cwi.nl/testweb/tests/43200:371633e5810b/GNU-Fedora-x86_64-dist/sql/mTests/test/BugDay_2005-11-09_2.9.3/hang_on_copy_into.SF-1100504.err.diff.html
http://monetdb.cwi.nl/testweb/tests/43200:371633e5810b/GNU-Fedora-x86_64-dist/geom/mTests/BugTracker/X_crash.SF-1971632.out.diff.html
http://monetdb.cwi.nl/testweb/tests/43200:371633e5810b/GNU-Fedora-x86_64-dist/geom/mTests/BugTracker/X_crash.SF-1971632.err.diff.html
http://monetdb.cwi.nl/testweb/tests/43200:371633e5810b/GNU-Fedora-x86_64-dist/geom/mTests/sql/geom_point.out.diff.html
http://monetdb.cwi.nl/testweb/tests/43200:371633e5810b/GNU-Fedora-x86_64-dist/geom/mTests/sql/geom_point.err.diff.html
http://monetdb.cwi.nl/testweb/tests/43200:371633e5810b/GNU-Fedora-x86_64-dist/geom/mTests/sql/spatial.out.diff.html
http://monetdb.cwi.nl/testweb/tests/43200:371633e5810b/GNU-Fedora-x86_64-dist/geom/mTests/sql/spatial.err.diff.html
## Comment 17173
Date: 2012-04-27 01:14:02 +0200
From: @drstmane
This appears to be fixed in Apr2012_1 and Apr2012 (latest):
http://monetdb.cwi.nl/testweb/web/testgrid.php?serial=43870:4702495ed780&module=sql
http://monetdb.cwi.nl/testweb/web/testgrid.php?serial=43950:702b55cbad26&module=sql
| SQL tests fail as error messages now go to stdout iso. stderr | https://api.github.com/repos/MonetDB/MonetDB/issues/3023/comments | 0 | 2020-11-30T12:07:57Z | 2024-06-27T11:55:28Z | https://github.com/MonetDB/MonetDB/issues/3023 | 753,423,507 | 3,023 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-02-18 14:23:53 +0100
From: @drstmane
To: MonetDB5 devs <<bugs-monetdb5>>
Version: -- development
CC: @mlkersten, @yzchang
Last updated: 2012-11-27 14:09:11 +0100
## Comment 16923
Date: 2012-02-18 14:23:53 +0100
From: @drstmane
Created attachment 99
error log
With the current development branch (changeset 737e54dc3c90), after starting mserver5 on a new (non existing database), and then connecting with mclient, mserver5 reports 153 MAL TypeExceptions of the following kind:
!TypeException:user.main[3]:'optimizer.datacell' undefined in: _3:any := optimizer.datacell()
See attachment for all details.
This causes basically all SQL & geom tests to fail.
> Attached file: [err.log](https://github.com/MonetDB/monetdb-issues-attachments/blob/master/issue_3022_err.log_99) (text/x-log, 15684 bytes)
> Description: error log
## Comment 16924
Date: 2012-02-18 14:37:38 +0100
From: @drstmane
Each client connection to a running server triggers two more exceptions:
>!TypeException:user.main[3]:'optimizer.datacell' undefined in: _3:any := optimizer.datacell()
!TypeException:user.main[3]:'optimizer.datacell' undefined in: _3:any := optimizer.datacell()
## Comment 16925
Date: 2012-02-18 15:00:44 +0100
From: @mlkersten
Problem not confirmed. Running Mtest on the SQL test set does not produce abnormal errors.
Perhaps a configure setting? or alias?
## Comment 16926
Date: 2012-02-18 15:04:43 +0100
From: @drstmane
My mserver5 is no alias, but the genuine binary.
My MonetDB is a plain from-scratch build of a pure checkout of changeset
[737e54dc3c90](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=737e54dc3c90) configure only with --prefix=... (i.e., pure default configure)
.../MonetDB $ hg summary
parent: 43185:737e54dc3c90 tip
Sent script errors into the right direction
branch: default
commit: (clean)
update: (current)
$ type -a mserver5
mserver5 is /ufs/manegold/_/Monet/HG/default/prefix/_/bin/mserver5
$ mserver5 --version
MonetDB 5 server v11.8.0 (64-bit, 64-bit oids)
This is an unreleased version
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2012 MonetDB B.V., all rights reserved
Visit http://www.monetdb.org/ for further information
Found 15.6GiB available memory, 8 available cpu cores
Libraries:
libpcre: 8.12 2011-01-15 (compiled with 8.12)
openssl: OpenSSL 1.0.0g 18 Jan 2012 (compiled with OpenSSL 1.0.0g-fips 18 Jan
2012)
libxml2: 2.7.8 (compiled with 2.7.8)
Compiled by: manegold@rome.ins.cwi.nl (x86_64-unknown-linux-gnu)
Compilation: gcc -g -Werror -Wall -Wextra -W
-Werror-implicit-function-declaration -Wpointer-arith
-Wdeclaration-after-statement -Wundef -Wformat=2 -Wno-format-nonliteral
-Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute
-Wmissing-prototypes -Wold-style-definition -Wpacked -Wunknown-pragmas
-Wvariadic-macros -fstack-protector-all -Wstack-protector
-Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs
-Wlogical-op -Wunreachable-code -Wp,-D_FORTIFY_SOURCE=2
Linking : /usr/bin/ld -m elf_x86_64
## Comment 16927
Date: 2012-02-18 15:05:36 +0100
From: @drstmane
Please note that my MonetDB is not configured with --enable-datacell .
The default is --disable-datacell .
## Comment 16930
Date: 2012-02-18 17:26:02 +0100
From: @drstmane
Appears to be fixed by changeset [887a6d6ded10](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=887a6d6ded10) .
Thanks!
## Comment 18071
Date: 2012-11-27 14:09:11 +0100
From: @yzchang
No need to add new test. This bug should already be covered by many existing tests.
| creating new database cause 153 MAL TypeExceptions | https://api.github.com/repos/MonetDB/MonetDB/issues/3022/comments | 0 | 2020-11-30T12:07:55Z | 2024-06-27T11:55:27Z | https://github.com/MonetDB/MonetDB/issues/3022 | 753,423,470 | 3,022 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-02-18 11:23:23 +0100
From: @mlkersten
To: MonetDB5 devs <<bugs-monetdb5>>
Version: -- development
CC: @drstmane, @yzchang
Last updated: 2012-11-27 14:12:30 +0100
## Comment 16922
Date: 2012-02-18 11:23:23 +0100
From: @mlkersten
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:10.0.1) Gecko/20100101 Firefox/10.0.1
Build Identifier:
The stable.err files contain the invocation of an old mserver.
Upon a release, we have to force-approve all test cases using
the invocation sequence of that release.
Reproducible: Always
## Comment 16928
Date: 2012-02-18 16:58:37 +0100
From: @grobian
what's the problem exactly?
## Comment 16929
Date: 2012-02-18 17:19:24 +0100
From: @mlkersten
Example:
recycle10.stable.err: cmdline opt xrpc_open = true
recycle10.stable.err: cmdline opt xrpc_port = 42858
recycle10.stable.out: 12:55:07 > mserver5 "--config=/export/scratch1/milena/monet.DBG/etc/monetdb5.conf" --debug=10 --set gdk_nr_threads=0 --set "monet_mod_path=/export/scratch1/milena/monet.DBG/lib/MonetDB5:/export/scratch1/milena/monet.DBG/lib/MonetDB5/lib:/export/scratch1/milena/monet.DBG/lib/MonetDB5/bin" --set "gdk_dbfarm=/export/scratch1/milena/monet.DBG/var/MonetDB5/dbfarm" --set "sql_logdir=/export/scratch1/milena/monet.DBG/var/MonetDB5/sql_logs" --set mapi_open=true --set xrpc_open=true --set mapi_port=31275 --set xrpc_port=42858 --set monet_prompt= --trace --dbname=mTests_src_mal recycle10.mal
as far as i am aware, we don't need/use xrpc anymore
and even monetdb5.conf file is questionable.
Although the tests won't fail, the stable output stems from old configurations.
## Comment 16931
Date: 2012-02-18 17:32:17 +0100
From: @grobian
I think it wouldn't hurt if mapprove would actually just copy the test output over the stable output, instead of patching it.
1. if we don't want the comments to be out-of-date, then why do we store them in the first place?
2. I don't think we should do mass commits to test output upon each release (benefit is?)
3. maintaining per release test outputs is absolutely not worth it
## Comment 16932
Date: 2012-02-18 17:57:34 +0100
From: @drstmane
I'm fine with any changes to testing that make your work/life easier, as long as they do not defeat the very purpose of testing. Hence, feel free ;-)
Originally, Mapprove used to simply copy rather than patch. But then, approving new output although Mtest/Mdif did not show any changes, as well as having diffs "blurred" by comments changes in addition to relevant output changes was considered too confusing. That's why the current solution of having Mapprove only patch relevant output was introduced.
Both comments, (commented out) command lines and (echoed) queries have been found useful to debug / trace / located and understand the (origin of) test differences (and thus to decide whether they indicate a regression that needs to be fixed in the code or an intended changed that needs to be approved.
Command lines are commented out (and thus ignored by Mdiff, as they contain inherently non-stable data (paths, port numbers, user names, etc.) that would trigger a diff with each run.
The latest actual up-to-date comments, command lines and queries are always available in the output created by your Mtest run.
## Comment 17550
Date: 2012-07-21 18:43:23 +0200
From: @grobian
the "old" mserver invocations work fine for me
## Comment 18072
Date: 2012-11-27 14:12:30 +0100
From: @yzchang
This is not really a bug, thus no test
| Stable output should reflect system version | https://api.github.com/repos/MonetDB/MonetDB/issues/3021/comments | 0 | 2020-11-30T12:07:52Z | 2024-06-28T07:23:14Z | https://github.com/MonetDB/MonetDB/issues/3021 | 753,423,440 | 3,021 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-02-17 09:06:24 +0100
From: @mlkersten
To: clients devs <<bugs-clients>>
Version: 11.7.5 (Dec2011) [obsolete]
Last updated: 2012-02-29 10:34:26 +0100
## Comment 16919
Date: 2012-02-17 09:06:24 +0100
From: @mlkersten
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:10.0.1) Gecko/20100101 Firefox/10.0.1
Build Identifier:
Debugging a SQL query and stepping through its execution works up to the point you exit the debugger with the 'q' command. Then mclient traps with an assertion error on inactive handle
Reproducible: Always
### Steps to Reproduce:
debug select count(*) from tables;
n
n
n
q
### Actual Results:
Assertion `hdl->active != result' failed.
0 0x0000003a45436285 in raise () from /lib64/libc.so.6
1 0x0000003a45437b9b in abort () from /lib64/libc.so.6
2 0x0000003a4542ee9e in __assert_fail_base () from /lib64/libc.so.6
3 0x0000003a4542ef42 in __assert_fail () from /lib64/libc.so.6
4 0x00007ffff7de4a91 in close_result (hdl=0x638c10) at /export/scratch1/mk/current//package/clients/mapilib/mapi.c:1506
5 0x00007ffff7de5204 in mapi_next_result (hdl=0x638c10) at /export/scratch1/mk/current//package/clients/mapilib/mapi.c:1580
6 0x0000000000407722 in format_result (mid=0x61d3b0, hdl=0x638c10, singleinstr=1 '\001') at /export/scratch1/mk/current//package/clients/mapiclient/mclient.c:1543
7 0x000000000040a321 in doFile (mid=0x61d3b0, file=0x414595 "-", useinserts=0, interactive=1, save_history=0) at /export/scratch1/mk/current//package/clients/mapiclient/mclient.c:2448
## Comment 16920
Date: 2012-02-17 13:43:19 +0100
From: @sjoerdmullender
Changeset [85e6ba7c194a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=85e6ba7c194a) 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=85e6ba7c194a](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=85e6ba7c194a)
Changeset description:
Continue reading even after we've seen mdb>EOD.
This fixes bug #3020.
## Comment 16921
Date: 2012-02-17 13:44:18 +0100
From: @sjoerdmullender
Fixed. No test possible since it deals with an interactive mclient.
| Assertion error in debugging mode | https://api.github.com/repos/MonetDB/MonetDB/issues/3020/comments | 0 | 2020-11-30T12:07:50Z | 2024-06-27T11:55:25Z | https://github.com/MonetDB/MonetDB/issues/3020 | 753,423,412 | 3,020 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-02-16 16:55:38 +0100
From: @skinkie
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes
Last updated: 2012-02-21 22:37:04 +0100
## Comment 16916
Date: 2012-02-16 16:55:38 +0100
From: @skinkie
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.159 Safari/535.1
Build Identifier:
CREATE TABLE "sys"."timdemgrp" (
"version" DECIMAL(2) NOT NULL,
"implicit" BOOLEAN NOT NULL,
"dataownercode" VARCHAR(10) NOT NULL,
"lineplanningnumber" VARCHAR(10) NOT NULL,
"journeypatterncode" VARCHAR(10) NOT NULL,
"timedemandgroupcode" VARCHAR(10) NOT NULL,
CONSTRAINT "timdemgrp_dataownercode_lineplanningnumber_journeypatterncode_timedemandgroupcode_pkey" PRIMARY KEY ("dataownercode", "lineplanningnumber", "journeypatterncode", "timedemandgroupcode"),
CONSTRAINT "timdemgrp_dataownercode_lineplanningnumber_journeypatterncode_fkey" FOREIGN KEY ("dataownercode", "lineplanningnumber", "journeypatterncode") REFERENCES "sys"."jopa" ("dataownercode", "lineplanningnumber", "journeypatterncode")
);
CREATE TABLE "sys"."pujo" (
"version" DECIMAL(2) NOT NULL,
"implicit" BOOLEAN NOT NULL,
"dataownercode" VARCHAR(10) NOT NULL,
"timetableversioncode" VARCHAR(10) NOT NULL,
"organizationalunitcode" VARCHAR(10) NOT NULL,
"periodgroupcode" VARCHAR(10) NOT NULL,
"specificdaycode" VARCHAR(10) NOT NULL,
"daytype" SMALLINT NOT NULL,
"lineplanningnumber" VARCHAR(10) NOT NULL,
"journeynumber" DECIMAL(6) NOT NULL,
"timedemandgroupcode" VARCHAR(10) NOT NULL,
"journeypatterncode" VARCHAR(10) NOT NULL,
"departuretime" TIMESTAMP NOT NULL,
"wheelchairaccessible" BOOLEAN NOT NULL,
"dataownerisoperator" BOOLEAN NOT NULL,
CONSTRAINT "pujo_dataownercode_timetableversioncode_organizationalunitcode_periodgroupcode_specificdaycode_daytype_lineplanningnumber_journeynumber_pkey" PRIMARY KEY ("dataownercode", "timetableversioncode", "organizationalunitcode", "periodgroupcode", "specificdaycode", "daytype", "lineplanningnumber", "journeynumber"));
So I want to have a Foreignkey between the tables. And created:
alter table pujo add FOREIGN KEY (DataOwnerCode, LinePlanningNumber, TimeDemandGroupCode, JourneyPatternCode) REFERENCES timdemgrp;
M0M29!UPDATE: FOREIGN KEY constraint 'pujo.pujo_dataownercode_lineplanningnumber_timedemandgroupcode_journeypatterncode_fkey' violated
This fails, but why?
sql>select DataOwnerCode, LinePlanningNumber, TimeDemandGroupCode, JourneyPatternCode from pujo except select DataOwnerCode, LinePlanningNumber, TimeDemandGroupCode, JourneyPatternCode from timdemgrp;
+---------------+--------------------+---------------------+--------------------+
| dataownercode | lineplanningnumber | timedemandgroupcode | journeypatterncode |
+===============+====================+=====================+====================+
+---------------+--------------------+---------------------+--------------------+
0 tuples (164.706ms)
sql>select DataOwnerCode, LinePlanningNumber, TimeDemandGroupCode, JourneyPatternCode from timdemgrp group by DataOwnerCode, LinePlanningNumber, TimeDemandGroupCode, JourneyPatternCode having count(*) > 1;
+---------------+--------------------+---------------------+--------------------+
| dataownercode | lineplanningnumber | timedemandgroupcode | journeypatterncode |
+===============+====================+=====================+====================+
+---------------+--------------------+---------------------+--------------------+
0 tuples (16.170ms)
Everything seems 'ok'.
I observed that my foreign key order was different from what is in the primary key statement in timdemgrp;
sql>alter table pujo add FOREIGN KEY (DataOwnerCode, LinePlanningNumber, JourneyPatternCode, TimeDemandGroupCode) REFERENCES timdemgrp;
operation successful (789.531ms)
I wonder if this is just 'bad sql' from my side, because the sequence actually makes a new key that is not matched on attributes but on sequence in the key. Or something more graceful could be done.
Reproducible: Always
## Comment 16918
Date: 2012-02-16 16:56:52 +0100
From: @skinkie
*** Bug #2989 has been marked as a duplicate of this bug. ***
## Comment 16967
Date: 2012-02-21 22:37:04 +0100
From: @njnes
This is not a bug. There is positional matching in keys, ie not name wise.
| Multicolumn foreign key order is important upon creation? | https://api.github.com/repos/MonetDB/MonetDB/issues/3019/comments | 0 | 2020-11-30T12:07:48Z | 2024-06-28T07:23:14Z | https://github.com/MonetDB/MonetDB/issues/3019 | 753,423,391 | 3,019 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-02-16 16:12:34 +0100
From: @skinkie
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes
Last updated: 2012-05-02 21:20:31 +0200
## Comment 16915
Date: 2012-02-16 16:12:34 +0100
From: @skinkie
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.159 Safari/535.1
Build Identifier:
MonetDB 5 server v11.8.0
This is an unreleased version
Serving database 'openov_cxx', using 1 thread
Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically linked
Found 3.865 GiB available main-memory.
Copyright (c) 1993-July 2008 CWI.
Copyright (c) August 2008-2012 MonetDB B.V., all rights reserved
Visit http://www.monetdb.org/ for further information
[New Thread 0x7fffebea9700 (LWP 31162)]
Listening for connection requests on mapi:monetdb://127.0.0.1:60015/
MonetDB/SQL module loaded
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff52e0c27 in logger_new (debug=0, fn=0x7fffec453b80 "sql", logdir=0x7fffec435240 "sql_logs", dbname=0x66d220 "openov_cxx", version=52000, prefuncp=0x7fffec414201 <bl_preversion>,
postfuncp=0x7fffec4143aa <bl_postversion>) at gdk_logger.c:1111
1111 BATloop(b, p, q) {
(gdb) Undefined command: "xh". Try "help".
(gdb) 0 0x00007ffff52e0c27 in logger_new (debug=0, fn=0x7fffec453b80 "sql", logdir=0x7fffec435240 "sql_logs", dbname=0x66d220 "openov_cxx", version=52000, prefuncp=0x7fffec414201 <bl_preversion>,
postfuncp=0x7fffec4143aa <bl_postversion>) at gdk_logger.c:1111
1 0x00007ffff52e180a in logger_create (debug=0, fn=0x7fffec453b80 "sql", logdir=0x7fffec435240 "sql_logs", dbname=0x66d220 "openov_cxx", version=52000, prefuncp=0x7fffec414201 <bl_preversion>,
postfuncp=0x7fffec4143aa <bl_postversion>) at gdk_logger.c:1268
2 0x00007fffec415676 in bl_create (logdir=0x7fffec435240 "sql_logs", dbname=0x66d220 "openov_cxx", cat_version=52000) at bat_logger.c:244
3 0x00007fffec3fc5a6 in store_init (debug=0, store=store_bat, logdir=0x7fffec435240 "sql_logs", dbname=0x66d220 "openov_cxx", stk=0) at store.c:1284
4 0x00007fffec378ce5 in mvc_init (dbname=0x66d220 "openov_cxx", debug=0, store=store_bat, stk=0) at sql_mvc.c:51
5 0x00007fffec2dd559 in SQLinit () at sql_scenario.c:237
6 0x00007fffec2dd1db in SQLprelude () at sql_scenario.c:166
7 0x00007ffff6aa962b in runMALsequence (cntxt=0x676990, mb=0x6a7420, startpc=1, stoppc=0, stk=0x1128dd0, env=0x0, pcicaller=0x0) at mal_interpreter.mx:1954
8 0x00007ffff6a97ff8 in runMAL (cntxt=0x676990, mb=0x6a7420, startpc=1, mbcaller=0x0, env=0x0, pcicaller=0x0) at mal_interpreter.mx:334
9 0x00007ffff6a81243 in MALengine (c=0x676990) at mal_session.c:631
10 0x00007ffff6a7f75d in malBootstrap () at mal_session.c:73
11 0x00007ffff6a5cd72 in mal_init () at mal.c:247
12 0x0000000000403658 in main (argc=5, av=0x7fffffffdf08) at mserver5.c:564
Reproducible: Always
MonetDB 5 server v11.8.0 (64-bit, 64-bit oids)
This is an unreleased version
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2012 MonetDB B.V., all rights reserved
Visit http://www.monetdb.org/ for further information
Found 3.9GiB available memory, 1 available cpu core
Libraries:
libpcre: 8.20 2011-10-21 (compiled with 8.20)
openssl: OpenSSL 1.0.0e 6 Sep 2011 (compiled with OpenSSL 1.0.0e 6 Sep 2011)
libxml2: 2.7.8 (compiled with 2.7.8)
Compiled by: skinkie@openov_cxx (x86_64-unknown-linux-gnu)
Compilation: gcc -g -Werror -Wall -Wextra -W -Werror-implicit-function-declaration -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wformat=2 -Wno-format-nonliteral -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -fstack-protector-all -Wstack-protector -Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs -Wlogical-op -Wunreachable-code -Wp,-D_FORTIFY_SOURCE=2
Linking : /usr/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64
## Comment 17214
Date: 2012-05-02 21:20:31 +0200
From: @njnes
it seems the important catalog bat got corrupt. Any idea why?
| Bad exit (due to out of diskspace) still prevents to startup when having freespace again | https://api.github.com/repos/MonetDB/MonetDB/issues/3018/comments | 0 | 2020-11-30T12:07:45Z | 2024-06-27T11:55:23Z | https://github.com/MonetDB/MonetDB/issues/3018 | 753,423,370 | 3,018 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-02-16 15:36:59 +0100
From: @skinkie
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @drstmane
Last updated: 2012-02-29 10:34:21 +0100
## Comment 16914
Date: 2012-02-16 15:36:59 +0100
From: @skinkie
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.159 Safari/535.1
Build Identifier:
CREATE TABLE "sys"."y" (
"x" BOOLEAN
);
select * from y, y as y1, y as y2 where y.x between y1.x and y2.x;
mserver5: rel_bin.c:611: exp_bin: Assertion `0' failed.
Program received signal SIGABRT, Aborted.
[Switching to Thread 0x7fffebaa7700 (LWP 31083)]
0x00007ffff2b48ac5 in raise () from /lib64/libc.so.6
(gdb) bt
0 0x00007ffff2b48ac5 in raise () from /lib64/libc.so.6
1 0x00007ffff2b49f46 in abort () from /lib64/libc.so.6
2 0x00007ffff2b4184e in __assert_fail_base () from /lib64/libc.so.6
3 0x00007ffff2b41910 in __assert_fail () from /lib64/libc.so.6
4 0x00007fffec3c8bc9 in exp_bin (sql=0x12f66b0, e=0x1553f40, left=0x1556f70, right=0x0, grp=0x0, sel=0x0) at rel_bin.c:611
5 0x00007fffec3cee3e in rel2bin_select (sql=0x12f66b0, rel=0x1554840, refs=0x15548d0) at rel_bin.c:1875
6 0x00007fffec3d7df7 in subrel_bin (sql=0x12f66b0, rel=0x1554840, refs=0x15548d0) at rel_bin.c:3785
7 0x00007fffec3ca712 in rel2bin_join (sql=0x12f66b0, rel=0x1553d60, refs=0x15548d0) at rel_bin.c:928
8 0x00007fffec3d7cde in subrel_bin (sql=0x12f66b0, rel=0x1553d60, refs=0x15548d0) at rel_bin.c:3760
9 0x00007fffec3cdf27 in rel2bin_project (sql=0x12f66b0, rel=0x15541b0, refs=0x15548d0, topn=0x0) at rel_bin.c:1676
10 0x00007fffec3d7dc9 in subrel_bin (sql=0x12f66b0, rel=0x15541b0, refs=0x15548d0) at rel_bin.c:3781
11 0x00007fffec3d80fc in output_rel_bin (sql=0x12f66b0, rel=0x15541b0) at rel_bin.c:3849
12 0x00007fffec2f2ba1 in sql_symbol2stmt (c=0x12f66b0, r=0x15541b0, sym=0x15536b0) at sql.mx:1654
13 0x00007fffec2e1424 in SQLparser (c=0x63b0b8) at sql_scenario.c:1387
14 0x00007ffff6a7f154 in runPhase (c=0x63b0b8, phase=1) at mal_scenario.c:522
15 0x00007ffff6a7f2af in runScenarioBody (c=0x63b0b8) at mal_scenario.c:564
16 0x00007ffff6a7f559 in runScenario (c=0x63b0b8) at mal_scenario.c:601
17 0x00007ffff6a805e7 in MSserveClient (dummy=0x63b0b8) at mal_session.c:438
18 0x00007ffff2ea9d0c in start_thread () from /lib64/libpthread.so.0
19 0x00007ffff2befd7d in clone () from /lib64/libc.so.6
workaround:
select * from y, y as y1, y as y2 where y.x >= y1.x and y.x <= y2.x;
Reproducible: Always
## Comment 16977
Date: 2012-02-23 14:44:24 +0100
From: @njnes
Changeset [86d94f21e92c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=86d94f21e92c) 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=86d94f21e92c](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=86d94f21e92c)
Changeset description:
fixed bugs 3034, 2964 2946 and 3017
The rel2bin_join didn't handle a bunch of corner cases
| rel_bin.c:611: exp_bin: Assertion `0' failed. with between on multicolumns | https://api.github.com/repos/MonetDB/MonetDB/issues/3017/comments | 0 | 2020-11-30T12:07:42Z | 2024-06-27T11:55:22Z | https://github.com/MonetDB/MonetDB/issues/3017 | 753,423,331 | 3,017 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-02-16 00:55:27 +0100
From: @skinkie
To: SQL devs <<bugs-sql>>
Version: 11.11.5 (Jul2012)
CC: @njnes, @drstmane
Last updated: 2012-07-17 13:46:39 +0200
## Comment 16904
Date: 2012-02-16 00:55:27 +0100
From: @skinkie
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.159 Safari/535.1
Build Identifier:
While implementing the hamming distance for RD, I didn't have many issues using integers. After I started to do projections from WGS84 I ended up in the most strange sorting issues.
The formula itself is: (x1 - x2)^2 + (y1 - y2)^2, so in the most simple SQL: (x1 - x2)*(x1 - x2) + (y1 - y2)*(y1 - y2).
It seems that the multiplication overflows;
sql>SELECT (117992 - 87329.2316881)*(117992 - 87329.2316881);
+-----------------------+
| sql_sub_single_value |
+=======================+
| -25184.88771707018591 |
+-----------------------+
1 tuple (1.489ms)
sql>select (117992 - 87329)*(117992 - 87329);
+----------------------+
| sql_sub_single_value |
+======================+
| 940219569 |
+----------------------+
1 tuple (1.042ms)
Now after learning today about the great power function it seems:
sql>SELECT power(117992 - 87329.2316881, 2);
+--------------------------+
| sql_sub_single_value |
+==========================+
| 940205360.54925871 |
+--------------------------+
1 tuple (1.569ms)
...that just works. Since the power(a,2) seems to be more expensive than a*a, I would rather use that.
Reproducible: Always
## Comment 16905
Date: 2012-02-16 01:26:21 +0100
From: @drstmane
Please note that in your original query, there are no double value, and hence there is no double multiplication.
(MonetDB/)SQL automatically assumes the smallest possible type for numerical literals; thus, 117992 is a 4-byte integer and 87329.2316881 is a decimal(12,7), internally represented as 8-byte integer; for arithmetics, the former is cast to the latter; and then the 8-byte integer multiplication overflows "silently" --- not detecting/reporting the overflow is the actual bug here (!) ---:
sql>trace SELECT (117992 - 87329.2316881)*(117992 - 87329.2316881);
+-----------------------+
| sql_sub_single_value |
+=======================+
| -25184.88771707018591 |
+-----------------------+
1 tuple (19.969ms)
+-------+---------------------------------------------------------------------------------------------------+
| ticks | stmt |
+=======+===================================================================================================+
| 7 | X_7 := calc.lng(A0=117992,17,7); |
| 3 | X_10 := calc.lng(7,A1=873292316881:lng,17,7); |
| 3 | X_11 := calc.-(X_7=1179920000000:lng,X_10=873292316881:lng); |
| 3 | X_12 := calc.lng(A2=117992,17,7); |
| 3 | X_13 := calc.lng(7,A3=873292316881:lng,17,7); |
| 3 | X_14 := calc.-(X_12=1179920000000:lng,X_13=873292316881:lng); |
| 2 | X_15 := calc.*(X_11=306627683119:lng,X_14=306627683119:lng); |
| 12 | sql.exportValue(1,".","sql_sub_single_value","decimal",19,14,8,X_15=-2518488771707018591:lng,""); |
| 340 | X_5:void := user.s2_1(117992,873292316881:lng,117992,873292316881:lng); |
+-------+---------------------------------------------------------------------------------------------------+
9 tuples (20.023ms)
You can enforce double arithmetics and thus avoid overflow (in this case) by casting (at least) one of the literals to double:
sql>trace SELECT (117992 - cast(87329.2316881 as double))*(117992 - 87329.2316881);
+--------------------------+
| sql_sub_single_value |
+==========================+
| 940205360.54925871 |
+--------------------------+
1 tuple (26.341ms)
+-------+-------------------------------------------------------------------------------------------+
| ticks | stmt |
+=======+===========================================================================================+
| 3 | X_7 := calc.-(A0=117992,A1=87329.231688100001); |
| 4 | X_8 := calc.lng(A2=117992,17,7); |
| 3 | X_11 := calc.lng(7,A3=873292316881:lng,17,7); |
| 3 | X_12 := calc.-(X_8=1179920000000:lng,X_11=873292316881:lng); |
| 20750 | X_13 := calc.dbl(7,X_12=306627683119:lng); |
| 3 | X_14 := calc.*(X_7=30662.768311899999,X_13=30662.768311899999); |
| 11 | sql.exportValue(1,".","sql_sub_single_value","double",53,7,9,X_14=940205360.54925871,""); |
| 21069 | X_5:void := user.s3_1(117992,87329.231688100001,117992,873292316881:lng); |
+-------+-------------------------------------------------------------------------------------------+
8 tuples (26.392ms)
## Comment 16906
Date: 2012-02-16 02:05:41 +0100
From: @skinkie
Thanks, especially your "decimal(12,7), internally represented as 8-byte integer;" is an eye opener. After thinking about this, obviously it is the only true way to maintain bit precision. Opposed to transforming to double, which is a float. The following example also shows that when the storage does increase, the operation also 'just works' - because it doesn't overflow anymore. Notice also the rendering of A1.
sql>trace SELECT (117992 - 87329.23168810000000)*(117992 - 87329.2316881);
+--------------------------+
| sql_sub_single_value |
+==========================+
| 940205360.54925871 |
+--------------------------+
1 tuple (8.348ms)
+-------+-------------------------------------------------------------------------------------------+
| ticks | stmt |
+=======+===========================================================================================+
| 5 | X_7 := calc.-(A0=117992,A1=87329.231688100001); |
| 7 | X_8 := calc.lng(A2=117992,17,7); |
| 3 | X_11 := calc.lng(7,A3=873292316881:lng,17,7); |
| 2 | X_12 := calc.-(X_8=1179920000000:lng,X_11=873292316881:lng); |
| 2 | X_13 := calc.dbl(7,X_12=306627683119:lng); |
| 3 | X_14 := calc.*(X_7=30662.768311899999,X_13=30662.768311899999); |
| 13 | sql.exportValue(1,".","sql_sub_single_value","double",53,7,9,X_14=940205360.54925871,""); |
| 3 | end s13_10; |
| 25 | function user.s13_10(A0=117992,A1=87329.231688100001,A2=117992,A3=873292316881:lng); |
| 749 | X_5:void := user.s13_10(117992,87329.231688100001,117992,873292316881:lng); |
+-------+-------------------------------------------------------------------------------------------+
10 tuples (8.401ms)
## Comment 17215
Date: 2012-05-02 21:24:01 +0200
From: @njnes
fixed in default.
## Comment 17475
Date: 2012-07-17 13:46:39 +0200
From: @grobian
Fix delivered in Jul2012 release
| Overflowing double multiplication leads to incorrect result | https://api.github.com/repos/MonetDB/MonetDB/issues/3016/comments | 0 | 2020-11-30T12:07:39Z | 2024-06-27T11:55:21Z | https://github.com/MonetDB/MonetDB/issues/3016 | 753,423,297 | 3,016 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-02-15 22:43:07 +0100
From: @skinkie
To: SQL devs <<bugs-sql>>
Version: -- development
CC: martin.van.dinther, @mlkersten, @yzchang
Last updated: 2017-07-27 13:30:48 +0200
## Comment 16899
Date: 2012-02-15 22:43:07 +0100
From: @skinkie
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.159 Safari/535.1
Build Identifier:
Would it be viable to implement BIT (as bit) and BIT VARYING (maybe as smallest possible fixed datatype given the precision)?
I'm currently using the very easy workaround using the example below, but I guess using the datatypes and operators (4.3.2) designed for this might be a better idea.
cast(power(2, dayofweek(cast('2012-02-15' as date))) as smallint))
Reproducible: Always
## Comment 16903
Date: 2012-02-15 23:34:43 +0100
From: @mlkersten
Bit and bitvarying datatypes are also common in astronomy.
## Comment 18132
Date: 2012-11-27 15:48:34 +0100
From: @yzchang
No test needed for feature request
## Comment 25502
Date: 2017-07-27 12:57:49 +0200
From: Martin van Dinther <<martin.van.dinther>>
According to https://en.wikipedia.org/wiki/SQL:2003
the data types "BIT" and "BIT VARYING" have been removed from SQL:2003 standard.
See line: "removal of the poorly implemented "BIT" and "BIT VARYING" data types".
## Comment 25503
Date: 2017-07-27 13:30:48 +0200
From: @skinkie
(In reply to Martin van Dinther from comment 3)
> According to https://en.wikipedia.org/wiki/SQL:2003
> the data types "BIT" and "BIT VARYING" have been removed from SQL:2003
> standard.
> See line: "removal of the poorly implemented "BIT" and "BIT VARYING" data
> types".
Again a reason why it should have been implemented before ;) But since it is in PostgreSQL I find it a good reason to be feature matching.
| SQL-92 defines BIT and BIT VARYING | https://api.github.com/repos/MonetDB/MonetDB/issues/3015/comments | 0 | 2020-11-30T12:07:37Z | 2024-06-28T13:40:51Z | https://github.com/MonetDB/MonetDB/issues/3015 | 753,423,276 | 3,015 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-02-15 22:25:55 +0100
From: @skinkie
To: MonetDB5 devs <<bugs-monetdb5>>
Version: -- development
CC: @yzchang, yadavtheddie007
Last updated: 2018-10-23 19:14:06 +0200
## Comment 16894
Date: 2012-02-15 22:25:55 +0100
From: @skinkie
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.159 Safari/535.1
Build Identifier:
monetdb5/modules/atoms/mtime.mx:700
command dayofweek(d:date) :int
address MTIMEdate_extract_dayofweek
comment "Returns the current day of the week
where 1=sunday, .., 7=saturday";
Opposed to the implementation at mtime.mx:2247
/* Returns the current day of the week where 1=monday, .., 7=sunday */
static inline str
date_extract_dayofweek(int *ret, date *v)
{
if (*v == date_nil) {
*ret = int_nil;
} else {
*ret = date_dayofweek(*v);
}
return MAL_SUCCEED;
}
Reproducible: Always
## Comment 16912
Date: 2012-02-16 14:55:49 +0100
From: @sjoerdmullender
Changeset [f745ed170259](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f745ed170259) 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=f745ed170259](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=f745ed170259)
Changeset description:
Fixed comment.
This fixes bug #3014.
## Comment 18074
Date: 2012-11-27 14:14:05 +0100
From: @yzchang
No need to test code comments
## Comment 26652
Date: 2018-10-23 19:14:06 +0200
From: adv ydv <<yadavtheddie007>>
we get enjoy the many types games http://tanktrouble.xyz but some time ago my friends are suggest him. then we are play. this is the unforgettable movements in my life
| dayofweek comment is wrong in mtime.mx:700 | https://api.github.com/repos/MonetDB/MonetDB/issues/3014/comments | 0 | 2020-11-30T12:07:34Z | 2024-06-27T11:55:19Z | https://github.com/MonetDB/MonetDB/issues/3014 | 753,423,243 | 3,014 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-02-15 22:06:11 +0100
From: @skinkie
To: SQL devs <<bugs-sql>>
Version: 11.7.5 (Dec2011) [obsolete]
CC: @drstmane
Last updated: 2012-02-29 10:34:25 +0100
## Comment 16893
Date: 2012-02-15 22:06:11 +0100
From: @skinkie
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.159 Safari/535.1
Build Identifier:
select bit_and(1, power(2, 1));
TypeException:user.s7_1[7]:'calc.and' undefined in: _12:any := calc.and(_8:dbl, _11:dbl)
39000!program contains errors
I hope this is a low hanging fruit where it would just be one line of mx. I guess it is in batcalc.mx:1145. But given the way the double is stored, it may or may not work. A more graceful error would be a feature request.
I wonder if it is possible to choose the type of the result based on he input. For example, in the example I use to integer types. Why would it be required to choose dbl as result opposed to lng?
power(a,b) {
if a = int and b >= 0
type is lng
else
type is dbl
I understand the implication for a multicolumn power would be to know the min value of column b and the type of column a.
Reproducible: Always
## Comment 16895
Date: 2012-02-15 22:26:24 +0100
From: @drstmane
As far as I am concerned, bit-wise AND does not make any sense for non-integer types; even C does not allow it:
$ cat x.c
include <stdlib.h>
include <stdio.h>
int main () {
double a = 1.2;
double b = 3.4;
double c = a & b;
printf("%g %g %g\n",a,b,c);
return 0;
}
$ gcc x.c -o x
x.c: In function ‘main’:
x.c:7:15: error: invalid operands to binary & (have ‘double’ and ‘double’)
I'm not sure, what the SQL standard says, but I would not be surprised, if it also does not allow bit-wise AND on non-integer types. If so, this feature would clearly be invalid.
## Comment 16896
Date: 2012-02-15 22:30:56 +0100
From: @drstmane
Likewise the signature for the power() function should be clear from the SQL standard (assuming it is indeed defined in the SQL standard).
Also there, I would not be surprised if power() is (just like pow() in C and MAL) defined on floating point types and returning floating point types. If so, please consider using casts if applicable for your use case.
## Comment 16897
Date: 2012-02-15 22:35:42 +0100
From: @skinkie
> If so, this feature would clearly be invalid.
Would there be a way to explicitly say to the user that double types are unsupported? From searching through: http://www.contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt I can't really tell if it should be supported. From the Transact-SQL pages I see this:
http://msdn.microsoft.com/en-us/library/ms174965.aspx
I'll file a feature request for the other datatype.
## Comment 16898
Date: 2012-02-15 22:36:27 +0100
From: @skinkie
(In reply to comment 2)
> If so, please consider using casts if applicable for your use case.
Yes, exactly. Will do this to workaround this specific case.
## Comment 16901
Date: 2012-02-15 22:49:36 +0100
From: @drstmane
If SQL bit_and() is indeed not defined for non-integer types, it should indeed trigger an SQL error message when called with non-integer arguments.
## Comment 16907
Date: 2012-02-16 12:56:30 +0100
From: @sjoerdmullender
Changeset [d2d9ae09ba8d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d2d9ae09ba8d) 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=d2d9ae09ba8d](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=d2d9ae09ba8d)
Changeset description:
Bit-wise operations don't work on floating point values.
And anyway, there is no implementation for these combinations.
This fixes bug #3013.
## Comment 16908
Date: 2012-02-16 14:13:30 +0100
From: @sjoerdmullender
Changeset [7e4846b6bc2e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7e4846b6bc2e) 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=7e4846b6bc2e](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=7e4846b6bc2e)
Changeset description:
Test for bug #3013.
## Comment 16909
Date: 2012-02-16 14:15:20 +0100
From: @sjoerdmullender
bit operations on floating point values don't make any sense, so I removed the functions from the SQL catalog. This means that the original query
select bit_and(1, power(2, 1));
suddenly works:
sql>select bit_and(1, power(2, 1));
+----------------------+
| bit_and_single_value |
+======================+
| 0 |
+----------------------+
1 tuple (1.107ms)
## Comment 16911
Date: 2012-02-16 14:29:41 +0100
From: @skinkie
Thanks! If there is an antonym of collateral damage it would be very suited here :)
| calc.and is not yet defined for dbl | https://api.github.com/repos/MonetDB/MonetDB/issues/3013/comments | 0 | 2020-11-30T12:07:31Z | 2024-06-27T11:55:18Z | https://github.com/MonetDB/MonetDB/issues/3013 | 753,423,214 | 3,013 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-02-15 17:14:02 +0100
From: @skinkie
To: SQL devs <<bugs-sql>>
Version: 11.7.5 (Dec2011) [obsolete]
CC: @njnes, @drstmane
Last updated: 2012-03-16 14:56:55 +0100
## Comment 16890
Date: 2012-02-15 17:14:02 +0100
From: @skinkie
User-Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.11 Safari/535.19
Build Identifier:
sql>trace select 16 and 16;
+------------------+
| and_single_value |
+==================+
| true |
+------------------+
1 tuple (4.755ms)
+-------+----------------------------------------------------------------------------+
| ticks | stmt |
+=======+============================================================================+
| 4 | X_5 := calc.bit(A0=16); |
| 4 | X_6 := calc.bit(A1=16); |
| 4 | X_7 := calc.and(X_5=true,X_6=true); |
| 14 | sql.exportValue(1,".","and_single_value":str,"boolean",1,0,2,X_7=true,""); |
| 5 | end s68_4; |
| 43 | function user.s68_4(A0=16,A1=16); |
| 549 | X_5:void := user.s68_4(16,16); |
+-------+----------------------------------------------------------------------------+
7 tuples (4.835ms)
sql>trace select cast(16 as smallint) and cast(16 as smallint);
+--------------------+
| and_=_single_value |
+====================+
| false |
+--------------------+
1 tuple (5.490ms)
+-------+---------------------------------------------------------------------------+
| ticks | stmt |
+=======+===========================================================================+
| 4 | X_5 := calc.==(A0=16:sht,1:sht); |
| 4 | X_6 := calc.==(A1=16:sht,1:sht); |
| 3 | X_7 := calc.and(X_5=false,X_6=false); |
| 15 | sql.exportValue(1,".","and_=_single_value","boolean",1,0,2,X_7=false,""); |
| 5 | end s69_4; |
| 120 | function user.s69_4(A0=16:sht,A1=16:sht); |
| 675 | X_5:void := user.s69_4(16:sht,16:sht); |
+-------+---------------------------------------------------------------------------+
7 tuples (5.573ms)
Reproducible: Always
MonetDB 5 server v11.8.0 (64-bit, 64-bit oids)
This is an unreleased version
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2012 MonetDB B.V., all rights reserved
Visit http://www.monetdb.org/ for further information
Found 3.9GiB available memory, 1 available cpu core
Libraries:
libpcre: 8.20 2011-10-21 (compiled with 8.20)
openssl: OpenSSL 1.0.0e 6 Sep 2011 (compiled with OpenSSL 1.0.0e 6 Sep 2011)
libxml2: 2.7.8 (compiled with 2.7.8)
Compiled by: skinkie@openov_cxx (x86_64-unknown-linux-gnu)
Compilation: gcc -g -Werror -Wall -Wextra -W -Werror-implicit-function-declaration -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wformat=2 -Wno-format-nonliteral -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -fstack-protector-all -Wstack-protector -Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs -Wlogical-op -Wunreachable-code -Wp,-D_FORTIFY_SOURCE=2
Linking : /usr/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64
## Comment 16891
Date: 2012-02-15 17:22:18 +0100
From: @skinkie
It seems it works because of 'luck' and not because it represents the documentation;
http://www.monetdb.org/Documentation/Manuals/MonetDB/Kernel/Modules/Calculator
## Comment 16892
Date: 2012-02-15 17:54:57 +0100
From: @skinkie
It seems that the following is the wanted behavior:
sql>trace select bit_and(cast(16 as smallint), cast(16 as smallint)) = cast(16 as smallint);
+----------------------+
| bit_and_single_value |
+======================+
| true |
+----------------------+
1 tuple (6.708ms)
+-------+--------------------------------------------------------------------------------+
| ticks | stmt |
+=======+================================================================================+
| 3 | X_6 := calc.and(A0=16:sht,A1=16:sht); |
| 4 | X_7 := calc.==(X_6=16:sht,A2=16:sht); |
| 14 | sql.exportValue(1,".","bit_and_single_value":str,"boolean",1,0,2,X_7=true,""); |
| 4 | end s20_1; |
| 46 | function user.s20_1(A0=16:sht,A1=16:sht,A2=16:sht); |
| 561 | X_5:void := user.s20_1(16:sht,16:sht,16:sht); |
+-------+--------------------------------------------------------------------------------+
6 tuples (6.792ms)
## Comment 16900
Date: 2012-02-15 22:46:29 +0100
From: @drstmane
SQL "and" is boolean not bit-wise; function bit_and(.,.) evaluates a bit-wise and of two arguments:
sql>trace select 16 and 16 ;
+------------------+
| and_single_value |
+==================+
| true |
+------------------+
1 tuple (3.201ms)
+-------+----------------------------------------------------------------------------+
| ticks | stmt |
+=======+============================================================================+
| 3 | X_5 := calc.bit(A0=16); |
| 3 | X_6 := calc.bit(A1=16); |
| 3 | X_7 := calc.and(X_5=true,X_6=true); |
| 8 | sql.exportValue(1,".","and_single_value":str,"boolean",1,0,2,X_7=true,""); |
| 170 | X_5:void := user.s7_1(16,16); |
+-------+----------------------------------------------------------------------------+
5 tuples (3.275ms)
(the given literals "16" are interpreted as / cast to boolean (bit) value "TRUE")
vs.
sql>trace select bit_and(16,16) ;
+----------------------+
| bit_and_single_value |
+======================+
| 16 |
+----------------------+
1 tuple (7.133ms)
+-------+------------------------------------------------------------------------------+
| ticks | stmt |
+=======+==============================================================================+
| 7 | X_5 := calc.and(A0=16,A1=16); |
| 19 | sql.exportValue(1,".","bit_and_single_value":str,"tinyint",8,0,6,X_5=16,""); |
| 276 | X_5:void := user.s6_1(16,16); |
+-------+------------------------------------------------------------------------------+
3 tuples (7.314ms)
(the given literals "16" are interpreted as tinyint)
It remains open, why the the explicit cast behaves as it does:
sql>trace select 16 and cast(16 as int);
+------------------+
| and_single_value |
+==================+
| false |
+------------------+
1 tuple (8.601ms)
+-------+---------------------------------------------------------------------------------+
| ticks | stmt |
+=======+=================================================================================+
| 8 | X_5 := calc.bit(A0=16); |
| 9 | X_6 := calc.==(A1=16,1:int); |
| 7 | X_7 := calc.and(X_5=true,X_6=false); |
| 19 | sql.exportValue(1:int,".","and_single_value","boolean",1:int,0,2,X_7=false,""); |
| 387 | X_5:void := user.s12_1(16,16); |
+-------+---------------------------------------------------------------------------------+
5 tuples (8.737ms)
vs.
sql>trace select bit_and(16,cast(16 as int)) ;
+----------------------+
| bit_and_single_value |
+======================+
| 16 |
+----------------------+
1 tuple (6.594ms)
+-------+---------------------------------------------------------------------------+
| ticks | stmt |
+=======+===========================================================================+
| 3 | X_5 := calc.and(A0=16,A1=16); |
| 9 | sql.exportValue(1,".","bit_and_single_value":str,"int",32,0,6,X_5=16,""); |
| 105 | X_5:void := user.s13_1(16,16); |
+-------+---------------------------------------------------------------------------+
3 tuples (6.642ms)
## Comment 16902
Date: 2012-02-15 22:55:08 +0100
From: @skinkie
I was puzzed by the following text;
[bitwise operators]
For integers there are some additional operations. The % operator implements the congruent modulo operation. The << and >> are the left and right bit shift. The or, and, xor and not for integers are implemented as bitwise boolean operations.
It is the first, and only, documentation that comes up when searching for bitwise operations in MonetDB. It is clear to me now, that this text refers to calc.and and not to SQL-'AND'. There is no page on SQL and bit_and, it might help future users either to write a page on SQL functions like these and/or make a reference from the Calculator page to how to use these functions in SQL.
## Comment 16910
Date: 2012-02-16 14:25:59 +0100
From: @sjoerdmullender
Bitwise AND in SQL is written &, bitwise OR is written |.
I believe there is no bitwise XOR. It should be ^ but that is acutally power (with the wrong priority, see bug #2291).
The AND and OR (and XOR) operators are Boolean operators.
If there is a bug here, it has to do with conversion of values to Booleans.
## Comment 16994
Date: 2012-02-25 18:33:37 +0100
From: @njnes
Changeset [aa359ac1eb36](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=aa359ac1eb36) 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=aa359ac1eb36](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=aa359ac1eb36)
Changeset description:
fixed boolean coerson problem See bug #3012
## Comment 17101
Date: 2012-03-16 14:56:55 +0100
From: @grobian
Released in Dec2011-SP2
| bitwise comparison fails after a cast | https://api.github.com/repos/MonetDB/MonetDB/issues/3012/comments | 0 | 2020-11-30T12:07:28Z | 2024-06-27T11:55:17Z | https://github.com/MonetDB/MonetDB/issues/3012 | 753,423,187 | 3,012 |
[
"MonetDB",
"MonetDB"
] | Date: 2012-02-15 15:59:49 +0100
From: @skinkie
To: SQL devs <<bugs-sql>>
Version: -- development
CC: @njnes
Last updated: 2012-03-16 14:56:53 +0100
## Comment 16889
Date: 2012-02-15 15:59:49 +0100
From: @skinkie
User-Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.11 Safari/535.19
Build Identifier:
I am trying to select a count in a subquery. This subquery seems to result in 0 rows. Though the count seems to operate on a row having 'null' values.
Reproducible: Always
### Actual Results:
Crash:
select dataownercode, lineplanningnumber, journeypatterncode, timinglinkorder, userstopcodebegin, istimingstop,
(select * from test as counter where
counter.dataownercode = test.dataownercode and
counter.lineplanningnumber = test.lineplanningnumber and
counter.journeypatterncode = test.journeypatterncode and
counter.timinglinkorder < test.timinglinkorder and
counter.userstopcodebegin = test.userstopcodebegin) as passagesequencenumber
from test order by dataownercode, lineplanningnumber, journeypatterncode, timinglinkorder limit 20;
>could not find (null).productformulatype
L22.L22
test.dataownercode
test.lineplanningnumber
test.journeypatterncode
test.timinglinkorder
test.userstopcodebegin
test.istimingstop
test.%TID%
test.dataownercode
test.lineplanningnumber
test.journeypatterncode
test.timinglinkorder
test.userstopcodebegin
test.istimingstop
mserver5: rel_bin.c:1695: rel2bin_project: Assertion `0' failed.
Aborted
Crashes in:
>mserver5: rel_select.c:603: rel_project: Assertion `exps_card(rel->exps) <= rel->card' failed.
select dataownercode, lineplanningnumber, journeypatterncode, timinglinkorder, userstopcodebegin, istimingstop,
(select count(*) from test as counter where
counter.dataownercode = test.dataownercode and
counter.lineplanningnumber = test.lineplanningnumber and
counter.journeypatterncode = test.journeypatterncode and
counter.timinglinkorder < test.timinglinkorder and
counter.userstopcodebegin = test.userstopcodebegin
group by dataownercode, lineplanningnumber, journeypatterncode) as passagesequencenumber
from test order by dataownercode, lineplanningnumber, journeypatterncode, timinglinkorder limit 20;
Works but count is 1:
select dataownercode, lineplanningnumber, journeypatterncode, timinglinkorder, userstopcodebegin, istimingstop,
(select count(*) from test as counter where
counter.dataownercode = test.dataownercode and
counter.lineplanningnumber = test.lineplanningnumber and
counter.journeypatterncode = test.journeypatterncode and
counter.timinglinkorder < test.timinglinkorder and
counter.userstopcodebegin = test.userstopcodebegin) as passagesequencenumber
from test order by dataownercode, lineplanningnumber, journeypatterncode, timinglinkorder limit 20;
CREATE TABLE "sys"."test" (
"version" DECIMAL(2) NOT NULL,
"implicit" BOOLEAN NOT NULL,
"dataownercode" VARCHAR(10) NOT NULL,
"lineplanningnumber" VARCHAR(10) NOT NULL,
"journeypatterncode" VARCHAR(10) NOT NULL,
"timinglinkorder" DECIMAL(3) NOT NULL,
"userstopcodebegin" VARCHAR(10) NOT NULL,
"userstopcodeend" VARCHAR(10) NOT NULL,
"confinrelcode" VARCHAR(10) NOT NULL,
"destcode" VARCHAR(10) NOT NULL,
"istimingstop" BOOLEAN NOT NULL,
"displaypublicline" VARCHAR(4),
"productformulatype" VARCHAR(4)
);
1,true,CXX,A001,0,0,40000010,40004015,santro,A00100998,true,,34
1,true,CXX,A001,0,1,40004015,40004021,santro,A00100998,false,,34
1,true,CXX,A001,0,2,40004021,40002570,santro,A00100998,false,,34
1,true,CXX,A001,0,3,40002570,40002550,santro,A00100998,false,,34
1,true,CXX,A001,0,4,40002550,40002590,santro,A00100998,false,,34
1,true,CXX,A001,0,5,40002590,40002610,santro,A00100998,false,,34
1,true,CXX,A001,0,6,40002610,40002630,santro,A00100998,false,,34
1,true,CXX,A001,0,7,40002630,40002690,santro,A00100998,false,,34
1,true,CXX,A001,0,8,40002690,40002770,santro,A00100998,false,,34
1,true,CXX,A001,0,9,40002770,40009591,santro,A00100998,false,,34
## Comment 16997
Date: 2012-02-26 10:59:18 +0100
From: @njnes
Changeset [7e4c8b3f36c6](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7e4c8b3f36c6) 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=7e4c8b3f36c6](https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=http//devmonetdborg/hg/MonetDB?cmd=changeset;node=7e4c8b3f36c6)
Changeset description:
in case of correlated groupby we need to add the outer projection's
to the groupby and aggr expressions.
Fixes bug #3011.
## Comment 17097
Date: 2012-03-16 14:56:53 +0100
From: @grobian
Released in Dec2011-SP2
| count(*) in subquery results in 1 for query without results | https://api.github.com/repos/MonetDB/MonetDB/issues/3011/comments | 0 | 2020-11-30T12:07:25Z | 2024-06-27T11:55:16Z | https://github.com/MonetDB/MonetDB/issues/3011 | 753,423,152 | 3,011 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.