WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
61538
[UNIX] SOCK_DGRAM sockets are not notified when the other end closes the connection
https://bugs.webkit.org/show_bug.cgi?id=61538
Summary
[UNIX] SOCK_DGRAM sockets are not notified when the other end closes the conn...
Carlos Garcia Campos
Reported
2011-05-26 09:10:23 PDT
A possible solution to this problem is to use SOCK_SEQPACKET instead of SOCK_DGRAM, but it's linux-only, see
bug #61287
for more details. So, even if we decice to use SOCK_SEQPACKET when available we still need an implementation when it isn't. The problem of not being notified when the other end closes the connection is that the process might get blocked waiting for a sync reply that will never be received because the other process has closed the connection. This currently happens when the web process sends the DestroyPlugin message to the plugin process and it was the las plugin. In that case the plugin process closes the connection and finishes after a timeout. During that timeout the web process is waiting for the reply to the DestroyPlugin message, and it doesn't wake uo until the plugin process really dies.
Attachments
Patch to use STREAM sockets
(13.22 KB, patch)
2011-05-26 09:16 PDT
,
Carlos Garcia Campos
andersca
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Carlos Garcia Campos
Comment 1
2011-05-26 09:16:05 PDT
Created
attachment 94986
[details]
Patch to use STREAM sockets One of the possible solutions would be simply using STREAM sockets instead of DGRAM sockets when SEQPACKET is not available. The problem is that the code is more complex because we need to handle message boundaries in the receiver, but the same code works for SEQPACKET sockets too.
Anders Carlsson
Comment 2
2011-06-03 11:40:34 PDT
Comment on
attachment 94986
[details]
Patch to use STREAM sockets View in context:
https://bugs.webkit.org/attachment.cgi?id=94986&action=review
> Source/WebKit2/Platform/CoreIPC/unix/ConnectionUnix.cpp:334 > + // Process messages from data received. > + while (processMessage()) { }
I think this reads better as while (true) { if (!processMessage()) break; }
Carlos Garcia Campos
Comment 3
2011-06-06 01:36:06 PDT
Committed
r88147
: <
http://trac.webkit.org/changeset/88147
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug