{"action":"created","issue":{"url":"https://api.github.com/repos/netty/netty/issues/8348","repository_url":"https://api.github.com/repos/netty/netty","labels_url":"https://api.github.com/repos/netty/netty/issues/8348/labels{/name}","comments_url":"https://api.github.com/repos/netty/netty/issues/8348/comments","events_url":"https://api.github.com/repos/netty/netty/issues/8348/events","html_url":"https://github.com/netty/netty/issues/8348","id":369037496,"node_id":"MDU6SXNzdWUzNjkwMzc0OTY=","number":8348,"title":"epoll_wait produces an EINVAL error since 4.1.30","user":{"login":"simonbasle","id":6986166,"node_id":"MDQ6VXNlcjY5ODYxNjY=","avatar_url":"https://avatars0.githubusercontent.com/u/6986166?v=4","gravatar_id":"","url":"https://api.github.com/users/simonbasle","html_url":"https://github.com/simonbasle","followers_url":"https://api.github.com/users/simonbasle/followers","following_url":"https://api.github.com/users/simonbasle/following{/other_user}","gists_url":"https://api.github.com/users/simonbasle/gists{/gist_id}","starred_url":"https://api.github.com/users/simonbasle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonbasle/subscriptions","organizations_url":"https://api.github.com/users/simonbasle/orgs","repos_url":"https://api.github.com/users/simonbasle/repos","events_url":"https://api.github.com/users/simonbasle/events{/privacy}","received_events_url":"https://api.github.com/users/simonbasle/received_events","type":"User","site_admin":false},"labels":[{"id":185727,"node_id":"MDU6TGFiZWwxODU3Mjc=","url":"https://api.github.com/repos/netty/netty/labels/defect","name":"defect","color":"e11d21","default":false}],"state":"closed","locked":false,"assignee":{"login":"normanmaurer","id":439362,"node_id":"MDQ6VXNlcjQzOTM2Mg==","avatar_url":"https://avatars3.githubusercontent.com/u/439362?v=4","gravatar_id":"","url":"https://api.github.com/users/normanmaurer","html_url":"https://github.com/normanmaurer","followers_url":"https://api.github.com/users/normanmaurer/followers","following_url":"https://api.github.com/users/normanmaurer/following{/other_user}","gists_url":"https://api.github.com/users/normanmaurer/gists{/gist_id}","starred_url":"https://api.github.com/users/normanmaurer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/normanmaurer/subscriptions","organizations_url":"https://api.github.com/users/normanmaurer/orgs","repos_url":"https://api.github.com/users/normanmaurer/repos","events_url":"https://api.github.com/users/normanmaurer/events{/privacy}","received_events_url":"https://api.github.com/users/normanmaurer/received_events","type":"User","site_admin":false},"assignees":[{"login":"normanmaurer","id":439362,"node_id":"MDQ6VXNlcjQzOTM2Mg==","avatar_url":"https://avatars3.githubusercontent.com/u/439362?v=4","gravatar_id":"","url":"https://api.github.com/users/normanmaurer","html_url":"https://github.com/normanmaurer","followers_url":"https://api.github.com/users/normanmaurer/followers","following_url":"https://api.github.com/users/normanmaurer/following{/other_user}","gists_url":"https://api.github.com/users/normanmaurer/gists{/gist_id}","starred_url":"https://api.github.com/users/normanmaurer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/normanmaurer/subscriptions","organizations_url":"https://api.github.com/users/normanmaurer/orgs","repos_url":"https://api.github.com/users/normanmaurer/repos","events_url":"https://api.github.com/users/normanmaurer/events{/privacy}","received_events_url":"https://api.github.com/users/normanmaurer/received_events","type":"User","site_admin":false},{"login":"carl-mastrangelo","id":8943572,"node_id":"MDQ6VXNlcjg5NDM1NzI=","avatar_url":"https://avatars0.githubusercontent.com/u/8943572?v=4","gravatar_id":"","url":"https://api.github.com/users/carl-mastrangelo","html_url":"https://github.com/carl-mastrangelo","followers_url":"https://api.github.com/users/carl-mastrangelo/followers","following_url":"https://api.github.com/users/carl-mastrangelo/following{/other_user}","gists_url":"https://api.github.com/users/carl-mastrangelo/gists{/gist_id}","starred_url":"https://api.github.com/users/carl-mastrangelo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carl-mastrangelo/subscriptions","organizations_url":"https://api.github.com/users/carl-mastrangelo/orgs","repos_url":"https://api.github.com/users/carl-mastrangelo/repos","events_url":"https://api.github.com/users/carl-mastrangelo/events{/privacy}","received_events_url":"https://api.github.com/users/carl-mastrangelo/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/netty/netty/milestones/193","html_url":"https://github.com/netty/netty/milestone/193","labels_url":"https://api.github.com/repos/netty/netty/milestones/193/labels","id":3686687,"node_id":"MDk6TWlsZXN0b25lMzY4NjY4Nw==","number":193,"title":"4.1.31.Final","description":"","creator":{"login":"normanmaurer","id":439362,"node_id":"MDQ6VXNlcjQzOTM2Mg==","avatar_url":"https://avatars3.githubusercontent.com/u/439362?v=4","gravatar_id":"","url":"https://api.github.com/users/normanmaurer","html_url":"https://github.com/normanmaurer","followers_url":"https://api.github.com/users/normanmaurer/followers","following_url":"https://api.github.com/users/normanmaurer/following{/other_user}","gists_url":"https://api.github.com/users/normanmaurer/gists{/gist_id}","starred_url":"https://api.github.com/users/normanmaurer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/normanmaurer/subscriptions","organizations_url":"https://api.github.com/users/normanmaurer/orgs","repos_url":"https://api.github.com/users/normanmaurer/repos","events_url":"https://api.github.com/users/normanmaurer/events{/privacy}","received_events_url":"https://api.github.com/users/normanmaurer/received_events","type":"User","site_admin":false},"open_issues":56,"closed_issues":35,"state":"open","created_at":"2018-09-25T11:22:27Z","updated_at":"2018-10-19T12:00:13Z","due_on":null,"closed_at":null},"comments":15,"created_at":"2018-10-11T09:43:34Z","updated_at":"2018-10-19T14:54:09Z","closed_at":"2018-10-12T03:02:41Z","author_association":"NONE","body":"### Expected behavior\r\nepoll_wait should work in 4.1.30 like it did in 4.1.29\r\n\r\n### Actual behavior\r\nSince switching to 4.1.30, `EpollEventLoop`'s `handleLoopException` is triggered with \r\n `io.netty.channel.ChannelException: timerfd_settime() failed: Invalid argument`, which points to `timerfd_settime`. This causes an epoll thread to be \"blocked\" sleeping.\r\n\r\nThe issue is visible in a Spring Boot test dealing with bad SSL certificates, which uses reactor/reactor-netty.\r\n\r\nWhile investigating this remotely with limited resources (partial access to the logs and reproduction case, no local linux machine to test on), I found that the 4.1.30 suspiciously contained an issue related to epoll_wait.\r\n\r\nLooking at the PR I think I might have found the regression:\r\n\r\nhttps://github.com/netty/netty/pull/7816/files#diff-db3e069239a403b954e3ebc024ba9507R251\r\n\r\n`Integer.MAX_VALUE` should be `MAX_SCHEDULED_TIMERFD_NS` (`999,999,999`) like it was before the PR, else `timerfd_settime` might return `EINVAL` if it is too large.\r\n\r\n### Steps to reproduce\r\nThe issue is triggered during tests of Spring Boot, but this is a smaller reproduction snippet that is using Spring Framework 5:\r\n\r\n```java\r\n@Test\r\n    public void strippedDown() {\r\n        assertThatExceptionOfType(RuntimeException.class)\r\n                .isThrownBy(() -> WebClient.create().get()\r\n                        .uri(\"https://\" + \"self-signed.badssl.com/\").exchange()\r\n                        .block(Duration.ofSeconds(10)))\r\n                .withCauseInstanceOf(SSLException.class);\r\n    }\r\n```\r\n\r\nI can try to spin up a repository with a maven project that reproduces the issue and can be run without set up if you need.\r\n\r\n### Netty version\r\n4.1.30\r\n\r\n### JVM version (e.g. `java -version`)\r\n??\r\n\r\n### OS version (e.g. `uname -a`)\r\n??"},"comment":{"url":"https://api.github.com/repos/netty/netty/issues/comments/431390766","html_url":"https://github.com/netty/netty/issues/8348#issuecomment-431390766","issue_url":"https://api.github.com/repos/netty/netty/issues/8348","id":431390766,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMTM5MDc2Ng==","user":{"login":"wilkinsona","id":914682,"node_id":"MDQ6VXNlcjkxNDY4Mg==","avatar_url":"https://avatars3.githubusercontent.com/u/914682?v=4","gravatar_id":"","url":"https://api.github.com/users/wilkinsona","html_url":"https://github.com/wilkinsona","followers_url":"https://api.github.com/users/wilkinsona/followers","following_url":"https://api.github.com/users/wilkinsona/following{/other_user}","gists_url":"https://api.github.com/users/wilkinsona/gists{/gist_id}","starred_url":"https://api.github.com/users/wilkinsona/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wilkinsona/subscriptions","organizations_url":"https://api.github.com/users/wilkinsona/orgs","repos_url":"https://api.github.com/users/wilkinsona/repos","events_url":"https://api.github.com/users/wilkinsona/events{/privacy}","received_events_url":"https://api.github.com/users/wilkinsona/received_events","type":"User","site_admin":false},"created_at":"2018-10-19T14:54:09Z","updated_at":"2018-10-19T14:54:09Z","author_association":"CONTRIBUTOR","body":"Ok, I've recreated the `io.netty.channel.ChannelException` with the debugger attached using 4.1.31.Final-SNAPSHOT. When it happens, `EpollEventLoop.epollWait(boolean)` calls `Native.epollWait(FileDescriptor, EpollEventArray, FileDescriptor, int, int)` passing in `-1` for both `timeoutSec` and `timeoutNs`. That points to #7816 again as it introduced the branch that results in `-1` being used."}}
{"actor":{"display_login":"wilkinsona"}}