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

Assertion on concurrent write #3303

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

Assertion on concurrent write #3303

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

Comments

@monetdb-team
Copy link

Date: 2013-06-08 15:38:47 +0200
From: @swingbit
To: SQL devs <>
Version: 11.15.7 (Feb2013-SP2)
CC: @njnes

Last updated: 2013-07-03 08:47:58 +0200

Comment 18798

Date: 2013-06-08 15:38:47 +0200
From: @swingbit

User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.94 Safari/537.36
Build Identifier:

I got this assertion while trying to write and commit on the same table from 2 different mclient sessions. I would have expected a "COMMiT failed" error on the second commit.

2013-06-08 15:29:06 ERR equip_tnw_20130531_01[11909]: mserver5: /opt/spinque/MonetDBServer/MonetDB.Spinque_Feb2013/src/sql/storage/bat/bat_storage.c:1451: tr_update_delta: Assertion `(((cur)->U->count) + ((ins)->U->count)) == (obat->cnt + (((((ins)->U->first <= (((BUN) 9223372036854775807LL) - 1)) ? (void) (0) : __assert_fail ("(ins)->U->first <= (((BUN) 9223372036854775807LL) - 1)", "/opt/spinque/MonetDBServer/MonetDB.Spinque_Feb2013/src/sql/storage/bat/bat_storage.c", 1451, PRETTY_FUNCTION)), (((ins)->U->count <= (((BUN) 9223372036854775807LL) - 1)) ? (void) (0) : __assert_fail ("(ins)->U->count <= (((BUN) 9223372036854775807LL) - 1)", "/opt/spinque/MonetDBServer/MonetDB.Spinque_Feb2013/src/sql/storage/bat/bat_storage.c", 1451, PRETTY_FUNCTION)), (((ins)->U->count <= (((BUN) 9223372036854775807LL) - 1) - (ins)->U->first) ? (void) (0) : __assert_fail ("(ins)->U->count <= (((BUN) 9223372036854775807LL) - 1) - (ins)->U->first", "/opt/spinque/MonetDBServer/MonetDB.Spinque_Feb2013/src/sql/storage/bat/bat_storage.c", 1451, PRETTY_FUNCTION)), (ins)->U->first + (ins)->U->count) - ins->U->inserted))' failed.
2

Reproducible: Always

Steps to Reproduce:

  1. open 2 mclient sessions
  2. START TRANSACTION on both, add a tuple on the same table, from both
  3. COMMIT on both

Actual Results:

The second COMMIT triggers the assertion above

Expected Results:

"COMMIT failed" error

$ mserver5 --version
MonetDB 5 server v11.15.8 (64-bit, 64-bit oids)
This is an unreleased version
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2013 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.31 2012-07-06 (compiled with 8.31)
openssl: OpenSSL 1.0.1e 11 Feb 2013 (compiled with OpenSSL 1.0.1e-fips 11 Feb 2013)
libxml2: 2.9.1 (compiled with 2.9.1)
Compiled by: roberto@photon.spinque.com (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
Linking : /usr/bin/ld -m elf_x86_64

Tip:
changeset: 47894:11a7d8d94a7b
branch: Feb2013
user: Niels Nes niels@cwi.nl
date: Fri Jun 07 15:49:07 2013 +0200
summary: fixed bug #3269, ie out of bounds write.

Comment 18846

Date: 2013-06-16 16:12:36 +0200
From: @njnes

fixed, ie appends are (again) also reads on the table/column.

Comment 18847

Date: 2013-06-16 16:14:33 +0200
From: MonetDB Mercurial Repository <>

Changeset 2a53b540e596 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=2a53b540e596

Changeset description:

fixed problem with concurrent appends (bug #3303)

fixed the test for join_over_multitable_using_index
@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 Nov 9, 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