logreader icon indicating copy to clipboard operation
logreader copied to clipboard

[Bug]: Visiting settings/admin/logging crashes Edge and Firefox

Open Lawkss opened this issue 1 year ago • 8 comments

⚠️ This issue respects the following points: ⚠️

Bug description

Visiting settings/admin/logging crashes Edge and Firefox.

You can scroll up and down a bit then CPU load increases dramatically. The size of the logfile is 26MB.

RAM usage increases by several GB in seconds

and then the browser tab crashes: "Out of Memory"

Screenshot 2024-05-25 193730

Firefox survives sometimes:

Screenshot 2024-05-25 193921

For temporary fix clearing the logfile helps.

Steps to reproduce

  1. Uprade NC 28 to NC 29
  2. Visit Logging page

Expected behavior

No crashes.

Installation method

Community Web installer on a VPS or web space

Nextcloud Server version

29

Operating system

RHEL/CentOS

PHP engine version

PHP 8.3

Web server

Apache (supported)

Database engine version

MariaDB

Is this bug present after an update or on a fresh install?

Upgraded to a MAJOR version (ex. 22 to 23)

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

  • [X] Default user-backend (database)
  • [ ] LDAP/ Active Directory
  • [ ] SSO - SAML
  • [ ] Other

Configuration report

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "vom-bruch.com"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "29.0.1.1",
        "overwrite.cli.url": "https:\/\/vom-bruch.com\/cloud",
        "htaccess.RewriteBase": "\/cloud",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "mail_smtpmode": "smtp",
        "mail_smtpsecure": "ssl",
        "mail_sendmailmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "filelocking.enabled": true,
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "timeout": 0
        },
        "default_phone_region": "AT",
        "simpleSignUpLink.shown": false,
        "app_install_overwrite": [
            "unsplash"
        ],
        "maintenance": false,
        "theme": "",
        "loglevel": 2,
        "maintenance_window_start": 1,
        "updater.release.channel": "stable"

List of activated Apps

Enabled:
  - activity: 2.21.1
  - bruteforcesettings: 2.9.0
  - calendar: 4.7.4
  - circles: 29.0.0-dev
  - cloud_federation_api: 1.12.0
  - comments: 1.19.0
  - contacts: 6.0.0
  - contactsinteraction: 1.10.0
  - dashboard: 7.9.0
  - dav: 1.30.1
  - federatedfilesharing: 1.19.0
  - federation: 1.19.0
  - files: 2.1.0
  - files_downloadlimit: 2.0.0
  - files_pdfviewer: 2.10.0
  - files_reminders: 1.2.0
  - files_sharing: 1.21.0
  - files_trashbin: 1.19.0
  - files_versions: 1.22.0
  - firstrunwizard: 2.18.0
  - logreader: 2.14.0
  - lookup_server_connector: 1.17.0
  - mail: 3.6.1
  - nextcloud_announcements: 1.18.0
  - notes: 4.10.0
  - notifications: 2.17.0
  - oauth2: 1.17.0
  - passman: 2.4.9
  - password_policy: 1.19.0
  - photos: 2.5.0
  - privacy: 1.13.0
  - provisioning_api: 1.19.0
  - recommendations: 2.1.0
  - related_resources: 1.4.0
  - richdocuments: 8.4.2
  - richdocumentscode: 24.4.201
  - serverinfo: 1.19.0
  - settings: 1.12.0
  - sharebymail: 1.19.0
  - spreed: 19.0.1
  - support: 1.12.0
  - survey_client: 1.17.0
  - suspicious_login: 7.0.0
  - systemtags: 1.19.0
  - text: 3.10.0
  - theming: 2.4.0
  - twofactor_backupcodes: 1.18.0
  - twofactor_totp: 11.0.0-dev
  - updatenotification: 1.19.1
  - user_status: 1.9.0
  - viewer: 2.3.0
  - weather_status: 1.9.0
  - workflowengine: 2.11.0
Disabled:
  - admin_audit: 1.19.0
  - encryption: 2.17.0
  - files_external: 1.21.0
  - user_ldap: 1.20.0

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

No response

Additional info

No response

Lawkss avatar May 25 '24 17:05 Lawkss

this is still happening in 29.0.3

just visiting logging page will immediately ramp up CPU fan and load.

Lawkss avatar Jul 06 '24 19:07 Lawkss

The freezing/crashing does not happen to me any longer, since the update to 29.0.4. Can someone cross-check? The details of an entry not showing up, see #1275, however, still happens.

LM-vb avatar Jul 23 '24 11:07 LM-vb

It is still happening with NC 29.0.4 on FF on my side...

Ornanovitch avatar Jul 23 '24 14:07 Ornanovitch

No freezes on Chrome (127.0.6533.73), Firefox (128.0) or Safari on my side. That's weird.

LM-vb avatar Jul 24 '24 08:07 LM-vb

FWIW, this has been a problem for me on two different NC installations: AIO on Debian; straight install on Ubuntu. And its been happening at least since 29.0.3 and possibly before (currently: the AIO is 29.0.4 and the other is 29.0.6). I've mostly tested with Firefox 115.14.0esr and a little chrome 128.0.6613.119. The tab will freezes up either immediately or after some use, and sometimes the whole window freezes. On occasions parts of the window are clickable and parts are not, even outside of the tab. In my case, I have access to the log files so this is less of a priority. But looking at logs in the browser is just darkly ironic.

baermb avatar Sep 05 '24 16:09 baermb

I tried to analyze this problem a bit more today, and I maybe have a clue. It doesn't freeze systematically, but when it does, this is because the poll?lastReqId request asks for way too much entries (hundreds), eating all my memory. It doesn't wait for me to scroll and to limit the entries with log?offset=50&query=

Ornanovitch avatar Sep 13 '24 09:09 Ornanovitch

I am experiencing the same bug. As usual, it appears to be nextcloud making some kind of enormous memory allocation.

This has been happening since at least (from memory NC26, and persists in the current version (29.0.7 at the time of writing).

The logging page (when it has worked) has always been incredibly slow and prone to crashing my browser (often taking down my entire laptop - I'm not rich and havent got much RAM.)

In spite of being lowish on RAM, No other website I browse is this abysmally sluggish, and I can normally have over 50 tabs open on the machine on various sites.

spyro1248 avatar Sep 22 '24 17:09 spyro1248

i experienced the same problem, restart apache2.service make off the problem, but reappear between 2-3 minutes after restarting

WadohS avatar Oct 01 '24 12:10 WadohS

still happening in nextcloud 30.0.1 RC1

Lawkss avatar Oct 04 '24 23:10 Lawkss

I tried to analyze this problem a bit more today, and I maybe have a clue. It doesn't freeze systematically, but when it does, this is because the poll?lastReqId request asks for way too much entries (hundreds), eating all my memory. It doesn't wait for me to scroll and to limit the entries with log?offset=50&query=

Is your system generating lots of new log entries every second? Are the in-browser Log reader settings set to Debug perhaps?

The poll query only asks for new queries since the last ReqId the front-end knows about. It'll poll every 10s, but the lastReqId=xxx value shouldn't change unless there have been new entries. And the entries within the response should be minimal since, at most, they'd cover a 10s period.

Those reporting this matter:

  • What are your Log reader settings? Specifically:
    • Filters
    • Log level (note: it's possible for this to be a different number than you see in your config.php)
    • Time format
    • Live view
  • How many new log entries are you seeing your log file typically over a one minute period?

Also, in case of interactions with browser extensions, try reproducing with extensions off (and maybe in private browsing mode) just to see if it changes behavior.

joshtrichards avatar Oct 05 '24 11:10 joshtrichards

Thanks @joshtrichards

My log reader settings is set on the Warning level as well as the filters (Warning, Error, Fatal). The local time format is checked as well as the live view.I don't have a lot of entries over a one minute period, sometime only 2 or 3! As I said, the reader doesn't freeze systematically, but when it does it doesn't looks like a number of entries problem

Ornanovitch avatar Oct 05 '24 12:10 Ornanovitch

Reproduced, though I'm not sure how/what precisely triggers it at the moment. It more sort of just... started happening.

joshtrichards avatar Oct 05 '24 13:10 joshtrichards

I am not generating that many entries. Sometimes non per day. It also doesnt want to display the details of log entries.

for me it always freezes almost immediately. I dont know what you mean by time format I use 24h clock system

I really hope it can be debugged.

Lawkss avatar Oct 05 '24 22:10 Lawkss

Because of the above thread, I took another look at logging on two instances (AIO docker NC 29.0.4 and a stand alone NC 29.07). If I turn off Live-view/Polling in Log reader's settings, both of them seem to function without an issue. If I turn it back on again, the window freezes. From the hand full of attempts I did, I generally needed to get into the Logging settings dialog and turn the Live-view setting off fairly quickly, before the window froze. And even after that, that window would freeze and I'd need to open a new window and go to NC's Logging again. If I successfully turned polling off, the logging screen then didn't cause any issues for me (unless I was foolish enough to turn Live-view back on to test it anyway :) ).

baermb avatar Oct 07 '24 21:10 baermb

Same here, turning on live view causes a run away thread and freezes tab. Turning it off resolves the crash.

denppa avatar Oct 17 '24 03:10 denppa

Seems fixed for me in 30.0.1 stable branch.

Lawkss avatar Oct 17 '24 21:10 Lawkss

Waiting for the docker images to update, currently using NC30.0.0. Will report back once the release is made.

denppa avatar Oct 18 '24 01:10 denppa

the crashes are now happening again. No idea why it worked for a brief while.

Lawkss avatar Oct 19 '24 12:10 Lawkss

Perhaps we need to introduce a delay in the live view polling.

joshtrichards avatar Oct 25 '24 14:10 joshtrichards

Still there in 30.0.2

Tested with Chrome and Firefox

punxxx-me avatar Nov 08 '24 12:11 punxxx-me

Still happens in 30.0.3 but not so fast as previous. I thought it was fixed, but no luck.

Cees2439867 avatar Dec 06 '24 11:12 Cees2439867

Still happens in 30.0.3

Lawkss avatar Dec 07 '24 13:12 Lawkss

Edge crashes almost immediately : RESULT_CODE_HUNG on 30.0.4.

I am sorry, I am not a developer, I don't understand the problem or its complexity on why this is still a thing since May 2024.

Lawkss avatar Dec 14 '24 22:12 Lawkss

This is still happening on Chrome, Edge and Firefox for me as well, currently on Nextcloud 30.0.3. I noted a semi related ticket here which relates to Nextcloud implementing Vue, to remedy the issue but it still does not seem to have fixed the issue over all.

panzerscope avatar Dec 16 '24 17:12 panzerscope

Tested today and still crashing using 30.0.4

freeDom- avatar Dec 16 '24 22:12 freeDom-

I confirm that the issue still exists. You demand log for each issue reporting and it is impossible to get that log. The tab becomes unresponsive. After a while, Opera displayes "Out of memory".

piiskop avatar Dec 24 '24 18:12 piiskop

I recently migrated from an old EOL server where I could not get an upgrade to work. After the migration, I was able to upgrade several releases to get to a current 30.0.4. I can confirm the logging issue is still a problem. Browser offers warning that the page is slowing down browser with an option to stop processing. All locks until opting to stop the page.

Running on Ubuntu 20.04 CPU: Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz (8 threads) Memory: 15.57 GB PHP 8.2.27 mysql 10.11.8

ace4love avatar Dec 30 '24 15:12 ace4love

Still happening in 30.0.5, each time i visit the logging page the tab is crashing and the whole server is becoming unresponsive for two minutes or so. Here are the response time from my uptime kuma : The two spikes are the two times i tried visiting the logging page Image

florent4014 avatar Jan 19 '25 10:01 florent4014

Still an issue for me with slighly different behaviour. I can visit the logging page on Firefox but sometimes the tab freezes. Only closing it will help. I cannot see a significant increase in CPU loads neither on my server host nor on the computer I'm accessing Nextcloud. I'm on Nextcloud Hub 9 (30.0.5)

comk22 avatar Feb 02 '25 15:02 comk22

yes, still an issue here too

Nextcloud Hub 9 (30.0.5)

Heart1010 avatar Feb 04 '25 15:02 Heart1010