Skip to content

Commit

Permalink
Revert "Print stack traces before committing suicide"
Browse files Browse the repository at this point in the history
Summary:
This reverts commit 02473a2.

We have 3 stack traces every time we crash, which is too much noise. Using pstack never seemed to have worked anyway.

Reviewed By: hermanlee

Differential Revision: D6718182

fbshipit-source-id: 3847c7b
  • Loading branch information
lth authored and inikep committed Sep 16, 2020
1 parent cc43eec commit 1ba8662
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion storage/rocksdb/event_listener.cc
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ void Rdb_event_listener::OnBackgroundError(
sql_print_error("RocksDB: BackgroundErrorReason: %d", (int)reason);
if (status->IsCorruption()) {
rdb_persist_corruption_marker();
abort_with_stack_traces();
abort();
}
}
} // namespace myrocks
12 changes: 6 additions & 6 deletions storage/rocksdb/ha_rocksdb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4709,7 +4709,7 @@ static ulonglong rdb_get_int_col_max_value(const Field *field) {
max_value = 0x7FFFFFFFFFFFFFFFULL;
break;
default:
abort_with_stack_traces();
abort();
}

return max_value;
Expand Down Expand Up @@ -10234,7 +10234,7 @@ void Rdb_drop_index_thread::run() {
"from cf id %u. MyRocks data dictionary may "
"get corrupted.",
d.cf_id);
abort_with_stack_traces();
abort();
}
rocksdb::ColumnFamilyHandle *cfh = cf_manager.get_cf(d.cf_id);
DBUG_ASSERT(cfh);
Expand Down Expand Up @@ -12332,7 +12332,7 @@ void rdb_handle_io_error(const rocksdb::Status status,
rdb_log_status_error(status, "failed to write to WAL");
/* NO_LINT_DEBUG */
sql_print_error("MyRocks: aborting on WAL write error.");
abort_with_stack_traces();
abort();
break;
}
case RDB_IO_ERROR_BG_THREAD: {
Expand All @@ -12343,7 +12343,7 @@ void rdb_handle_io_error(const rocksdb::Status status,
rdb_log_status_error(status, "failed on I/O");
/* NO_LINT_DEBUG */
sql_print_error("MyRocks: aborting on I/O error.");
abort_with_stack_traces();
abort();
break;
}
default:
Expand All @@ -12355,14 +12355,14 @@ void rdb_handle_io_error(const rocksdb::Status status,
rdb_persist_corruption_marker();
/* NO_LINT_DEBUG */
sql_print_error("MyRocks: aborting because of data corruption.");
abort_with_stack_traces();
abort();
} else if (!status.ok()) {
switch (err_type) {
case RDB_IO_ERROR_DICT_COMMIT: {
rdb_log_status_error(status, "Failed to write to WAL (dictionary)");
/* NO_LINT_DEBUG */
sql_print_error("MyRocks: aborting on WAL write error.");
abort_with_stack_traces();
abort();
break;
}
default:
Expand Down
4 changes: 2 additions & 2 deletions storage/rocksdb/properties_collector.cc
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ void Rdb_tbl_prop_coll::CollectStatsForRow(const rocksdb::Slice &key,
sql_print_error("RocksDB: Unexpected entry type found: %u. "
"This should not happen so aborting the system.",
type);
abort_with_stack_traces();
abort();
break;
}

Expand Down Expand Up @@ -362,7 +362,7 @@ int Rdb_index_stats::unmaterialize(const std::string &s,
sql_print_error("Index stats version %d was outside of supported range. "
"This should not happen so aborting the system.",
version);
abort_with_stack_traces();
abort();
}

size_t needed = sizeof(stats.m_gl_index_id.cf_id) +
Expand Down
2 changes: 1 addition & 1 deletion storage/rocksdb/rdb_compact_filter.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ class Rdb_compact_filter : public rocksdb::CompactionFilter {
sql_print_error("Decoding ttl from PK value failed in compaction filter, "
"for index (%u,%u), val: %s",
m_prev_index.cf_id, m_prev_index.index_id, buf.c_str());
abort_with_stack_traces();
abort();
}

/*
Expand Down
8 changes: 4 additions & 4 deletions storage/rocksdb/rdb_datadic.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3501,7 +3501,7 @@ GL_INDEX_ID Rdb_tbl_def::get_autoincr_gl_index_id() {
}

// Every table must have a primary key, even if it's hidden.
abort_with_stack_traces();
abort();
return GL_INDEX_ID();
}

Expand Down Expand Up @@ -4780,7 +4780,7 @@ bool Rdb_dict_manager::get_index_info(
"and it may be a bug.",
index_info->m_index_dict_version, index_info->m_index_type,
index_info->m_kv_version, index_info->m_ttl_duration);
abort_with_stack_traces();
abort();
}

return found;
Expand Down Expand Up @@ -5043,7 +5043,7 @@ void Rdb_dict_manager::resume_drop_indexes() const {
"bug.",
max_index_id_in_dict, gl_index_id.cf_id,
gl_index_id.index_id);
abort_with_stack_traces();
abort();
}
}
}
Expand Down Expand Up @@ -5092,7 +5092,7 @@ void Rdb_dict_manager::log_start_drop_index(GL_INDEX_ID gl_index_id,
"from index id (%u,%u). MyRocks data dictionary may "
"get corrupted.",
gl_index_id.cf_id, gl_index_id.index_id);
abort_with_stack_traces();
abort();
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions storage/rocksdb/rdb_datadic.h
Original file line number Diff line number Diff line change
Expand Up @@ -1419,7 +1419,7 @@ class Rdb_system_merge_op : public rocksdb::AssociativeMergeOperator {
value.size() !=
RDB_SIZEOF_AUTO_INCREMENT_VERSION + ROCKSDB_SIZEOF_AUTOINC_VALUE ||
GetVersion(value) > Rdb_key_def::AUTO_INCREMENT_VERSION) {
abort_with_stack_traces();
abort();
}

uint64_t merged_value = Deserialize(value);
Expand All @@ -1428,7 +1428,7 @@ class Rdb_system_merge_op : public rocksdb::AssociativeMergeOperator {
if (existing_value->size() != RDB_SIZEOF_AUTO_INCREMENT_VERSION +
ROCKSDB_SIZEOF_AUTOINC_VALUE ||
GetVersion(*existing_value) > Rdb_key_def::AUTO_INCREMENT_VERSION) {
abort_with_stack_traces();
abort();
}

merged_value = std::max(merged_value, Deserialize(*existing_value));
Expand Down
2 changes: 1 addition & 1 deletion storage/rocksdb/rdb_i_s.cc
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,7 @@ static int rdb_i_s_global_info_fill_table(
"from CF with id = %u. MyRocks data dictionary may "
"be corrupted.",
cf_handle->GetID());
abort_with_stack_traces();
abort();
}

snprintf(cf_id_buf, INT_BUF_LEN, "%u", cf_handle->GetID());
Expand Down
2 changes: 1 addition & 1 deletion storage/rocksdb/rdb_io_watchdog.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ void Rdb_io_watchdog::expire_io_callback(union sigval timer_data) {
"Shutting the service down.",
m_write_timeout);

abort_with_stack_traces();
abort();
}

void Rdb_io_watchdog::io_check_callback(union sigval timer_data) {
Expand Down
4 changes: 2 additions & 2 deletions storage/rocksdb/rdb_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ namespace myrocks {
do { \
if (!(expr)) { \
my_safe_printf_stderr("\nShip assert failure: \'%s\'\n", #expr); \
abort_with_stack_traces(); \
abort(); \
} \
} while (0)
#endif // SHIP_ASSERT
Expand Down Expand Up @@ -235,7 +235,7 @@ inline void rdb_check_mutex_call_result(const char *function_name,

// This will hopefully result in a meaningful stack trace which we can use
// to efficiently debug the root cause.
abort_with_stack_traces();
abort();
}
}

Expand Down

0 comments on commit 1ba8662

Please sign in to comment.