Closed Bug 459042 Opened 16 years ago Closed 16 years ago

-memstats (GCStats) other fields can overflow and return large number

Categories

(Tamarin Graveyard :: Garbage Collection (mmGC), defect, P3)

x86
macOS
defect

Tracking

(Not tracked)

VERIFIED FIXED
Future

People

(Reporter: dschaffe, Assigned: tierney)

Details

Attachments

(1 file, 3 obsolete files)

Is this caused by other being a negative number?  Certain tests will show other bytes are being e.g. 3986.4MB

To reproduce
- Enable GCStats=1 in mm.cfg
Run http://asteam/memoryperf/papervision/dof05.swf 
view flashlog.txt searching for 409 or looking for a case where mmgc > private
See the “other” memory at 4095M (~ 4 gb) is erroneous, mmgc should not be > private,
 [mem] ------- gross stats -----
[mem] private 17113 (66.8M) 100%
[mem]     mmgc 17248 (67.4M) 100%
[mem]         unmanaged 14560 (56.9M) 85%
[mem]         managed 1292 (5.0M) 7%
[mem]         free 1321 (5.2M) 7%
[mem]     jit 0 (0K) 0%
[mem]     other 1048441 (4095.5M) 6126%
[mem] bytes (interal fragmentation) 15723 (61.4M) 99%
[mem]     managed bytes  1187 (4.6M) 91%
[mem]     unmanaged bytes  14536 (56.8M) 99%
[mem] -------- gross stats end -----
Flags: flashplayer-triage+
Flags: wanted-flashplayer10+
Flags: flashplayer-qrb?
Open to Erik
Assignee: nobody → tierney
Status: NEW → ASSIGNED
Flags: flashplayer-qrb? → flashplayer-qrb+
Priority: -- → P3
Target Milestone: --- → Future
untouched pages returned by GCHeap won't count in private bytes.  GCHeap should touch every page it returns, there's actually a decent rationale for this which is that you don't want the program to crash later accessing the memory it allocated if real memory is exhausted.  With that in place this problem should go away or more investigation is necessary if that's not it.
Switch mac builds to call vm_protect with set_maximum=true instead of just mprotect.  mprotect was causing the pages to be marked as shared memory, vm_protect does not do that when set_maximum is true.  This was causing private bytes to be under reported as lots of private pages were ending up as shared pages.
Attachment #344667 - Attachment is obsolete: true
Attached patch Try again with new file name. (obsolete) — Splinter Review
Attachment #344668 - Attachment is obsolete: true
Attachment #344670 - Attachment is obsolete: true
Attachment #344906 - Flags: review?(treilly)
Attachment #344906 - Flags: review?(treilly) → review+
Pushed:  http://hg.mozilla.org/tamarin-redux/rev/aa8f4ef5466e
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: