https://issues.apache.org/bugzilla/show_bug.cgi?id=47672
Summary: seg fault from mod_mem_cache
Product: Apache httpd-2
Version: 2.2-HEAD
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Other Modules
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Dan Poirier <[email protected]> 2009-08-10 12:40:14 PDT ---
Created an attachment (id=24124)
Add a per-memcache object lock to protect the cached object pool
I can produce a seg fault out of mod_mem_cache by setting the cache
expiration very short (1 second), then hitting it with bursts of
requests for the same URL every few seconds. The stack looks like:
#0 apr_table_add (t=0x9ee2230, key=0x9f8b630 "ETag", val=0x9f8c1c8
"\"3ee9f6-22-4533a9a40f700\"") at tables/apr_tables.c:792
#1 0xb7e10521 in deep_table_copy (p=<value optimized out>, table=<value
optimized out>) at mod_mem_cache.c:559
#2 0xb7e10a9d in store_headers (h=0x9f8b2e0, r=0x9f8a200, info=0x9f2eed8) at
mod_mem_cache.c:642
#3 0xb806ed7c in cache_save_filter (f=0x9f8b988, in=0x9f8c220) at
mod_cache.c:797
#4 0x0807628b in default_handler (r=0x9f8a200) at core.c:3757
...
This appears to be due to concurrent use of mobj->pool when updating
the stored headers for a stale cached object. Adding a lock per
memory cache object and using it to protect use of mobj->pool, I'm no
longer able to reproduce the problem. Since the lock is per cached
object, there should be little contention for it. (The fault was very
rare in real-world traffic.)
I'm attaching my fix for 2.2.x, since mod_mem_cache is no longer in
trunk.
--
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: [email protected]
For additional commands, e-mail: [email protected]