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

Select from remote table leaves session open #6548

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

Select from remote table leaves session open #6548

monetdb-team opened this issue Nov 30, 2020 · 0 comments
Labels
bug Something isn't working normal SQL

Comments

@monetdb-team
Copy link

Date: 2018-02-27 11:50:10 +0100
From: Nick <>
To: SQL devs <>
Version: 11.27.13 (Jul2017-SP4)
CC: @njnes

Last updated: 2018-03-29 15:39:16 +0200

Comment 26231

Date: 2018-02-27 11:50:10 +0100
From: Nick <>

User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0
Build Identifier:

I have two databases (v11.27.13 both) on two Debian8 machines. One with
corrupted table (in my case it got corrupted due to bug in Jul2017-SP1) and
another with remote table to the corrupted table. When I run the SELECT
query on the remote table I get an error. And the session opened by this
query to the first DB did not close. I see it by querying 'sys.sessions'
table. And every time I run this SELECT I get additional record in
'sys.sessions'. This happens only if en error occurs, on successful SELECT
the session immediately disappears. How can I force this sessions to close
or is it a bug?

Reproducible: Always

Steps to Reproduce:

  1. Have two instances on MonetDB with 'storage' databases in each.
  2. In the first instance create regular table like this:
    create table storage.ttt(col1 varchar(10));
  3. Fill it with some data.
  4. Corrupt this table somehow (Don't know how to reproduce this step. I got it corrupted accidentally due to bug in Jul2017-SP1)
  5. In the second instance create remote table to the table created in step 2:
    create remote table storage.ttt(col1 varchar(10))ON 'mapi:monetdb://:50000/storage';
  6. Check opened sessions on the first instance by running the query under 'monetdb' user:
    select * from sys.sessions;
    1 tuple (3.907ms)
  7. Run query on remote table:
    select * from storage.ttt;
    and get an error about corrupted BAT or something.
  8. Check opened sessions again and the additional inactive session will be listed which will never close.

Actual Results:

Increasing number of inactive sessions from the second instance.

Expected Results:

Close each session after query on the remote table has failed.

mserver5 --version
MonetDB 5 server v11.27.13 "Jul2017-SP4" (64-bit, 128-bit integers)
Copyright (c) 1993 - July 2008 CWI
Copyright (c) August 2008 - 2018 MonetDB B.V., all rights reserved
Visit https://www.monetdb.org/ for further information
Found 11.8GiB available memory, 4 available cpu cores
Libraries:
libpcre: 8.35 2014-04-04 (compiled with 8.35)
openssl: OpenSSL 1.0.1t 3 May 2016 (compiled with )
libxml2: 2.9.1 (compiled with 2.9.1)
Compiled by: root@dev.monetdb.org (x86_64-pc-linux-gnu)
Compilation: gcc -O3 -fomit-frame-pointer -pipe -g -D_FORTIFY_SOURCE=2
Linking : /usr/bin/ld -m elf_x86_64

Comment 26232

Date: 2018-02-27 14:26:05 +0100
From: Nick <>

In my case the error I got on step 8 is:
Cannot subtract delete column
BATdiff: inputs not compatible.

Comment 26260

Date: 2018-03-14 11:46:27 +0100
From: MonetDB Mercurial Repository <>

Changeset a20ec2286704 made by Niels Nes niels@cwi.nl in the MonetDB repo, refers to this bug.

For complete details, see https//devmonetdborg/hg/MonetDB?cmd=changeset;node=a20ec2286704

Changeset description:

fixes for bug #6548 (ie add exception block to catch exceptions and disconnect from the
remote mserver)

also fixed problem in newExitStmt, don't push a newAssignment statement
as that is allready pushed.

Comment 26261

Date: 2018-03-14 11:47:50 +0100
From: @njnes

solved by an exception block

Comment 26315

Date: 2018-03-29 15:39:16 +0200
From: @sjoerdmullender

The Mar2018 version has been released.

@monetdb-team monetdb-team added bug Something isn't working normal SQL labels Nov 30, 2020
@sjoerdmullender sjoerdmullender added this to the Ancient Release milestone Feb 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working normal SQL
Projects
None yet
Development

No branches or pull requests

2 participants