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
290446
[SOUP] WPENetworkProcess crashed on process exit
https://bugs.webkit.org/show_bug.cgi?id=290446
Summary
[SOUP] WPENetworkProcess crashed on process exit
Volodymyr Ogorodnik
Reported
2025-03-26 02:03:15 PDT
Created
attachment 474721
[details]
Collected callstack with process crash. We have collected many reports from customers, that WPENetworkProcess crashed at the exit from browser. Our SW is based on RDK with browser version build from branch wpe-2.38. Full callstack of crashed process is in attachment. It shows the guilty is libcrypto from openssl, but this is rather side effect than the source of problem. Some code analyzis and a couple of tests shows the following. - libcrypto registers a OPENSSL_cleanup() function to be called when process' main() function has ended (see (ossl_init_register_atexit). - OPENSSL_cleanup() clears all data structures , so any call to this library after rather cause issue, like this report. - On another side WPENetworkProcess uses soup library to get data from the network (NetworkProcessMainSoup). - NetworkProcessMainSoup calls platformFinalize() to cleanup on main thread exit. - in turn it calls NetworkSession::destroySession() on every running session, which actually does not destroy the session, just cancels last request in NetworkDataTaskSoup::invalidateAndCancel(). - So the last hope to do something with created Soup session is SoupNetworkSession which totally ignores the duties: SoupNetworkSession::~SoupNetworkSession() = default; So whatever happen later(e.g. network shutdown ) soup session still alive and may react to events. In worst case it can close connection, using separate thread. Thus main thread in meantime could call OPENSSL_cleanup and destroy data that will be used to close connection. Seems the quick and simple solution to cleanup would be to call soup_session_abort() before we close the network process. SoupNetworkSession::~SoupNetworkSession() { soup_session_abort(m_soupSession.get()); } Please check the findings and confirm if the proposed solution is the proper one . Thank you, Volodymyr Ogorodnik.
Attachments
Collected callstack with process crash.
(55.79 KB, text/plain)
2025-03-26 02:03 PDT
,
Volodymyr Ogorodnik
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Przemyslaw Gorszkowski
Comment 1
2025-03-26 02:29:24 PDT
Thanks Volodymyr for your report, but it seems that this issue should be rather reported in
https://github.com/WebPlatformForEmbedded/WPEWebKit/issues
(downstream bugs report), this bugs report system is for upstream issues.
Volodymyr Ogorodnik
Comment 2
2025-03-26 03:03:56 PDT
Indeed I need a fix for 2.38 and will follow there, thanks. But if my findings are correct, the main trunk has the same issue, please confirm or reject the ticket if it is already solved (or not applicable anymore for any other reason). Regards, Volodymyr.
Przemyslaw Gorszkowski
Comment 3
2025-04-22 04:02:18 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/44367
EWS
Comment 4
2025-04-23 02:22:46 PDT
Committed
294000@main
(9c20e69c2119): <
https://commits.webkit.org/294000@main
> Reviewed commits have been landed. Closing PR #44367 and removing active labels.
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