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

Crashes and hangs with remote tables #6289

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

Crashes and hangs with remote tables #6289

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

Comments

@monetdb-team
Copy link

Date: 2017-04-21 13:32:13 +0200
From: @joerivanruth
To: SQL devs <>
Version: -- development
CC: @joerivanruth, @njnes

Last updated: 2017-07-17 16:07:29 +0200

Comment 25255

Date: 2017-04-21 13:32:13 +0200
From: @joerivanruth

User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36
Build Identifier:

I have a MERGE TABLE which includes a REMOTE TABLE.
Accessing the merge table fails in various ways.

Attached a shell script and some sql files. In demo.sh, you can
select a wide table (line 3, COMMON=wide.sql) or a narrow table
(COMMON=narrow.sql).

The script assumes a running monetdbd with two databases foo and bar.
On foo, it creates a schema 'atraf' with a MERGE TABLE containing a
REMOTE TABLE from bar. On bar, it creates the table referred to by
foo. Then it runs a query on the merge table.

The result varies by platform and table width.

  1. on Ubuntu (Xenial64), both narrow and wide fail with:

    an error occurred on connection: Connection lost
    
  2. on OSX, narrow hangs, and the session is not cleaned up from
    sys.sessions after Control-C.

  3. on OSX with a wide table, database bar reports at query time a
    syntax error in the DDL:

    :: query on foo :::::::::::::::::::::::::::::::::::::::::::::::::::::::
    
    SET SCHEMA atraf;
    auto commit mode: on
    (mapi:monetdb://monetdb@localhost/bar)
    operator expected
            "DestStateFips" varchar(10) default null,
    ^<identifier> expected
             "DestStateName" varchar(100) default null,
    ...
    

So this is probably a memory corruption error.

Reproducible: Always

Steps to Reproduce:

  1. start monetdbd, and start+release two databases 'foo' and 'bar'.
  2. run the attached script.
  3. optionally, switch line 3, COMMON=, between wide.sql and narrow.sql

Actual Results:

See above: a crash, a hang or garbage errors

Expected Results:

a query result.

Comment 25257

Date: 2017-04-21 15:17:50 +0200
From: @joerivanruth

Created attachment 550
Tar file containing the scripts

Attached file: crash.tar (application/x-tar, 11776 bytes)
Description: Tar file containing the scripts

Comment 25276

Date: 2017-04-30 23:27:41 +0200
From: @njnes

if exists isn't supported on the released versions yet

a test without monetdbd shows no problems (on fedora)

Comment 25282

Date: 2017-05-02 14:02:25 +0200
From: @joerivanruth

You're right, I was actually testing on 'default', not a released version.
I can't seem to remove the version now :(

I still see the behaviour on OS X and Ubuntu, with and without monetdbd.

Comment 25396

Date: 2017-06-28 10:57:44 +0200
From: MonetDB Mercurial Repository <>

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

Changeset description:

fixed bug in rel_read, solves bug #6289

Comment 25397

Date: 2017-06-28 11:00:49 +0200
From: @njnes

fixed the problem in rel_read

Comment 25399

Date: 2017-06-28 13:21:26 +0200
From: @joerivanruth

Created attachment 553
Shell- and sql script demonstrating another failure

Another test case

Attached file: crash2.tar.gz (application/x-gzip, 1278 bytes)
Description: Shell- and sql script demonstrating another failure

Comment 25400

Date: 2017-06-28 13:24:57 +0200
From: @joerivanruth

Unfortunately, I still get failures with MERGE tables.

On Linux (rocks085) this script yields

  • mclient -e -d foo -s 'SET SCHEMA atraf; SELECT COUNT(DISTINCT "Year") FROM ontime;'
    SET SCHEMA atraf; SELECT COUNT(DISTINCT "Year") FROM ontime;
    auto commit mode: on
    (mapi:monetdb://monetdb@localhost/bar)
    operator expected

On OS X it's slightly different:

  • mclient -e -d foo -s 'SET SCHEMA atraf; SELECT COUNT(DISTINCT "Year") FROM ontime;'
    SET SCHEMA atraf; SELECT COUNT(DISTINCT "Year") FROM ontime;
    auto commit mode: on
    (mapi:monetdb://monetdb@localhost/bar)
    operator expected
    "DestStateFips" varchar(10) default null,
    ^ expected
    "DestStateName" varchar(100) default null,
    ^ expected

This continues for quite a while, ending in

"Div5WheelsOff" varchar(10) default null,

^ expected
"Div5TailNum" varchar(10) default null
^ expected
);
^ expected

Note these error messages about the DDL occur when querying the merge table.

Comment 25406

Date: 2017-07-03 20:51:39 +0200
From: @njnes

fixed a problem in RMTput, ie buffer to small

@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