Bug 54365

Summary: Connection closed by server during file transfer
Product: Apache httpd-2 Reporter: Jon Hadfield <hadfieldj>
Component: mpm_eventAssignee: Apache HTTPD Bugs Mailing List <bugs>
Status: NEW ---    
Severity: normal    
Priority: P2    
Version: 2.4.3   
Target Milestone: ---   
Hardware: Sun   
OS: Solaris   

Description Jon Hadfield 2013-01-02 12:15:38 UTC
Apache 2.4.3 - Solaris 10 sparc 64, event-mpm
APR - 1.4.6, APR util 1.4.1

Whilst downloading a file, apache is closing the connection before the transfer is complete. 

Truss output shows this as each connection is closed before the client initiates a retry and a partial response is returned:
17543/1:        read(7, " !", 1)                                = 1
17543/1:        lwp_wait(2, 0xFFFFFFFF7FFFF26C)                 = 0
17543/1:        lwp_kill(67, SIGHUP)                            = 0
17543/67:           Received signal #1, SIGHUP, in port_getn() [caught]
17543/67:             siginfo: SIGHUP pid=17543 uid=4001360 code=-1
17543/67:       port_getn(3, 0x100429558, 64, 1, 0xFFFFFFFF727FBA90) Err#4 EINTR
17543/67:       lwp_sigmask(SIG_SETMASK, 0xFFBEE007, 0x0000FFF7) = 0xFFBFFEFF [0x0000FFFF]
17543/67:       setcontext(0xFFFFFFFF727FB160)
17543/67:       port_dissociate(3, 4, 0x00000006)               = 0
17543/67:       port_dissociate(3, 4, 0x00000005)               = 0
17543/67:       close(6)                                        = 0
17543/67:       close(5)                                        = 0

Symptoms look similar to previous APR related bug: https://issues.apache.org/bugzilla/show_bug.cgi?id=42580

I'm able to reproduce by starting with StartServers 120, ThreadsPerChild 64, then starting a single request to download a large file. As apache clears down the idle threads, the active thread appears to be killed along with the idle ones.
So far unable to reproduce with StartServers 3, ThreadsPerChild 25.