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

Infinite dot when some spawned thread crash which make indent more than 75 #46

Open
yymone opened this issue Nov 16, 2023 · 1 comment

Comments

@yymone
Copy link

yymone commented Nov 16, 2023

Summary of Bug

I find an issue in my program.
I am trying to spawn thread to run some tasks and the tasks call start_timer and then panic before end_timer. It is normal in my program so I just handle the panic error from thread and try to do other tasks in new spawn threads.
After panic happens some times, my program hang at busy print dot infinitely.

image

Version

Steps to Reproduce

I cannot stable reproduce it but after reviewing the code, I think it is very probably because of the overflow issue when global static INDENT_NUM exceed some number and makes this indent_amount exceed 75 and cause the issue.
https://docs.rs/ark-std/latest/src/ark_std/perf_trace.rs.html#125

After each panic of my spawn thread, I can see more and more dots before Start: and End: logging in my programe and finally if it exceed 75 and the next time when I call a end_timer will trigger the infinitely printing of dot.

@yymone
Copy link
Author

yymone commented Nov 16, 2023

Rerepoduced by codes:
https://github.com/yymone/arkDotBug

run it by release flag:
cargo run --release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant