On 14.04.2006, at 11:35, Zoran Vasiljevic wrote:
We are funking all over the place. Now I have to
isolate the test which triggers the error. This
will be a long work as I have to disable test per
test, reboot the server (takes long time under purify)
and repeat...
OK. This is the beast:
test cache-6.2 {eval ttl} -body {
ns_cache_eval -ttl 1 -- c1 k1 {return a}
after 1500
ns_cache_eval c1 k1 {return b}
} -cleanup {
ns_cache_flush c1
} -result b
It immediately results in the series of
invalid writes and reads. I will have to
isolate this in detail but here is the
breakdown of Purify:
FMR: Free memory read
This is occurring while in thread 13:
Push [cache.c:903]
Ns_CacheWaitCreateEntry [cache.c:295]
CreateEntry [tclcache.c:686]
NsTclCacheEvalObjCmd [tclcache.c:158]
TclEvalObjvInternal [tclBasic.c:3085]
Tcl_EvalEx [tclBasic.c:3687]
Reading 4 bytes from 0x15c2dd8 in the heap.
Address 0x15c2dd8 is 8 bytes into a freed block at 0x15c2dd0
of 32 bytes.
This block was allocated from thread 13:
malloc [rtlib.o]
TclpAlloc [tclAlloc.c:679]
Tcl_Alloc [tclCkalloc.c:1002]
ns_malloc [memory.c:67]
ns_calloc [memory.c:85]
Ns_CacheWaitCreateEntry [cache.c:260]
There have been 0 frees since this block was freed from thread
13:
free [rtlib.o]
TclpFree [tclAlloc.c:702]
Tcl_Free [tclCkalloc.c:1160]
ns_free [memory.c:74]
Ns_CacheDeleteEntry [cache.c:489]
ExpireEntry [cache.c:937]
FMW: Free memory write
This is occurring while in thread 13:
Push [cache.c:906]
Ns_CacheWaitCreateEntry [cache.c:295]
CreateEntry [tclcache.c:686]
NsTclCacheEvalObjCmd [tclcache.c:158]
TclEvalObjvInternal [tclBasic.c:3085]
Tcl_EvalEx [tclBasic.c:3687]
Writing 4 bytes to 0x15c2dd4 in the heap.
Address 0x15c2dd4 is 4 bytes into a freed block at 0x15c2dd0
of 32 bytes.
This block was allocated from thread 13:
malloc [rtlib.o]
TclpAlloc [tclAlloc.c:679]
Tcl_Alloc [tclCkalloc.c:1002]
ns_malloc [memory.c:67]
ns_calloc [memory.c:85]
Ns_CacheWaitCreateEntry [cache.c:260]
There have been 0 frees since this block was freed from thread
13:
free [rtlib.o]
TclpFree [tclAlloc.c:702]
Tcl_Free [tclCkalloc.c:1160]
ns_free [memory.c:74]
Ns_CacheDeleteEntry [cache.c:489]
ExpireEntry [cache.c:937]
FMR: Free memory read
This is occurring while in thread 13:
Push [cache.c:907]
Ns_CacheWaitCreateEntry [cache.c:295]
CreateEntry [tclcache.c:686]
NsTclCacheEvalObjCmd [tclcache.c:158]
TclEvalObjvInternal [tclBasic.c:3085]
Tcl_EvalEx [tclBasic.c:3687]
Reading 4 bytes from 0x15c2dd8 in the heap.
Address 0x15c2dd8 is 8 bytes into a freed block at 0x15c2dd0
of 32 bytes.
This block was allocated from thread 13:
malloc [rtlib.o]
TclpAlloc [tclAlloc.c:679]
Tcl_Alloc [tclCkalloc.c:1002]
ns_malloc [memory.c:67]
ns_calloc [memory.c:85]
Ns_CacheWaitCreateEntry [cache.c:260]
There have been 0 frees since this block was freed from thread
13:
free [rtlib.o]
TclpFree [tclAlloc.c:702]
Tcl_Free [tclCkalloc.c:1160]
ns_free [memory.c:74]
Ns_CacheDeleteEntry [cache.c:489]
ExpireEntry [cache.c:937]
FMW: Free memory write
This is occurring while in thread 13:
Push [cache.c:907]
Ns_CacheWaitCreateEntry [cache.c:295]
CreateEntry [tclcache.c:686]
NsTclCacheEvalObjCmd [tclcache.c:158]
TclEvalObjvInternal [tclBasic.c:3085]
Tcl_EvalEx [tclBasic.c:3687]
Writing 4 bytes to 0x15c2dd0 in the heap.
Address 0x15c2dd0 is at the beginning of a freed block of 32
bytes.
This block was allocated from thread 13:
malloc [rtlib.o]
TclpAlloc [tclAlloc.c:679]
Tcl_Alloc [tclCkalloc.c:1002]
ns_malloc [memory.c:67]
ns_calloc [memory.c:85]
Ns_CacheWaitCreateEntry [cache.c:260]
There have been 0 frees since this block was freed from thread
13:
free [rtlib.o]
TclpFree [tclAlloc.c:702]
Tcl_Free [tclCkalloc.c:1160]
ns_free [memory.c:74]
Ns_CacheDeleteEntry [cache.c:489]
ExpireEntry [cache.c:937]
FMR: Free memory read
This is occurring while in thread 13:
Push [cache.c:908]
Ns_CacheWaitCreateEntry [cache.c:295]
CreateEntry [tclcache.c:686]
NsTclCacheEvalObjCmd [tclcache.c:158]
TclEvalObjvInternal [tclBasic.c:3085]
Tcl_EvalEx [tclBasic.c:3687]
Reading 4 bytes from 0x15c2dd8 in the heap.
Address 0x15c2dd8 is 8 bytes into a freed block at 0x15c2dd0
of 32 bytes.
This block was allocated from thread 13:
malloc [rtlib.o]
TclpAlloc [tclAlloc.c:679]
Tcl_Alloc [tclCkalloc.c:1002]
ns_malloc [memory.c:67]
ns_calloc [memory.c:85]
Ns_CacheWaitCreateEntry [cache.c:260]
There have been 0 frees since this block was freed from thread
13:
free [rtlib.o]
TclpFree [tclAlloc.c:702]
Tcl_Free [tclCkalloc.c:1160]
ns_free [memory.c:74]
Ns_CacheDeleteEntry [cache.c:489]
ExpireEntry [cache.c:937]
FMR: Free memory read
This is occurring while in thread 13:
Push [cache.c:909]
Ns_CacheWaitCreateEntry [cache.c:295]
CreateEntry [tclcache.c:686]
NsTclCacheEvalObjCmd [tclcache.c:158]
TclEvalObjvInternal [tclBasic.c:3085]
Tcl_EvalEx [tclBasic.c:3687]
Reading 4 bytes from 0x15c2dd8 in the heap.
Address 0x15c2dd8 is 8 bytes into a freed block at 0x15c2dd0
of 32 bytes.
This block was allocated from thread 13:
malloc [rtlib.o]
TclpAlloc [tclAlloc.c:679]
Tcl_Alloc [tclCkalloc.c:1002]
ns_malloc [memory.c:67]
ns_calloc [memory.c:85]
Ns_CacheWaitCreateEntry [cache.c:260]
There have been 0 frees since this block was freed from thread
13:
free [rtlib.o]
TclpFree [tclAlloc.c:702]
Tcl_Free [tclCkalloc.c:1160]
ns_free [memory.c:74]
Ns_CacheDeleteEntry [cache.c:489]
ExpireEntry [cache.c:937]
FMR: Free memory read
This is occurring while in thread 13:
Push [cache.c:910]
Ns_CacheWaitCreateEntry [cache.c:295]
CreateEntry [tclcache.c:686]
NsTclCacheEvalObjCmd [tclcache.c:158]
TclEvalObjvInternal [tclBasic.c:3085]
Tcl_EvalEx [tclBasic.c:3687]
Reading 4 bytes from 0x15c2dd8 in the heap.
Address 0x15c2dd8 is 8 bytes into a freed block at 0x15c2dd0
of 32 bytes.
This block was allocated from thread 13:
malloc [rtlib.o]
TclpAlloc [tclAlloc.c:679]
Tcl_Alloc [tclCkalloc.c:1002]
ns_malloc [memory.c:67]
ns_calloc [memory.c:85]
Ns_CacheWaitCreateEntry [cache.c:260]
There have been 0 frees since this block was freed from thread
13:
free [rtlib.o]
TclpFree [tclAlloc.c:702]
Tcl_Free [tclCkalloc.c:1160]
ns_free [memory.c:74]
Ns_CacheDeleteEntry [cache.c:489]
ExpireEntry [cache.c:937]
FMW: Free memory write
This is occurring while in thread 13:
Push [cache.c:904]
Ns_CacheWaitCreateEntry [cache.c:295]
Ns_CacheCreateEntry [cache.c:244]
NsTclCacheEvalObjCmd [tclcache.c:172]
TclEvalObjvInternal [tclBasic.c:3085]
Tcl_EvalEx [tclBasic.c:3687]
Writing 4 bytes to 0x15c2dd4 in the heap.
Address 0x15c2dd4 is 4 bytes into a freed block at 0x15c2dd0
of 32 bytes.
This block was allocated from thread 13:
malloc [rtlib.o]
TclpAlloc [tclAlloc.c:679]
Tcl_Alloc [tclCkalloc.c:1002]
ns_malloc [memory.c:67]
ns_calloc [memory.c:85]
Ns_CacheWaitCreateEntry [cache.c:260]
There have been 1 frees since this block was freed from thread
13:
free [rtlib.o]
TclpFree [tclAlloc.c:702]
Tcl_Free [tclCkalloc.c:1160]
ns_free [memory.c:74]
Ns_CacheDeleteEntry [cache.c:489]
ExpireEntry [cache.c:937]
FMW: Free memory write
This is occurring while in thread 13:
Delink [cache.c:875]
Ns_CacheDeleteEntry [cache.c:487]
Ns_CacheFlushEntry [cache.c:517]
Ns_CacheFlush [cache.c:548]
NsTclCacheFlushObjCmd [tclcache.c:587]
TclEvalObjvInternal [tclBasic.c:3085]
Writing 4 bytes to 0x15c2dd4 in the heap.
Address 0x15c2dd4 is 4 bytes into a freed block at 0x15c2dd0
of 32 bytes.
This block was allocated from thread 13:
malloc [rtlib.o]
TclpAlloc [tclAlloc.c:679]
Tcl_Alloc [tclCkalloc.c:1002]
ns_malloc [memory.c:67]
ns_calloc [memory.c:85]
Ns_CacheWaitCreateEntry [cache.c:260]
There have been 23 frees since this block was freed from
thread 13:
free [rtlib.o]
TclpFree [tclAlloc.c:702]
Tcl_Free [tclCkalloc.c:1160]
ns_free [memory.c:74]
Ns_CacheDeleteEntry [cache.c:489]
ExpireEntry [cache.c:937]