Closed Bug 714450 Opened 13 years ago Closed 12 years ago

Slow SQL statement recording accesses a hashtable from multiple threads simultaneously causing badness

Categories

(Toolkit :: Telemetry, defect)

12 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla12
Tracking Status
firefox10 --- unaffected
firefox11 + unaffected

People

(Reporter: khuey, Assigned: vladan)

References

Details

(Keywords: assertion, regression)

Attachments

(1 file)

(In reply to Kyle Huey [:khuey] (khuey@mozilla.com) from comment #0)
> http://hg.mozilla.org/mozilla-central/rev/fd47a1e23039#l8.248

Hmm, the mTrackedDBs hash table is a whitelist initialized when Telemetry is initialized and then only ever read afterwards (at least until destruction anyway). Is there an issue with multiple threads reading from an immutable nsTHashtable without synchronization?
As we discussed on IRC, the hashtable needs to be marked as immutable with PL_DHashMarkTableImmutable.  The best way to do this is probably to expose a MarkImmutable() function on nsTHashtable that calls PL_DHashMarkTableImmutable on the underlying table and then call MarkImmutable when you finish setting up the table.
Assignee: nobody → vdjeric
Attachment #586994 - Flags: review?(benjamin) → review+
Target Milestone: --- → mozilla12
https://hg.mozilla.org/mozilla-central/rev/b18d407e2321
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Is the user pain significant enough, and the patch low-risk enough, to land on Beta? If so, please nominate for Beta 11 approval.
The bug that caused this was backed out of 11, so there's nothing to do there.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: