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

TCP server source reader: assertion failed: stop_at >= self.start_at #164

Open
laysakura opened this issue May 26, 2022 · 0 comments
Open
Labels
bug Something isn't working

Comments

@laysakura
Copy link
Contributor

Describe the bug

App1 in the online doc causes a panic without any foreign input.

To Reproduce

  1. Write the code in https://springql.github.io/get-started/write-basic-apps#app1-simple-arithmetic-conversion-over-a-stream in main.c.
  2. gcc main.c -lspringql_client -L.
  3. DYLD_LIBRARY_PATH=. ./a.out

Then, the panic below occurs after a few seconds. It is probabilistic bug.

2022-05-26T06:11:56Z ERROR panic] thread 'GenericWorker' panicked at 'assertion failed: stop_at >= self.start_at': /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/springql-core-
0.9.0/src/stream_engine/time/duration/wall_clock_duration/wall_clock_stopwatch.rs:27
       0: backtrace::backtrace::trace_unsynchronized
       1: backtrace::backtrace::trace
       2: backtrace::capture::Backtrace::create
       3: backtrace::capture::Backtrace::new
       4: log_panics::init::{{closure}}
       5: std::panicking::rust_panic_with_hook
       6: std::panicking::begin_panic_handler::{{closure}}
       7: std::sys_common::backtrace::__rust_end_short_backtrace
       8: _rust_begin_unwind
       9: core::panicking::panic_fmt
      10: core::panicking::panic
      11: springql_core::stream_engine::time::duration::wall_clock_duration::wall_clock_stopwatch::WallClockStopwatch::stop
      12: springql_core::stream_engine::autonomous_executor::task::pump_task::PumpTask::run
      13: springql_core::stream_engine::autonomous_executor::task::Task::run
      14: springql_core::stream_engine::autonomous_executor::task_executor::task_worker_thread_handler::TaskWorkerThreadHandler::execute_task_series
      15: springql_core::stream_engine::autonomous_executor::task_executor::task_worker_thread_handler::TaskWorkerThreadHandler::main_loop_cycle
      16: <springql_core::stream_engine::autonomous_executor::task_executor::generic_worker_pool::generic_worker::generic_worker_thread::GenericWorkerThread as springql_core::stream_engine::au
tonomous_executor::worker::worker_thread::WorkerThread>::main_loop_cycle
      17: springql_core::stream_engine::autonomous_executor::worker::worker_thread::WorkerThread::main_loop
      18: springql_core::stream_engine::autonomous_executor::worker::worker_thread::WorkerThread::run::{{closure}}
      19: std::sys_common::backtrace::__rust_begin_short_backtrace
      20: std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}
      21: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
      22: std::panicking::try::do_call
      23: ___rust_try
      24: std::panicking::try
      25: std::panic::catch_unwind
      26: std::thread::Builder::spawn_unchecked_::{{closure}}
      27: core::ops::function::FnOnce::call_once{{vtable.shim}}
      28: std::sys::unix::thread::Thread::new::thread_start
      29: __pthread_deallocate

[2022-05-26T06:11:56Z ERROR panic] thread 'SourceWorker' panicked at 'assertion failed: stop_at >= self.start_at': /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/springql-core-0
.9.0/src/stream_engine/time/duration/wall_clock_duration/wall_clock_stopwatch.rs:27
       0: backtrace::backtrace::trace_unsynchronized
       1: backtrace::backtrace::trace
       2: backtrace::capture::Backtrace::create
       3: backtrace::capture::Backtrace::new
       4: log_panics::init::{{closure}}
       5: std::panicking::rust_panic_with_hook
       6: std::panicking::begin_panic_handler::{{closure}}
       7: std::sys_common::backtrace::__rust_end_short_backtrace
       8: _rust_begin_unwind
       9: core::panicking::panic_fmt
      10: core::panicking::panic
      11: springql_core::stream_engine::time::duration::wall_clock_duration::wall_clock_stopwatch::WallClockStopwatch::stop
      12: springql_core::stream_engine::autonomous_executor::task::source_task::SourceTask::run
      13: springql_core::stream_engine::autonomous_executor::task::Task::run
      14: springql_core::stream_engine::autonomous_executor::task_executor::task_worker_thread_handler::TaskWorkerThreadHandler::execute_task_series
      15: springql_core::stream_engine::autonomous_executor::task_executor::task_worker_thread_handler::TaskWorkerThreadHandler::main_loop_cycle
      16: <springql_core::stream_engine::autonomous_executor::task_executor::source_worker_pool::source_worker::source_worker_thread::SourceWorkerThread as springql_core::stream_engine::autono
mous_executor::worker::worker_thread::WorkerThread>::main_loop_cycle
      17: springql_core::stream_engine::autonomous_executor::worker::worker_thread::WorkerThread::main_loop
      18: springql_core::stream_engine::autonomous_executor::worker::worker_thread::WorkerThread::run::{{closure}}
      19: std::sys_common::backtrace::__rust_begin_short_backtrace
      20: std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}
      21: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
      22: std::panicking::try::do_call
      23: ___rust_try
      24: std::panicking::try
      25: std::panic::catch_unwind
      26: std::thread::Builder::spawn_unchecked_::{{closure}}
      27: core::ops::function::FnOnce::call_once{{vtable.shim}}
      28: std::sys::unix::thread::Thread::new::thread_start
      29: __pthread_deallocate

code snippet

https://springql.github.io/get-started/write-basic-apps#app1-simple-arithmetic-conversion-over-a-stream

Expected behavior

No panic.

Environment

SpringQL

  • SpringQL-client-c: 0.9.0+2

your machine

  • Device: MacBook Pro (M1)

image

Additional context

@laysakura laysakura added the bug Something isn't working label May 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant