Closed Bug 1032656 Opened 12 years ago Closed 11 years ago

bzero hang in OfflineAudioContext constructor

Categories

(Core :: Web Audio, defect)

x86_64
macOS
defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla36

People

(Reporter: jruderman, Assigned: padenot)

References

Details

(Keywords: hang, testcase)

Attachments

(4 files)

Attached file testcase
In a debug build or ASan build, this hangs for 5+ seconds. In a nightly build, it doesn't. Weird. What do debug and ASan builds have in common?
Attached file sample-asan.txt
Attached file sample-debug.txt
ASAN and debug build zero memory when allocating, I believe. Release build don't. And ASAN should have some allocation overhead on top of that. This test case allocates a 16GB buffer, and zeroing it takes some time. Nevertheless, we can make it better by allocating the output buffer lazily on the rendering thread instead of doing it on the main thread. Because Jesse's testcase does not call `startRendering`, no memory is even allocated anymore.
Attachment #8510289 - Flags: review?(ehsan.akhgari)
Assignee: nobody → padenot
Status: NEW → ASSIGNED
Comment on attachment 8510289 [details] [diff] [review] Allocate the output buffer for OfflineAudioContext off-main-thread. r= Review of attachment 8510289 [details] [diff] [review]: ----------------------------------------------------------------- ::: content/media/webaudio/AudioDestinationNode.cpp @@ +184,4 @@ > // How many frames the OfflineAudioContext intends to produce. > uint32_t mLength; > float mSampleRate; > + bool mBufferAllocated; A more honest name for this would be mBufferAllocationAttempted, since the allocations are fallible. :-)
Attachment #8510289 - Flags: review?(ehsan.akhgari) → review+
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: