Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gdk/gdk_bat.c:2904: BATassertHeadProps: Assertion `!b->H->revsorted || cmp >= 0' failed. #3542

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

Comments

@monetdb-team
Copy link

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

Date: 2014-08-15 16:29:12 +0200
From: Martin van Dinther <<martin.van.dinther>>
To: SQL devs <>
Version: 11.17.17 (Jan2014-SP2)
CC: @njnes

Last updated: 2014-10-31 14:13:59 +0100

Comment 20048

Date: 2014-08-15 16:29:12 +0200
From: Martin van Dinther <<martin.van.dinther>>

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

Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased)
Database: MonetDB v11.20.0 (unreleased), 'demo'
Type \q to quit, ? for a list of available commands
auto commit mode: on
sql>CREATE TABLE test_num_data (id integer, val numeric(18,10));
operation successful (74.403ms)
sql>INSERT INTO test_num_data VALUES (1, '-0.0');
1 affected rows (2.112ms)
sql>INSERT INTO test_num_data VALUES (2, '-34338492.215397047');
1 affected rows (2.752ms)
sql>SELECT * FROM test_num_data;
+------+----------------------+
| id | val |
+======+======================+
| 1 | 0.0000000000 |
| 2 | -34338492.2153970470 |
+------+----------------------+
2 tuples (2.587ms)
sql>SELECT t1.id, t2.id, t1.val * t2.val FROM test_num_data t1, test_num_data t2;
+------+------+----------------------------------------+
| id | id | sql_mul_val |
+======+======+========================================+
| 1 | 1 | 000000000000000000000 |
| 1 | 2 | 000000000000000000000 |
| 2 | 1 | 000000000000000000000 |
| 2 | 2 | 1179132047626883.59686213585632020900 |
+------+------+----------------------------------------+
4 tuples (3.749ms)
sql>SELECT t1.id, t2.id, round(t1.val * t2.val, 30) FROM test_num_data t1, test_num_data t2;
sql>

with the last query you will get:

mserver5: /ufs/dinther/dev/dev/gdk/gdk_bat.c:2904: BATassertHeadProps: Assertion `!b->H->revsorted || cmp >= 0' failed.

Reproducible: Always

Steps to Reproduce:

  1. compile software from default branch and do make install
  2. start INSTALL/bin/mserver5
  3. start mclient enter following SQL
    CREATE TABLE test_num_data (id integer, val numeric(18,10));
    INSERT INTO test_num_data VALUES (1, '-0.0');
    INSERT INTO test_num_data VALUES (2, '-34338492.215397047');
    SELECT * FROM test_num_data;
    SELECT t1.id, t2.id, t1.val * t2.val FROM test_num_data t1, test_num_data t2;
    SELECT t1.id, t2.id, round(t1.val * t2.val, 30) FROM test_num_data t1, test_num_data t2;

Actual Results:

bash-4.2$ ./start_INSTALL_mserver5.sh
builtin opt gdk_dbpath = /ufs/dinther/INSTALL/var/monetdb5/dbfarm/demo
builtin opt gdk_debug = 0
builtin opt gdk_vmtrim = no
builtin opt monet_prompt = >
builtin opt monet_daemon = no
builtin opt mapi_port = 50000
builtin opt mapi_open = false
builtin opt mapi_autosense = false
builtin opt sql_optimizer = default_pipe
builtin opt sql_debug = 0
cmdline opt gdk_debug = 10
MonetDB 5 server v11.20.0
This is an unreleased version
Serving database 'demo', using 8 threads
Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs and 128bit integers dynamically linked
Found 15.356 GiB available main-memory.
Copyright (c) 1993-July 2008 CWI.
Copyright (c) August 2008-2014 MonetDB B.V., all rights reserved
Visit http://www.monetdb.org/ for further information
Listening for connection requests on mapi:monetdb://127.0.0.1:50000/
MonetDB/GIS module loaded
MonetDB/SQL module loaded

SQL catalog created, loading sql scripts once
loading sql script: 09_like.sql
loading sql script: 10_math.sql
loading sql script: 11_times.sql
loading sql script: 12_url.sql
loading sql script: 13_date.sql
loading sql script: 14_inet.sql
loading sql script: 15_querylog.sql
loading sql script: 16_tracelog.sql
loading sql script: 19_cluster.sql
loading sql script: 20_vacuum.sql
loading sql script: 21_dependency_functions.sql
loading sql script: 22_clients.sql
loading sql script: 23_skyserver.sql
loading sql script: 24_zorder.sql
loading sql script: 25_debug.sql
loading sql script: 26_sysmon.sql
loading sql script: 39_analytics.sql
loading sql script: 39_analytics_hge.sql
loading sql script: 40_geom.sql
loading sql script: 40_json.sql
loading sql script: 40_json_hge.sql
loading sql script: 41_jsonstore.sql
loading sql script: 45_uuid.sql
loading sql script: 46_gsl.sql
loading sql script: 75_storagemodel.sql
loading sql script: 80_statistics.sql
loading sql script: 80_udf.sql
loading sql script: 80_udf_hge.sql
loading sql script: 90_generator.sql
loading sql script: 99_system.sql
WARNING To speedup user.columnsize a bulk operator implementation is needed
WARNING To speedup user.heapsize a bulk operator implementation is needed
WARNING To speedup user.hashsize a bulk operator implementation is needed
WARNING To speedup user.imprintsize a bulk operator implementation is needed
mserver5: /ufs/dinther/dev/dev/gdk/gdk_bat.c:2904: BATassertHeadProps: Assertion `!b->H->revsorted || cmp >= 0' failed.
./start_INSTALL_mserver5.sh: line 4: 13529 Aborted ./INSTALL/bin/mserver5 -d10
bash-4.2$

Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased)
Database: MonetDB v11.20.0 (unreleased), 'demo'
Type \q to quit, ? for a list of available commands
auto commit mode: on
sql>CREATE TABLE test_num_data (id integer, val numeric(18,10));
operation successful (74.403ms)
sql>INSERT INTO test_num_data VALUES (1, '-0.0');
1 affected rows (2.112ms)
sql>INSERT INTO test_num_data VALUES (2, '-34338492.215397047');
1 affected rows (2.752ms)
sql>SELECT * FROM test_num_data;
+------+----------------------+
| id | val |
+======+======================+
| 1 | 0.0000000000 |
| 2 | -34338492.2153970470 |
+------+----------------------+
2 tuples (2.587ms)
sql>SELECT t1.id, t2.id, t1.val * t2.val FROM test_num_data t1, test_num_data t2;
+------+------+----------------------------------------+
| id | id | sql_mul_val |
+======+======+========================================+
| 1 | 1 | 000000000000000000000 |
| 1 | 2 | 000000000000000000000 |
| 2 | 1 | 000000000000000000000 |
| 2 | 2 | 1179132047626883.59686213585632020900 |
+------+------+----------------------------------------+
4 tuples (3.749ms)
sql>SELECT t1.id, t2.id, round(t1.val * t2.val, 30) FROM test_num_data t1, test_num_data t2;
sql>

Expected Results:

no assertion failure

Comment 20063

Date: 2014-08-20 11:04:55 +0200
From: @njnes

we get overflow with these computations on Oct2014

Comment 20065

Date: 2014-08-20 12:22:27 +0200
From: MonetDB Mercurial Repository <>

Changeset b3e90980dc9b 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=b3e90980dc9b

Changeset description:

added test for bug #3542

Comment 20103

Date: 2014-08-28 23:33:47 +0200
From: MonetDB Mercurial Repository <>

Changeset 440f4e5a5586 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=440f4e5a5586

Changeset description:

ifthenelse.Bug-3546 & round.Bug-3542: approved int128 output

Comment 20349

Date: 2014-10-31 14:13:59 +0100
From: @sjoerdmullender

Oct2014 has been released.

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

Successfully merging a pull request may close this issue.

None yet
1 participant