You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by "Flyangz (via GitHub)" <gi...@apache.org> on 2023/12/08 07:37:41 UTC
[I] [Bug] Close KyuubiSession when OperationLog not initialized may lead log file leak [kyuubi]
Flyangz opened a new issue, #5832:
URL: https://github.com/apache/kyuubi/issues/5832
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
### Search before asking
- [X] I have searched in the [issues](https://github.com/apache/kyuubi/issues?q=is%3Aissue) 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.
https://github.com/apache/kyuubi/blob/1d6e65356e6eab6656be6245de89a02e910304ec/kyuubi-common/src/main/scala/org/apache/kyuubi/operation/log/OperationLog.scala#L234-L235
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
### 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?
- [X] 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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
Re: [I] [Bug] Close KyuubiSession when OperationLog not initialized may lead log file leak [kyuubi]
Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 closed issue #5832: [Bug] Close KyuubiSession when OperationLog not initialized may lead log file leak
URL: https://github.com/apache/kyuubi/issues/5832
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
Re: [I] [Bug] Close KyuubiSession when OperationLog not initialized may lead log file leak [kyuubi]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #5832:
URL: https://github.com/apache/kyuubi/issues/5832#issuecomment-1846697134
Hello @Flyangz,
Thanks for finding the time to report the issue!
We really appreciate the community's efforts to improve Apache Kyuubi.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
Re: [I] [Bug] Close KyuubiSession when OperationLog not initialized may lead log file leak [kyuubi]
Posted by "yaooqinn (via GitHub)" <gi...@apache.org>.
yaooqinn commented on issue #5832:
URL: https://github.com/apache/kyuubi/issues/5832#issuecomment-1846799880
Thanks @Flyangz for reporting this issue, also cc @turboFei @pan3793
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
Re: [I] [Bug] Close KyuubiSession when OperationLog not initialized may lead log file leak [kyuubi]
Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on issue #5832:
URL: https://github.com/apache/kyuubi/issues/5832#issuecomment-1855260496
Seems solved by https://github.com/apache/kyuubi/pull/5211
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
Re: [I] [Bug] Close KyuubiSession when OperationLog not initialized may lead log file leak [kyuubi]
Posted by "Flyangz (via GitHub)" <gi...@apache.org>.
Flyangz commented on issue #5832:
URL: https://github.com/apache/kyuubi/issues/5832#issuecomment-1855342476
> Seems solved by #5211
Sorry that I have not mentioned the #5211 had been patched. We applied it when we first discovered the leak, but it didn't work.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org