You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/08/23 19:57:00 UTC
[jira] [Commented] (PROTON-2347) Reactor leaks file handles when an IO Exception is encountered
[ https://issues.apache.org/jira/browse/PROTON-2347?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17583822#comment-17583822 ]
ASF GitHub Bot commented on PROTON-2347:
----------------------------------------
BenD10 opened a new pull request, #43:
URL: https://github.com/apache/qpid-proton-j/pull/43
https://issues.apache.org/jira/browse/PROTON-2347
When an IOException is thrown, the SocketChannel was not properly
cleaned up which caused a file descriptor leak.
To confirm the fix, I used the reproducer available in the above JIRA and monitored open file handles.
Using 0.33.10:
```
ben@ubuntu:~$ date && lsof -p 34755 | wc -l
Tue 23 Aug 2022 03:24:14 PM EDT
60086
ben@ubuntu:~$ date && lsof -p 34755 | wc -l
Tue 23 Aug 2022 03:24:17 PM EDT
85005
ben@ubuntu:~$ date && lsof -p 34755 | wc -l
Tue 23 Aug 2022 03:24:21 PM EDT
116822
ben@ubuntu:~$ date && lsof -p 34755 | wc -l
Tue 23 Aug 2022 03:24:27 PM EDT
155766
ben@ubuntu:~$ date && lsof -p 34755 | wc -l
Tue 23 Aug 2022 03:24:33 PM EDT
209201
ben@ubuntu:~$ date && lsof -p 34755 | wc -l
Tue 23 Aug 2022 03:24:41 PM EDT
275748
```
With the fix on 0.34.0-SNAPSHOT
```
ben@ubuntu:~/git/qpid-proton-j$ date && lsof -p 36940 | wc -l
Tue 23 Aug 2022 03:40:23 PM EDT
44
ben@ubuntu:~/git/qpid-proton-j$ date && lsof -p 36940 | wc -l
Tue 23 Aug 2022 03:40:26 PM EDT
40
ben@ubuntu:~/git/qpid-proton-j$ date && lsof -p 36940 | wc -l
Tue 23 Aug 2022 03:40:32 PM EDT
44
ben@ubuntu:~/git/qpid-proton-j$ date && lsof -p 36940 | wc -l
Tue 23 Aug 2022 03:40:47 PM EDT
44
ben@ubuntu:~/git/qpid-proton-j$ date && lsof -p 36940 | wc -l
Tue 23 Aug 2022 03:40:54 PM EDT
44
ben@ubuntu:~/git/qpid-proton-j$ date && lsof -p 36940 | wc -l
Tue 23 Aug 2022 03:41:01 PM EDT
44
```
> Reactor leaks file handles when an IO Exception is encountered
> --------------------------------------------------------------
>
> Key: PROTON-2347
> URL: https://issues.apache.org/jira/browse/PROTON-2347
> Project: Qpid Proton
> Issue Type: Bug
> Components: proton-j
> Affects Versions: proton-j-0.33.8
> Environment: Windows 10 desktop
> Reporter: Tim Taylor
> Priority: Minor
> Fix For: proton-j-future
>
> Attachments: repro.txt
>
>
> When I try to open a connection using proton-j while my machine doesn't have internet access, I see that proton-j leaks file descriptors. Attached is the sample I wrote that repro's this issue. I'm looking either for guidance on how to handle IOExceptions in the onTransportError callback, or for a confirmation that what I'm doing to handle them is correct, and that there is a bug in proton-j around this scenario.
>
> If you need help viewing the file descriptor count growing over time, the [process explorer tool|https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer] is what I've been using. Running the sample in a loop will make this leak more obvious, but it isn't required to leak the file descriptors. This same bug seems to happen in Linux and MacOS as well.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org