Page MenuHomePhabricator

Debug warnings that were recorded with $wgPHPSessionHandling = 'warn' in WMF production
Closed, ResolvedPublic

Description

See T393963

https://logstash.wikimedia.org/goto/411bbb6dacfa60acf57d4ca579a0a7aa

(Warnings which occur on shutdown have been the majority and they're probably unimportant)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
matmarex renamed this task from Debug warnings recorded with $wgPHPSessionHandling = 'warn' in WMF production to Debug warnings that were recorded with $wgPHPSessionHandling = 'warn' in WMF production.Jul 29 2025, 3:14 PM

We've logged warnings between 12 May and 11 June, and these entries in Logstash will expire soon, so it's high time to have a look.

There are a few distinct stack traces, but they all ultimately end in one of SessionManager->shutdown(), SessionBackend->resetId() or SessionBackend->unpersist() calling session_write_close(), which in turn calls PHPSessionHandler->write:

1from /srv/mediawiki/php-1.45.0-wmf.3/includes/debug/MWDebug.php(386)
2#0 [internal function]: MediaWiki\Exception\MWExceptionHandler::handleError(int, string, string, int)
3#1 /srv/mediawiki/php-1.45.0-wmf.3/includes/debug/MWDebug.php(386): trigger_error(string, int)
4#2 /srv/mediawiki/php-1.45.0-wmf.3/includes/debug/MWDebug.php(357): MediaWiki\Debug\MWDebug::sendRawDeprecated(string, bool, string)
5#3 /srv/mediawiki/php-1.45.0-wmf.3/includes/debug/MWDebug.php(238): MediaWiki\Debug\MWDebug::deprecatedMsg(string, string, string, int)
6#4 /srv/mediawiki/php-1.45.0-wmf.3/includes/GlobalFunctions.php(782): MediaWiki\Debug\MWDebug::deprecated(string, string, string, int)
7#5 /srv/mediawiki/php-1.45.0-wmf.3/includes/session/PHPSessionHandler.php(327): wfDeprecated(string, string)
8#6 [internal function]: MediaWiki\Session\PHPSessionHandler->write(string, string)
9#7 /srv/mediawiki/php-1.45.0-wmf.3/includes/session/SessionManager.php(474): session_write_close()
10#8 [internal function]: MediaWiki\Session\SessionManager->shutdown()
11#9 {main}
12
13from /srv/mediawiki/php-1.45.0-wmf.3/includes/debug/MWDebug.php(386)
14#0 [internal function]: MediaWiki\Exception\MWExceptionHandler::handleError(int, string, string, int)
15#1 /srv/mediawiki/php-1.45.0-wmf.3/includes/debug/MWDebug.php(386): trigger_error(string, int)
16#2 /srv/mediawiki/php-1.45.0-wmf.3/includes/debug/MWDebug.php(357): MediaWiki\Debug\MWDebug::sendRawDeprecated(string, bool, string)
17#3 /srv/mediawiki/php-1.45.0-wmf.3/includes/debug/MWDebug.php(238): MediaWiki\Debug\MWDebug::deprecatedMsg(string, string, string, int)
18#4 /srv/mediawiki/php-1.45.0-wmf.3/includes/GlobalFunctions.php(782): MediaWiki\Debug\MWDebug::deprecated(string, string, string, int)
19#5 /srv/mediawiki/php-1.45.0-wmf.3/includes/session/PHPSessionHandler.php(327): wfDeprecated(string, string)
20#6 [internal function]: MediaWiki\Session\PHPSessionHandler->write(string, string)
21#7 /srv/mediawiki/php-1.45.0-wmf.3/includes/session/SessionBackend.php(276): session_write_close()
22#8 /srv/mediawiki/php-1.45.0-wmf.3/includes/session/Session.php(103): MediaWiki\Session\SessionBackend->resetId()
23#9 /srv/mediawiki/php-1.45.0-wmf.3/extensions/CentralAuth/includes/Special/SpecialCentralAutoLogin.php(645): MediaWiki\Session\Session->resetId()
24#10 /srv/mediawiki/php-1.45.0-wmf.3/includes/specialpage/SpecialPage.php(734): MediaWiki\Extension\CentralAuth\Special\SpecialCentralAutoLogin->execute(string)
25#11 /srv/mediawiki/php-1.45.0-wmf.3/includes/specialpage/SpecialPageFactory.php(1738): MediaWiki\SpecialPage\SpecialPage->run(string)
26#12 /srv/mediawiki/php-1.45.0-wmf.3/includes/actions/ActionEntryPoint.php(499): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, MediaWiki\Context\RequestContext)
27#13 /srv/mediawiki/php-1.45.0-wmf.3/includes/actions/ActionEntryPoint.php(143): MediaWiki\Actions\ActionEntryPoint->performRequest()
28#14 /srv/mediawiki/php-1.45.0-wmf.3/includes/MediaWikiEntryPoint.php(198): MediaWiki\Actions\ActionEntryPoint->execute()
29#15 /srv/mediawiki/php-1.45.0-wmf.3/index.php(58): MediaWiki\MediaWikiEntryPoint->run()
30#16 /srv/mediawiki/w/index.php(3): require(string)
31#17 {main}
32
33from /srv/mediawiki/php-1.45.0-wmf.3/includes/debug/MWDebug.php(386)
34#0 [internal function]: MediaWiki\Exception\MWExceptionHandler::handleError(int, string, string, int)
35#1 /srv/mediawiki/php-1.45.0-wmf.3/includes/debug/MWDebug.php(386): trigger_error(string, int)
36#2 /srv/mediawiki/php-1.45.0-wmf.3/includes/debug/MWDebug.php(357): MediaWiki\Debug\MWDebug::sendRawDeprecated(string, bool, string)
37#3 /srv/mediawiki/php-1.45.0-wmf.3/includes/debug/MWDebug.php(238): MediaWiki\Debug\MWDebug::deprecatedMsg(string, string, string, int)
38#4 /srv/mediawiki/php-1.45.0-wmf.3/includes/GlobalFunctions.php(782): MediaWiki\Debug\MWDebug::deprecated(string, string, string, int)
39#5 /srv/mediawiki/php-1.45.0-wmf.3/includes/session/PHPSessionHandler.php(327): wfDeprecated(string, string)
40#6 [internal function]: MediaWiki\Session\PHPSessionHandler->write(string, string)
41#7 /srv/mediawiki/php-1.45.0-wmf.3/includes/session/SessionBackend.php(364): session_write_close()
42#8 /srv/mediawiki/php-1.45.0-wmf.3/includes/session/Session.php(144): MediaWiki\Session\SessionBackend->unpersist()
43#9 /srv/mediawiki/php-1.45.0-wmf.3/includes/user/User.php(2384): MediaWiki\Session\Session->unpersist()
44#10 /srv/mediawiki/php-1.45.0-wmf.3/includes/user/User.php(2358): MediaWiki\User\User->doLogout()
45#11 /srv/mediawiki/php-1.45.0-wmf.3/includes/api/ApiLogout.php(65): MediaWiki\User\User->logout()
46#12 /srv/mediawiki/php-1.45.0-wmf.3/includes/api/ApiMain.php(2010): MediaWiki\Api\ApiLogout->execute()
47#13 /srv/mediawiki/php-1.45.0-wmf.3/includes/api/ApiMain.php(948): MediaWiki\Api\ApiMain->executeAction()
48#14 /srv/mediawiki/php-1.45.0-wmf.3/includes/api/ApiMain.php(919): MediaWiki\Api\ApiMain->executeActionWithErrorHandling()
49#15 /srv/mediawiki/php-1.45.0-wmf.3/includes/api/ApiEntryPoint.php(152): MediaWiki\Api\ApiMain->execute()
50#16 /srv/mediawiki/php-1.45.0-wmf.3/includes/MediaWikiEntryPoint.php(198): MediaWiki\Api\ApiEntryPoint->execute()
51#17 /srv/mediawiki/php-1.45.0-wmf.3/api.php(44): MediaWiki\MediaWikiEntryPoint->run()
52#18 /srv/mediawiki/w/api.php(3): require(string)
53#19 {main}
54
55from /srv/mediawiki/php-1.45.0-wmf.3/includes/debug/MWDebug.php(386)
56#0 [internal function]: MediaWiki\Exception\MWExceptionHandler::handleError(int, string, string, int)
57#1 /srv/mediawiki/php-1.45.0-wmf.3/includes/debug/MWDebug.php(386): trigger_error(string, int)
58#2 /srv/mediawiki/php-1.45.0-wmf.3/includes/debug/MWDebug.php(357): MediaWiki\Debug\MWDebug::sendRawDeprecated(string, bool, string)
59#3 /srv/mediawiki/php-1.45.0-wmf.3/includes/debug/MWDebug.php(238): MediaWiki\Debug\MWDebug::deprecatedMsg(string, string, string, int)
60#4 /srv/mediawiki/php-1.45.0-wmf.3/includes/GlobalFunctions.php(782): MediaWiki\Debug\MWDebug::deprecated(string, string, string, int)
61#5 /srv/mediawiki/php-1.45.0-wmf.3/includes/session/PHPSessionHandler.php(327): wfDeprecated(string, string)
62#6 [internal function]: MediaWiki\Session\PHPSessionHandler->write(string, string)
63#7 /srv/mediawiki/php-1.45.0-wmf.3/includes/session/SessionBackend.php(276): session_write_close()
64#8 /srv/mediawiki/php-1.45.0-wmf.3/includes/session/Session.php(103): MediaWiki\Session\SessionBackend->resetId()
65#9 /srv/mediawiki/php-1.45.0-wmf.3/includes/auth/AuthManager.php(2860): MediaWiki\Session\Session->resetId()
66#10 /srv/mediawiki/php-1.45.0-wmf.3/includes/auth/AuthManager.php(848): MediaWiki\Auth\AuthManager->setSessionDataForUser(MediaWiki\User\User, bool)
67#11 /srv/mediawiki/php-1.45.0-wmf.3/includes/specialpage/AuthManagerSpecialPage.php(410): MediaWiki\Auth\AuthManager->continueAuthentication(array)
68#12 /srv/mediawiki/php-1.45.0-wmf.3/includes/specialpage/AuthManagerSpecialPage.php(542): MediaWiki\SpecialPage\AuthManagerSpecialPage->performAuthenticationStep(string, array)
69#13 /srv/mediawiki/php-1.45.0-wmf.3/includes/htmlform/HTMLForm.php(825): MediaWiki\SpecialPage\AuthManagerSpecialPage->handleFormSubmit(array, MediaWiki\HTMLForm\CodexHTMLForm)
70#14 /srv/mediawiki/php-1.45.0-wmf.3/includes/specialpage/AuthManagerSpecialPage.php(473): MediaWiki\HTMLForm\HTMLForm->trySubmit()
71#15 /srv/mediawiki/php-1.45.0-wmf.3/includes/specialpage/LoginSignupSpecialPage.php(407): MediaWiki\SpecialPage\AuthManagerSpecialPage->trySubmit()
72#16 /srv/mediawiki/php-1.45.0-wmf.3/includes/specialpage/SpecialPage.php(734): MediaWiki\SpecialPage\LoginSignupSpecialPage->execute(null)
73#17 /srv/mediawiki/php-1.45.0-wmf.3/includes/specialpage/SpecialPageFactory.php(1738): MediaWiki\SpecialPage\SpecialPage->run(null)
74#18 /srv/mediawiki/php-1.45.0-wmf.3/includes/actions/ActionEntryPoint.php(499): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, MediaWiki\Context\RequestContext)
75#19 /srv/mediawiki/php-1.45.0-wmf.3/includes/actions/ActionEntryPoint.php(143): MediaWiki\Actions\ActionEntryPoint->performRequest()
76#20 /srv/mediawiki/php-1.45.0-wmf.3/includes/MediaWikiEntryPoint.php(198): MediaWiki\Actions\ActionEntryPoint->execute()
77#21 /srv/mediawiki/php-1.45.0-wmf.3/index.php(58): MediaWiki\MediaWikiEntryPoint->run()
78#22 /srv/mediawiki/w/index.php(3): require(string)
79#23 {main}
80
81from /srv/mediawiki/php-1.45.0-wmf.3/includes/debug/MWDebug.php(386)
82#0 [internal function]: MediaWiki\Exception\MWExceptionHandler::handleError(int, string, string, int)
83#1 /srv/mediawiki/php-1.45.0-wmf.3/includes/debug/MWDebug.php(386): trigger_error(string, int)
84#2 /srv/mediawiki/php-1.45.0-wmf.3/includes/debug/MWDebug.php(357): MediaWiki\Debug\MWDebug::sendRawDeprecated(string, bool, string)
85#3 /srv/mediawiki/php-1.45.0-wmf.3/includes/debug/MWDebug.php(238): MediaWiki\Debug\MWDebug::deprecatedMsg(string, string, string, int)
86#4 /srv/mediawiki/php-1.45.0-wmf.3/includes/GlobalFunctions.php(782): MediaWiki\Debug\MWDebug::deprecated(string, string, string, int)
87#5 /srv/mediawiki/php-1.45.0-wmf.3/includes/session/PHPSessionHandler.php(327): wfDeprecated(string, string)
88#6 [internal function]: MediaWiki\Session\PHPSessionHandler->write(string, string)
89#7 /srv/mediawiki/php-1.45.0-wmf.3/includes/session/SessionBackend.php(276): session_write_close()
90#8 /srv/mediawiki/php-1.45.0-wmf.3/includes/session/Session.php(103): MediaWiki\Session\SessionBackend->resetId()
91#9 /srv/mediawiki/php-1.45.0-wmf.3/includes/auth/AuthManager.php(2860): MediaWiki\Session\Session->resetId()
92#10 /srv/mediawiki/php-1.45.0-wmf.3/includes/auth/AuthManager.php(376): MediaWiki\Auth\AuthManager->setSessionDataForUser(MediaWiki\User\User)
93#11 /srv/mediawiki/php-1.45.0-wmf.3/includes/specialpage/LoginSignupSpecialPage.php(431): MediaWiki\Auth\AuthManager->beginAuthentication(array, string)
94#12 /srv/mediawiki/php-1.45.0-wmf.3/includes/specialpage/SpecialPage.php(734): MediaWiki\SpecialPage\LoginSignupSpecialPage->execute(null)
95#13 /srv/mediawiki/php-1.45.0-wmf.3/includes/specialpage/SpecialPageFactory.php(1738): MediaWiki\SpecialPage\SpecialPage->run(null)
96#14 /srv/mediawiki/php-1.45.0-wmf.3/includes/actions/ActionEntryPoint.php(499): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, MediaWiki\Context\RequestContext)
97#15 /srv/mediawiki/php-1.45.0-wmf.3/includes/actions/ActionEntryPoint.php(143): MediaWiki\Actions\ActionEntryPoint->performRequest()
98#16 /srv/mediawiki/php-1.45.0-wmf.3/includes/MediaWikiEntryPoint.php(198): MediaWiki\Actions\ActionEntryPoint->execute()
99#17 /srv/mediawiki/php-1.45.0-wmf.3/index.php(58): MediaWiki\MediaWikiEntryPoint->run()
100#18 /srv/mediawiki/w/index.php(3): require(string)
101#19 {main}
102
103from /srv/mediawiki/php-1.45.0-wmf.3/includes/debug/MWDebug.php(386)
104#0 [internal function]: MediaWiki\Exception\MWExceptionHandler::handleError(int, string, string, int)
105#1 /srv/mediawiki/php-1.45.0-wmf.3/includes/debug/MWDebug.php(386): trigger_error(string, int)
106#2 /srv/mediawiki/php-1.45.0-wmf.3/includes/debug/MWDebug.php(357): MediaWiki\Debug\MWDebug::sendRawDeprecated(string, bool, string)
107#3 /srv/mediawiki/php-1.45.0-wmf.3/includes/debug/MWDebug.php(238): MediaWiki\Debug\MWDebug::deprecatedMsg(string, string, string, int)
108#4 /srv/mediawiki/php-1.45.0-wmf.3/includes/GlobalFunctions.php(782): MediaWiki\Debug\MWDebug::deprecated(string, string, string, int)
109#5 /srv/mediawiki/php-1.45.0-wmf.3/includes/session/PHPSessionHandler.php(327): wfDeprecated(string, string)
110#6 [internal function]: MediaWiki\Session\PHPSessionHandler->write(string, string)
111#7 /srv/mediawiki/php-1.45.0-wmf.3/includes/session/SessionBackend.php(276): session_write_close()
112#8 /srv/mediawiki/php-1.45.0-wmf.3/includes/session/Session.php(103): MediaWiki\Session\SessionBackend->resetId()
113#9 /srv/mediawiki/php-1.45.0-wmf.3/includes/auth/AuthManager.php(2860): MediaWiki\Session\Session->resetId()
114#10 /srv/mediawiki/php-1.45.0-wmf.3/includes/auth/AuthManager.php(848): MediaWiki\Auth\AuthManager->setSessionDataForUser(MediaWiki\User\User, bool)
115#11 /srv/mediawiki/php-1.45.0-wmf.3/includes/auth/AuthManager.php(431): MediaWiki\Auth\AuthManager->continueAuthentication(array)
116#12 /srv/mediawiki/php-1.45.0-wmf.3/includes/specialpage/AuthManagerSpecialPage.php(408): MediaWiki\Auth\AuthManager->beginAuthentication(array, string)
117#13 /srv/mediawiki/php-1.45.0-wmf.3/includes/specialpage/AuthManagerSpecialPage.php(542): MediaWiki\SpecialPage\AuthManagerSpecialPage->performAuthenticationStep(string, array)
118#14 /srv/mediawiki/php-1.45.0-wmf.3/includes/htmlform/HTMLForm.php(825): MediaWiki\SpecialPage\AuthManagerSpecialPage->handleFormSubmit(array, MediaWiki\HTMLForm\CodexHTMLForm)
119#15 /srv/mediawiki/php-1.45.0-wmf.3/includes/specialpage/AuthManagerSpecialPage.php(473): MediaWiki\HTMLForm\HTMLForm->trySubmit()
120#16 /srv/mediawiki/php-1.45.0-wmf.3/includes/specialpage/LoginSignupSpecialPage.php(407): MediaWiki\SpecialPage\AuthManagerSpecialPage->trySubmit()
121#17 /srv/mediawiki/php-1.45.0-wmf.3/includes/specialpage/SpecialPage.php(734): MediaWiki\SpecialPage\LoginSignupSpecialPage->execute(null)
122#18 /srv/mediawiki/php-1.45.0-wmf.3/includes/specialpage/SpecialPageFactory.php(1738): MediaWiki\SpecialPage\SpecialPage->run(null)
123#19 /srv/mediawiki/php-1.45.0-wmf.3/includes/actions/ActionEntryPoint.php(499): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, MediaWiki\Context\RequestContext)
124#20 /srv/mediawiki/php-1.45.0-wmf.3/includes/actions/ActionEntryPoint.php(143): MediaWiki\Actions\ActionEntryPoint->performRequest()
125#21 /srv/mediawiki/php-1.45.0-wmf.3/includes/MediaWikiEntryPoint.php(198): MediaWiki\Actions\ActionEntryPoint->execute()
126#22 /srv/mediawiki/php-1.45.0-wmf.3/index.php(58): MediaWiki\MediaWikiEntryPoint->run()
127#23 /srv/mediawiki/w/index.php(3): require(string)
128#24 {main}
129
130from /srv/mediawiki/php-1.45.0-wmf.3/includes/debug/MWDebug.php(386)
131#0 [internal function]: MediaWiki\Exception\MWExceptionHandler::handleError(int, string, string, int)
132#1 /srv/mediawiki/php-1.45.0-wmf.3/includes/debug/MWDebug.php(386): trigger_error(string, int)
133#2 /srv/mediawiki/php-1.45.0-wmf.3/includes/debug/MWDebug.php(357): MediaWiki\Debug\MWDebug::sendRawDeprecated(string, bool, string)
134#3 /srv/mediawiki/php-1.45.0-wmf.3/includes/debug/MWDebug.php(238): MediaWiki\Debug\MWDebug::deprecatedMsg(string, string, string, int)
135#4 /srv/mediawiki/php-1.45.0-wmf.3/includes/GlobalFunctions.php(782): MediaWiki\Debug\MWDebug::deprecated(string, string, string, int)
136#5 /srv/mediawiki/php-1.45.0-wmf.3/includes/session/PHPSessionHandler.php(327): wfDeprecated(string, string)
137#6 [internal function]: MediaWiki\Session\PHPSessionHandler->write(string, string)
138#7 /srv/mediawiki/php-1.45.0-wmf.3/includes/session/SessionBackend.php(276): session_write_close()
139#8 /srv/mediawiki/php-1.45.0-wmf.3/includes/session/Session.php(103): MediaWiki\Session\SessionBackend->resetId()
140#9 /srv/mediawiki/php-1.45.0-wmf.3/includes/auth/AuthManager.php(2860): MediaWiki\Session\Session->resetId()
141#10 /srv/mediawiki/php-1.45.0-wmf.3/includes/auth/AuthManager.php(848): MediaWiki\Auth\AuthManager->setSessionDataForUser(MediaWiki\User\User, bool)
142#11 /srv/mediawiki/php-1.45.0-wmf.3/includes/auth/AuthManager.php(431): MediaWiki\Auth\AuthManager->continueAuthentication(array)
143#12 /srv/mediawiki/php-1.45.0-wmf.3/includes/api/ApiClientLogin.php(104): MediaWiki\Auth\AuthManager->beginAuthentication(array, string)
144#13 /srv/mediawiki/php-1.45.0-wmf.3/includes/api/ApiMain.php(2010): MediaWiki\Api\ApiClientLogin->execute()
145#14 /srv/mediawiki/php-1.45.0-wmf.3/includes/api/ApiMain.php(948): MediaWiki\Api\ApiMain->executeAction()
146#15 /srv/mediawiki/php-1.45.0-wmf.3/includes/api/ApiMain.php(919): MediaWiki\Api\ApiMain->executeActionWithErrorHandling()
147#16 /srv/mediawiki/php-1.45.0-wmf.3/includes/api/ApiEntryPoint.php(152): MediaWiki\Api\ApiMain->execute()
148#17 /srv/mediawiki/php-1.45.0-wmf.3/includes/MediaWikiEntryPoint.php(198): MediaWiki\Api\ApiEntryPoint->execute()
149#18 /srv/mediawiki/php-1.45.0-wmf.3/api.php(44): MediaWiki\MediaWikiEntryPoint->run()
150#19 /srv/mediawiki/w/api.php(3): require(string)
151#20 {main}

Unfortunately this does not tell me much, so I just went to read PHPSessionHandler->write very carefully, and I think I found a possible cause: T402602: Storing objects in session data causes unnecessary session writes, and emits spurious warnings with $wgPHPSessionHandling = 'warn'

After that is fixed, we should try setting $wgPHPSessionHandling = 'warn' again and see if we still get any warnings. I'll also improve the logging, so that they will be more useful this time.

Change #1181001 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/core@master] PHPSessionHandler: In warn mode, report the changed keys

https://gerrit.wikimedia.org/r/1181001

Change #1181001 merged by jenkins-bot:

[mediawiki/core@master] PHPSessionHandler: In warn mode, report the changed keys

https://gerrit.wikimedia.org/r/1181001

Change #1181695 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/core@wmf/1.45.0-wmf.15] PHPSessionHandler: In warn mode, report the changed keys

https://gerrit.wikimedia.org/r/1181695

Change #1181695 merged by jenkins-bot:

[mediawiki/core@wmf/1.45.0-wmf.15] PHPSessionHandler: In warn mode, report the changed keys

https://gerrit.wikimedia.org/r/1181695

Mentioned in SAL (#wikimedia-operations) [2025-08-25T13:13:36Z] <lucaswerkmeister-wmde@deploy1003> Started scap sync-world: Backport for [[gerrit:1181695|PHPSessionHandler: In warn mode, report the changed keys (T400668)]], [[gerrit:1181697|Set wgPHPSessionHandling to 'warn' again (T362324)]]

Mentioned in SAL (#wikimedia-operations) [2025-08-25T13:20:04Z] <lucaswerkmeister-wmde@deploy1003> lucaswerkmeister-wmde, matmarex: Backport for [[gerrit:1181695|PHPSessionHandler: In warn mode, report the changed keys (T400668)]], [[gerrit:1181697|Set wgPHPSessionHandling to 'warn' again (T362324)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2025-08-25T13:26:50Z] <lucaswerkmeister-wmde@deploy1003> Finished scap sync-world: Backport for [[gerrit:1181695|PHPSessionHandler: In warn mode, report the changed keys (T400668)]], [[gerrit:1181697|Set wgPHPSessionHandling to 'warn' again (T362324)]] (duration: 13m 14s)

Unfortunately this does not tell me much, so I just went to read PHPSessionHandler->write very carefully, and I think I found a possible cause: T402602: Storing objects in session data causes unnecessary session writes, and emits spurious warnings with $wgPHPSessionHandling = 'warn'

After that is fixed, we should try setting $wgPHPSessionHandling = 'warn' again and see if we still get any warnings. I'll also improve the logging, so that they will be more useful this time.

I did this in the opposite order, so that we can learn more from the logs. All of the improved warnings say Something wrote to $_SESSION['AuthManager::AutoCreateBlacklist']! (https://logstash.wikimedia.org/goto/52a5435c02284314fb7190afb24eb9c4). This is not true (we do not write to $_SESSION), but it does confirm that the problem is with storing objects, since we store StatusValues under the AuthManager::AutoCreateBlacklist key (https://codesearch.wmcloud.org/core/?q=AUTOCREATE_BLOCKLIST). It's also interesting to confirm that this is the only place where storing objects happens (at least in WMF production).