We are seeing this error on Windows Server 2019

Jan 21, 2022 10:30:21 AM org.apache.tomcat.util.net.AprEndpoint setSocketOptions
SEVERE: Error allocating socket processor
java.io.IOException: Duplicate accept detected. This is a known OS bug. Please 
consider reporting that you are affected: 
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1924298
        at 
org.apache.tomcat.util.net.AprEndpoint.setSocketOptions(AprEndpoint.java:811)
        at 
org.apache.tomcat.util.net.AprEndpoint.setSocketOptions(AprEndpoint.java:83)
        at org.apache.tomcat.util.net.Acceptor.run(Acceptor.java:149)
        at java.base/java.lang.Thread.run(Thread.java:829)


Adoptium JDK jdk-11.0.13+8 64bit
Apache Tomcat 9.0.56
tomcat-native-1.2.31
openssl-1.1.1l
apr-1.7.0
apr-util-1.6.1

2022-01-21 09:58:59 Apache Commons Daemon procrun stdout initialized.
Jan 21, 2022 9:59:01 AM org.apache.catalina.core.AprLifecycleListener 
lifecycleEvent
INFO: Loaded Apache Tomcat Native library [1.2.31] using APR version [1.7.0].
Jan 21, 2022 9:59:01 AM org.apache.catalina.core.AprLifecycleListener 
lifecycleEvent
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], 
random [true], UDS [true].
Jan 21, 2022 9:59:01 AM org.apache.catalina.core.AprLifecycleListener 
lifecycleEvent
INFO: APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
Jan 21, 2022 9:59:01 AM org.apache.catalina.core.AprLifecycleListener 
initializeSSL
INFO: OpenSSL successfully initialized [OpenSSL 1.1.1l  24 Aug 2021]
Jan 21, 2022 9:59:01 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-apr-0.0.0.0-xxxxx"]
Jan 21, 2022 9:59:01 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["https-openssl-apr-0.0.0.0-xxxxx"]
Jan 21, 2022 9:59:01 AM org.apache.tomcat.util.net.openssl.OpenSSLUtil 
getKeyManagers
Jan 21, 2022 9:59:01 AM org.apache.catalina.startup.Catalina load
INFO: Server initialization in [667] milliseconds
Jan 21, 2022 9:59:01 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service [Catalina]
Jan 21, 2022 9:59:01 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet engine: [Apache Tomcat/9.0.56]


AND We are seeing the error on Ubuntu 20.04.3 LTS

Jan 21, 2022 8:55:02 AM org.apache.tomcat.util.net.AprEndpoint setSocketOptions
SEVERE: Error allocating socket processor
java.io.IOException: Duplicate accept detected. This is a known OS bug. Please 
consider reporting that you are affected: 
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1924298
        at 
org.apache.tomcat.util.net.AprEndpoint.setSocketOptions(AprEndpoint.java:811)
        at 
org.apache.tomcat.util.net.AprEndpoint.setSocketOptions(AprEndpoint.java:83)
        at org.apache.tomcat.util.net.Acceptor.run(Acceptor.java:149)
        at java.base/java.lang.Thread.run(Thread.java:829)

Jan 21, 2022 7:08:11 AM org.apache.catalina.core.AprLifecycleListener 
lifecycleEvent
INFO: Loaded Apache Tomcat Native library [1.2.31] using APR version [1.7.0].
Jan 21, 2022 7:08:11 AM org.apache.catalina.core.AprLifecycleListener 
lifecycleEvent
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], 
random [true], UDS [true].
Jan 21, 2022 7:08:11 AM org.apache.catalina.core.AprLifecycleListener 
lifecycleEvent
INFO: APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
Jan 21, 2022 7:08:11 AM org.apache.catalina.core.AprLifecycleListener 
initializeSSL
INFO: OpenSSL successfully initialized [OpenSSL 1.1.1l  24 Aug 2021]
Jan 21, 2022 7:08:11 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-apr-0.0.0.0-xxxxx"]
Jan 21, 2022 7:08:11 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["https-openssl-apr-0.0.0.0-xxxxx"]
Jan 21, 2022 7:08:11 AM org.apache.catalina.startup.Catalina load
INFO: Server initialization in [463] milliseconds
Jan 21, 2022 7:08:11 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service [Catalina]
Jan 21, 2022 7:08:11 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet engine: [Apache Tomcat/9.0.56]


We do NOT see this issue logged, by Tomcat, on the same Windows or Linux
O/S versions with

DIFF AdoptOpenJDK 11.0.10+9 64bit
DIFF Apache Tomcat 9.0.43
DIFF tomcat-native-1.2.26
DIFF openssl-1.1.1i
SAME apr-1.7.0
SAME apr-util-1.6.1

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1924298

Title:
  accept returns duplicate endpoints under load

Status in Linux:
  New
Status in linux package in Ubuntu:
  Confirmed

Bug description:
  When accepting client connections under load, duplicate endpoints may
  be returned. These endpoints will have different (usually sequential)
  file descriptors but will refer to the same connection (same server
  IP, same server port, same client IP, same client port). Both copies
  of the endpoint appear to be functional.

  Reproduction requires:
  - compilation of the attached server.c program
  - wrk (https://github.com/wg/wrk) to generate load

  The steps to reproduce are:
  - run 'server' application in one console window
  - run 'for i in {1..50}; do /opt/wrk/wrk -t 2 -c 1000 -d 5s --latency 
--timeout 1s http://localhost:5555/post; done' in a second console window
  - run the same command in a third window to generate concurrent load

  You may need to run additional instance of the wrk command in multiple
  windows to trigger the issue.

  When the problem occurs the server executable will exit and print some 
debugging info. e.g.:
  accerror = 1950892, counter = 10683, port = 59892, clientfd = 233, lastClient 
= 232

  This indicates that the sockets with file descriptors 233 and 232 are
  duplicates.

  The issue has been reproduced on fully patched versions of Ubuntu
  20.04 and 18.04. Other versions have not been tested.

  This issue was originally observed in Java and was reported against the 
Spring Framework:
  https://github.com/spring-projects/spring-framework/issues/26434

  Investigation from the Spring team and the Apache Tomcat team identified that 
it appeared to be a JDK issue:
  https://bugs.openjdk.java.net/browse/JDK-8263243

  Further research from the JDK team determined that the issue was at
  the OS level. Hence this report.

  ProblemType: Bug
  DistroRelease: Ubuntu 20.04
  Package: linux-image-5.4.0-71-generic 5.4.0-71.79
  ProcVersionSignature: Ubuntu 5.4.0-71.79-generic 5.4.101
  Uname: Linux 5.4.0-71-generic x86_64
  NonfreeKernelModules: nvidia_modeset nvidia
  ApportVersion: 2.20.11-0ubuntu27.16
  Architecture: amd64
  CasperMD5CheckResult: skip
  CurrentDesktop: ubuntu:GNOME
  Date: Thu Apr 15 12:52:53 2021
  HibernationDevice: RESUME=UUID=f5a46e09-d99b-4475-8ab6-2cd70da8418d
  InstallationDate: Installed on 2017-02-02 (1532 days ago)
  InstallationMedia: Ubuntu 16.04.1 LTS "Xenial Xerus" - Release amd64 
(20160719)
  IwConfig:
   lo        no wireless extensions.
   
   docker0   no wireless extensions.
   
   eno1      no wireless extensions.
  MachineType: Gigabyte Technology Co., Ltd. Default string
  ProcFB: 0 VESA VGA
  ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-5.4.0-71-generic 
root=/dev/mapper/ubuntu--vg-root ro text
  RelatedPackageVersions:
   linux-restricted-modules-5.4.0-71-generic N/A
   linux-backports-modules-5.4.0-71-generic  N/A
   linux-firmware                            1.187.10
  RfKill:
   
  SourcePackage: linux
  UpgradeStatus: Upgraded to focal on 2020-09-07 (219 days ago)
  dmi.bios.date: 06/13/2016
  dmi.bios.vendor: American Megatrends Inc.
  dmi.bios.version: F22
  dmi.board.asset.tag: Default string
  dmi.board.name: X99-SLI-CF
  dmi.board.vendor: Gigabyte Technology Co., Ltd.
  dmi.board.version: x.x
  dmi.chassis.asset.tag: Default string
  dmi.chassis.type: 3
  dmi.chassis.vendor: Default string
  dmi.chassis.version: Default string
  dmi.modalias: 
dmi:bvnAmericanMegatrendsInc.:bvrF22:bd06/13/2016:svnGigabyteTechnologyCo.,Ltd.:pnDefaultstring:pvrDefaultstring:rvnGigabyteTechnologyCo.,Ltd.:rnX99-SLI-CF:rvrx.x:cvnDefaultstring:ct3:cvrDefaultstring:
  dmi.product.family: Default string
  dmi.product.name: Default string
  dmi.product.sku: Default string
  dmi.product.version: Default string
  dmi.sys.vendor: Gigabyte Technology Co., Ltd.

To manage notifications about this bug go to:
https://bugs.launchpad.net/linux/+bug/1924298/+subscriptions


-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to