logreader icon indicating copy to clipboard operation
logreader copied to clipboard

Logging stuck + 100% CPU after unchecking all filters

Open ltguillaume opened this issue 4 years ago • 4 comments

Steps to reproduce

  1. Enter Settings -> Logging
  2. Uncheck all filters
  3. Try to refresh or return to Logging after loading another page

Expected behaviour

An empty log, from which you can re-check the desired filter items.

Actual behaviour

An empty Logging tab with only a spinner. The PHP thread gets completely stuck, draining 100% of the CPU core indefinitely.

Server configuration

Operating system: Arch Linux ARM on Raspberry Pi 4 Web server: nginx 1.16.1 Database: mariadb 10.4.12 PHP version: php(-fpm) 7.4.3 Nextcloud version: (see Nextcloud admin page) Nextcloud 18.0.1 Updated from an older Nextcloud/ownCloud or fresh install: updated from 18.0.0 (but never tried this with previous versions!) Where did you install Nextcloud from: pacman Signing status:

Signing status
=====================
The following list covers which files have failed the integrity check. Please read
the previous linked documentation to learn more about the errors and how to fix
them.

Results
=======
- files_rightclick
	- EXTRA_FILE
		- files_rightclick/l10n/hu.js
		- files_rightclick/l10n/ps.json
		- files_rightclick/l10n/gl.json
		- files_rightclick/l10n/es.js
		- files_rightclick/l10n/gl.js
		- files_rightclick/l10n/bg.json
		- files_rightclick/l10n/lv.js
		- files_rightclick/l10n/lv.json
		- files_rightclick/l10n/ps.js
		- files_rightclick/l10n/ca.json
		- files_rightclick/l10n/hu.json
		- files_rightclick/l10n/zh_TW.json
		- files_rightclick/l10n/bg.js
		- files_rightclick/l10n/zh_TW.js
		- files_rightclick/l10n/es.json
		- files_rightclick/l10n/ca.js
		- files_rightclick/appinfo/info.xml
		- files_rightclick/appinfo/signature.json
		- files_rightclick/README.md

Raw output
==========
Array
(
    [files_rightclick] => Array
        (
            [EXTRA_FILE] => Array
                (
                    [files_rightclick/l10n/hu.js] => Array
                        (
                            [expected] => 
                            [current] => 638b9adc309de1aa295bc87836faa3a2d68450706873e282da5b621994af067af12908440554d10dbdb4cb58a8eae9e8a03dac4c9de68b11727d8a989463405b
                        )

                    [files_rightclick/l10n/ps.json] => Array
                        (
                            [expected] => 
                            [current] => b68af94ea3573f18aaf357e4a3002522e0683c7d05c7d54fda916560e622019848dbb31a106e5df307d01a332e6d2a237bbf66cc9c2129322908d7d4548af5e1
                        )

                    [files_rightclick/l10n/gl.json] => Array
                        (
                            [expected] => 
                            [current] => 1e6f6b644cdd0ef7cd68eb2c88f3f91becc2e3b21c447dfe3090828df31a3ef8457a5946daf8fb94a6c51bac34264d085d8b093126fa1329efa2867ce12f056f
                        )

                    [files_rightclick/l10n/es.js] => Array
                        (
                            [expected] => 
                            [current] => 93a68081b7ecea484e6b59bcfa8132cb176884dfbb732851c7e07554bf6b676418c4688f12a4a8bfb5c95145ffeb611cfd82bf5aafbd8fb7c36075946d6468e3
                        )

                    [files_rightclick/l10n/gl.js] => Array
                        (
                            [expected] => 
                            [current] => 5ed7e3482c29f4111a17901124f95d2ecc866c5e574738546ea5dbc43673d10ef46118b2bbe2796c5d8b595f4a3ddaa5dd6b3711baf3e199caef17b2066dcb91
                        )

                    [files_rightclick/l10n/bg.json] => Array
                        (
                            [expected] => 
                            [current] => e8a019e9edf82fce9f8ac9eb1c305e413292ac1be6d651b0ca071fbb1f23418764cb5a1bfb1a5506b385e86b46f7b51dbba216d4f1b8847a87e93244e03e93eb
                        )

                    [files_rightclick/l10n/lv.js] => Array
                        (
                            [expected] => 
                            [current] => 771c52fa0392d5b395aaa281d53b77628950b814cfb67a106c23edc1615ef69da449b00233f0f28700182687c726a929180e7904cba3a41aea0886151534a634
                        )

                    [files_rightclick/l10n/lv.json] => Array
                        (
                            [expected] => 
                            [current] => 4d072d9c75ac92bb38346680299c7cb59d961d2f09ae63e98e1831cb964becfe0046d8347405d1b95ab5d9a389d0fe0ed32a4e14e1b9d0cca58386fa474d5475
                        )

                    [files_rightclick/l10n/ps.js] => Array
                        (
                            [expected] => 
                            [current] => 5b302603f25705e50fc5f7420008c068c9abe39aa1eff7d85c1a17f5f1cb3ed6511c6508ef35d01bee7a4d240bf112bf9707a27127659f675410a63ca4a6a9bc
                        )

                    [files_rightclick/l10n/ca.json] => Array
                        (
                            [expected] => 
                            [current] => 638021388b1af71199dcf96bd2ae58232c0f7e5f38e320fb35f473f6555e1789c13640af9fffc964af33b5b29ce322fe934855a7c7a007cf18a801b7ee9ce716
                        )

                    [files_rightclick/l10n/hu.json] => Array
                        (
                            [expected] => 
                            [current] => b54b1b8001357d07a6412eb227406197598a83f289d101c7b4092c949d39372eae1b4bf2fef0276b9e3806072942b9b76f0d2daf0e63c9a175b95619b982d840
                        )

                    [files_rightclick/l10n/zh_TW.json] => Array
                        (
                            [expected] => 
                            [current] => 241584a550c340990f8ecb597fdf2c1ae73c642913dd389e42bc3cc80a117fd045ea2015927af07cf6474ae293ce02234358516a28863ac381f06dbd3ad6c67d
                        )

                    [files_rightclick/l10n/bg.js] => Array
                        (
                            [expected] => 
                            [current] => d62ac241450e07d0c5434a9ed99fb78632c4a8795c0a441b9f1bb5728581bf844bb94026b4d2676cbad265d28c37a919bd200015136df83d8c6db1a709cf4224
                        )

                    [files_rightclick/l10n/zh_TW.js] => Array
                        (
                            [expected] => 
                            [current] => 022e5e645454c6e7e625f05eff94c5dae2be88b95eaddde50193338fea7ca9d449dce9d811c13a45d04fdcc162410e9368fb550ae975d53ff2aebeb11c04686c
                        )

                    [files_rightclick/l10n/es.json] => Array
                        (
                            [expected] => 
                            [current] => 95b97102c678bcc552db97a4a59420be4b369d75e7bcbc223d0701e7f02fb92e91f463f4f5b3e55508702e7fcde1ecffbcb55f8e6aa58a834005d5974963b7d0
                        )

                    [files_rightclick/l10n/ca.js] => Array
                        (
                            [expected] => 
                            [current] => 7fd45f2d4c7b0beedb4a8ae0104a7ed2f4e70cfae4136f5c359a2dabcfec96c833cc5434ee8c78299825bbaa0ff59155471257826c15a68a8831c46043916502
                        )

                    [files_rightclick/appinfo/info.xml] => Array
                        (
                            [expected] => 
                            [current] => 385cdbbe0856c7cc9fc1afb8ca022d6ff35f119816c1f977450e8ef6d40961909ce17c385c941a3aedfb4900fafd34efa95c8527734d880e695aa8e2d24e7f94
                        )

                    [files_rightclick/appinfo/signature.json] => Array
                        (
                            [expected] => 
                            [current] => b931b23aa6de46c9d1ef0f745184e37ca09ac814ad42c8620c8fd7314f11ac496b5bfad5a7db613baeddbda7eb8eb988b115c13efba4868e664d603e5a7d509a
                        )

                    [files_rightclick/README.md] => Array
                        (
                            [expected] => 
                            [current] => 008148d723136644c2542312557ed5b9db1af5de6797a221d221012ae0ad367b2daca4774bcaba8936ec8394093b83c3e3f2d8e7c52e5f5882e28579dffe99e2
                        )

                )

        )

)

List of activated apps:

App list
Enabled:
  - activity: 2.11.0
  - calendar: 2.0.1
  - cloud_federation_api: 1.1.0
  - contacts: 3.1.8
  - dav: 1.14.0
  - deck: 0.8.0
  - federatedfilesharing: 1.8.0
  - files: 1.13.1
  - files_external: 1.9.0
  - files_rightclick: 0.15.2
  - files_sharing: 1.10.1
  - files_trackdownloads: 1.7.0
  - files_trashbin: 1.8.0
  - files_versions: 1.11.0
  - logreader: 2.3.0
  - lookup_server_connector: 1.6.0
  - nextcloud_announcements: 1.7.0
  - notifications: 2.6.0
  - oauth2: 1.6.0
  - provisioning_api: 1.8.0
  - serverinfo: 1.8.0
  - settings: 1.0.0
  - tasks: 0.11.3
  - text: 2.0.0
  - twofactor_backupcodes: 1.7.0
  - updatenotification: 1.8.0
  - viewer: 1.2.0
  - workflowengine: 2.0.0
Disabled:
  - accessibility
  - admin_audit
  - bruteforcesettings
  - comments
  - encryption
  - federation
  - files_pdfviewer
  - files_videoplayer
  - firstrunwizard
  - password_policy
  - photos
  - privacy
  - recommendations
  - sharebymail
  - support
  - survey_client
  - systemtags
  - theming
  - user_ldap

Nextcloud configuration:

Config report
<?php
$CONFIG = array (
  'instanceid' => '###',
  'passwordsalt' => '###',
  'secret' => '###',
  'trusted_domains' =>
  array (
    0 => '###',
  ),
  'datadirectory' => '/srv/http/nextcloud',
  'dbtype' => 'mysql',
  'version' => '18.0.1.3',
  'overwrite.cli.url' => '###',
  'dbname' => '###',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => '###',
  'dbpassword' => '###',
  'installed' => true,
  'maintenance' => false,
  'theme' => '###',
  'appstore.experimental.enabled' => true,
  'logtimezone' => '###',
  'mail_from_address' => '###',
  'mail_smtpmode' => 'smtp',
  'mail_domain' => '###',
  'enable_previews' => false,
  'mail_sendmailmode' => 'smtp',
  'mail_smtpauth' => 1,
  'mail_smtpname' => '###',
  'mail_smtppassword' => '###',
  'mail_smtpauthtype' => '###',
  'mail_smtpsecure' => 'ssl',
  'mail_smtphost' => '###',
  'mail_smtpport' => '###',
  'loglevel' => 0,
  'remember_login_cookie_lifetime' => ###,
  'app_install_overwrite' =>
  array (
    0 => 'contacts',
    1 => 'files_trackdownloads',
  ),
);

Are you using external storage, if yes which one: local/smb/sftp/... local Are you using encryption: yes/no no Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/... webdav

Client configuration

Browser: Firefox/Chrome Operating system: Any

Logs

Web server error log

Web server error log
Nothing there, other than me restarting php-fpm in order to stop the stuck thread.

Nextcloud log (data/nextcloud.log)

Nextcloud log
Nothing there related to this issue (only some "deprecated" messages).

Browser log

Browser log
JQMIGRATE: Migrate is installed, version 1.4.1  main.js:566:521
Proxying an event bus of version 1.1.2 with 0.2.1  notifications.js:21:13427
Handlebars is deprecated: please ship your own, this will be removed in Nextcloud 20  globals.js:66:2
New search handler registered

ltguillaume avatar Feb 25 '20 21:02 ltguillaume

Hi had the same issue with the log reader. I fixed the issue by decreasing the log file size. You can change the rotation with sudo -u www-user php occ log:file --rotate-size 52428800 (size in bytes). After the rotation the log reader works as designed.

It looks like it take to long to read out the complete file.

maximilianvonamerongen avatar Mar 21 '21 18:03 maximilianvonamerongen

Hi you can fix it temporarily with setting the filters in the database directly.

Be careful editing the database directly, because you can destroy your nextcloud instance.

Assuming the database prefix is oc_ :

Logviewer can only be restored by executing: UPDATE oc_appconfig SET configvalue = '11111' WHERE appid = 'logreader' AND configkey = 'levels';

TimRivinius avatar Oct 28 '21 07:10 TimRivinius

The following should work too AFAIK (from the CLI). It's safer and easier than directly adjusting the database table:

occ config:app:set logreader levels --value="11111"

joshtrichards avatar Jun 08 '23 00:06 joshtrichards

Also, even better, this is no longer a reproduceable issue in >NC26. I think we can close this out.

joshtrichards avatar Jun 08 '23 12:06 joshtrichards

Last version of Logreader written in react is Nextcloud 27.1.11 (End of life was at 2024-06-25)

Quickly checked at Nextcloud 28, requests to logfile are chunked by 50 rows, so should not be an issue anymore

Antreesy avatar Sep 17 '24 09:09 Antreesy