Bug 115811

Summary: Massive memory growth and hanging
Product: WebKit Reporter: BJ Homer <bjhomer>
Component: Web InspectorAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: barraclough, ggaren, graouts, joepeck, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
URL: http://canvas.instructure.com/login
Attachments:
Description Flags
sysdiagnose output
none
Activity Monitor sample of SafariForWebKitDevelopment Web Content
none
spindump none

Description BJ Homer 2013-05-08 11:34:17 PDT
Created attachment 201086 [details]
sysdiagnose output

I've seen this a few times in the recent nightly builds. Maybe starting 2-3 days ago. I'll have the new Safari Inspector open, and do something like reload a page or type in a new URL. I may have had the timeline recording, but I'm not sure; I don't have consistent repro steps. Anyway, Webkit starts beachballing and gobbling up memory like crazy. I watched it go up to 5.5GB "Real Memory" in Activity Monitor in about 30 seconds.

I ran a sysdiagnose, which took forever. sysdiagnose gave me the following output, which makes me think it missed the spindump stuff. I took a sample of the process in Activity Monitor when it was done, but I'm not sure if it will be relevant. At that point, the process was using <1% CPU, but the web page still hadn't loaded. (It never did, actually. I force-quit the process eventually.)

Gathering time sensitive information
====================================
Running fs_usage, spindump and top
  
/usr/bin/sysdiagnose: line 497: 65767 Terminated: 15          "${SPINDUMP}" ${pid} -file ${data_directory_path}/spindump.txt >> ${tools_output} 2>&1
Done gathering time sensitive information. Proceeding to gather non time sensitive data
=======================================================================================
Running zprint
Running kextstat
Collecting BootCache Statistics
Running netstat
Running lsof
Running pmset diagnostics
Running allmemory. This will take a couple of minutes
Running heap on the process 65187
Running vmmap on the process 65187
Running leaks on the process 65187
Running zprint on the process 65187
Running system profiler
Copying kernel and system logs
Copying spin and crash reports
Running df
Running ioreg
/usr/bin/sysdiagnose: line 265: 66576 Terminated: 15          "${SYSTEM_PROFILER}" ${system_profiler_arguments[0]} -xml >&${data_directory_path}/system_profiler.spx  (wd: ~)
sysdiagnose results written to /var/tmp/sysdiagnose_2013.05.08_10-59-24-MDT_65187.tar.gz

Anyway. Here are the attachments; I hope they will be useful.
Comment 1 BJ Homer 2013-05-08 11:34:55 PDT
Created attachment 201087 [details]
Activity Monitor sample of SafariForWebKitDevelopment Web Content
Comment 2 BJ Homer 2013-05-14 15:39:13 PDT
I found a 100% reproducible test case. All extensions disabled. Running r150075.

Steps to reproduce:
1. Open the nightly build. Go to something boring, like google.com.
2. Open the safari web inspector (Cmd-Opt-I).
3. Go to the timeline tab (Ctrl-2)
4. Go to http://canvas.instructure.com/login

At this point, the process "SafariForWebKitDevelopment Web Content" will start using 100% CPU and eating memory like crazy. I cannot close the tab; I have to quit the process to get things under control.

I ran a spindump while the CPU was going crazy, since my first bug filed failed to include the spindump output. It's attached.

I hope this helps.
Comment 3 BJ Homer 2013-05-14 15:39:34 PDT
Created attachment 201767 [details]
spindump
Comment 4 Radar WebKit Bug Importer 2013-05-16 07:10:34 PDT
<rdar://problem/13911608>
Comment 5 Timothy Hatcher 2013-05-16 08:07:30 PDT
I have a fix, should be in the next couple of nightly builds.