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

lwt: assertion in boost::dynamic_bitset on execution of multi table LWT batch. #6332

Closed
1 task done
enaydanov opened this issue Apr 30, 2020 · 5 comments
Closed
1 task done
Assignees
Milestone

Comments

@enaydanov
Copy link
Contributor

This is Scylla's bug tracker, to be used for reporting bugs only.
If you have a question about Scylla, and not a bug, please ask it in
our mailing-list at scylladb-dev@googlegroups.com or in our slack channel.

  • I have read the disclaimer above, and I am reporting a suspected malfunction in Scylla.

Installation details
Scylla version (or git commit hash): 4.0.rc2
Cluster size: 1
OS (RHEL/CentOS/Ubuntu/AWS AMI): Ubuntu

Trying to make following CQL and instead of syntax error got assertion:

CREATE TABLE transactions (
  id UUID,
  src_bic TEXT,
  src_ban TEXT,
  dst_bic TEXT,
  dst_ban TEXT,
  amount DECIMAL,
  status TEXT,
  PRIMARY KEY (id)
);

CREATE TABLE transactions_in_progress (
  id UUID,
  PRIMARY KEY (id)
);

BEGIN BATCH
  INSERT INTO transactions (id, src_bic, src_ban, dst_bic, dst_ban, amount, status)
    VALUES ({transaction_uuid}, '1', '1', '1', '2', 100, 'in progress') IF NOT EXISTS
  INSERT INTO transactions_in_progress (id) VALUES ({transaction_uuid}) IF NOT EXISTS
APPLY BATCH

Assertion:

scylla: /usr/include/boost/dynamic_bitset/dynamic_bitset.hpp:868: boost::dynamic_bitset<Block, Allocator>& boost::dynamic_bitset<Block, Allocator>::operator|=(const boost::dynamic_bitset<Block, Allocator>&) [with Block = long unsigned int; Allocator = std::allocator<long unsigned int>]: Assertion `size() == rhs.size()' failed.
@bentsi
Copy link
Contributor

bentsi commented May 10, 2020

@kostja are you aware of this?

@kostja kostja self-assigned this May 10, 2020
@kostja
Copy link
Contributor

kostja commented May 10, 2020

Well, Evgeniy mentioned earlier he hit a crash, I wasn't aware of the specifics. Will take a look.

@slivne slivne added this to the 4.2 milestone May 11, 2020
alecco added a commit to alecco/scylladb that referenced this issue May 14, 2020
Closes scylladb#6332

Tested with https://github.com/scylladb/scylla-dtest/pull/1465

Branch URL: https://github.com/alecco/scylla/tree/fix_issue_6332

Tests: unit ({dev})

Signed-off-by: Alejo Sanchez <alejo.sanchez@scylladb.com>
@alecco alecco self-assigned this May 14, 2020
alecco added a commit to alecco/scylladb that referenced this issue May 14, 2020
Closes scylladb#6332

Tested with https://github.com/scylladb/scylla-dtest/pull/1465

Branch URL: https://github.com/alecco/scylla/tree/fix_issue_6332

Tests: unit ({dev})

Signed-off-by: Alejo Sanchez <alejo.sanchez@scylladb.com>
alecco added a commit to alecco/scylladb that referenced this issue May 14, 2020
LWT batches conditions can't span multiple tables.
This was detected in batch_statement::validate() called in ::prepare().
But ::cas_result_set_metadata() was built in the constructor,
causing a bitset assert/crash in a reported scenario.
This patch moves validate() to the constructor before building metadata.

Closes scylladb#6332

Tested with https://github.com/scylladb/scylla-dtest/pull/1465

Branch URL: https://github.com/alecco/scylla/tree/fix_issue_6332

Tests: unit ({dev})

Signed-off-by: Alejo Sanchez <alejo.sanchez@scylladb.com>
alecco added a commit to alecco/scylladb that referenced this issue May 14, 2020
LWT batches conditions can't span multiple tables.
This was detected in batch_statement::validate() called in ::prepare().
But ::cas_result_set_metadata() was built in the constructor,
causing a bitset assert/crash in a reported scenario.
This patch moves validate() to the constructor before building metadata.

Closes scylladb#6332

Tested with https://github.com/scylladb/scylla-dtest/pull/1465

Signed-off-by: Alejo Sanchez <alejo.sanchez@scylladb.com>
tgrabiec added a commit that referenced this issue May 15, 2020
…om Alejo

Fix a metadata crash and exception message casing consistency.

Fixes #6332.

* https://github.com/alecco/scylla/tree/fix_issue_6332:
  lwt: consistent exception message case
  lwt: validate before constructing metadata
tgrabiec added a commit that referenced this issue May 18, 2020
…om Alejo

Fix a metadata crash and exception message casing consistency.

Fixes #6332

* alejo/fix_issue_6332:
  lwt: validate before constructing metadata
  lwt: consistent exception message case
avikivity pushed a commit that referenced this issue May 19, 2020
…om Alejo

Fix a metadata crash and exception message casing consistency.

Fixes #6332

* alejo/fix_issue_6332:
  lwt: validate before constructing metadata
  lwt: consistent exception message case
@avikivity
Copy link
Member

@tgrabiec please evaluate for backport

@tgrabiec
Copy link
Contributor

Seems safe for backporting.

Could bring a cluster down when hit, so we probably should backport.

avikivity pushed a commit that referenced this issue Jun 21, 2020
LWT batches conditions can't span multiple tables.
This was detected in batch_statement::validate() called in ::prepare().
But ::cas_result_set_metadata() was built in the constructor,
causing a bitset assert/crash in a reported scenario.
This patch moves validate() to the constructor before building metadata.

Closes #6332

Tested with scylladb/scylla-dtest#1465

Signed-off-by: Alejo Sanchez <alejo.sanchez@scylladb.com>
(cherry picked from commit d1521e6)
avikivity pushed a commit that referenced this issue Jun 21, 2020
LWT batches conditions can't span multiple tables.
This was detected in batch_statement::validate() called in ::prepare().
But ::cas_result_set_metadata() was built in the constructor,
causing a bitset assert/crash in a reported scenario.
This patch moves validate() to the constructor before building metadata.

Closes #6332

Tested with scylladb/scylla-dtest#1465

Signed-off-by: Alejo Sanchez <alejo.sanchez@scylladb.com>
(cherry picked from commit d1521e6)
@avikivity
Copy link
Member

Backported to 4.0, 4.1.

avikivity pushed a commit that referenced this issue Jun 21, 2020
LWT batches conditions can't span multiple tables.
This was detected in batch_statement::validate() called in ::prepare().
But ::cas_result_set_metadata() was built in the constructor,
causing a bitset assert/crash in a reported scenario.
This patch moves validate() to the constructor before building metadata.

Closes #6332

Tested with scylladb/scylla-dtest#1465

[avi: adjust spelling of exception message to 4.1 spelling]

Signed-off-by: Alejo Sanchez <alejo.sanchez@scylladb.com>
(cherry picked from commit d1521e6)
avikivity pushed a commit that referenced this issue Jun 21, 2020
LWT batches conditions can't span multiple tables.
This was detected in batch_statement::validate() called in ::prepare().
But ::cas_result_set_metadata() was built in the constructor,
causing a bitset assert/crash in a reported scenario.
This patch moves validate() to the constructor before building metadata.

Closes #6332

Tested with scylladb/scylla-dtest#1465

[avi: adjust spelling of exception message to 4.0 spelling]

Signed-off-by: Alejo Sanchez <alejo.sanchez@scylladb.com>
(cherry picked from commit d1521e6)
@enaydanov enaydanov changed the title lwt: assertion in boost::dynamic_bitset on execution of multi partition LWT batch. lwt: assertion in boost::dynamic_bitset on execution of multi table LWT batch. Jun 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants