[Webkit-unassigned] [Bug 51474] [Qt][WK2] WebProcess does not clean up on termination

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 3 04:42:55 PST 2011


--- Comment #11 from Balazs Kelemen <kbalazs at webkit.org>  2011-01-03 04:42:55 PST ---
(In reply to comment #8)

Sorry for the long delay, I was on my vacation.

> As for fixing the existing bugs caused by implementing the crashhandler in the first place, i think this patch is good in general.
> Rest is feedback on the crash handler, sorry about this..
> However, I think the whole approach here is maybe not that wise. 
> IMO the best fix would be to remove the whole crashhandler and have following contract for all the IPC and SHM files:
> 1. Web process creates them and sends the filename to UI process
> 2. UI process opens the file and deletes it
> 3. Web process would delete the file in its object destructors in case ui process didn't delete it. 

But we should assure that those destructors will be executed. By terminating the web process with SIGKILL that's not the case.
Furthermore, SHM segments must be released on both side unless the system won't free it up (that is the case on Unix).

> 3) Deletes files in crash handler. The file names exist in the memory space of crashed process. In other words, those filenames can contain whatever valuable filename, like my $HOME/.emacs, due to some stack/heap smashing bug. When coding properly, I don't actually think there's much that you are allowed to do in signal handlers. For one, I wouldn't call any Qt functions.- 

Of course crash handling is nasty. The main purpose of doing that was to save the bots from being full of stale files and shm segments in
the case when trunk is in a crashing state for a while. This is not that important however since a production release should be stable enough
to not suffering from this. However, at least on normal termination those staling stuff should be cleaned.

> 4) One of the main features of WebKit is that it is fast to kill the process. Now you are again introducing code that will swap in random pages of memory during exit.

That's true but how could we do any cleaning without that? I know this is a policy but I do not think that it is a main feature :)

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list