{"id":21680016,"url":"https://github.com/squarespace/netty-http-client-test","last_synced_at":"2025-07-18T04:32:21.163Z","repository":{"id":31235040,"uuid":"34796418","full_name":"Squarespace/netty-http-client-test","owner":"Squarespace","description":null,"archived":false,"fork":false,"pushed_at":"2023-04-08T08:07:12.000Z","size":168,"stargazers_count":1,"open_issues_count":0,"forks_count":4,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-04-14T23:14:59.551Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/netty/netty/issues/3709","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Squarespace.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-29T13:49:09.000Z","updated_at":"2019-07-03T20:48:24.000Z","dependencies_parsed_at":"2022-09-09T03:40:30.231Z","dependency_job_id":null,"html_url":"https://github.com/Squarespace/netty-http-client-test","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Squarespace%2Fnetty-http-client-test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Squarespace%2Fnetty-http-client-test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Squarespace%2Fnetty-http-client-test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Squarespace%2Fnetty-http-client-test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Squarespace","download_url":"https://codeload.github.com/Squarespace/netty-http-client-test/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226349628,"owners_count":17610917,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-25T15:13:59.853Z","updated_at":"2024-11-25T15:14:00.492Z","avatar_url":"https://github.com/Squarespace.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\nContext:\n\nThere appears to be a race condition in Netty 4.1.0-Beta w/ Epoll on Linux and this is a repro of it. \n\n* Client: Netty 4.1.0-Beta5-SNAPSHOT\n* Server: Plain Java ServerSocket and Jetty (you can pick)\n\nFor each request a new connection is being created, the server responds and closes the connection.\n\nExpected: The client consumes the response and closes the connection.\n\nActual: Every other connection gets closed before it consumes the response. Wireshark shows the response on the wire.\n\nSteps to reproduce:\n\n1. Clone this repository\n2. ./run.sh\n\n```\n$ java -version\njava version \"1.8.0_40\"\nJava(TM) SE Runtime Environment (build 1.8.0_40-b25)\nJava HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)\n```\n\n```\n$ uname -a\nLinux xxxxx 3.19.3-1-ARCH #1 SMP PREEMPT Thu Mar 26 14:56:16 CET 2015 x86_64 GNU/Linux\n```\n\n### Init\n\n```\n[main] DEBUG io.netty.channel.MultithreadEventLoopGroup - -Dio.netty.eventLoopThreads: 24\n[main] DEBUG io.netty.util.NetUtil - Loopback interface: lo (lo, 0:0:0:0:0:0:0:1%lo)\n[main] DEBUG io.netty.util.NetUtil - /proc/sys/net/core/somaxconn: 128\n[main] DEBUG io.netty.channel.DefaultChannelId - -Dio.netty.processId: 4675 (auto-detected)\n[main] DEBUG io.netty.channel.DefaultChannelId - -Dio.netty.machineId: 40:6c:8f:ff:fe:b9:25:55 (auto-detected)\n[main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.numHeapArenas: 12\n[main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.numDirectArenas: 12\n[main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.pageSize: 8192\n[main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.maxOrder: 11\n[main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.chunkSize: 16777216\n[main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.tinyCacheSize: 512\n[main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.smallCacheSize: 256\n[main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.normalCacheSize: 64\n[main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.maxCachedBufferCapacity: 32768\n[main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.cacheTrimInterval: 8192\n[main] DEBUG io.netty.buffer.ByteBufUtil - -Dio.netty.allocator.type: pooled\n[main] DEBUG io.netty.buffer.ByteBufUtil - -Dio.netty.threadLocalDirectBufferSize: 65536\n[epollEventLoopGroup-2-1] DEBUG io.netty.util.ResourceLeakDetector - -Dio.netty.leakDetectionLevel: simple\n[main] DEBUG io.netty.util.Recycler - -Dio.netty.recycler.maxCapacity: 262144\n```\n\n### 1st request (success)\n\n```\n[main] TRACE com.squarespace.netty.NettyHttpClient - Sending Request: /jetty-netty-test-0 to [id: 0x16538249, /127.0.0.1:47837 =\u003e /127.0.0.1:8080]\n[Thread-1] TRACE com.squarespace.netty.NettyHttpClient - [PlainServer] Received Request: GET /jetty-netty-test-0 HTTP/1.1 from Socket[addr=/127.0.0.1,port=47837,localport=8080]\n[Thread-1] TRACE com.squarespace.netty.NettyHttpClient - [PlainServer] Sent Response: Socket[addr=/127.0.0.1,port=47837,localport=8080]\n[epollEventLoopGroup-2-1] TRACE com.squarespace.netty.NettyHttpClient - Received Response: ChannelHandlerContext(NettyHttpClient$HttpHandler#0, [id: 0x16538249, /127.0.0.1:47837 =\u003e /127.0.0.1:8080])\n```\n\n### Nth request (failure)\n\n```\n[main] TRACE com.squarespace.netty.NettyHttpClient - Sending Request: /jetty-netty-test-1 to [id: 0x77e01dea, /127.0.0.1:47838 =\u003e /127.0.0.1:8080]\n[Thread-2] TRACE com.squarespace.netty.NettyHttpClient - [PlainServer] Received Request: GET /jetty-netty-test-1 HTTP/1.1 from Socket[addr=/127.0.0.1,port=47838,localport=8080]\n[Thread-2] TRACE com.squarespace.netty.NettyHttpClient - [PlainServer] Sent Response: Socket[addr=/127.0.0.1,port=47838,localport=8080]\n[epollEventLoopGroup-2-2] ERROR com.squarespace.netty.NettyHttpClient - Connection closed without response: ChannelHandlerContext(NettyHttpClient$HttpHandler#0, [id: 0x77e01dea, /127.0.0.1:47838 :\u003e /127.0.0.1:8080])\n```\n\n### Ignore\n\n```\n[Thread-0] TRACE com.squarespace.netty.NettyHttpClient - ServerSocket: Socket closed\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsquarespace%2Fnetty-http-client-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsquarespace%2Fnetty-http-client-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsquarespace%2Fnetty-http-client-test/lists"}