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

crash if mclient disconnects abruptly during a query #3736

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

crash if mclient disconnects abruptly during a query #3736

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

Comments

@monetdb-team
Copy link

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

Date: 2015-06-10 08:48:01 +0200
From: Wiest Dennis <<Dennis.Wiest>>
To: SQL devs <>
Version: 11.19.15 (Oct2014-SP4)
CC: @njnes

Last updated: 2015-08-28 13:41:48 +0200

Comment 20912

Date: 2015-06-10 08:48:01 +0200
From: Wiest Dennis <<Dennis.Wiest>>

User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0
Build Identifier:

Hello,

I'm new here. I have the following problem. I have a database that looks like this (see end of email). Now I want to issue the following query.

Select b. * FROM open_auctions o, b bidder WHERE (select b3.INCREASE from bidder b3 where b3.id = (select min (b3a.id) from bidder b3a where b3a.open_auction_id = o.open_auction_id)) * 2 <= (Select b2.INCREASE from bidder b2 where b2.id = (SELECT MAX (b2a.id) from bidder b2a where b2a.open_auction_id = o.open_auction_id)) AND o.open_auction_id = b.open_auction_id;

The database crashes. If I divide the query individually and settled it works flawlessly.
Other complex query also work. Only in this query crashes the database. Can anyone help me further?

I installed MonetDB 11:19:11 64 bits on Redhat. 6

Thanks and Regards

Dennis

CREATE TABLE closed_auctions (
id int NOT NULL AUTO_INCREMENT,
seller varchar(255) NOT NULL,
buyer varchar(255) NOT NULL,
itemref varchar(255) NOT NULL,
price double NOT NULL,
date varchar(255) NOT NULL,
quantitiy int NOT NULL,
type varchar(255) NOT NULL,
PRIMARY KEY (id)
);

INSERT INTO open_auctions (id, open_auction_id, initial, reserve, aktuell, privacy, itemref, seller, quantity, type, start, ende) VALUES
(1, 'open_auction0', 210.62, 1540.75, 263.12, 'No', 'item0', 'person11', 1, 'Regular', '02/27/1998', '03/09/1999'),
(2, 'open_auction1', 69.64, 398.65, 168.64, '', 'item2', 'person10', 1, 'Featured', '06/14/1998', '02/27/1999'),
(3, 'open_auction2', 13.9, 0, 16.9, 'No', 'item3', 'person11', 1, 'Featured', '07/16/2000', '10/22/2000'),
(4, 'open_auction3', 17.12, 0, 179.12, '', 'item5', 'person13', 1, 'Featured', '02/01/2001', '07/22/1999'),
(5, 'open_auction4', 38.21, 116.91, 219.71, 'No', 'item7', 'person11', 4, 'Regular, Dutch', '08/05/2000', '01/09/1999'),
(6, 'open_auction5', 75.95, 174.84, 116.45, 'No', 'item9', 'person7', 1, 'Featured', '01/27/2001', '10/08/1999'),
(7, 'open_auction6', 67.27, 0, 77.77, 'Yes', 'item10', 'person14', 1, 'Featured', '12/15/2001', '07/13/1999'),
(8, 'open_auction7', 35.53, 133.36, 73.03, 'Yes', 'item12', 'person16', 1, 'Regular', '04/06/2001', '04/11/2000'),
(9, 'open_auction8', 92.54, 0, 101.54, '', 'item13', 'person12', 1, 'Regular', '10/20/1998', '02/04/2001'),
(10, 'open_auction9', 9.88, 0, 137.38, '', 'item14', 'person10', 1, 'Featured', '06/16/1998', '12/05/2000'),
(11, 'open_auction10', 86.28, 0, 239.28, 'Yes', 'item16', 'person8', 1, 'Featured', '06/26/2000', '02/04/1998'),
(12, 'open_auction11', 4.12, 24.53, 38.62, '', 'item17', 'person12', 1, 'Regular', '11/03/1999', '03/02/2000');

CREATE TABLE bidder (
id int NOT NULL AUTO_INCREMENT,
open_auction_id varchar(255) NOT NULL,
date varchar(255) NOT NULL,
time varchar(255) NOT NULL,
personref varchar(255) NOT NULL,
increase double NOT NULL,
PRIMARY KEY (id)
);

-- Daten für Tabelle bidder

INSERT INTO bidder (id, open_auction_id, date, time, personref, increase) VALUES
(1, 'open_auction0', '06/13/2001', '13:16:15', 'person0', 18),
(2, 'open_auction0', '09/18/2000', '11:29:44', 'person23', 12),
(3, 'open_auction0', '01/07/1998', '10:23:59', 'person14', 18),
(4, 'open_auction0', '07/10/2001', '14:00:39', 'person16', 4.5),
(5, 'open_auction1', '11/12/1998', '11:23:38', 'person20', 4.5),
(6, 'open_auction1', '10/02/2000', '22:48:00', 'person4', 15),
(7, 'open_auction1', '12/04/1998', '22:29:38', 'person23', 1.5),
(8, 'open_auction1', '06/22/1999', '12:43:47', 'person19', 15),
(9, 'open_auction1', '12/02/2001', '13:38:51', 'person15', 45),
(10, 'open_auction1', '11/12/2001', '04:50:27', 'person9', 6),
(11, 'open_auction1', '05/21/2001', '08:02:16', 'person5', 12),
(12, 'open_auction2', '12/04/2000', '14:03:16', 'person5', 3),
(13, 'open_auction3', '09/03/2000', '22:45:30', 'person8', 10.5),
(14, 'open_auction3', '08/18/1998', '17:13:40', 'person22', 25.5),
(15, 'open_auction3', '06/05/1998', '11:57:56', 'person19', 16.5),
(16, 'open_auction3', '09/20/1999', '00:39:18', 'person5', 46.5),
(17, 'open_auction3', '10/03/2001', '01:08:59', 'person23', 58.5),
(18, 'open_auction3', '02/17/2001', '07:13:32', 'person20', 4.5),
(19, 'open_auction4', '10/19/1998', '09:00:31', 'person7', 33),
(20, 'open_auction4', '03/11/2001', '01:59:02', 'person8', 9),
(21, 'open_auction4', '04/16/2001', '23:37:09', 'person8', 6),
(22, 'open_auction4', '03/06/1999', '12:19:57', 'person5', 4.5),
(23, 'open_auction4', '02/01/2000', '09:37:51', 'person21', 18),
(24, 'open_auction4', '01/09/1999', '19:31:44', 'person1', 31.5),
(25, 'open_auction4', '11/11/2001', '05:24:08', 'person16', 27),
(26, 'open_auction4', '11/19/1998', '16:16:17', 'person10', 7.5),
(27, 'open_auction4', '04/05/1999', '00:37:15', 'person17', 7.5),
(28, 'open_auction4', '09/14/1999', '12:00:43', 'person12', 37.5),
(29, 'open_auction5', '07/07/2000', '08:53:00', 'person15', 6),
(30, 'open_auction5', '08/06/2001', '10:16:15', 'person13', 4.5),
(31, 'open_auction5', '08/23/1999', '08:26:06', 'person17', 30),
(32, 'open_auction6', '01/23/2000', '17:14:42', 'person1', 10.5),
(33, 'open_auction7', '10/14/1999', '14:39:18', 'person16', 27),
(34, 'open_auction7', '05/19/1999', '23:51:16', 'person14', 9),
(35, 'open_auction7', '03/27/1999', '19:14:39', 'person23', 1.5),
(36, 'open_auction8', '04/26/2001', '00:41:04', 'person12', 9),
(37, 'open_auction9', '04/03/1999', '19:09:46', 'person22', 18),
(38, 'open_auction9', '01/21/1999', '08:14:44', 'person19', 19.5),
(39, 'open_auction9', '11/24/1999', '02:12:12', 'person11', 12),
(40, 'open_auction9', '01/07/2001', '05:33:55', 'person7', 9),
(41, 'open_auction9', '07/28/2000', '00:57:52', 'person16', 16.5),
(42, 'open_auction9', '01/28/2000', '20:24:02', 'person23', 1.5),
(43, 'open_auction9', '05/13/2001', '02:45:46', 'person13', 1.5),
(44, 'open_auction9', '12/06/2000', '15:18:07', 'person21', 24),
(45, 'open_auction9', '08/16/1998', '09:27:27', 'person14', 3),
(46, 'open_auction9', '06/18/2001', '19:57:53', 'person7', 3),
(47, 'open_auction9', '12/13/2001', '09:01:23', 'person2', 12),
(48, 'open_auction9', '03/18/2001', '08:59:02', 'person13', 7.5),
(49, 'open_auction10', '08/14/1998', '16:33:46', 'person23', 33),
(50, 'open_auction10', '03/24/1998', '11:45:48', 'person3', 1.5),
(51, 'open_auction10', '10/08/1998', '06:20:35', 'person1', 45),
(52, 'open_auction10', '01/12/1998', '21:43:02', 'person3', 15),
(53, 'open_auction10', '03/02/2001', '20:20:33', 'person0', 9),
(54, 'open_auction10', '03/01/2000', '10:08:07', 'person23', 10.5),
(55, 'open_auction10', '07/19/2001', '00:50:29', 'person6', 9),
(56, 'open_auction10', '10/04/2001', '00:58:25', 'person4', 3),
(57, 'open_auction10', '11/27/1998', '00:15:23', 'person21', 27),
(58, 'open_auction11', '05/16/1998', '15:08:01', 'person1', 15),
(59, 'open_auction11', '05/08/2000', '06:44:20', 'person3', 4.5),
(60, 'open_auction11', '10/22/2001', '15:34:49', 'person4', 15);

Reproducible: Always

Steps to Reproduce:

  1. Create Tables
  2. Insert Data
  3. Execute Query looking on Details

Actual Results:

The Database Crashed and gives this in the log file

2015-06-10 06:39:38 MSG merovingian[7145]: Merovingian 1.7 (Oct2014-SP3) starting
2015-06-10 06:39:38 MSG merovingian[7145]: monitoring dbfarm /mnt/u60/home/axlavs/dennis/monetdb
2015-06-10 06:39:58 MSG merovingian[7145]: accepting connections on TCP socket 0.0.0.0:50000
2015-06-10 06:39:58 MSG merovingian[7145]: accepting connections on UNIX domain socket /tmp/.s.monetdb.50000
2015-06-10 06:40:18 MSG discovery[7145]: listening for UDP messages on :50000
2015-06-10 06:40:18 MSG control[7145]: accepting connections on UNIX domain socket /tmp/.s.merovingian.50000
2015-06-10 06:40:18 MSG discovery[7145]: new neighbour weac-cn2.axl.intra (weac-cn2.axl.intra)
2015-06-10 06:40:20 MSG discovery[7145]: new database mapi:monetdb://weac-cn2.axl.intra:50000/xmarktest (ttl=660s)
2015-06-10 06:40:20 MSG discovery[7145]: new database mapi:monetdb://weac-cn2.axl.intra:50000/aixm (ttl=660s)
2015-06-10 06:40:20 MSG discovery[7145]: new database mapi:monetdb://weac-cn2.axl.intra:50000/xmark (ttl=660s)
2015-06-10 06:40:49 MSG merovingian[7145]: starting database 'xmarktest', up min/avg/max: 33m/2d/4d, crash average: 0.00 0.80 0.30 (11-2=9)
2015-06-10 06:40:49 MSG merovingian[7145]: proxying client (local) for database 'xmarktest' to mapi:monetdb:///mnt/u60/home/axlavs/dennis/monetdb/xmarktest/.mapi.sock?database=xmarktest
2015-06-10 06:40:49 MSG merovingian[7145]: target connection is on local UNIX domain socket, passing on filedescriptor instead of proxying
2015-06-10 06:40:49 MSG xmarktest[12823]: arguments: /usr/bin/mserver5 --dbpath=/mnt/u60/home/axlavs/dennis/monetdb/xmarktest --set merovingian_uri=mapi:monetdb://weac-cn2.axl.intra:50000/xmarktest --set mapi_open=false --set mapi_port=0 --set mapi_usock=/mnt/u60/home/axlavs/dennis/monetdb/xmarktest/.mapi.sock --set monet_vault_key=/mnt/u60/home/axlavs/dennis/monetdb/xmarktest/.vaultkey --set gdk_nr_threads=32 --set max_clients=64 --set sql_optimizer=default_pipe --set monet_daemon=yes
2015-06-10 06:40:49 MSG xmarktest[12823]: MonetDB 5 server v11.19.11 "Oct2014-SP3"
2015-06-10 06:40:49 MSG xmarktest[12823]: Serving database 'xmarktest', using 32 threads
2015-06-10 06:40:49 MSG xmarktest[12823]: Compiled for x86_64-redhat-linux-gnu/64bit with 64bit OIDs dynamically linked
2015-06-10 06:40:49 MSG xmarktest[12823]: Found 62.883 GiB available main-memory.
2015-06-10 06:40:49 MSG xmarktest[12823]: Copyright (c) 1993-July 2008 CWI.
2015-06-10 06:40:49 MSG xmarktest[12823]: Copyright (c) August 2008-2015 MonetDB B.V., all rights reserved
2015-06-10 06:40:49 MSG xmarktest[12823]: Visit http://www.monetdb.org/ for further information
2015-06-10 06:40:49 MSG xmarktest[12823]: Listening for UNIX domain connection requests on mapi:monetdb:///mnt/u60/home/axlavs/dennis/monetdb/xmarktest/.mapi.sock
2015-06-10 06:40:49 MSG xmarktest[12823]: MonetDB/GIS module loaded
2015-06-10 06:40:49 MSG xmarktest[12823]: MonetDB/SQL module loaded
2015-06-10 06:40:49 MSG merovingian[7145]: proxying client (local) for database 'xmarktest' to mapi:monetdb:///mnt/u60/home/axlavs/dennis/monetdb/xmarktest/.mapi.sock?database=xmarktest
2015-06-10 06:40:49 MSG merovingian[7145]: target connection is on local UNIX domain socket, passing on filedescriptor instead of proxying
2015-06-10 06:41:04 MSG merovingian[7145]: database 'xmarktest' (12823) was killed by signal SIGSEGV

Expected Results:

Execute this Query like other Systems. Mysql Oracle etc...

Comment 20913

Date: 2015-06-10 10:00:54 +0200
From: @njnes

could you also add the open_auctions create table statement.

Comment 20914

Date: 2015-06-10 10:04:44 +0200
From: Wiest Dennis <<Dennis.Wiest>>

CREATE TABLE open_auctions (
id int NOT NULL AUTO_INCREMENT,
open_auction_id varchar(255) NOT NULL,
initial double NOT NULL,
reserve double NOT NULL,
aktuell double NOT NULL,
privacy varchar(255) NOT NULL,
itemref varchar(255) NOT NULL,
seller varchar(255) NOT NULL,
quantity double NOT NULL,
type varchar(255) NOT NULL,
start varchar(255) NOT NULL,
ende varchar(255) NOT NULL,
PRIMARY KEY (id)
);

sorry my mistake

Comment 20915

Date: 2015-06-10 10:50:20 +0200
From: MonetDB Mercurial Repository <>

Changeset 38c03afee6e7 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=38c03afee6e7

Changeset description:

fixed bug #3736, protect agains empty expression lists

Comment 20916

Date: 2015-06-10 10:51:31 +0200
From: @njnes

fixed in the stable branch. Added more protection against empty expression lists. Possibly the query will need some more optimization tricks. So lets us know if the performance isn't what you expect.

Comment 20917

Date: 2015-06-10 11:00:40 +0200
From: Wiest Dennis <<Dennis.Wiest>>

Thanks Niels,

is its fixed in the sourcecode 11.19.11 ?? Or in the newest sourcecode?

Dennis

Comment 20918

Date: 2015-06-10 11:24:13 +0200
From: @sjoerdmullender

It's fixed in the Oct2014 branch, in time for an Oct2014-SP5 release, if that ever materializes. Otherwise it will be in the next feature release.

Comment 21187

Date: 2015-08-28 13:41:48 +0200
From: @sjoerdmullender

Jul2015 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