You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2009/10/18 17:35:20 UTC
DO NOT REPLY [Bug 48021] New: File upload broken
https://issues.apache.org/bugzilla/show_bug.cgi?id=48021
Summary: File upload broken
Product: Apache httpd-2
Version: 2.2.14
Platform: PC
OS/Version: Linux
Status: NEW
Severity: regression
Priority: P2
Component: mod_fcgid
AssignedTo: bugs@httpd.apache.org
ReportedBy: sitnikov@gmail.com
Created an attachment (id=24391)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=24391)
test file
If request size exceed FcgidMaxRequestInMem PHP got error: UPLOAD_ERR_PARTIAL
(The uploaded file was only partially uploaded)
--
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@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 48021] File upload broken
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48021
Jeff Trawick <tr...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |iamsoordinary@gmail.com
--- Comment #9 from Jeff Trawick <tr...@apache.org> 2010-01-15 07:21:42 UTC ---
*** Bug 48554 has been marked as a duplicate of this bug. ***
--
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@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 48021] File upload broken
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48021
Jeff Trawick <tr...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #8 from Jeff Trawick <tr...@apache.org> 2009-10-20 03:52:44 UTC ---
This is now fixed for future mod_fcgid 2.3.5.
In the interim:
To make mod_fcgid behave like 2.2 (which ignored the in-memory limit in most
cases), set FcgidMaxRequestInMem higher than your largest request body.
To resolve the regression and at the same time respect FcgidMaxRequestInMem,
apply this patch:
http://svn.apache.org/viewvc/httpd/mod_fcgid/trunk/modules/fcgid/fcgid_bridge.c?r1=826829&r2=826828&pathrev=826829
--
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@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 48021] File upload broken
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48021
--- Comment #1 from Andrew Sitnikov <si...@gmail.com> 2009-10-18 08:36:07 UTC ---
Created an attachment (id=24392)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=24392)
strace while upload test file
--
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@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 48021] File upload broken
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48021
Jeff Trawick <tr...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #24392|application/octet-stream |text/plain
mime type| |
--
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@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 48021] File upload broken
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48021
--- Comment #7 from Jeff Trawick <tr...@apache.org> 2009-10-19 10:40:26 UTC ---
Thanks for the quick feedback.
I found out what was breaking my own test: the request body size has to exceed
FcgidMaxRequestInMem by some variable amount before hitting the truncation bug,
and I wasn't sending enough data to hit it.
The patch is working for my updated testcase as well.
--
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@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 48021] File upload broken
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48021
--- Comment #4 from Andrew Sitnikov <si...@gmail.com> 2009-10-19 09:09:43 UTC ---
Created an attachment (id=24396)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=24396)
httpd strace
--
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@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 48021] File upload broken
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48021
--- Comment #2 from Jeff Trawick <tr...@apache.org> 2009-10-19 08:17:52 UTC ---
Thanks for the report.
I'm not yet able to reproduce, so I have a few more questions:
* Is this a 32-bit or 64-bit build?
* What is your value of FcgidMaxRequestInMem?
* Is it possible to get a trace of the httpd process for the same testcase?
mod_fcgid 2.2 didn't actually respect FcgidMaxRequestInMem except for fairly
low values (< ~8K), so to get the previous behavior you can set
FcgidMaxRequestInMem to a very high value.
--
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@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 48021] File upload broken
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48021
--- Comment #5 from Jeff Trawick <tr...@apache.org> 2009-10-19 10:11:52 UTC ---
Thanks for the new data. The temporary file that holds the part of the request
body in excess of FcgidMaxRequestInMem is getting truncated after the first
buffer of data for this request is getting written there:
19921 open("/tmp/fcgid.tmp.pBN8aH", O_RDWR|O_CREAT|O_EXCL, 0600) = 40
19921 write(40, "pppppppppppppppppppppppppppppppp"..., 1460) = 1460
19921 poll([{fd=39, events=POLLIN, revents=POLLIN}], 1, 120000) = 1
19921 read(39, "PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP"..., 8000) = 1460
19921 ftruncate(40, 0) = 0
19921 write(40, "PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP"..., 1460) = 1460
The fix may be as simple as this:
--- mod_fcgid-2.3.4/modules/fcgid/fcgid_bridge.c.orig 2009-10-19
13:08:15.437700200 -0400
+++ mod_fcgid-2.3.4/modules/fcgid/fcgid_bridge.c 2009-10-19
13:08:55.547050836 -0400
@@ -574,7 +574,9 @@
apr_pool_userdata_set((const void *) fd, fd_key,
apr_pool_cleanup_null,
r->connection->pool);
- } else if (need_truncate) {
+ }
+
+ if (need_truncate) {
need_truncate = 0;
apr_file_trunc(fd, 0);
cur_pos = 0;
Before testing that fix I need to see why my testcase isn't failing with 2.3.4
:(
--
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@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 48021] File upload broken
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48021
Jeff Trawick <tr...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |eric@krausser-edv.de
--- Comment #10 from Jeff Trawick <tr...@apache.org> 2010-01-26 13:46:30 UTC ---
*** Bug 48626 has been marked as a duplicate of this bug. ***
--
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@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 48021] File upload broken
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48021
--- Comment #6 from Andrew Sitnikov <si...@gmail.com> 2009-10-19 10:34:29 UTC ---
> The fix may be as simple as this:
this patch working for me
--
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@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 48021] File upload broken
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48021
Jeff Trawick <tr...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |CLOSED
--
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@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 48021] File upload broken
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48021
--- Comment #3 from Andrew Sitnikov <si...@gmail.com> 2009-10-19 09:07:46 UTC ---
(In reply to comment #2)
> Thanks for the report.
> I'm not yet able to reproduce, so I have a few more questions:
> * Is this a 32-bit or 64-bit build?
test with 32 and 64 bit
> * What is your value of FcgidMaxRequestInMem?
any. i test with defaut (64K), 32K (for test case) and 1M.
if request is large that this value we got broken upload.
> * Is it possible to get a trace of the httpd process for the same testcase?
see new attache.
> mod_fcgid 2.2 didn't actually respect FcgidMaxRequestInMem except for fairly
> low values (< ~8K), so to get the previous behavior you can set
sorry, my mistake. before we use "origin" 2.3.x (not asf)
> FcgidMaxRequestInMem to a very high value.
now, we use this as workaround
--
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@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org