-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fault logs should not be skipped #15337
Fault logs should not be skipped #15337
Conversation
EWS run on previous version of this PR (hash ca29d61) |
@@ -723,14 +723,30 @@ static void registerLogHook() | |||
if (msg->buffer_sz > 1024) | |||
return; | |||
|
|||
// Skip faults and debug logs in non-internal builds. | |||
if (type == OS_LOG_TYPE_FAULT || type == OS_LOG_TYPE_DEBUG) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh wow, this is an important fix lol
|
||
auto connectionID = WebProcess::singleton().networkProcessConnectionID(); | ||
if (connectionID) | ||
IPC::Connection::send(connectionID, Messages::NetworkConnectionToWebProcess::LogOnBehalfOfWebContent(logChannel.bytesInludingNullTerminator(), logCategory.bytesInludingNullTerminator(), logString, OS_LOG_TYPE_ERROR, getpid()), 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest with still use the dispatch queue but use WorkQueue::dispatchWithQoS() to make the message priority higher. Otherwise, we can end up with out-of-order logging which would be unfortunate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also pass the QoS to IPC::Connection::send() for FAULT messages (already supported).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, good point, will fix!
Thanks for reviewing!
ca29d61
to
eba8117
Compare
EWS run on previous version of this PR (hash eba8117) |
eba8117
to
8528226
Compare
EWS run on previous version of this PR (hash 8528226) |
|
||
// Send fault logs with high priority. If the WebContent process is terminated, we might not be able to send the log in time. | ||
if (type == OS_LOG_TYPE_FAULT) { | ||
type = type == OS_LOG_TYPE_ERROR; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was a typo, fixed in latest patch :)
8528226
to
ddaee3f
Compare
EWS run on current version of this PR (hash ddaee3f) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
https://bugs.webkit.org/show_bug.cgi?id=258577 rdar://111393438 Reviewed by Chris Dumez. Fault logs should not be skipped in the WebContent process, but sent asap to the Networking process. * Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::registerLogHook): Canonical link: https://commits.webkit.org/265558@main
ddaee3f
to
4e7db72
Compare
Committed 265558@main (4e7db72): https://commits.webkit.org/265558@main Reviewed commits have been landed. Closing PR #15337 and removing active labels. |
4e7db72
ddaee3f