Closed Bug 303003 Opened 20 years ago Closed 18 years ago

ASSERTION: FindEntry() called for a bound entry.: '!binding'

Categories

(Core :: Networking: Cache, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bc, Assigned: syskin2)

Details

(Keywords: assertion)

Attachments

(2 files)

-> default owner
Assignee: darin → nobody
I can't see the assertion with the url's mentioned in comment 0. But I can see the assertion on first load or shift-reload on http://www.lidl.nl/nl/home.nsf/pages/c.o.20060807.index I've attached a backtrace of the assertion, it seems that in this case the assertion is happening while loading an image.
Keywords: assertion
This is because assertion checks if entry is active, but only bases its check on hash. Two cache entries with identical hash can exist (it's handled correctly) but assert will still fire. Steps to reproduce: 1. Visit www.spaceflightnow.com 2. Visit it again or do view->page info Actual results: Assert fires because the following objects have the same hash: http://spaceflightnow.com/news/images/ni0705/070516apollo17_140.jpg http://spaceflightnow.com/news/images/ni0705/070511apollo10_140.jpg Expected results: Assert confirms that entries differ and doesn't fire Quite evil isn't it? I made a patch, attaching....
This is my first mozilla patch ever :) Biesi I ask you for review because you said tonight: 02:27:25 : <biesi> sysKin_away, cache should really not assert :)
Attachment #268079 - Flags: review?(cbiesinger)
I wonder whether we could come up with a better hash setup such that those wouldn't collide. That's got to be a good idea, no? File a followup bug?
Put another way, why are we not using an actual hashtable instead of just finding by hash number?
because we name the actual disk cache files after the hash number, I would assume. I have no idea whether the patch is correct though... you should ask alfredkayser for review instead.
Patch looks ok to me. Indeed hash collisions can happen and are handled (but not in a very strong way). The hash collision problem itself can be addressed in two ways: * switch to the SQL based cache for the diskcache * extend the hash key (it is used as filename, but also stored as a 32bit integer), which has big impact on cache structure.
Comment on attachment 268079 [details] [diff] [review] don't fire wrong assert Great, could you please make it r+ and commit please? :) Risk is none, as it's debug-only.
Attachment #268079 - Flags: review?(cbiesinger) → review?(alfredkayser)
Comment on attachment 268079 [details] [diff] [review] don't fire wrong assert I can r+ plus it, but I don't have checkin access
Attachment #268079 - Flags: review?(alfredkayser) → review+
Whiteboard: [checkin needed]
Doesn't the patch need supperreview?
Assignee: nobody → syskin
I checked this in.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Whiteboard: [checkin needed]
Flags: in-testsuite?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: