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 2006/09/22 09:56:42 UTC
DO NOT REPLY [Bug 40576] New: - mod_mem_cache: signal Floating point exception (8)
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40576>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=40576
Summary: mod_mem_cache: signal Floating point exception (8)
Product: Apache httpd-2
Version: 2.2.2
Platform: Other
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: mod_cache
AssignedTo: bugs@httpd.apache.org
ReportedBy: xuekun.hu@gmail.com
When caching zero byte file with GDSF removal algorithm and 0
MCacheMinObjectSize in mod_mem_cache, Apache will get �[notice] child pid 2230
exit signal Floating point exception (8)�.
Solutions could be
1.
diff -ru httpd-2.2.2/modules/cache/mod_mem_cache.c httpd-
2.2.2.new/modules/cache/mod_mem_cache.c
--- httpd-2.2.2/modules/cache/mod_mem_cache.c 2006-04-22 09:53:06.000000000
+0800
+++ httpd-2.2.2.new/modules/cache/mod_mem_cache.c 2006-09-01
13:12:56.594483296 +0800
@@ -199,7 +199,7 @@
cache_object_t *obj = (cache_object_t *)a;
mem_cache_object_t *mobj = obj->vobj;
- if (mobj->priority == 0)
+ if (mobj->priority == 0 && mobj->m_len != 0)
mobj->priority = queue_clock -
(long)(mobj->total_refs*1000 / mobj->m_len);
2. Or set MCacheMinObjectSize greater than 0
diff -ru httpd-2.2.2/modules/cache/mod_mem_cache.c httpd-
2.2.2.new/modules/cache/mod_mem_cache.c
--- httpd-2.2.2/modules/cache/mod_mem_cache.c 2006-04-22 09:53:06.000000000
+0800
+++ httpd-2.2.2.new/modules/cache/mod_mem_cache.c 2006-09-01
13:49:08.233344008 +0800
@@ -98,7 +98,7 @@
static mem_cache_conf *sconf;
#define DEFAULT_MAX_CACHE_SIZE 100*1024
-#define DEFAULT_MIN_CACHE_OBJECT_SIZE 0
+#define DEFAULT_MIN_CACHE_OBJECT_SIZE 1
#define DEFAULT_MAX_CACHE_OBJECT_SIZE 10000
#define DEFAULT_MAX_OBJECT_CNT 1009
#define DEFAULT_MAX_STREAMING_BUFFER_SIZE 100000
@@ -964,7 +964,8 @@
if (sscanf(arg, "%" APR_SIZE_T_FMT, &val) != 1) {
return "MCacheMinObjectSize value must be an integer (bytes)";
}
- sconf->min_cache_object_size = val;
+ if (val > 0)
+ sconf->min_cache_object_size = val;
return NULL;
}
static const char
Which one is better? Any comments?
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 40576] - mod_mem_cache: signal Floating point exception (8)
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40576>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=40576
------- Additional Comments From rpluem@apache.org 2006-10-30 13:42 -------
>From a first glance 2) seems to be more reasonable to me as I currently cannot
see a reason to cache objects of size 0 :-). Regarding your check of the value
set by MCacheMinObjectSize you should return an error is the value is invalid.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 40576] - mod_mem_cache: signal Floating point exception (8)
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40576>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=40576
rpluem@apache.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |PatchAvailable
------- Additional Comments From rpluem@apache.org 2006-11-01 05:04 -------
Committed to trunk as r469895
(http://svn.apache.org/viewvc?view=rev&rev=469895). Thanks.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 40576] - mod_mem_cache: signal Floating point exception (8)
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40576>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=40576
------- Additional Comments From xuekun.hu@gmail.com 2006-10-30 18:23 -------
(In reply to comment #2)
> From a first glance 2) seems to be more reasonable to me as I currently cannot
> see a reason to cache objects of size 0 :-). Regarding your check of the value
> set by MCacheMinObjectSize you should return an error is the value is invalid.
Thanks for comments. I also think 2) is more reasonable :-)
Based on your comments, I added the error return value.
diff -ru httpd-2.2.2/modules/cache/mod_mem_cache.c httpd-
2.2.2.new/modules/cache/mod_mem_cache.c
--- httpd-2.2.2/modules/cache/mod_mem_cache.c 2006-04-22 09:53:06.000000000
+0800
+++ httpd-2.2.2.new/modules/cache/mod_mem_cache.c 2006-09-01
13:49:08.233344008 +0800
@@ -98,7 +98,7 @@
static mem_cache_conf *sconf;
#define DEFAULT_MAX_CACHE_SIZE 100*1024
-#define DEFAULT_MIN_CACHE_OBJECT_SIZE 0
+#define DEFAULT_MIN_CACHE_OBJECT_SIZE 1
#define DEFAULT_MAX_CACHE_OBJECT_SIZE 10000
#define DEFAULT_MAX_OBJECT_CNT 1009
#define DEFAULT_MAX_STREAMING_BUFFER_SIZE 100000
@@ -964,7 +964,8 @@
if (sscanf(arg, "%" APR_SIZE_T_FMT, &val) != 1) {
return "MCacheMinObjectSize value must be an integer (bytes)";
}
- sconf->min_cache_object_size = val;
+ if (val > 0)
+ sconf->min_cache_object_size = val;
+ else
+ return "MCacheMinObjectSize value must be an positive integer (bytes)";
return NULL;
}
static const char
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 40576] - mod_mem_cache: signal Floating point exception (8)
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40576>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=40576
rpluem@apache.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mdteng@gmail.com
------- Additional Comments From rpluem@apache.org 2007-01-19 14:38 -------
*** Bug 41417 has been marked as a duplicate of this bug. ***
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 40576] - mod_mem_cache: signal Floating point exception (8)
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40576>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=40576
rpluem@apache.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Additional Comments From rpluem@apache.org 2007-09-04 07:41 -------
Backported to 2.2.x as r572628 (http://svn.apache.org/viewvc?rev=572628&view=rev).
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 40576] - mod_mem_cache: signal Floating point exception (8)
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40576>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=40576
------- Additional Comments From rpluem@apache.org 2007-09-02 03:00 -------
Proposed for backport as r571936 (http://svn.apache.org/viewvc?rev=571936&view=rev).
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 40576] - mod_mem_cache: signal Floating point exception (8)
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40576>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=40576
------- Additional Comments From xuekun.hu@gmail.com 2006-10-29 21:26 -------
(In reply to comment #0)
Hi, All
I knew you are all very busy and probaly are busying working on
mod_disk_cache :-)
I really hope someone could give me some comments since I'm a newbie on
learning/reading Apache source code.
Thx, Xuekun
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org