aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/actors
diff options
context:
space:
mode:
authorilnurkh <ilnurkh@yandex-team.com>2023-10-17 08:15:44 +0300
committerilnurkh <ilnurkh@yandex-team.com>2023-10-17 09:00:07 +0300
commit784925324fd115c37bc98c5bbfe64c15f9966d74 (patch)
treef763f6eaacfcd4757d249977aaddfa4e9b2a355b /library/cpp/actors
parentd6c75d9ec33559b29eb61a8f2e17cbca30fd5ae2 (diff)
downloadydb-784925324fd115c37bc98c5bbfe64c15f9966d74.tar.gz
Y_FAIL->Y_ABORT at '^li'
https://clubs.at.yandex-team.ru/arcadia/29404
Diffstat (limited to 'library/cpp/actors')
-rw-r--r--library/cpp/actors/core/actor_benchmark_helper.h2
-rw-r--r--library/cpp/actors/core/actor_coroutine.cpp8
-rw-r--r--library/cpp/actors/core/actor_virtual.h4
-rw-r--r--library/cpp/actors/core/balancer.cpp2
-rw-r--r--library/cpp/actors/core/config.h2
-rw-r--r--library/cpp/actors/core/cpu_manager.cpp2
-rw-r--r--library/cpp/actors/core/event.h8
-rw-r--r--library/cpp/actors/core/event_local.h4
-rw-r--r--library/cpp/actors/core/event_pb.h8
-rw-r--r--library/cpp/actors/core/executor_pool_base.cpp2
-rw-r--r--library/cpp/actors/core/executor_pool_basic.cpp4
-rw-r--r--library/cpp/actors/core/executor_pool_united.cpp60
-rw-r--r--library/cpp/actors/core/executor_thread.cpp28
-rw-r--r--library/cpp/actors/core/interconnect.cpp2
-rw-r--r--library/cpp/actors/core/invoke.h2
-rw-r--r--library/cpp/actors/core/log.h2
-rw-r--r--library/cpp/actors/core/mailbox.cpp14
-rw-r--r--library/cpp/actors/core/mailbox.h4
-rw-r--r--library/cpp/actors/core/scheduler_cookie.cpp8
-rw-r--r--library/cpp/actors/cppcoro/task.h2
-rw-r--r--library/cpp/actors/cppcoro/task_actor_ut.cpp2
-rw-r--r--library/cpp/actors/cppcoro/task_group.h2
-rw-r--r--library/cpp/actors/cppcoro/task_result.h8
-rw-r--r--library/cpp/actors/dnscachelib/dnscache.cpp2
-rw-r--r--library/cpp/actors/dnsresolver/dnsresolver.cpp6
-rw-r--r--library/cpp/actors/dnsresolver/dnsresolver_caching.cpp22
-rw-r--r--library/cpp/actors/helpers/selfping_actor.cpp2
-rw-r--r--library/cpp/actors/http/http.cpp8
-rw-r--r--library/cpp/actors/http/http_proxy.cpp4
-rw-r--r--library/cpp/actors/interconnect/handshake_broker.h4
-rw-r--r--library/cpp/actors/interconnect/interconnect_channel.cpp2
-rw-r--r--library/cpp/actors/interconnect/interconnect_handshake.cpp6
-rw-r--r--library/cpp/actors/interconnect/interconnect_resolve.cpp2
-rw-r--r--library/cpp/actors/interconnect/interconnect_stream.cpp18
-rw-r--r--library/cpp/actors/interconnect/interconnect_tcp_input_session.cpp2
-rw-r--r--library/cpp/actors/interconnect/interconnect_tcp_proxy.cpp4
-rw-r--r--library/cpp/actors/interconnect/interconnect_tcp_proxy.h4
-rw-r--r--library/cpp/actors/interconnect/interconnect_tcp_session.cpp4
-rw-r--r--library/cpp/actors/interconnect/mock/ic_mock.cpp4
-rw-r--r--library/cpp/actors/interconnect/outgoing_stream.h2
-rw-r--r--library/cpp/actors/interconnect/poller_actor.cpp8
-rw-r--r--library/cpp/actors/interconnect/poller_actor_darwin.h2
-rw-r--r--library/cpp/actors/interconnect/poller_actor_linux.h12
-rw-r--r--library/cpp/actors/interconnect/poller_actor_win.h2
-rw-r--r--library/cpp/actors/interconnect/poller_tcp_unit.cpp2
-rw-r--r--library/cpp/actors/interconnect/poller_tcp_unit_epoll.cpp6
-rw-r--r--library/cpp/actors/interconnect/ut/interconnect_ut.cpp4
-rw-r--r--library/cpp/actors/interconnect/ut/large.cpp2
-rw-r--r--library/cpp/actors/interconnect/ut/poller_actor_ut.cpp8
-rw-r--r--library/cpp/actors/testlib/test_runtime.cpp12
-rw-r--r--library/cpp/actors/util/rc_buf.h6
-rw-r--r--library/cpp/actors/util/rope.h2
52 files changed, 171 insertions, 171 deletions
diff --git a/library/cpp/actors/core/actor_benchmark_helper.h b/library/cpp/actors/core/actor_benchmark_helper.h
index 0671271f42..c5dd09efe1 100644
--- a/library/cpp/actors/core/actor_benchmark_helper.h
+++ b/library/cpp/actors/core/actor_benchmark_helper.h
@@ -325,7 +325,7 @@ struct TActorBenchmark {
}
return setup;
}
- Y_FAIL();
+ Y_ABORT();
}
static double BenchSendReceive(bool allocation, NActors::TMailboxType::EType mType, EPoolType poolType, ESendingType sendingType) {
diff --git a/library/cpp/actors/core/actor_coroutine.cpp b/library/cpp/actors/core/actor_coroutine.cpp
index 9b0c81fa26..32390eaae3 100644
--- a/library/cpp/actors/core/actor_coroutine.cpp
+++ b/library/cpp/actors/core/actor_coroutine.cpp
@@ -67,7 +67,7 @@ namespace NActors {
return nullptr; // it is not a race -- we've got timeout exactly for our current wait
}
}
- Y_FAIL("no pending event");
+ Y_ABORT("no pending event");
}
bool TActorCoroImpl::ProcessEvent(THolder<IEventHandle> ev) {
@@ -127,12 +127,12 @@ namespace NActors {
Run();
} catch (const TDtorException& /*ex*/) {
if (!AllowUnhandledDtor) {
- Y_FAIL("unhandled TDtorException");
+ Y_ABORT("unhandled TDtorException");
}
} catch (const std::exception& ex) {
- Y_FAIL("unhandled exception of type %s", TypeName(ex).data());
+ Y_ABORT("unhandled exception of type %s", TypeName(ex).data());
} catch (...) {
- Y_FAIL("unhandled exception of type not derived from std::exception");
+ Y_ABORT("unhandled exception of type not derived from std::exception");
}
}
Finished = true;
diff --git a/library/cpp/actors/core/actor_virtual.h b/library/cpp/actors/core/actor_virtual.h
index 5598312952..78da45138d 100644
--- a/library/cpp/actors/core/actor_virtual.h
+++ b/library/cpp/actors/core/actor_virtual.h
@@ -70,7 +70,7 @@ public:
}
virtual bool SerializeToArcadiaStream(TChunkSerializer* /*serializer*/) const override {
- Y_FAIL("Serialization of local event %s->%s", typeid(TEvent).name(), typeid(TActor).name());
+ Y_ABORT("Serialization of local event %s->%s", typeid(TEvent).name(), typeid(TActor).name());
}
virtual bool IsSerializable() const override {
@@ -78,7 +78,7 @@ public:
}
static IEventBase* Load(TEventSerializedData*) {
- Y_FAIL("Loading of local event %s->%s", typeid(TEvent).name(), typeid(TActor).name());
+ Y_ABORT("Loading of local event %s->%s", typeid(TEvent).name(), typeid(TActor).name());
}
};
diff --git a/library/cpp/actors/core/balancer.cpp b/library/cpp/actors/core/balancer.cpp
index e09c834543..5e8a280a8b 100644
--- a/library/cpp/actors/core/balancer.cpp
+++ b/library/cpp/actors/core/balancer.cpp
@@ -294,7 +294,7 @@ namespace NActors {
return;
}
}
- Y_FAIL();
+ Y_ABORT();
}
void TBalancer::Unlock() {
diff --git a/library/cpp/actors/core/config.h b/library/cpp/actors/core/config.h
index 38aaf77797..7c843d0847 100644
--- a/library/cpp/actors/core/config.h
+++ b/library/cpp/actors/core/config.h
@@ -122,7 +122,7 @@ namespace NActors {
return p.PoolName;
}
}
- Y_FAIL("undefined pool id: %" PRIu32, (ui32)poolId);
+ Y_ABORT("undefined pool id: %" PRIu32, (ui32)poolId);
}
std::optional<ui32> GetThreadsOptional(ui32 poolId) const {
diff --git a/library/cpp/actors/core/cpu_manager.cpp b/library/cpp/actors/core/cpu_manager.cpp
index df4ea486e4..24b3161e3c 100644
--- a/library/cpp/actors/core/cpu_manager.cpp
+++ b/library/cpp/actors/core/cpu_manager.cpp
@@ -132,7 +132,7 @@ namespace NActors {
return result;
}
}
- Y_FAIL("missing PoolId: %d", int(poolId));
+ Y_ABORT("missing PoolId: %d", int(poolId));
}
TVector<IExecutorPool*> TCpuManager::GetBasicExecutorPools() const {
diff --git a/library/cpp/actors/core/event.h b/library/cpp/actors/core/event.h
index e7f561338f..3517dc7a68 100644
--- a/library/cpp/actors/core/event.h
+++ b/library/cpp/actors/core/event.h
@@ -75,7 +75,7 @@ namespace NActors {
template <typename TEventType>
TEventType* Get() {
if (Type != TEventType::EventType)
- Y_FAIL("Event type %" PRIu32 " doesn't match the expected type %" PRIu32, Type, TEventType::EventType);
+ Y_ABORT("Event type %" PRIu32 " doesn't match the expected type %" PRIu32, Type, TEventType::EventType);
if (!Event) {
static TEventSerializedData empty;
@@ -86,7 +86,7 @@ namespace NActors {
return static_cast<TEventType*>(Event.Get());
}
- Y_FAIL("Failed to Load() event type %" PRIu32 " class %s", Type, TypeName<TEventType>().data());
+ Y_ABORT("Failed to Load() event type %" PRIu32 " class %s", Type, TypeName<TEventType>().data());
}
template <typename T>
@@ -364,10 +364,10 @@ namespace NActors {
return TString(header); \
} \
bool SerializeToArcadiaStream(NActors::TChunkSerializer*) const override { \
- Y_FAIL("Local event " #eventType " is not serializable"); \
+ Y_ABORT("Local event " #eventType " is not serializable"); \
} \
static IEventBase* Load(NActors::TEventSerializedData*) { \
- Y_FAIL("Local event " #eventType " has no load method"); \
+ Y_ABORT("Local event " #eventType " has no load method"); \
} \
bool IsSerializable() const override { \
return false; \
diff --git a/library/cpp/actors/core/event_local.h b/library/cpp/actors/core/event_local.h
index 2845aa94dd..da0f740ba8 100644
--- a/library/cpp/actors/core/event_local.h
+++ b/library/cpp/actors/core/event_local.h
@@ -14,7 +14,7 @@ namespace NActors {
}
bool SerializeToArcadiaStream(TChunkSerializer* /*serializer*/) const override {
- Y_FAIL("Serialization of local event %s type %" PRIu32, TypeName<TEv>().data(), TEventType);
+ Y_ABORT("Serialization of local event %s type %" PRIu32, TypeName<TEv>().data(), TEventType);
}
bool IsSerializable() const override {
@@ -22,7 +22,7 @@ namespace NActors {
}
static IEventBase* Load(TEventSerializedData*) {
- Y_FAIL("Loading of local event %s type %" PRIu32, TypeName<TEv>().data(), TEventType);
+ Y_ABORT("Loading of local event %s type %" PRIu32, TypeName<TEv>().data(), TEventType);
}
};
diff --git a/library/cpp/actors/core/event_pb.h b/library/cpp/actors/core/event_pb.h
index d3b422f1dc..5fce7c830f 100644
--- a/library/cpp/actors/core/event_pb.h
+++ b/library/cpp/actors/core/event_pb.h
@@ -213,7 +213,7 @@ namespace NActors {
if (const auto& info = input->GetSerializationInfo(); info.IsExtendedFormat) {
// check marker
if (!iter.Valid() || (*iter.ContiguousData() != PayloadMarker && *iter.ContiguousData() != ExtendedPayloadMarker)) {
- Y_FAIL("invalid event");
+ Y_ABORT("invalid event");
}
const bool dataIsSeparate = *iter.ContiguousData() == ExtendedPayloadMarker; // ropes go after sizes
@@ -232,7 +232,7 @@ namespace NActors {
// parse number of payload ropes
size_t numRopes = DeserializeNumber(iter, size);
if (numRopes == Max<size_t>()) {
- Y_FAIL("invalid event");
+ Y_ABORT("invalid event");
}
TStackVec<size_t, 16> ropeLens;
if (dataIsSeparate) {
@@ -242,7 +242,7 @@ namespace NActors {
// parse length of the rope
const size_t len = DeserializeNumber(iter, size);
if (len == Max<size_t>() || size < len) {
- Y_FAIL("invalid event len# %zu size# %" PRIu64, len, size);
+ Y_ABORT("invalid event len# %zu size# %" PRIu64, len, size);
}
// extract the rope
if (dataIsSeparate) {
@@ -259,7 +259,7 @@ namespace NActors {
// parse the protobuf
TRopeStream stream(iter, size);
if (!ev->Record.ParseFromZeroCopyStream(&stream)) {
- Y_FAIL("Failed to parse protobuf event type %" PRIu32 " class %s", TEventType, TypeName(ev->Record).data());
+ Y_ABORT("Failed to parse protobuf event type %" PRIu32 " class %s", TEventType, TypeName(ev->Record).data());
}
}
ev->CachedByteSize = input->GetSize();
diff --git a/library/cpp/actors/core/executor_pool_base.cpp b/library/cpp/actors/core/executor_pool_base.cpp
index d58cd6ce08..059cac48d2 100644
--- a/library/cpp/actors/core/executor_pool_base.cpp
+++ b/library/cpp/actors/core/executor_pool_base.cpp
@@ -206,7 +206,7 @@ namespace NActors {
UnlockFromExecution((TMailboxTable::TTinyReadAsFilledMailbox*)mailbox, this, false, hint, MaxWorkers, ++revolvingWriteCounter);
break;
default:
- Y_FAIL();
+ Y_ABORT();
}
NHPTimer::STime elapsed = GetCycleCountFast() - hpstart;
diff --git a/library/cpp/actors/core/executor_pool_basic.cpp b/library/cpp/actors/core/executor_pool_basic.cpp
index f9ea74a920..bb36fce894 100644
--- a/library/cpp/actors/core/executor_pool_basic.cpp
+++ b/library/cpp/actors/core/executor_pool_basic.cpp
@@ -352,7 +352,7 @@ namespace NActors {
}
break;
default:
- Y_FAIL();
+ Y_ABORT();
}
}
}
@@ -530,7 +530,7 @@ namespace NActors {
pthread_t threadSelf = pthread_self();
sched_param param = {RealtimePriority};
if (pthread_setschedparam(threadSelf, SCHED_FIFO, &param)) {
- Y_FAIL("Cannot set realtime priority");
+ Y_ABORT("Cannot set realtime priority");
}
}
#else
diff --git a/library/cpp/actors/core/executor_pool_united.cpp b/library/cpp/actors/core/executor_pool_united.cpp
index a21fd2d1a7..960545ffb5 100644
--- a/library/cpp/actors/core/executor_pool_united.cpp
+++ b/library/cpp/actors/core/executor_pool_united.cpp
@@ -526,7 +526,7 @@ namespace NActors {
FastWorkerSleep(GetCycleCountFast() + Config.SoftLimitTs);
break;
case Stopped: return false;
- default: Y_FAIL();
+ default: Y_ABORT();
}
}
} else if (wctx.Lease.IsNeverExpiring()) { // if idle-worker
@@ -542,7 +542,7 @@ namespace NActors {
idleTimer->Wait();
break;
case Stopped: return false;
- default: Y_FAIL();
+ default: Y_ABORT();
}
} else { // lease has expired and hard preemption occured, so we are executing in a slow-worker
wctx.IncrementPreemptedEvents();
@@ -556,7 +556,7 @@ namespace NActors {
idleTimer = nullptr;
break;
case Stopped: return false;
- default: Y_FAIL();
+ default: Y_ABORT();
}
}
}
@@ -693,7 +693,7 @@ namespace NActors {
return;
}
} else {
- Y_FAIL("two slow-workers executing the same pool on the same core");
+ Y_ABORT("two slow-workers executing the same pool on the same core");
return; // pool is already slow
}
}
@@ -706,7 +706,7 @@ namespace NActors {
void EndHardPreemption(TWorkerId to) {
ATOMIC_COMPILER_BARRIER();
if (!AtomicCas(&CurrentLease, TLease(to, NeverExpire), HardPreemptionLease)) {
- Y_FAIL("hard preemption failed");
+ Y_ABORT("hard preemption failed");
}
}
@@ -717,7 +717,7 @@ namespace NActors {
void EnablePreemptionAndGrant(TLease lease) {
ATOMIC_COMPILER_BARRIER();
if (!AtomicCas(&CurrentLease, lease, lease.NeverExpire())) {
- Y_FAIL("lease grant failed");
+ Y_ABORT("lease grant failed");
}
}
@@ -789,7 +789,7 @@ namespace NActors {
switch (ret) {
case 0: return;
case EINVAL:
- Y_FAIL("sched_setscheduler(%" PRIu64 ", %d, %d) -> EINVAL", tid, policy, param.sched_priority);
+ Y_ABORT("sched_setscheduler(%" PRIu64 ", %d, %d) -> EINVAL", tid, policy, param.sched_priority);
case EPERM:
// Requirements:
// * CAP_SYS_NICE capability to run real-time processes and set cpu affinity.
@@ -802,11 +802,11 @@ namespace NActors {
// echo -1 > /sys/fs/cgroup/cpu/[cgroup]/cpu.rt_runtime_us
// (also set the same value for every parent cgroup)
// https://www.kernel.org/doc/Documentation/scheduler/sched-rt-group.txt
- Y_FAIL("sched_setscheduler(%" PRIu64 ", %d, %d) -> EPERM", tid, policy, param.sched_priority);
+ Y_ABORT("sched_setscheduler(%" PRIu64 ", %d, %d) -> EPERM", tid, policy, param.sched_priority);
case ESRCH:
- Y_FAIL("sched_setscheduler(%" PRIu64 ", %d, %d) -> ESRCH", tid, policy, param.sched_priority);
+ Y_ABORT("sched_setscheduler(%" PRIu64 ", %d, %d) -> ESRCH", tid, policy, param.sched_priority);
default:
- Y_FAIL("sched_setscheduler(%" PRIu64 ", %d, %d) -> %d", tid, policy, param.sched_priority, ret);
+ Y_ABORT("sched_setscheduler(%" PRIu64 ", %d, %d) -> %d", tid, policy, param.sched_priority, ret);
}
#else
Y_UNUSED(tid);
@@ -865,23 +865,23 @@ namespace NActors {
}
// Should never be called
- void ReclaimMailbox(TMailboxType::EType, ui32, TWorkerId, ui64) override { Y_FAIL(); }
- TMailboxHeader *ResolveMailbox(ui32) override { Y_FAIL(); }
- void Schedule(TInstant, TAutoPtr<IEventHandle>, ISchedulerCookie*, TWorkerId) override { Y_FAIL(); }
- void Schedule(TMonotonic, TAutoPtr<IEventHandle>, ISchedulerCookie*, TWorkerId) override { Y_FAIL(); }
- void Schedule(TDuration, TAutoPtr<IEventHandle>, ISchedulerCookie*, TWorkerId) override { Y_FAIL(); }
- bool Send(TAutoPtr<IEventHandle>&) override { Y_FAIL(); }
- bool SpecificSend(TAutoPtr<IEventHandle>&) override { Y_FAIL(); }
- void ScheduleActivation(ui32) override { Y_FAIL(); }
- void SpecificScheduleActivation(ui32) override { Y_FAIL(); }
- void ScheduleActivationEx(ui32, ui64) override { Y_FAIL(); }
- TActorId Register(IActor*, TMailboxType::EType, ui64, const TActorId&) override { Y_FAIL(); }
- TActorId Register(IActor*, TMailboxHeader*, ui32, const TActorId&) override { Y_FAIL(); }
- void Prepare(TActorSystem*, NSchedulerQueue::TReader**, ui32*) override { Y_FAIL(); }
- void Start() override { Y_FAIL(); }
- void PrepareStop() override { Y_FAIL(); }
- void Shutdown() override { Y_FAIL(); }
- bool Cleanup() override { Y_FAIL(); }
+ void ReclaimMailbox(TMailboxType::EType, ui32, TWorkerId, ui64) override { Y_ABORT(); }
+ TMailboxHeader *ResolveMailbox(ui32) override { Y_ABORT(); }
+ void Schedule(TInstant, TAutoPtr<IEventHandle>, ISchedulerCookie*, TWorkerId) override { Y_ABORT(); }
+ void Schedule(TMonotonic, TAutoPtr<IEventHandle>, ISchedulerCookie*, TWorkerId) override { Y_ABORT(); }
+ void Schedule(TDuration, TAutoPtr<IEventHandle>, ISchedulerCookie*, TWorkerId) override { Y_ABORT(); }
+ bool Send(TAutoPtr<IEventHandle>&) override { Y_ABORT(); }
+ bool SpecificSend(TAutoPtr<IEventHandle>&) override { Y_ABORT(); }
+ void ScheduleActivation(ui32) override { Y_ABORT(); }
+ void SpecificScheduleActivation(ui32) override { Y_ABORT(); }
+ void ScheduleActivationEx(ui32, ui64) override { Y_ABORT(); }
+ TActorId Register(IActor*, TMailboxType::EType, ui64, const TActorId&) override { Y_ABORT(); }
+ TActorId Register(IActor*, TMailboxHeader*, ui32, const TActorId&) override { Y_ABORT(); }
+ void Prepare(TActorSystem*, NSchedulerQueue::TReader**, ui32*) override { Y_ABORT(); }
+ void Start() override { Y_ABORT(); }
+ void PrepareStop() override { Y_ABORT(); }
+ void Shutdown() override { Y_ABORT(); }
+ bool Cleanup() override { Y_ABORT(); }
};
// Proxy executor pool working with cpu-local scheduler (aka actorsystem 2.0)
@@ -1058,7 +1058,7 @@ namespace NActors {
return token;
}
case TCpuState::Forbidden:
- Y_FAIL();
+ Y_ABORT();
case TCpuState::Stopped:
return CpuStopped;
}
@@ -1401,7 +1401,7 @@ namespace NActors {
}
TAffinity* TUnitedExecutorPool::Affinity() const {
- Y_FAIL(); // should never be called, TCpuExecutorPool is used instead
+ Y_ABORT(); // should never be called, TCpuExecutorPool is used instead
}
ui32 TUnitedExecutorPool::GetThreads() const {
@@ -1409,7 +1409,7 @@ namespace NActors {
}
ui32 TUnitedExecutorPool::GetReadyActivation(TWorkerContext&, ui64) {
- Y_FAIL(); // should never be called, TCpu*ExecutorPool is used instead
+ Y_ABORT(); // should never be called, TCpu*ExecutorPool is used instead
}
inline void TUnitedExecutorPool::ScheduleActivation(ui32 activation) {
diff --git a/library/cpp/actors/core/executor_thread.cpp b/library/cpp/actors/core/executor_thread.cpp
index deddb0a97e..eed1794ab1 100644
--- a/library/cpp/actors/core/executor_thread.cpp
+++ b/library/cpp/actors/core/executor_thread.cpp
@@ -539,7 +539,7 @@ namespace NActors {
case TExecutionState::FreeLeavingMarked:
return false;
default:
- Y_FAIL();
+ Y_ABORT();
}
}
}
@@ -572,7 +572,7 @@ namespace NActors {
case TExecutionState::FreeLeavingMarked:
return false;
default:
- Y_FAIL();
+ Y_ABORT();
}
}
}
@@ -587,7 +587,7 @@ namespace NActors {
case TExecutionState::Leaving:
case TExecutionState::Executing:
case TExecutionState::LeavingMarked:
- Y_FAIL();
+ Y_ABORT();
case TExecutionState::Free:
if (AtomicUi32Cas(&ExecutionState, TExecutionState::Executing, TExecutionState::Free))
return true;
@@ -601,7 +601,7 @@ namespace NActors {
case TExecutionState::FreeLeavingMarked:
return false;
default:
- Y_FAIL();
+ Y_ABORT();
}
}
}
@@ -613,7 +613,7 @@ namespace NActors {
else if (state == TExecutionState::FreeExecuting)
AtomicStore(&ExecutionState, (ui32)TExecutionState::FreeLeaving);
else
- Y_FAIL();
+ Y_ABORT();
AtomicBarrier();
}
@@ -624,7 +624,7 @@ namespace NActors {
switch (state) {
case TExecutionState::Inactive:
case TExecutionState::Scheduled:
- Y_FAIL();
+ Y_ABORT();
case TExecutionState::Leaving:
if (!wouldReschedule) {
if (AtomicUi32Cas(&ExecutionState, TExecutionState::Inactive, TExecutionState::Leaving))
@@ -635,14 +635,14 @@ namespace NActors {
}
break;
case TExecutionState::Executing:
- Y_FAIL();
+ Y_ABORT();
case TExecutionState::LeavingMarked:
if (AtomicUi32Cas(&ExecutionState, TExecutionState::Scheduled, TExecutionState::LeavingMarked))
return true;
break;
case TExecutionState::Free:
case TExecutionState::FreeScheduled:
- Y_FAIL();
+ Y_ABORT();
case TExecutionState::FreeLeaving:
if (!wouldReschedule) {
if (AtomicUi32Cas(&ExecutionState, TExecutionState::Free, TExecutionState::FreeLeaving))
@@ -653,13 +653,13 @@ namespace NActors {
}
break;
case TExecutionState::FreeExecuting:
- Y_FAIL();
+ Y_ABORT();
case TExecutionState::FreeLeavingMarked:
if (AtomicUi32Cas(&ExecutionState, TExecutionState::FreeScheduled, TExecutionState::FreeLeavingMarked))
return true;
break;
default:
- Y_FAIL();
+ Y_ABORT();
}
}
}
@@ -671,7 +671,7 @@ namespace NActors {
switch (state) {
case TExecutionState::Inactive:
case TExecutionState::Scheduled:
- Y_FAIL();
+ Y_ABORT();
case TExecutionState::Leaving:
if (!wouldReschedule) {
if (AtomicUi32Cas(&ExecutionState, TExecutionState::Free, TExecutionState::Leaving))
@@ -682,7 +682,7 @@ namespace NActors {
}
break;
case TExecutionState::Executing:
- Y_FAIL();
+ Y_ABORT();
case TExecutionState::LeavingMarked:
if (AtomicUi32Cas(&ExecutionState, TExecutionState::FreeScheduled, TExecutionState::LeavingMarked))
return true;
@@ -692,9 +692,9 @@ namespace NActors {
case TExecutionState::FreeLeaving:
case TExecutionState::FreeExecuting:
case TExecutionState::FreeLeavingMarked:
- Y_FAIL();
+ Y_ABORT();
default:
- Y_FAIL();
+ Y_ABORT();
}
}
}
diff --git a/library/cpp/actors/core/interconnect.cpp b/library/cpp/actors/core/interconnect.cpp
index 8671fb2db7..b477f71e57 100644
--- a/library/cpp/actors/core/interconnect.cpp
+++ b/library/cpp/actors/core/interconnect.cpp
@@ -171,7 +171,7 @@ namespace NActors {
}
default:
- Y_FAIL("unexpected legacy key# %d", key);
+ Y_ABORT("unexpected legacy key# %d", key);
}
}
diff --git a/library/cpp/actors/core/invoke.h b/library/cpp/actors/core/invoke.h
index 6151c32bfa..c9e29effe2 100644
--- a/library/cpp/actors/core/invoke.h
+++ b/library/cpp/actors/core/invoke.h
@@ -54,7 +54,7 @@ namespace NActors {
} else if (auto *value = std::any_cast<T>(&arg)) {
return std::move(*value);
} else {
- Y_FAIL("unspported return type for TEvInvokeResult: actual# %s != expected# %s",
+ Y_ABORT("unspported return type for TEvInvokeResult: actual# %s != expected# %s",
TypeName(arg.type()).data(), TypeName<T>().data());
}
}, Result);
diff --git a/library/cpp/actors/core/log.h b/library/cpp/actors/core/log.h
index 3e171b9b73..44cd3730a4 100644
--- a/library/cpp/actors/core/log.h
+++ b/library/cpp/actors/core/log.h
@@ -524,7 +524,7 @@ namespace NActors {
~TVerifyFormattedRecordWriter() {
const TString data = TBase::GetResult();
- Y_FAIL("%s", data.data());
+ Y_ABORT("%s", data.data());
}
};
}
diff --git a/library/cpp/actors/core/mailbox.cpp b/library/cpp/actors/core/mailbox.cpp
index 37cb900ecf..d11ff9cbcb 100644
--- a/library/cpp/actors/core/mailbox.cpp
+++ b/library/cpp/actors/core/mailbox.cpp
@@ -36,7 +36,7 @@ namespace NActors {
case TMailboxHeader::TExecutionState::FreeLeavingMarked:
return false;
default:
- Y_FAIL();
+ Y_ABORT();
}
}
@@ -84,7 +84,7 @@ namespace NActors {
DestructMailboxLine<TTinyReadAsFilledMailbox>((ui8*)lineHeader + 64, (ui8*)lineHeader + LineSize);
break;
default:
- Y_FAIL();
+ Y_ABORT();
}
lineHeader->~TMailboxLineHeader();
@@ -126,7 +126,7 @@ namespace NActors {
done &= CleanupMailboxLine<TTinyReadAsFilledMailbox>((ui8*)lineHeader + 64, (ui8*)lineHeader + LineSize);
break;
default:
- Y_FAIL();
+ Y_ABORT();
}
}
}
@@ -262,7 +262,7 @@ namespace NActors {
}
return true;
default:
- Y_FAIL("unknown mailbox type");
+ Y_ABORT("unknown mailbox type");
}
}
@@ -319,7 +319,7 @@ namespace NActors {
} while (AtomicGet(CachedTinyReadAsFilledMailboxes) > (MailboxCacheTinyReadAsFilled.Concurrency * 512));
return 0;
default:
- Y_FAIL("Unknown mailbox type");
+ Y_ABORT("Unknown mailbox type");
}
}
@@ -353,7 +353,7 @@ namespace NActors {
AtomicIncrement(CachedTinyReadAsFilledMailboxes);
break;
default:
- Y_FAIL();
+ Y_ABORT();
}
}
}
@@ -557,7 +557,7 @@ namespace NActors {
counter = &CachedTinyReadAsFilledMailboxes;
break;
default:
- Y_FAIL();
+ Y_ABORT();
}
AtomicStore(Lines + lineIndex, header);
diff --git a/library/cpp/actors/core/mailbox.h b/library/cpp/actors/core/mailbox.h
index d7e3ef5384..4697dedcfd 100644
--- a/library/cpp/actors/core/mailbox.h
+++ b/library/cpp/actors/core/mailbox.h
@@ -168,7 +168,7 @@ namespace NActors {
break;
}
default:
- Y_FAIL();
+ Y_ABORT();
}
return nullptr;
}
@@ -211,7 +211,7 @@ namespace NActors {
break;
}
default:
- Y_FAIL();
+ Y_ABORT();
}
}
diff --git a/library/cpp/actors/core/scheduler_cookie.cpp b/library/cpp/actors/core/scheduler_cookie.cpp
index 0fa6f543a7..b975a80c07 100644
--- a/library/cpp/actors/core/scheduler_cookie.cpp
+++ b/library/cpp/actors/core/scheduler_cookie.cpp
@@ -24,11 +24,11 @@ namespace NActors {
return false;
}
- Y_FAIL();
+ Y_ABORT();
}
bool DetachEvent() noexcept override {
- Y_FAIL();
+ Y_ABORT();
}
};
@@ -60,7 +60,7 @@ namespace NActors {
return false;
}
- Y_FAIL();
+ Y_ABORT();
}
bool DetachEvent() noexcept override {
@@ -74,7 +74,7 @@ namespace NActors {
return false;
}
- Y_FAIL();
+ Y_ABORT();
}
};
diff --git a/library/cpp/actors/cppcoro/task.h b/library/cpp/actors/cppcoro/task.h
index 8afeb7e705..bb5a385db2 100644
--- a/library/cpp/actors/cppcoro/task.h
+++ b/library/cpp/actors/cppcoro/task.h
@@ -129,7 +129,7 @@ namespace NActors {
struct TFinalSuspend {
static bool await_ready() noexcept { return false; }
- static void await_resume() noexcept { Y_FAIL("unexpected coroutine resume"); }
+ static void await_resume() noexcept { Y_ABORT("unexpected coroutine resume"); }
static std::coroutine_handle<> await_suspend(std::coroutine_handle<TTaskPromise<T>> h) noexcept {
auto next = std::exchange(h.promise().Continuation, std::noop_coroutine());
diff --git a/library/cpp/actors/cppcoro/task_actor_ut.cpp b/library/cpp/actors/cppcoro/task_actor_ut.cpp
index 79d68b64c2..43186bfc55 100644
--- a/library/cpp/actors/cppcoro/task_actor_ut.cpp
+++ b/library/cpp/actors/cppcoro/task_actor_ut.cpp
@@ -45,7 +45,7 @@ Y_UNIT_TEST_SUITE(TaskActor) {
case TEvStop::EventType:
co_return false;
default:
- Y_FAIL("Unexpected event");
+ Y_ABORT("Unexpected event");
}
};
while (co_await singleRequest()) {
diff --git a/library/cpp/actors/cppcoro/task_group.h b/library/cpp/actors/cppcoro/task_group.h
index 5b82e5f592..1de0cf5c1e 100644
--- a/library/cpp/actors/cppcoro/task_group.h
+++ b/library/cpp/actors/cppcoro/task_group.h
@@ -177,7 +177,7 @@ namespace NActors {
struct TFinalSuspend {
static bool await_ready() noexcept { return false; }
- static void await_resume() noexcept { Y_FAIL("unexpected coroutine resume"); }
+ static void await_resume() noexcept { Y_ABORT("unexpected coroutine resume"); }
Y_NO_INLINE
static std::coroutine_handle<> await_suspend(std::coroutine_handle<TTaskGroupPromise<T>> h) noexcept {
diff --git a/library/cpp/actors/cppcoro/task_result.h b/library/cpp/actors/cppcoro/task_result.h
index 54e66fd57f..da78c53b7a 100644
--- a/library/cpp/actors/cppcoro/task_result.h
+++ b/library/cpp/actors/cppcoro/task_result.h
@@ -67,7 +67,7 @@ namespace NActors {
typename NDetail::TLValue<T>::TType Value() & {
switch (Result.index()) {
case 0: {
- Y_FAIL("Task result has no value");
+ Y_ABORT("Task result has no value");
}
case 1: {
if constexpr (std::same_as<T, void>) {
@@ -82,13 +82,13 @@ namespace NActors {
std::rethrow_exception(e);
}
}
- Y_FAIL("Task result has an invalid state");
+ Y_ABORT("Task result has an invalid state");
}
typename NDetail::TRValue<T>::TType Value() && {
switch (Result.index()) {
case 0: {
- Y_FAIL("Task result has no value");
+ Y_ABORT("Task result has no value");
}
case 1: {
if constexpr (std::same_as<T, void>) {
@@ -103,7 +103,7 @@ namespace NActors {
std::rethrow_exception(std::move(e));
}
}
- Y_FAIL("Task result has an invalid state");
+ Y_ABORT("Task result has an invalid state");
}
private:
diff --git a/library/cpp/actors/dnscachelib/dnscache.cpp b/library/cpp/actors/dnscachelib/dnscache.cpp
index c24888caa5..91ed284c12 100644
--- a/library/cpp/actors/dnscachelib/dnscache.cpp
+++ b/library/cpp/actors/dnscachelib/dnscache.cpp
@@ -387,7 +387,7 @@ void TDnsCache::GHBNCallback(void* arg, int status, int, struct hostent* info) {
p->second.AddrsV6.push_back(*(struct in6_addr*)(info->h_addr_list[i]));
}
} else {
- Y_FAIL("unknown address type in ares callback");
+ Y_ABORT("unknown address type in ares callback");
}
resolved = TTimeKeeper::GetTime();
notfound = 0;
diff --git a/library/cpp/actors/dnsresolver/dnsresolver.cpp b/library/cpp/actors/dnsresolver/dnsresolver.cpp
index bf88d7a41c..d7d8c0e3b6 100644
--- a/library/cpp/actors/dnsresolver/dnsresolver.cpp
+++ b/library/cpp/actors/dnsresolver/dnsresolver.cpp
@@ -91,7 +91,7 @@ namespace NDnsResolver {
if (WSAGetLastError() == WSAEWOULDBLOCK) {
break;
}
- Y_FAIL("Unexpected recv error");
+ Y_ABORT("Unexpected recv error");
#else
if (errno == EAGAIN || errno == EWOULDBLOCK) {
break;
@@ -320,7 +320,7 @@ namespace NDnsResolver {
break;
}
default:
- Y_FAIL("unknown address family in ares callback");
+ Y_ABORT("unknown address family in ares callback");
}
}
} else {
@@ -349,7 +349,7 @@ namespace NDnsResolver {
break;
}
default:
- Y_FAIL("unknown address family in ares callback");
+ Y_ABORT("unknown address family in ares callback");
}
} else {
result->ErrorText = ares_strerror(status);
diff --git a/library/cpp/actors/dnsresolver/dnsresolver_caching.cpp b/library/cpp/actors/dnsresolver/dnsresolver_caching.cpp
index bc3e5c3d7e..83b1847962 100644
--- a/library/cpp/actors/dnsresolver/dnsresolver_caching.cpp
+++ b/library/cpp/actors/dnsresolver/dnsresolver_caching.cpp
@@ -58,7 +58,7 @@ namespace NDnsResolver {
case AF_UNSPEC:
return OutgoingInFlightUnspec;
default:
- Y_FAIL("Unexpected family %d", family);
+ Y_ABORT("Unexpected family %d", family);
}
}
@@ -71,7 +71,7 @@ namespace NDnsResolver {
case AF_UNSPEC:
return OutgoingErrorsUnspec;
default:
- Y_FAIL("Unexpected family %d", family);
+ Y_ABORT("Unexpected family %d", family);
}
}
@@ -84,7 +84,7 @@ namespace NDnsResolver {
case AF_UNSPEC:
return OutgoingTotalUnspec;
default:
- Y_FAIL("Unexpected family %d", family);
+ Y_ABORT("Unexpected family %d", family);
}
}
};
@@ -153,7 +153,7 @@ namespace NDnsResolver {
break;
default:
- Y_FAIL("Unexpected request family %d", waitingInfo.Family);
+ Y_ABORT("Unexpected request family %d", waitingInfo.Family);
}
}
@@ -173,14 +173,14 @@ namespace NDnsResolver {
break;
default:
- Y_FAIL("Unexpected request family %d", waitingInfo.Family);
+ Y_ABORT("Unexpected request family %d", waitingInfo.Family);
}
break;
}
default:
- Y_FAIL("Unexpected TEvUndelievered, type=%" PRIu32, ev->Get()->SourceType);
+ Y_ABORT("Unexpected TEvUndelievered, type=%" PRIu32, ev->Get()->SourceType);
}
}
@@ -329,7 +329,7 @@ namespace NDnsResolver {
case AF_INET:
return StateIPv4;
default:
- Y_FAIL("Unsupported family %d", family);
+ Y_ABORT("Unsupported family %d", family);
}
}
@@ -342,7 +342,7 @@ namespace NDnsResolver {
case AF_INET:
return StateIPv4;
default:
- Y_FAIL("Unsupported family %d", family);
+ Y_ABORT("Unsupported family %d", family);
}
}
};
@@ -456,7 +456,7 @@ namespace NDnsResolver {
PushSoftV4(it, newDeadline);
break;
default:
- Y_FAIL("Unexpected family %d", family);
+ Y_ABORT("Unexpected family %d", family);
}
}
@@ -472,7 +472,7 @@ namespace NDnsResolver {
PushHardV4(it, newDeadline);
break;
default:
- Y_FAIL("Unexpected family %d", family);
+ Y_ABORT("Unexpected family %d", family);
}
}
@@ -638,7 +638,7 @@ namespace NDnsResolver {
} else if (!addrs4.empty()) {
reply->Addr = addrs4.front();
} else {
- Y_FAIL("Unexpected reply with empty address list");
+ Y_ABORT("Unexpected reply with empty address list");
}
Send(req->Sender, reply.Release(), 0, req->Cookie);
break;
diff --git a/library/cpp/actors/helpers/selfping_actor.cpp b/library/cpp/actors/helpers/selfping_actor.cpp
index 0ab1dc57e4..f9f7c297fc 100644
--- a/library/cpp/actors/helpers/selfping_actor.cpp
+++ b/library/cpp/actors/helpers/selfping_actor.cpp
@@ -153,7 +153,7 @@ public:
switch (ev->GetTypeRewrite()) {
HFunc(TEvPing, HandlePing);
default:
- Y_FAIL("TSelfPingActor::RunningState: unexpected event 0x%08" PRIx32, ev->GetTypeRewrite());
+ Y_ABORT("TSelfPingActor::RunningState: unexpected event 0x%08" PRIx32, ev->GetTypeRewrite());
}
}
diff --git a/library/cpp/actors/http/http.cpp b/library/cpp/actors/http/http.cpp
index 22d5409343..9da46e412b 100644
--- a/library/cpp/actors/http/http.cpp
+++ b/library/cpp/actors/http/http.cpp
@@ -14,7 +14,7 @@ inline TStringBuf operator +(TStringBuf l, TStringBuf r) {
if (r.end() == l.begin()) {
return TStringBuf(r.data(), l.size() + r.size());
}
- Y_FAIL("oops");
+ Y_ABORT("oops");
return TStringBuf();
}
@@ -203,7 +203,7 @@ void THttpParser<THttpRequest, TSocketBuffer>::Advance(size_t len) {
break;
}
default:
- Y_FAIL("Invalid processing sequence");
+ Y_ABORT("Invalid processing sequence");
break;
}
}
@@ -590,10 +590,10 @@ THttpOutgoingRequest::THttpOutgoingRequest(TStringBuf method, TStringBuf scheme,
THttpOutgoingRequest::THttpOutgoingRequest(TStringBuf method, TStringBuf url, TStringBuf protocol, TStringBuf version) {
TStringBuf scheme, host, uri;
if (!CrackURL(url, scheme, host, uri)) {
- Y_FAIL("Invalid URL specified");
+ Y_ABORT("Invalid URL specified");
}
if (!scheme.empty() && scheme != "http" && scheme != "https") {
- Y_FAIL("Invalid URL specified");
+ Y_ABORT("Invalid URL specified");
}
Secure = (scheme == "https");
TString urie = UrlEscapeRet(uri);
diff --git a/library/cpp/actors/http/http_proxy.cpp b/library/cpp/actors/http/http_proxy.cpp
index ea7792ef81..74bf497632 100644
--- a/library/cpp/actors/http/http_proxy.cpp
+++ b/library/cpp/actors/http/http_proxy.cpp
@@ -87,13 +87,13 @@ protected:
void Handle(TEvHttpProxy::TEvHttpIncomingResponse::TPtr event, const NActors::TActorContext& ctx) {
Y_UNUSED(event);
Y_UNUSED(ctx);
- Y_FAIL("This event shouldn't be there, it should go to the http connection owner directly");
+ Y_ABORT("This event shouldn't be there, it should go to the http connection owner directly");
}
void Handle(TEvHttpProxy::TEvHttpOutgoingResponse::TPtr event, const NActors::TActorContext& ctx) {
Y_UNUSED(event);
Y_UNUSED(ctx);
- Y_FAIL("This event shouldn't be there, it should go to the http connection directly");
+ Y_ABORT("This event shouldn't be there, it should go to the http connection directly");
}
void Handle(TEvHttpProxy::TEvHttpOutgoingRequest::TPtr event, const NActors::TActorContext& ctx) {
diff --git a/library/cpp/actors/interconnect/handshake_broker.h b/library/cpp/actors/interconnect/handshake_broker.h
index d657e7dd51..c850320bd2 100644
--- a/library/cpp/actors/interconnect/handshake_broker.h
+++ b/library/cpp/actors/interconnect/handshake_broker.h
@@ -73,7 +73,7 @@ namespace NActors {
}
default:
- Y_FAIL("Unimplimented selection strategy");
+ Y_ABORT("Unimplimented selection strategy");
}
const size_t n = WaiterLookup.erase(waiter);
@@ -136,7 +136,7 @@ namespace NActors {
hFunc(TEvHandshakeBrokerFree, Handle);
default:
- Y_FAIL("unexpected event 0x%08" PRIx32, ev->GetTypeRewrite());
+ Y_ABORT("unexpected event 0x%08" PRIx32, ev->GetTypeRewrite());
}
}
diff --git a/library/cpp/actors/interconnect/interconnect_channel.cpp b/library/cpp/actors/interconnect/interconnect_channel.cpp
index 30f384786b..71f4d6e5c3 100644
--- a/library/cpp/actors/interconnect/interconnect_channel.cpp
+++ b/library/cpp/actors/interconnect/interconnect_channel.cpp
@@ -221,7 +221,7 @@ namespace NActors {
}
complete = !Iter.Valid();
} else {
- Y_FAIL();
+ Y_ABORT();
}
Y_ABORT_UNLESS(!complete || event.EventActuallySerialized == event.EventSerializedSize,
"EventActuallySerialized# %" PRIu32 " EventSerializedSize# %" PRIu32 " Type# 0x%08" PRIx32,
diff --git a/library/cpp/actors/interconnect/interconnect_handshake.cpp b/library/cpp/actors/interconnect/interconnect_handshake.cpp
index 7783de1f92..eae80d8c5c 100644
--- a/library/cpp/actors/interconnect/interconnect_handshake.cpp
+++ b/library/cpp/actors/interconnect/interconnect_handshake.cpp
@@ -296,7 +296,7 @@ namespace NActors {
} catch (const TExPoison&) {
// just stop execution, do nothing
} catch (...) {
- Y_FAIL("unhandled exception");
+ Y_ABORT("unhandled exception");
}
if (SubscribedForConnection) {
SendToProxy(MakeHolder<TEvSubscribeForConnection>(*HandshakeId, false));
@@ -439,7 +439,7 @@ namespace NActors {
throw TExPoison();
default:
- Y_FAIL("unexpected event 0x%08" PRIx32, type);
+ Y_ABORT("unexpected event 0x%08" PRIx32, type);
}
}
@@ -1097,7 +1097,7 @@ namespace NActors {
SendExBlock(MainChannel, ev->Record, "ExReply");
ProgramInfo.Clear(); // do not issue reply to the proxy
} else {
- Y_FAIL("unexpected event Type# 0x%08" PRIx32, reply->GetTypeRewrite());
+ Y_ABORT("unexpected event Type# 0x%08" PRIx32, reply->GetTypeRewrite());
}
}
}
diff --git a/library/cpp/actors/interconnect/interconnect_resolve.cpp b/library/cpp/actors/interconnect/interconnect_resolve.cpp
index 921f08fba6..071af2f7c4 100644
--- a/library/cpp/actors/interconnect/interconnect_resolve.cpp
+++ b/library/cpp/actors/interconnect/interconnect_resolve.cpp
@@ -157,7 +157,7 @@ namespace NActors {
return MakeHolder<NAddr::TIPv4Addr>(TIpAddress(msg->GetAddrV4().s_addr, Port));
}
- Y_FAIL("Unexpected result address family");
+ Y_ABORT("Unexpected result address family");
}
return nullptr;
diff --git a/library/cpp/actors/interconnect/interconnect_stream.cpp b/library/cpp/actors/interconnect/interconnect_stream.cpp
index 51a23923af..ab3b74fa57 100644
--- a/library/cpp/actors/interconnect/interconnect_stream.cpp
+++ b/library/cpp/actors/interconnect/interconnect_stream.cpp
@@ -50,13 +50,13 @@ namespace NInterconnect {
return;
switch (LastSocketError()) {
case EBADF:
- Y_FAIL("Close bad descriptor");
+ Y_ABORT("Close bad descriptor");
case EINTR:
break;
case EIO:
- Y_FAIL("EIO");
+ Y_ABORT("EIO");
default:
- Y_FAIL("It's something unexpected");
+ Y_ABORT("It's something unexpected");
}
}
@@ -136,7 +136,7 @@ namespace NInterconnect {
return -LastSocketError();
return ret;
#else
- Y_FAIL("WriteV() unsupported on Windows");
+ Y_ABORT("WriteV() unsupported on Windows");
#endif
}
@@ -148,7 +148,7 @@ namespace NInterconnect {
return -LastSocketError();
return ret;
#else
- Y_FAIL("ReadV() unsupported on Windows");
+ Y_ABORT("ReadV() unsupported on Windows");
#endif
}
@@ -481,7 +481,7 @@ namespace NInterconnect {
}
}
}
- Y_FAIL();
+ Y_ABORT();
}
std::optional<std::pair<const void*, size_t>> BlockedSend;
@@ -585,7 +585,7 @@ namespace NInterconnect {
return -EPROTO;
default:
- Y_FAIL("unexpected SSL_get_error() status# %d", status);
+ Y_ABORT("unexpected SSL_get_error() status# %d", status);
}
}
};
@@ -616,11 +616,11 @@ namespace NInterconnect {
}
ssize_t TSecureSocket::WriteV(const struct iovec* /*iov*/, int /*iovcnt*/) const {
- Y_FAIL("unsupported on SSL sockets");
+ Y_ABORT("unsupported on SSL sockets");
}
ssize_t TSecureSocket::ReadV(const struct iovec* /*iov*/, int /*iovcnt*/) const {
- Y_FAIL("unsupported on SSL sockets");
+ Y_ABORT("unsupported on SSL sockets");
}
TString TSecureSocket::GetCipherName() const {
diff --git a/library/cpp/actors/interconnect/interconnect_tcp_input_session.cpp b/library/cpp/actors/interconnect/interconnect_tcp_input_session.cpp
index 5e29f49590..3f5ebd2987 100644
--- a/library/cpp/actors/interconnect/interconnect_tcp_input_session.cpp
+++ b/library/cpp/actors/interconnect/interconnect_tcp_input_session.cpp
@@ -307,7 +307,7 @@ namespace NActors {
break;
default:
- Y_FAIL("unexpected state");
+ Y_ABORT("unexpected state");
}
break;
}
diff --git a/library/cpp/actors/interconnect/interconnect_tcp_proxy.cpp b/library/cpp/actors/interconnect/interconnect_tcp_proxy.cpp
index c1994b2d71..514bfb0b84 100644
--- a/library/cpp/actors/interconnect/interconnect_tcp_proxy.cpp
+++ b/library/cpp/actors/interconnect/interconnect_tcp_proxy.cpp
@@ -525,7 +525,7 @@ namespace NActors {
break;
default:
- Y_FAIL("Unexpected type of event in held event queue");
+ Y_ABORT("Unexpected type of event in held event queue");
}
}
@@ -736,7 +736,7 @@ namespace NActors {
switch (auto& ev = h; ev->GetTypeRewrite()) {
hFunc(NMon::TEvHttpInfoRes, Session->GenerateHttpInfo);
default:
- Y_FAIL();
+ Y_ABORT();
}
} else {
TActivationContext::Send(h.Release());
diff --git a/library/cpp/actors/interconnect/interconnect_tcp_proxy.h b/library/cpp/actors/interconnect/interconnect_tcp_proxy.h
index 4622bf3f88..81f043a2e9 100644
--- a/library/cpp/actors/interconnect/interconnect_tcp_proxy.h
+++ b/library/cpp/actors/interconnect/interconnect_tcp_proxy.h
@@ -129,7 +129,7 @@ namespace NActors {
hFunc(TEvSubscribeForConnection, Handle); \
hFunc(TEvReportConnection, Handle); \
default: \
- Y_FAIL("unexpected event Type# 0x%08" PRIx32, type); \
+ Y_ABORT("unexpected event Type# 0x%08" PRIx32, type); \
} \
} \
if (profiled) { \
@@ -316,7 +316,7 @@ namespace NActors {
hFunc(TEvHandshakeAsk, IncomingHandshake);
hFunc(TEvHandshakeRequest, IncomingHandshake);
default:
- Y_FAIL();
+ Y_ABORT();
}
}
void IncomingHandshake(TEvHandshakeAsk::TPtr& ev);
diff --git a/library/cpp/actors/interconnect/interconnect_tcp_session.cpp b/library/cpp/actors/interconnect/interconnect_tcp_session.cpp
index 59738b2052..a7509fbc94 100644
--- a/library/cpp/actors/interconnect/interconnect_tcp_session.cpp
+++ b/library/cpp/actors/interconnect/interconnect_tcp_session.cpp
@@ -112,7 +112,7 @@ namespace NActors {
}
void TInterconnectSessionTCP::PassAway() {
- Y_FAIL("TInterconnectSessionTCP::PassAway() can't be called directly");
+ Y_ABORT("TInterconnectSessionTCP::PassAway() can't be called directly");
}
void TInterconnectSessionTCP::Forward(STATEFN_SIG) {
@@ -326,7 +326,7 @@ namespace NActors {
switch (EUpdateState state = ReceiveContext->UpdateState) {
case EUpdateState::NONE:
case EUpdateState::CONFIRMING:
- Y_FAIL("unexpected state");
+ Y_ABORT("unexpected state");
case EUpdateState::INFLIGHT:
// this message we are processing was the only one in flight, so we can reset state to NONE here
diff --git a/library/cpp/actors/interconnect/mock/ic_mock.cpp b/library/cpp/actors/interconnect/mock/ic_mock.cpp
index 9178e52da8..81e181b673 100644
--- a/library/cpp/actors/interconnect/mock/ic_mock.cpp
+++ b/library/cpp/actors/interconnect/mock/ic_mock.cpp
@@ -89,7 +89,7 @@ namespace NActors {
} else if (nodeId == ui32(Key >> 32)) {
return PeerInfo + 1;
} else {
- Y_FAIL();
+ Y_ABORT();
}
}
};
@@ -236,7 +236,7 @@ namespace NActors {
break;
default:
- Y_FAIL();
+ Y_ABORT();
}
}
}
diff --git a/library/cpp/actors/interconnect/outgoing_stream.h b/library/cpp/actors/interconnect/outgoing_stream.h
index 47803764d7..980bd401f0 100644
--- a/library/cpp/actors/interconnect/outgoing_stream.h
+++ b/library/cpp/actors/interconnect/outgoing_stream.h
@@ -100,7 +100,7 @@ namespace NInterconnect {
const char *bufferBegin = buffer->Data;
const char *bufferEnd = bufferBegin + BufferSize;
if (bufferBegin < end && begin < bufferEnd) {
- Y_FAIL();
+ Y_ABORT();
}
}
#endif
diff --git a/library/cpp/actors/interconnect/poller_actor.cpp b/library/cpp/actors/interconnect/poller_actor.cpp
index e3ddbe8b98..1f18e72a5b 100644
--- a/library/cpp/actors/interconnect/poller_actor.cpp
+++ b/library/cpp/actors/interconnect/poller_actor.cpp
@@ -89,7 +89,7 @@ namespace NActors {
try {
TPipeHandle::Pipe(ReadEnd, WriteEnd, CloseOnExec);
} catch (const TFileError& err) {
- Y_FAIL("failed to create pipe");
+ Y_ABORT("failed to create pipe");
}
// switch the read/write ends to nonblocking mode
@@ -134,7 +134,7 @@ namespace NActors {
if (err == EINTR) {
continue;
} else {
- Y_FAIL("WriteEnd.Write() failed with %s", strerror(err));
+ Y_ABORT("WriteEnd.Write() failed with %s", strerror(err));
}
} else {
Y_ABORT_UNLESS(nwritten);
@@ -157,7 +157,7 @@ namespace NActors {
} else if (error == EAGAIN || error == EWOULDBLOCK) {
break;
} else {
- Y_FAIL("read() failed with %s", strerror(errno));
+ Y_ABORT("read() failed with %s", strerror(errno));
}
} else {
Y_ABORT_UNLESS(n);
@@ -178,7 +178,7 @@ namespace NActors {
} else if (std::get_if<TPollerWakeup>(&op->Operation)) {
op->SignalDone();
} else {
- Y_FAIL();
+ Y_ABORT();
}
} while (SyncOperationsQ.Pop());
return true;
diff --git a/library/cpp/actors/interconnect/poller_actor_darwin.h b/library/cpp/actors/interconnect/poller_actor_darwin.h
index f091972502..a1f750e711 100644
--- a/library/cpp/actors/interconnect/poller_actor_darwin.h
+++ b/library/cpp/actors/interconnect/poller_actor_darwin.h
@@ -53,7 +53,7 @@ namespace NActors {
if (errno == EINTR) {
return false;
} else {
- Y_FAIL("kevent() failed with %s", strerror(errno));
+ Y_ABORT("kevent() failed with %s", strerror(errno));
}
}
diff --git a/library/cpp/actors/interconnect/poller_actor_linux.h b/library/cpp/actors/interconnect/poller_actor_linux.h
index f19f53f730..8831d2062b 100644
--- a/library/cpp/actors/interconnect/poller_actor_linux.h
+++ b/library/cpp/actors/interconnect/poller_actor_linux.h
@@ -19,7 +19,7 @@ namespace NActors {
event.data.ptr = nullptr;
event.events = EPOLLIN;
if (epoll_ctl(EpollDescriptor, EPOLL_CTL_ADD, ReadEnd, &event) == -1) {
- Y_FAIL("epoll_ctl(EPOLL_CTL_ADD) failed with %s", strerror(errno));
+ Y_ABORT("epoll_ctl(EPOLL_CTL_ADD) failed with %s", strerror(errno));
}
ISimpleThread::Start(); // start poller thread
@@ -44,7 +44,7 @@ namespace NActors {
if (errno == EINTR) {
return false; // restart the call a bit later
} else {
- Y_FAIL("epoll_wait() failed with %s", strerror(errno));
+ Y_ABORT("epoll_wait() failed with %s", strerror(errno));
}
}
@@ -69,7 +69,7 @@ namespace NActors {
event.events = EPOLLONESHOT | EPOLLRDHUP | flags;
event.data.ptr = record;
if (epoll_ctl(EpollDescriptor, EPOLL_CTL_MOD, record->Socket->GetDescriptor(), &event) == -1) {
- Y_FAIL("epoll_ctl(EPOLL_CTL_MOD) failed with %s", strerror(errno));
+ Y_ABORT("epoll_ctl(EPOLL_CTL_MOD) failed with %s", strerror(errno));
}
}
@@ -85,7 +85,7 @@ namespace NActors {
void UnregisterSocketInLoop(const TIntrusivePtr<TSharedDescriptor>& socket) {
if (epoll_ctl(EpollDescriptor, EPOLL_CTL_DEL, socket->GetDescriptor(), nullptr) == -1) {
- Y_FAIL("epoll_ctl(EPOLL_CTL_DEL) failed with %s", strerror(errno));
+ Y_ABORT("epoll_ctl(EPOLL_CTL_DEL) failed with %s", strerror(errno));
}
}
@@ -94,7 +94,7 @@ namespace NActors {
event.events = EPOLLONESHOT | EPOLLRDHUP;
event.data.ptr = record.Get();
if (epoll_ctl(EpollDescriptor, EPOLL_CTL_ADD, record->Socket->GetDescriptor(), &event) == -1) {
- Y_FAIL("epoll_ctl(EPOLL_CTL_ADD) failed with %s", strerror(errno));
+ Y_ABORT("epoll_ctl(EPOLL_CTL_ADD) failed with %s", strerror(errno));
}
}
@@ -109,7 +109,7 @@ namespace NActors {
event.events = EPOLLONESHOT | EPOLLRDHUP | flags;
event.data.ptr = record.Get();
if (epoll_ctl(EpollDescriptor, EPOLL_CTL_MOD, record->Socket->GetDescriptor(), &event) == -1) {
- Y_FAIL("epoll_ctl(EPOLL_CTL_MOD) failed with %s", strerror(errno));
+ Y_ABORT("epoll_ctl(EPOLL_CTL_MOD) failed with %s", strerror(errno));
}
}
}
diff --git a/library/cpp/actors/interconnect/poller_actor_win.h b/library/cpp/actors/interconnect/poller_actor_win.h
index 9666c32be7..f59d3ddda7 100644
--- a/library/cpp/actors/interconnect/poller_actor_win.h
+++ b/library/cpp/actors/interconnect/poller_actor_win.h
@@ -53,7 +53,7 @@ namespace NActors {
if (err == EINTR) {
return false; // try a bit later
} else {
- Y_FAIL("select() failed with %s", strerror(err));
+ Y_ABORT("select() failed with %s", strerror(err));
}
}
diff --git a/library/cpp/actors/interconnect/poller_tcp_unit.cpp b/library/cpp/actors/interconnect/poller_tcp_unit.cpp
index 853fce04b4..994d907004 100644
--- a/library/cpp/actors/interconnect/poller_tcp_unit.cpp
+++ b/library/cpp/actors/interconnect/poller_tcp_unit.cpp
@@ -120,7 +120,7 @@ namespace NInterconnect {
do {
auto sock = InputQueue.Top().first->GetDescriptor();
if (!Operations.emplace(sock, std::move(InputQueue.Top())).second)
- Y_FAIL("Descriptor is already in pooler.");
+ Y_ABORT("Descriptor is already in pooler.");
} while (InputQueue.Pop());
}
}
diff --git a/library/cpp/actors/interconnect/poller_tcp_unit_epoll.cpp b/library/cpp/actors/interconnect/poller_tcp_unit_epoll.cpp
index 33666a2747..aac6d52bb4 100644
--- a/library/cpp/actors/interconnect/poller_tcp_unit_epoll.cpp
+++ b/library/cpp/actors/interconnect/poller_tcp_unit_epoll.cpp
@@ -13,7 +13,7 @@ namespace NInterconnect {
::epoll_event event = {0, {.fd = stream}};
if (::epoll_ctl(epoll, EPOLL_CTL_DEL, stream, &event)) {
Cerr << "epoll_ctl errno: " << errno << Endl;
- Y_FAIL("epoll delete error!");
+ Y_ABORT("epoll delete error!");
}
}
@@ -24,7 +24,7 @@ namespace NInterconnect {
event.data.fd = stream;
if (::epoll_ctl(epoll, EPOLL_CTL_ADD, stream, &event)) {
Cerr << "epoll_ctl errno: " << errno << Endl;
- Y_FAIL("epoll add error!");
+ Y_ABORT("epoll add error!");
}
}
@@ -92,7 +92,7 @@ namespace NInterconnect {
::epoll_pwait(epoll, events, EVENTS_BUF_SIZE, 200, &sigmask);
if (result == -1 && errno != EINTR)
- Y_FAIL("epoll wait error!");
+ Y_ABORT("epoll wait error!");
auto& side = GetSide<WriteOp>();
side.ProcessInput();
diff --git a/library/cpp/actors/interconnect/ut/interconnect_ut.cpp b/library/cpp/actors/interconnect/ut/interconnect_ut.cpp
index 8d1b47c0c6..bc9e86545a 100644
--- a/library/cpp/actors/interconnect/ut/interconnect_ut.cpp
+++ b/library/cpp/actors/interconnect/ut/interconnect_ut.cpp
@@ -64,7 +64,7 @@ public:
Y_ABORT_UNLESS(it->second == ev->GetChainBuffer()->GetString());
Tentative.erase(it);
} else {
- Y_FAIL("Cookie# %" PRIu64, ev->Cookie);
+ Y_ABORT("Cookie# %" PRIu64, ev->Cookie);
}
IssueQueries();
}
@@ -167,7 +167,7 @@ Y_UNIT_TEST_SUITE(Interconnect) {
break;
default:
- Y_FAIL();
+ Y_ABORT();
}
Sleep(TDuration::MilliSeconds(RandomNumber<ui32>(500) + 100));
diff --git a/library/cpp/actors/interconnect/ut/large.cpp b/library/cpp/actors/interconnect/ut/large.cpp
index 725238242a..88207f816b 100644
--- a/library/cpp/actors/interconnect/ut/large.cpp
+++ b/library/cpp/actors/interconnect/ut/large.cpp
@@ -63,7 +63,7 @@ Y_UNIT_TEST_SUITE(LargeMessage) {
Y_ABORT_UNLESS(SessionId != ev->InterconnectSession);
Done.Signal();
} else {
- Y_FAIL("incorrect sequence number");
+ Y_ABORT("incorrect sequence number");
}
}
diff --git a/library/cpp/actors/interconnect/ut/poller_actor_ut.cpp b/library/cpp/actors/interconnect/ut/poller_actor_ut.cpp
index 67921ef9bc..38b9b5a0b6 100644
--- a/library/cpp/actors/interconnect/ut/poller_actor_ut.cpp
+++ b/library/cpp/actors/interconnect/ut/poller_actor_ut.cpp
@@ -44,15 +44,15 @@ std::pair<TTestSocketPtr, TTestSocketPtr> TcpSockets() {
addr.sin_port = 0;
addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
if (bind(server, (sockaddr*)&addr, sizeof(addr)) == -1) {
- Y_FAIL("bind() failed with %s", strerror(errno));
+ Y_ABORT("bind() failed with %s", strerror(errno));
} else if (listen(server, 1) == -1) {
- Y_FAIL("listen() failed with %s", strerror(errno));
+ Y_ABORT("listen() failed with %s", strerror(errno));
}
// obtain local address for client
socklen_t len = sizeof(addr);
if (getsockname(server, (sockaddr*)&addr, &len) == -1) {
- Y_FAIL("getsockname() failed with %s", strerror(errno));
+ Y_ABORT("getsockname() failed with %s", strerror(errno));
}
// create client socket
@@ -61,7 +61,7 @@ std::pair<TTestSocketPtr, TTestSocketPtr> TcpSockets() {
// connect to server
if (connect(client, (sockaddr*)&addr, len) == -1) {
- Y_FAIL("connect() failed with %s", strerror(errno));
+ Y_ABORT("connect() failed with %s", strerror(errno));
}
// accept connection from the other side
diff --git a/library/cpp/actors/testlib/test_runtime.cpp b/library/cpp/actors/testlib/test_runtime.cpp
index 256116ce32..20b26c33d3 100644
--- a/library/cpp/actors/testlib/test_runtime.cpp
+++ b/library/cpp/actors/testlib/test_runtime.cpp
@@ -298,7 +298,7 @@ namespace NActors {
ui32 GetReadyActivation(TWorkerContext& wctx, ui64 revolvingCounter) override {
Y_UNUSED(wctx);
Y_UNUSED(revolvingCounter);
- Y_FAIL();
+ Y_ABORT();
}
void ReclaimMailbox(TMailboxType::EType mailboxType, ui32 hint, TWorkerId workerId, ui64 revolvingCounter) override {
@@ -458,7 +458,7 @@ namespace NActors {
// generic
TAffinity* Affinity() const override {
- Y_FAIL();
+ Y_ABORT();
}
private:
@@ -812,7 +812,7 @@ namespace NActors {
TString explanation;
auto status = node->LogSettings->SetLevel(priority, component, explanation);
if (status) {
- Y_FAIL("SetLogPriority failed: %s", explanation.c_str());
+ Y_ABORT("SetLogPriority failed: %s", explanation.c_str());
}
}
}
@@ -956,7 +956,7 @@ namespace NActors {
UnlockFromExecution((TMailboxTable::TTinyReadAsFilledMailbox *)mailbox, node->ExecutorPools[0], false, hint, MaxWorkers, ++revolvingCounter);
break;
default:
- Y_FAIL("Unsupported mailbox type");
+ Y_ABORT("Unsupported mailbox type");
}
return actorId;
@@ -1250,7 +1250,7 @@ namespace NActors {
break;
}
default:
- Y_FAIL("Unknown action");
+ Y_ABORT("Unknown action");
}
}
}
@@ -1753,7 +1753,7 @@ namespace NActors {
for (auto& x : Nodes) {
return x.second->ActorSystem.Get();
}
- Y_FAIL("Don't use this method.");
+ Y_ABORT("Don't use this method.");
}
TActorSystem* TTestActorRuntimeBase::GetActorSystem(ui32 nodeId) {
diff --git a/library/cpp/actors/util/rc_buf.h b/library/cpp/actors/util/rc_buf.h
index b5b15fa4cc..db0f7deff5 100644
--- a/library/cpp/actors/util/rc_buf.h
+++ b/library/cpp/actors/util/rc_buf.h
@@ -679,7 +679,7 @@ class TRcBuf {
case EType::INTERNAL_BACKEND: return wrapper(reinterpret_cast<std::conditional_t<IsConst, const TInternalBackend&, TInternalBackend&>>(value));
case EType::EXTERNAL_BACKEND: return wrapper(reinterpret_cast<std::conditional_t<IsConst, const IContiguousChunk::TPtr&, IContiguousChunk::TPtr&>>(value));
}
- Y_FAIL("Unexpected type# %" PRIu64, static_cast<ui64>(type));
+ Y_ABORT("Unexpected type# %" PRIu64, static_cast<ui64>(type));
}
template<typename TOwner, typename TCallback, bool IsConst = std::is_const_v<TOwner>>
@@ -1039,7 +1039,7 @@ public:
return EResizeResult::NoAlloc;
} else {
if (strategy == EResizeStrategy::FailOnCopy && static_cast<bool>(Backend)) {
- Y_FAIL("Fail on grow");
+ Y_ABORT("Fail on grow");
}
auto newData = TRcBuf::Uninitialized(size + GetSize(), UnsafeHeadroom() > size ? UnsafeHeadroom() - size : 0, UnsafeTailroom());
if (auto data = GetData(); data) {
@@ -1056,7 +1056,7 @@ public:
return EResizeResult::NoAlloc;
} else {
if (strategy == EResizeStrategy::FailOnCopy && static_cast<bool>(Backend)) {
- Y_FAIL("Fail on grow");
+ Y_ABORT("Fail on grow");
}
auto newData = TRcBuf::Uninitialized(size + GetSize(), UnsafeHeadroom(), UnsafeTailroom() > size ? UnsafeTailroom() - size : 0);
if (auto data = GetData(); data) {
diff --git a/library/cpp/actors/util/rope.h b/library/cpp/actors/util/rope.h
index 4487fdc87d..b092d502cd 100644
--- a/library/cpp/actors/util/rope.h
+++ b/library/cpp/actors/util/rope.h
@@ -39,7 +39,7 @@ public:
}
void *operator new(size_t) {
- Y_FAIL();
+ Y_ABORT();
}
void *operator new(size_t, void *ptr) {