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

Vector panicked at 'async fn resumed after completion' #10485

Closed
xdatcloud opened this issue Dec 16, 2021 · 4 comments · Fixed by #10490
Closed

Vector panicked at 'async fn resumed after completion' #10485

xdatcloud opened this issue Dec 16, 2021 · 4 comments · Fixed by #10490
Labels
domain: sinks Anything related to the Vector's sinks sink: loki Anything `loki` sink related type: bug A code related bug.

Comments

@xdatcloud
Copy link
Contributor

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Vector Version

vector 0.18.1 (x86_64-apple-darwin c4adb60 2021-11-30)

Vector Configuration File

Origin Configuration

data_dir = "/tmp"

[api]
enabled = true
address = "127.0.0.1:8686"

[sources.demo_logs]
type = "demo_logs"
format = "shuffle"
lines = ["hello", "world"]

[sinks.demo_logs_to_loki]
type = "loki"
inputs = [
    "demo_logs",
]
endpoint = "<endpoint>"
encoding.codec = "json"
batch.max_events = 10000
tenant_id = "<tenant_id>"
request.rate_limit_duration_secs = 1
request.rate_limit_num = 500

[sinks.demo_logs_to_loki.auth]
user = "<user>"
password = "<password>"
strategy = "basic"

[sinks.demo_logs_to_loki.labels]
host = "{{ host }}"

Configuration After Change (In order to trigger the panic)

data_dir = "/tmp"

[api]
enabled = true
address = "127.0.0.1:8686"

[sources.demo_logs]
type = "demo_logs"
format = "shuffle"
lines = ["hello", "world"]

[sinks.demo_logs_to_loki]
type = "loki"
inputs = [
    "demo_logs",
]
endpoint = "<endpoint>"
encoding.codec = "json"
batch.max_events = 10000
tenant_id = "<tenant_id>"
request.rate_limit_duration_secs = 1
request.rate_limit_num = 400 # this line modified, indeed any changes in config file will probably trigger the panic

[sinks.demo_logs_to_loki.auth]
user = "<user>"
password = "<password>"
strategy = "basic"

[sinks.demo_logs_to_loki.labels]
host = "{{ host }}"

Debug Output

https://gist.github.com/xdatcloud/9af88c2652a283a693b942bf8d99f930

Expected Behavior

Vector keep working.

Actual Behavior

Vector exited due to the panic.

Example Data

Additional Context

Run vector with --watch-config enabled:

RUST_BACKTRACE=full vector -vvv -w true -c panic-test-config.toml

Please try to modify config file several times and the panic will probably occurred.

References

@xdatcloud xdatcloud added the type: bug A code related bug. label Dec 16, 2021
@xdatcloud
Copy link
Contributor Author

xdatcloud commented Dec 16, 2021

I wonder this issue is related to vector_core::stream::driver. I ran the test above with vector built under debug mode, and the backtrace shows 'async fn resumed after completion' probably occurred at: https://gist.github.com/xdatcloud/6424ef6be706b505490fa2754e6626ea#file-vector-output-log-L122-L127

@jszwedko jszwedko added domain: sinks Anything related to the Vector's sinks sink: loki Anything `loki` sink related labels Dec 16, 2021
@xdatcloud
Copy link
Contributor Author

Please leave any information about this issue, I would like to make a hotfix on my local at this weekend, thanks!

@jszwedko
Copy link
Member

Hi @xdatcloud ! Thanks for filing this! We think #10490 will fix it. Would you want to give that a try?

@xdatcloud
Copy link
Contributor Author

Hi @xdatcloud ! Thanks for filing this! We think #10490 will fix it. Would you want to give that a try?

Great! Thanks for this quick fix! I will make a hot patch on my local branch 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: sinks Anything related to the Vector's sinks sink: loki Anything `loki` sink related type: bug A code related bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants