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 `v->cfd_->internal_comparator().Compare(start, end) <= 0' failed. #131

Closed
RoelVdP opened this issue Jan 3, 2016 · 2 comments
Closed
Assignees

Comments

@RoelVdP
Copy link

RoelVdP commented Jan 3, 2016

2016-01-04 09:20:31 29082 [Note] /sda/FB-02.01.16-mysql-5.6.24-linux-x86_64/bin/mysqld: ready for connections.
Version: '5.6.24-debug'  socket: '/sda/FB-02.01.16-mysql-5.6.24-linux-x86_64/socket.sock'  port: 10529  MySQL Community Server (GPL)
mysqld: /git/FB-mysql-5.6/rocksdb/db/version_set.cc:3101: uint64_t rocksdb::VersionSet::ApproximateSize(rocksdb::Version*, const rocksdb::Slice&, const rocksdb::Slice&, int, int): Assertion `v->cfd_->internal_comparator().Compare(start, end) <= 0' failed.
22:20:38 UTC - mysqld got signal 6 ;

+bt
#0  0x00007f79363a3741 in __pthread_kill (threadid=, signo=6) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
#1  0x0000000000e3d22e in my_write_core (sig=6) at /git/FB-mysql-5.6/mysys/stacktrace.c:422
#2  0x0000000000ab6060 in handle_fatal_signal (sig=6) at /git/FB-mysql-5.6/sql/signal_handler.cc:239
#3  signal handler called
#4  0x00007f79343305f7 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#5  0x00007f7934331ce8 in __GI_abort () at abort.c:90
#6  0x00007f7934329566 in __assert_fail_base (fmt=0x7f7934479228 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x16e0f00 "v->cfd_->internal_comparator().Compare(start, end) <= 0", file=file@entry=0x16dfcb0 "/git/FB-mysql-5.6/rocksdb/db/version_set.cc", line=line@entry=3101, function=function@entry=0x16e35e0  "uint64_t rocksdb::VersionSet::ApproximateSize(rocksdb::Version*, const rocksdb::Slice&, const rocksdb::Slice&, int, int)") at assert.c:92
#7  0x00007f7934329612 in __GI___assert_fail (assertion=0x16e0f00 "v->cfd_->internal_comparator().Compare(start, end) <= 0", file=0x16dfcb0 "/git/FB-mysql-5.6/rocksdb/db/version_set.cc", line=3101, function=0x16e35e0  "uint64_t rocksdb::VersionSet::ApproximateSize(rocksdb::Version*, const rocksdb::Slice&, const rocksdb::Slice&, int, int)") at assert.c:101
#8  0x0000000000f669eb in rocksdb::VersionSet::ApproximateSize (this=0x7f7932107500, v=0x7f7932038000, start=..., end=..., start_level=0, end_level=-1) at /git/FB-mysql-5.6/rocksdb/db/version_set.cc:3101
#9  0x0000000000edbb63 in rocksdb::DBImpl::GetApproximateSizes (this=0x7f7932139000, column_family=0x7f79320db2e0, range=0x7f7936998000, n=1, sizes=0x7f7936998028, include_memtable=true) at /git/FB-mysql-5.6/rocksdb/db/db_impl.cc:4795
#10 0x0000000001005867 in rocksdb::StackableDB::GetApproximateSizes (this=0x7f7932107640, column_family=0x7f79320db2e0, r=0x7f7936998000, n=1, sizes=0x7f7936998028, include_memtable=true) at /git/FB-mysql-5.6/rocksdb/include/rocksdb/utilities/stackable_db.h:158
#11 0x0000000000e5dc7e in ha_rocksdb::records_in_range (this=0x7f792dca1410, inx=0, min_key=0x7f79369980d0, max_key=0x0) at /git/FB-mysql-5.6/storage/rocksdb/ha_rocksdb.cc:6465
#12 0x00000000009c1761 in handler::multi_range_read_info_const (this=0x7f792dca1410, keyno=0, seq=0x7f79369981b0, seq_init_param=0x7f79369981f0, n_ranges_arg=0, bufsz=0x7f7936998640, flags=0x7f7936998644, cost=0x7f7936998540) at /git/FB-mysql-5.6/sql/handler.cc:5922
#13 0x0000000000d03c1b in check_quick_select (param=0x7f7936998880, idx=0, index_only=false, tree=0x7f792dc1a2a8, update_tbl_stats=true, mrr_flags=0x7f7936998644, bufsize=0x7f7936998640, cost=0x7f7936998540) at /git/FB-mysql-5.6/sql/opt_range.cc:9510
#14 0x0000000000cfbaa4 in get_key_scans_params (param=0x7f7936998880, tree=0x7f792dc1a058, index_read_must_be_used=false, update_tbl_stats=true, read_time=12.299999999999999) at /git/FB-mysql-5.6/sql/opt_range.cc:5602
#15 0x0000000000cf5b72 in SQL_SELECT::test_quick_select (this=0x7f792dc6ea70, thd=0x7f79321a9000, keys_to_use=..., prev_tables=0, limit=18446744073709551615, force_quick_range=false, interesting_order=st_order::ORDER_NOT_RELEVANT) at /git/FB-mysql-5.6/sql/opt_range.cc:2902
#16 0x0000000000d52154 in get_quick_record_count (thd=0x7f79321a9000, select=0x7f792dc6ea70, table=0x7f792dcc4000, keys=0x7f792dc6e3e0, limit=18446744073709551615) at /git/FB-mysql-5.6/sql/sql_optimizer.cc:3983
#17 0x0000000000d514bd in make_join_statistics (join=0x7f792dc61018, tables_arg=0x7f792dc60290, conds=0x7f792dc60a38, keyuse_array=0x7f792dc61240, first_optimization=true) at /git/FB-mysql-5.6/sql/sql_optimizer.cc:3694
#18 0x0000000000d48c11 in JOIN::optimize (this=0x7f792dc61018) at /git/FB-mysql-5.6/sql/sql_optimizer.cc:363
#19 0x0000000000b96358 in mysql_execute_select (thd=0x7f79321a9000, select_lex=0x7f79321ac9d0, free_join=true) at /git/FB-mysql-5.6/sql/sql_select.cc:1119
#20 0x0000000000b96687 in mysql_select (thd=0x7f79321a9000, tables=0x7f792dc60290, wild_num=1, fields=..., conds=0x7f792dc60a38, order=0x7f79321acb98, group=0x7f79321acad0, having=0x0, select_options=2147748608, result=0x7f792dc60ff0, unit=0x7f79321ac378, select_lex=0x7f79321ac9d0) at /git/FB-mysql-5.6/sql/sql_select.cc:1254
#21 0x0000000000b94771 in handle_select (thd=0x7f79321a9000, result=0x7f792dc60ff0, setup_tables_done_option=0) at /git/FB-mysql-5.6/sql/sql_select.cc:126
#22 0x0000000000b6abbe in execute_sqlcom_select (thd=0x7f79321a9000, all_tables=0x7f792dc60290, last_timer=0x7f793699d9a0) at /git/FB-mysql-5.6/sql/sql_parse.cc:5858
#23 0x0000000000b635f7 in mysql_execute_command (thd=0x7f79321a9000, statement_start_time=0x7f793699c938, post_parse=0x7f793699d9a0) at /git/FB-mysql-5.6/sql/sql_parse.cc:3244
#24 0x0000000000b6e118 in mysql_parse (thd=0x7f79321a9000, rawbuf=0x7f792dc60010 "SELECT * FROM t2 WHERE c1 > 4294967295 ORDER BY c1,c6", length=53, parser_state=0x7f793699d2f0, last_timer=0x7f793699d9a0, async_commit=0x7f793699d99f "") at /git/FB-mysql-5.6/sql/sql_parse.cc:7385
#25 0x0000000000b5f7fb in dispatch_command (command=COM_QUERY, thd=0x7f79321a9000, packet=0x7f7932350001 "SELECT * FROM t2 WHERE c1 > 4294967295 ORDER BY c1,c6", packet_length=53) at /git/FB-mysql-5.6/sql/sql_parse.cc:1595
#26 0x0000000000b5e0bf in do_command (thd=0x7f79321a9000) at /git/FB-mysql-5.6/sql/sql_parse.cc:1071
#27 0x0000000000b24d6c in do_handle_one_connection (thd_arg=0x7f79321a9000) at /git/FB-mysql-5.6/sql/sql_connect.cc:1071
#28 0x0000000000b2466b in handle_one_connection (arg=0x7f79321a9000) at /git/FB-mysql-5.6/sql/sql_connect.cc:929
#29 0x00007f793639edc5 in start_thread (arg=0x7f793699e700) at pthread_create.c:308
#30 0x00007f79343f121d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Testcase:
# --no-defaults --default-tmp-storage-engine=MyISAM --rocksdb --skip-innodb --skip-innodb-buffer-page --default-storage-engine=RocksDB
DROP DATABASE test;CREATE DATABASE test;USE test;
CREATE TABLE t2(c1 INTEGER UNSIGNED NOT NULL, c2 INTEGER NULL, c3 TINYINT, c4 SMALLINT , c5 MEDIUMINT, c6 INT, c7 BIGINT, PRIMARY KEY(c1,c6)) ENGINE=RocksDB; 
SELECT * FROM t2 WHERE c1 > 4294967295 ORDER BY c1,c6;
@yoshinorim
Copy link
Contributor

Thanks for the bug report @RoelVdP ! Verified as described.

@yoshinorim yoshinorim self-assigned this Jan 4, 2016
@yoshinorim
Copy link
Contributor

yoshinorim added a commit that referenced this issue Jan 4, 2016
Summary:
When kd::successor() is called in records_in_range, there is a
possiblity of range.start >= range.limit. RocksDB has an assertion
"v->cfd_->internal_comparator().Compare(start, end) <= 0'" so
range should not be passed to rocksdb::GetApproximateSize in that case.
This diff skips calling rocksdb::GetApproximateSize() and just returns
0.

Test Plan: mtr and rocksdb.rocksdb

Reviewers: jkedgar, spetrunia, hermanlee4

Reviewed By: hermanlee4

Subscribers: webscalesql-eng

Differential Revision: https://reviews.facebook.net/D52491
yoshinorim added a commit that referenced this issue Jan 5, 2016
Summary:
When kd::successor() is called in records_in_range, there is a
possiblity of range.start >= range.limit. RocksDB has an assertion
"v->cfd_->internal_comparator().Compare(start, end) <= 0'" so
range should not be passed to rocksdb::GetApproximateSize in that case.
This diff skips calling rocksdb::GetApproximateSize() and just returns
0.

Test Plan: mtr and rocksdb.rocksdb

Reviewers: jkedgar, spetrunia, hermanlee4

Reviewed By: hermanlee4

Subscribers: webscalesql-eng

Differential Revision: https://reviews.facebook.net/D52491
hermanlee pushed a commit that referenced this issue Jan 31, 2017
Summary:
When kd::successor() is called in records_in_range, there is a
possiblity of range.start >= range.limit. RocksDB has an assertion
"v->cfd_->internal_comparator().Compare(start, end) <= 0'" so
range should not be passed to rocksdb::GetApproximateSize in that case.
This diff skips calling rocksdb::GetApproximateSize() and just returns
0.

Test Plan: mtr and rocksdb.rocksdb

Reviewers: jkedgar, spetrunia, hermanlee4

Reviewed By: hermanlee4

Subscribers: webscalesql-eng

Differential Revision: https://reviews.facebook.net/D52491
VitaliyLi pushed a commit to VitaliyLi/mysql-5.6 that referenced this issue Feb 9, 2017
)

Summary:
When kd::successor() is called in records_in_range, there is a
possiblity of range.start >= range.limit. RocksDB has an assertion
"v->cfd_->internal_comparator().Compare(start, end) <= 0'" so
range should not be passed to rocksdb::GetApproximateSize in that case.
This diff skips calling rocksdb::GetApproximateSize() and just returns
0.

Test Plan: mtr and rocksdb.rocksdb

Reviewers: jkedgar, spetrunia, hermanlee4

Reviewed By: hermanlee4

Subscribers: webscalesql-eng

Differential Revision: https://reviews.facebook.net/D52491
facebook-github-bot pushed a commit that referenced this issue Dec 23, 2019
Summary:
When kd::successor() is called in records_in_range, there is a
possiblity of range.start >= range.limit. RocksDB has an assertion
"v->cfd_->internal_comparator().Compare(start, end) <= 0'" so
range should not be passed to rocksdb::GetApproximateSize in that case.
This diff skips calling rocksdb::GetApproximateSize() and just returns
0.

Differential Revision: https://reviews.facebook.net/D52491

fbshipit-source-id: 8b717bf
inikep pushed a commit to inikep/mysql-5.6 that referenced this issue Aug 12, 2020
)

Summary:
When kd::successor() is called in records_in_range, there is a
possiblity of range.start >= range.limit. RocksDB has an assertion
"v->cfd_->internal_comparator().Compare(start, end) <= 0'" so
range should not be passed to rocksdb::GetApproximateSize in that case.
This diff skips calling rocksdb::GetApproximateSize() and just returns
0.

Differential Revision: https://reviews.facebook.net/D52491

fbshipit-source-id: 8b717bf
inikep pushed a commit to inikep/mysql-5.6 that referenced this issue Sep 9, 2020
)

Summary:
When kd::successor() is called in records_in_range, there is a
possiblity of range.start >= range.limit. RocksDB has an assertion
"v->cfd_->internal_comparator().Compare(start, end) <= 0'" so
range should not be passed to rocksdb::GetApproximateSize in that case.
This diff skips calling rocksdb::GetApproximateSize() and just returns
0.

Differential Revision: https://reviews.facebook.net/D52491

fbshipit-source-id: 8b717bf
inikep pushed a commit to inikep/mysql-5.6 that referenced this issue Sep 16, 2020
)

Summary:
When kd::successor() is called in records_in_range, there is a
possiblity of range.start >= range.limit. RocksDB has an assertion
"v->cfd_->internal_comparator().Compare(start, end) <= 0'" so
range should not be passed to rocksdb::GetApproximateSize in that case.
This diff skips calling rocksdb::GetApproximateSize() and just returns
0.

Differential Revision: https://reviews.facebook.net/D52491

fbshipit-source-id: 8b717bf
inikep pushed a commit to inikep/mysql-5.6 that referenced this issue Oct 5, 2020
)

Summary:
When kd::successor() is called in records_in_range, there is a
possiblity of range.start >= range.limit. RocksDB has an assertion
"v->cfd_->internal_comparator().Compare(start, end) <= 0'" so
range should not be passed to rocksdb::GetApproximateSize in that case.
This diff skips calling rocksdb::GetApproximateSize() and just returns
0.

Differential Revision: https://reviews.facebook.net/D52491

fbshipit-source-id: 8b717bf
inikep pushed a commit to inikep/mysql-5.6 that referenced this issue Nov 11, 2020
)

Summary:
When kd::successor() is called in records_in_range, there is a
possiblity of range.start >= range.limit. RocksDB has an assertion
"v->cfd_->internal_comparator().Compare(start, end) <= 0'" so
range should not be passed to rocksdb::GetApproximateSize in that case.
This diff skips calling rocksdb::GetApproximateSize() and just returns
0.

Differential Revision: https://reviews.facebook.net/D52491

fbshipit-source-id: 8b717bf
inikep pushed a commit to inikep/mysql-5.6 that referenced this issue Mar 11, 2021
)

Summary:
When kd::successor() is called in records_in_range, there is a
possiblity of range.start >= range.limit. RocksDB has an assertion
"v->cfd_->internal_comparator().Compare(start, end) <= 0'" so
range should not be passed to rocksdb::GetApproximateSize in that case.
This diff skips calling rocksdb::GetApproximateSize() and just returns
0.

Differential Revision: https://reviews.facebook.net/D52491

fbshipit-source-id: 8fac2b9a770
inikep pushed a commit to inikep/mysql-5.6 that referenced this issue Aug 16, 2021
)

Summary:
When kd::successor() is called in records_in_range, there is a
possiblity of range.start >= range.limit. RocksDB has an assertion
"v->cfd_->internal_comparator().Compare(start, end) <= 0'" so
range should not be passed to rocksdb::GetApproximateSize in that case.
This diff skips calling rocksdb::GetApproximateSize() and just returns
0.

Differential Revision: https://reviews.facebook.net/D52491

fbshipit-source-id: 8fac2b9a770
inikep pushed a commit to inikep/mysql-5.6 that referenced this issue Aug 30, 2021
)

Summary:
When kd::successor() is called in records_in_range, there is a
possiblity of range.start >= range.limit. RocksDB has an assertion
"v->cfd_->internal_comparator().Compare(start, end) <= 0'" so
range should not be passed to rocksdb::GetApproximateSize in that case.
This diff skips calling rocksdb::GetApproximateSize() and just returns
0.

Differential Revision: https://reviews.facebook.net/D52491

fbshipit-source-id: 8fac2b9a770
inikep pushed a commit to inikep/mysql-5.6 that referenced this issue Aug 30, 2021
)

Summary:
When kd::successor() is called in records_in_range, there is a
possiblity of range.start >= range.limit. RocksDB has an assertion
"v->cfd_->internal_comparator().Compare(start, end) <= 0'" so
range should not be passed to rocksdb::GetApproximateSize in that case.
This diff skips calling rocksdb::GetApproximateSize() and just returns
0.

Differential Revision: https://reviews.facebook.net/D52491

fbshipit-source-id: 8fac2b9a770
inikep pushed a commit to inikep/mysql-5.6 that referenced this issue Sep 1, 2021
)

Summary:
When kd::successor() is called in records_in_range, there is a
possiblity of range.start >= range.limit. RocksDB has an assertion
"v->cfd_->internal_comparator().Compare(start, end) <= 0'" so
range should not be passed to rocksdb::GetApproximateSize in that case.
This diff skips calling rocksdb::GetApproximateSize() and just returns
0.

Differential Revision: https://reviews.facebook.net/D52491

fbshipit-source-id: 8fac2b9a770
inikep pushed a commit to inikep/mysql-5.6 that referenced this issue Sep 2, 2021
)

Summary:
When kd::successor() is called in records_in_range, there is a
possiblity of range.start >= range.limit. RocksDB has an assertion
"v->cfd_->internal_comparator().Compare(start, end) <= 0'" so
range should not be passed to rocksdb::GetApproximateSize in that case.
This diff skips calling rocksdb::GetApproximateSize() and just returns
0.

Differential Revision: https://reviews.facebook.net/D52491

fbshipit-source-id: 8fac2b9a770
inikep pushed a commit to inikep/mysql-5.6 that referenced this issue Jan 17, 2022
)

Summary:
When kd::successor() is called in records_in_range, there is a
possiblity of range.start >= range.limit. RocksDB has an assertion
"v->cfd_->internal_comparator().Compare(start, end) <= 0'" so
range should not be passed to rocksdb::GetApproximateSize in that case.
This diff skips calling rocksdb::GetApproximateSize() and just returns
0.

Differential Revision: https://reviews.facebook.net/D52491
inikep pushed a commit to inikep/mysql-5.6 that referenced this issue Apr 26, 2022
)

Summary:
When kd::successor() is called in records_in_range, there is a
possiblity of range.start >= range.limit. RocksDB has an assertion
"v->cfd_->internal_comparator().Compare(start, end) <= 0'" so
range should not be passed to rocksdb::GetApproximateSize in that case.
This diff skips calling rocksdb::GetApproximateSize() and just returns
0.

Differential Revision: https://reviews.facebook.net/D52491
inikep pushed a commit to inikep/mysql-5.6 that referenced this issue May 20, 2022
)

Summary:
When kd::successor() is called in records_in_range, there is a
possiblity of range.start >= range.limit. RocksDB has an assertion
"v->cfd_->internal_comparator().Compare(start, end) <= 0'" so
range should not be passed to rocksdb::GetApproximateSize in that case.
This diff skips calling rocksdb::GetApproximateSize() and just returns
0.

Differential Revision: https://reviews.facebook.net/D52491
laurynas-biveinis pushed a commit to laurynas-biveinis/mysql-5.6 that referenced this issue Aug 11, 2022
)

Summary:
When kd::successor() is called in records_in_range, there is a
possiblity of range.start >= range.limit. RocksDB has an assertion
"v->cfd_->internal_comparator().Compare(start, end) <= 0'" so
range should not be passed to rocksdb::GetApproximateSize in that case.
This diff skips calling rocksdb::GetApproximateSize() and just returns
0.

Differential Revision: https://reviews.facebook.net/D52491
inikep pushed a commit to inikep/mysql-5.6 that referenced this issue Mar 28, 2023
)

Summary:
When kd::successor() is called in records_in_range, there is a
possiblity of range.start >= range.limit. RocksDB has an assertion
"v->cfd_->internal_comparator().Compare(start, end) <= 0'" so
range should not be passed to rocksdb::GetApproximateSize in that case.
This diff skips calling rocksdb::GetApproximateSize() and just returns
0.

Differential Revision: https://reviews.facebook.net/D52491
inikep pushed a commit to inikep/mysql-5.6 that referenced this issue Jun 1, 2023
)

Summary:
When kd::successor() is called in records_in_range, there is a
possiblity of range.start >= range.limit. RocksDB has an assertion
"v->cfd_->internal_comparator().Compare(start, end) <= 0'" so
range should not be passed to rocksdb::GetApproximateSize in that case.
This diff skips calling rocksdb::GetApproximateSize() and just returns
0.

Differential Revision: https://reviews.facebook.net/D52491
inikep pushed a commit to inikep/mysql-5.6 that referenced this issue Jun 14, 2023
)

Summary:
When kd::successor() is called in records_in_range, there is a
possiblity of range.start >= range.limit. RocksDB has an assertion
"v->cfd_->internal_comparator().Compare(start, end) <= 0'" so
range should not be passed to rocksdb::GetApproximateSize in that case.
This diff skips calling rocksdb::GetApproximateSize() and just returns
0.

Differential Revision: https://reviews.facebook.net/D52491
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

2 participants