{
"reqId": "5GdOC6Zt2kvmbJIF8JsE",
"level": 3,
"time": "2020-11-13T10:03:21+00:00",
"remoteAddr": "172.19.0.1",
"user": "admin",
"app": "index",
"method": "GET",
"url": "/settings/user",
"message": {
"Exception": "Exception",
"Message": "Call to a member function getFileInfo() on null",
"Code": 0,
"Trace": [
{
"file": "/var/www/nextcloud/lib/private/AppFramework/App.php",
"line": 157,
"function": "dispatch",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->",
"args": [
{
"__class__": "OCA\\Settings\\Controller\\PersonalSettingsController"
},
"index"
]
},
{
"file": "/var/www/nextcloud/lib/private/Route/Router.php",
"line": 309,
"function": "main",
"class": "OC\\AppFramework\\App",
"type": "::",
"args": [
"OCA\\Settings\\Controller\\PersonalSettingsController",
"index",
{
"__class__": "OC\\AppFramework\\DependencyInjection\\DIContainer"
},
{
"section": "personal-info",
"action": null,
"_route": "settings.PersonalSettings.index"
}
]
},
{
"file": "/var/www/nextcloud/lib/base.php",
"line": 1008,
"function": "match",
"class": "OC\\Route\\Router",
"type": "->",
"args": [
"/settings/user"
]
},
{
"file": "/var/www/nextcloud/index.php",
"line": 37,
"function": "handleRequest",
"class": "OC",
"type": "::",
"args": []
}
],
"File": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
"Line": 159,
"Previous": {
"Exception": "Error",
"Message": "Call to a member function getFileInfo() on null",
"Code": 0,
"Trace": [
{
"file": "/var/www/nextcloud/lib/private/legacy/OC_Helper.php",
"line": 488,
"function": "getFileInfo",
"class": "OC\\Files\\Filesystem",
"type": "::",
"args": [
"/",
false
]
},
{
"file": "/var/www/nextcloud/apps/settings/lib/Settings/Personal/PersonalInfo.php",
"line": 108,
"function": "getStorageInfo",
"class": "OC_Helper",
"type": "::",
"args": [
"/"
]
},
{
"file": "/var/www/nextcloud/apps/settings/lib/Controller/CommonSettingsTrait.php",
"line": 137,
"function": "getForm",
"class": "OCA\\Settings\\Settings\\Personal\\PersonalInfo",
"type": "->",
"args": []
},
{
"file": "/var/www/nextcloud/apps/settings/lib/Controller/PersonalSettingsController.php",
"line": 77,
"function": "formatSettings",
"class": "OCA\\Settings\\Controller\\PersonalSettingsController",
"type": "->",
"args": [
{
"10": [
{
"__class__": "OCA\\Settings\\Settings\\Personal\\PersonalInfo"
}
],
"1000": [
{
"__class__": "OCA\\Settings\\Settings\\Personal\\ServerDevNotice"
}
]
}
]
},
{
"file": "/var/www/nextcloud/apps/settings/lib/Controller/CommonSettingsTrait.php",
"line": 148,
"function": "getSettings",
"class": "OCA\\Settings\\Controller\\PersonalSettingsController",
"type": "->",
"args": [
"personal-info"
]
},
{
"file": "/var/www/nextcloud/apps/settings/lib/Controller/PersonalSettingsController.php",
"line": 68,
"function": "getIndexResponse",
"class": "OCA\\Settings\\Controller\\PersonalSettingsController",
"type": "->",
"args": [
"personal",
"personal-info"
]
},
{
"file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
"line": 218,
"function": "index",
"class": "OCA\\Settings\\Controller\\PersonalSettingsController",
"type": "->",
"args": [
"personal-info"
]
},
{
"file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
"line": 127,
"function": "executeController",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->",
"args": [
{
"__class__": "OCA\\Settings\\Controller\\PersonalSettingsController"
},
"index"
]
},
{
"file": "/var/www/nextcloud/lib/private/AppFramework/App.php",
"line": 157,
"function": "dispatch",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->",
"args": [
{
"__class__": "OCA\\Settings\\Controller\\PersonalSettingsController"
},
"index"
]
},
{
"file": "/var/www/nextcloud/lib/private/Route/Router.php",
"line": 309,
"function": "main",
"class": "OC\\AppFramework\\App",
"type": "::",
"args": [
"OCA\\Settings\\Controller\\PersonalSettingsController",
"index",
{
"__class__": "OC\\AppFramework\\DependencyInjection\\DIContainer"
},
{
"section": "personal-info",
"action": null,
"_route": "settings.PersonalSettings.index"
}
]
},
{
"file": "/var/www/nextcloud/lib/base.php",
"line": 1008,
"function": "match",
"class": "OC\\Route\\Router",
"type": "->",
"args": [
"/settings/user"
]
},
{
"file": "/var/www/nextcloud/index.php",
"line": 37,
"function": "handleRequest",
"class": "OC",
"type": "::",
"args": []
}
],
"File": "/var/www/nextcloud/lib/private/Files/Filesystem.php",
"Line": 864
},
"CustomMessage": "--"
},
"userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36",
"version": "21.0.0.7"
}
if (!$rootInfo) {
$rootInfo = \OC\Files\Filesystem::getFileInfo($path, $includeExtStorage ? 'ext' : false);
}
How is that possible @ChristophWurst @rullzer @nickvergessen ?
Flushing memcache fixes it :shrug: Shall I close?
I think I've seen this as well this week. But I'm not sure.
It happened to me twice today as well on newly setup instances.
At first the page could be open and upon second visit it couldn't.
I didn't clean memcache between the resets, I'll add that to my reset script...
yup, calling redis-cli flushall fixed the issue for me as well... (with redis configured)
what...
so redis-cli flushall, then page refresh: page is there.
then the next page refresh it fails again...
there is something fishy in there...
I can reproduce this consistently...
next up: test again with a bare instance, not will all apps
also happening with the "original" apps folder from git with no extras.
seems to be a "classic" issue where the Filesystem global class has its static internal $defaultInstance not yet set...
could be a code order execution
needs further debugging
could be a code order execution
Are you back triggering race conditions again?? :D
could be a code order execution
Are you back triggering race conditions again?? :D
That's my specialty...
I can always reproduce this consistently...
I suspect that in some code paths setupFS() was called but when the cache is used setupFS() is not called, maybe skipped.
Digging further...
It's independent from the session: I logged in as admin in two browsers/sessions.
If I load the settings page in one browser, it displays fine and internally triggers the broken state.
In the second browser the page load is directly broken.
But interestingly if I curl the URL with basic auth it loads fine ?!
But a curl with the session cookie returns the broken page (internal server error).
Independent from the user. If one user "broke it" it's broken for everyone. Ok, so global cache stuff...
I added log statements in Util::setupFS and Filesystem::init (the latter needed to prevent null issue), none of both are called!
So it is possible that PersonalSettings (storage info) only worked so far by pure luck that something else already initialized that bit... won't be the first time... such is static mess!
I think setupFS used to be called for every request, or almost everywhere. Maybe it got "lazy".
Grepping for it makes it appear almost everywhere, like https://github.com/nextcloud/server/blob/master/apps/files/lib/Controller/ViewController.php#L137
The latter is showing that before querying the storage one needs to make sure the FS is setup...
Ok, let's go with that fix then. I've added a setupFS() in PersonalInfo and it works now...
Will push soon
I checked all occurrences of ::getStorageInfo and found that all others had some form of setupFS() run before, so they should be safe. Phew.
a weird similar issue has popped up: https://github.com/nextcloud/server/issues/24482