-
Notifications
You must be signed in to change notification settings - Fork 972
Closed
Labels
Description
Code of Conduct
- I agree to follow this project's Code of Conduct
Search before asking
- I have searched in the issues and found no similar issues.
Describe the bug
I added some debug logs and got the below pictures.

We can see kyuubi received a close session request and closed corresponding operation logs. Let say thread A done this work. One log was closed before initialized, so the the OperationLog#close call did not close writer.
kyuubi/kyuubi-common/src/main/scala/org/apache/kyuubi/operation/log/OperationLog.scala
Lines 234 to 235 in 1d6e653
| def close(): Unit = synchronized { | |
| if (!initialized) return |
After that,
OperationLog#write was called by other thread B. Finally, the thread A called SessionManager#deleteOperationLogSessionDir and cause log file leak.
Affects Version(s)
1.7.1 with #5211 patch
Kyuubi Server Log Output
No response
Kyuubi Engine Log Output
No response
Kyuubi Server Configurations
No response
Kyuubi Engine Configurations
No response
Additional context
Maybe we can delete if (!initialized) return to fix it?
Are you willing to submit PR?
- Yes. I would be willing to submit a PR with guidance from the Kyuubi community to fix.
- No. I cannot submit a PR at this time.
bowenliang123