risingwavelabs / risingwave

Best-in-class stream processing, analytics, and management. Perform continuous analytics, or build event-driven applications, real-time ETL pipelines, and feature stores in minutes. Unified streaming and batch. PostgreSQL compatible.
https://go.risingwave.com/slack
Apache License 2.0
6.78k stars 561 forks source link

bug: no sink id or name in RemoteSink's error message #18212

Open fuyufjh opened 3 weeks ago

fuyufjh commented 3 weeks ago

Describe the bug

Lack of sink_id and sink_name in the error message

Error message/log

{
  "timestamp": "2024-08-23T05:51:03.964317686Z",
  "level": "ERROR",
  "fields": {
    "message": "actor exit with error",
    "actor_id": 67856,
    "error": "Executor error: Sink error: Remote sink error: INTERNAL: Error when exec 08S01, message Communications link failure\n\nThe last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.\n\nBacktrace:\n   0: std::backtrace_rs::backtrace::libunwind::trace\n             at ./rustc/4a0cc881dcc4d800f10672747f61a94377ff6662/library/std/src/../../backtrace/src/backtrace/libunwind.rs:105:5\n   1: std::backtrace_rs::backtrace::trace_unsynchronized\n             at ./rustc/4a0cc881dcc4d800f10672747f61a94377ff6662/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5\n   2: std::backtrace::Backtrace::create\n             at ./rustc/4a0cc881dcc4d800f10672747f61a94377ff6662/library/std/src/backtrace.rs:331:13\n   3: anyhow::kind::Adhoc::new\n             at ./root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/anyhow-1.0.86/src/kind.rs:73:36\n   4: risingwave_jni_core::Java_com_risingwave_java_binding_Binding_sendSinkWriterErrorToChannel::{{closure}}\n             at ./risingwave/src/jni_core/src/lib.rs:1145:58\n   5: risingwave_jni_core::execute_and_catch::{{closure}}\n             at ./risingwave/src/jni_core/src/lib.rs:208:59\n   6: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once\n             at ./rustc/4a0cc881dcc4d800f10672747f61a94377ff6662/library/core/src/panic/unwind_safe.rs:272:9\n   7: std::panicking::try::do_call\n             at ./rustc/4a0cc881dcc4d800f10672747f61a94377ff6662/library/std/src/panicking.rs:552:40\n   8: std::panicking::try\n             at ./rustc/4a0cc881dcc4d800f10672747f61a94377ff6662/library/std/src/panicking.rs:516:19\n   9: std::panic::catch_unwind\n             at ./rustc/4a0cc881dcc4d800f10672747f61a94377ff6662/library/std/src/panic.rs:146:14\n  10: risingwave_common::util::panic::rw_catch_unwind::{{closure}}\n             at ./risingwave/src/common/src/util/panic.rs:44:9\n  11: tokio::task::task_local::LocalKey<T>::scope_inner\n             at ./root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/task/task_local.rs:217:19\n  12: tokio::task::task_local::LocalKey<T>::sync_scope\n             at ./root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/task/task_local.rs:173:15\n  13: risingwave_common::util::panic::rw_catch_unwind\n             at ./risingwave/src/common/src/util/panic.rs:42:5\n  14: risingwave_jni_core::execute_and_catch\n             at ./risingwave/src/jni_core/src/lib.rs:208:11\n  15: Java_com_risingwave_java_binding_Binding_sendSinkWriterErrorToChannel\n             at ./risingwave/src/jni_core/src/lib.rs:1140:5\n  16: <unknown>\n\n"
  },
  "target": "risingwave_stream::task::stream_manager",
  "threadName": "rw-streaming"
}

Full logs

To Reproduce

No response

Expected behavior

No response

How did you deploy RisingWave?

No response

The version of RisingWave

No response

Additional context

No response

BugenZhao commented 2 weeks ago

The spans should provide such information if the error is logged within the Sink executor. However, we have exited the spans when it reaches 'actor exit with error'.