apr-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 48029] New: httpd-2.2.14 hangs in port_getn
Date Tue, 20 Oct 2009 17:46:41 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=48029

           Summary: httpd-2.2.14 hangs in port_getn
           Product: APR
           Version: 1.3.9
          Platform: Sun
        OS/Version: Solaris
            Status: NEW
          Severity: normal
          Priority: P2
         Component: APR
        AssignedTo: bugs@apr.apache.org
        ReportedBy: httpd.apache@jan-o-sch.net


running httpd on Solaris 10U7, we were facing problems somewhat like the ones
described in bug 47645, at least we saw processes hanging a *long* time in
port_getn once in a while. Although the conversation in that bug looks like
2.2.11 would not be affected, we decided to upgrade - and things are getting
better.

Better meaning the bug is rather easy to reproduce, now. We are using prefork
mpm. What I can reproduce is:
- start a fresh apache instance
- query some cgi

Results:
Some output from the cgi is received slowly, then it suddenly stops. The cgi
seems to have run properly: On the server, the corresponding process has
terminated, and can be seen as "defunct" with ps. Its parent is an httpd
process. pstack on that process shows:
 feef4ce5 portfs   (6, c, 8672428, 2, 1, 8045438)
 fecb0a77 call_port_getn (c, 8672428, 2, 804547c, 11e1a300, 0) + a5
 fecb1335 apr_pollset_poll (86723e8, 11e1a300, 0, 80454d8, 80454dc, 8672800) +
1d5
 081fb58d cgi_bucket_read (8669f70, 8045538, 804553c, 0, 8045520, fefd25eb) +
76
 080b0f86 ap_content_length_filter (866cca8, 8672798, 866bf14, 860c190,
866bf0c, 8669ec0) + bc
[...]

Using solaris' dtrace, we are seeing that the process called port_getn several
times earlier. System calls in chronological order, truncated after
ap_content_length_filter:

[1]
              libc.so.1`_portfs+0x15
              libapr-1.so.0.3.9`apr_pollset_poll+0xe2
              httpd`cgi_bucket_read+0x76
              httpd`ap_content_length_filter+0xbc
              httpd`ap_pass_brigade+0x92
return value: 0

[2]
              libc.so.1`_portfs+0x15
              libapr-1.so.0.3.9`call_port_getn+0xa5
              libapr-1.so.0.3.9`apr_pollset_poll+0x1d5
              httpd`cgi_bucket_read+0x76
              httpd`ap_content_length_filter+0xbc
              httpd`ap_pass_brigade+0x92
return value: 1

[3]
              libc.so.1`_write+0x15
              libapr-1.so.0.3.9`apr_file_write+0x1cc
              libapr-1.so.0.3.9`apr_file_write_full+0x38
              libapr-1.so.0.3.9`apr_file_puts+0x3b
              httpd`log_error_core+0x566
              httpd`ap_log_rerror+0x5b
              httpd`cgi_bucket_read+0x12f
              httpd`ap_content_length_filter+0xbc
              httpd`ap_pass_brigade+0x92
return value: 131
corresponding log entry: (11)Resource temporarily unavailable: poll failed
waiting for CGI child

[4]
              libc.so.1`_writev+0x15
              libapr-1.so.0.3.9`apr_socket_sendv+0x83
              httpd`writev_it_all+0x5d
              httpd`ap_core_output_filter+0xb1a
              httpd`ap_pass_brigade+0x92
return value: 8183
obviously transfers the bit of output that is returned to the client

[5]
              libc.so.1`_portfs+0x15
              libapr-1.so.0.3.9`call_port_getn+0xa5
              libapr-1.so.0.3.9`apr_pollset_poll+0x1d5
              httpd`cgi_bucket_read+0x76
              httpd`ap_content_length_filter+0xbc
              httpd`ap_pass_brigade+0x92
return value: 1

[6]
              libc.so.1`_read+0x15
              libapr-1.so.0.3.9`apr_file_read+0xff
              libapr-1.so.0.3.9`apr_file_gets+0x178
              httpd`log_script_err+0x26
              httpd`cgi_bucket_read+0x1a4
              httpd`ap_content_length_filter+0xbc
              httpd`ap_pass_brigade+0x92
return value: 0
why 0? where has the rest of my cgi output gone?

[7]
              libc.so.1`_portfs+0x15
              libapr-1.so.0.3.9`apr_pollset_remove+0x7b
              httpd`cgi_bucket_read+0x1c4
              httpd`ap_content_length_filter+0xbc
              httpd`ap_pass_brigade+0x92
return value: 0

[8]
              libc.so.1`_portfs+0x15
              libapr-1.so.0.3.9`call_port_getn+0xa5
              libapr-1.so.0.3.9`apr_pollset_poll+0x1d5
              httpd`cgi_bucket_read+0x76
              httpd`ap_content_length_filter+0xbc
              httpd`ap_pass_brigade+0x92
-- hangs for quite a long time

This might also be a mod_cgi bug. However, mod_cgi.c has a timestamp of Jul
2007, and it worked with apr from httpd 2.2.11.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


Mime
View raw message