No details on block_log artifacts generation error
When any error is thrown (for example: Bad file descriptor
) during the block_log_artifacts file generation, only a general message is displayed, but with no details/context:
terminate called after throwing an instance of 'fc::exception'
GDB backtrace: bc.log
The expected behavior is handling the error correctly, displaying it, and closing the node standardly.
Also, the mentioned Bad file descriptor
error is caused by the read_only flag usage. block_log_artifacts code can try performing writes on a read-only file descriptor:
int flags = O_RDWR | O_CLOEXEC;
if (read_only)
flags = O_RDONLY | O_CLOEXEC;
_storage_fd = ::open(_artifact_file_name.generic_string().c_str(), flags, 0644);
// [...]
hive::utilities::perform_write(_storage_fd, reinterpret_cast<const char*>(&buffer), N*sizeof(Data), offset, description);
Edited by Mateusz Tyszczak