Bug 414016 - Log file /var/log/syslog grows in size very fast
Summary: Log file /var/log/syslog grows in size very fast
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Bundle-AppImage (show other bugs)
Version: 6.4.0
Platform: Appimage Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-10 23:24 UTC by MarcP
Modified: 2020-01-09 05:44 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 7.0.0


Attachments
Extract of /var/log/syslog (7.49 KB, text/plain)
2019-11-10 23:24 UTC, MarcP
Details
A run of digikam appimage 7-beta with output captured by typescript. Last 1500 lines of output further edited for relevance. (143.40 KB, text/plain)
2020-01-06 11:42 UTC, TahomaSoft
Details

Note You need to log in before you can comment on or make changes to this bug.
Description MarcP 2019-11-10 23:24:43 UTC
Created attachment 123830 [details]
Extract of /var/log/syslog

SUMMARY

I have noticed that the Digikam 6.4.0 stable appimage (and also some of the preceding betas) cause logfiles to grow very fast. I am talking about several GB in a few minutes. I have encountedred this issue in two computers already, filling 25GB of disk space in a couple of hours, mainly in /var/log/syslog, but also in system journal at /var/log/journal/.

The content of the logs seems to be the same lines repeating over and over again. I have attached a small sample.


STEPS TO REPRODUCE
1. Check the size of /var/log/syslog
2. Use digikam for half an hour (tag pictures and sort directories)

OBSERVED RESULT
Notice how the log file has increased substantially in size.

EXPECTED RESULT
Log files should not have grown so much in a single session.

SOFTWARE/OS VERSIONS

Linux: Digikam 6.4.0 appimage in Ubuntu 18.4 LTS with Gnome
Comment 1 Maik Qualmann 2019-11-11 05:59:56 UTC
That's the problem with the locale we've already talked about. At the moment I strongly advise against using the AppImage. Without a working locale that affects many things like date and string comparisons, digiKam is not safe to use. At the moment, compile digiKam from the sources themselves.

Maik
Comment 2 MarcP 2019-11-11 10:30:42 UTC
Ok, understood.
Comment 3 caulier.gilles 2019-11-11 10:33:42 UTC
But there is no reason to see this whole package of messages in /var/log/...

digiKam do not play directly with these log-files.

Gilles Caulier
Comment 4 Maik Qualmann 2019-11-11 10:41:21 UTC
Unfortunately, the distributions lead the way and write warnings of applications to /var/log/. For me, /var/log/ is really only for the kernel. But the same here under openSUSE, everything to /var/log/.

Maik
Comment 5 MarcP 2019-11-11 11:07:57 UTC
If I watch the /var/log/syslog in real time, I can see basically everything digikam is doing, as if I had launched it from a terminal. And same for other programs I am running.

I think that temporarily I'll limit the size of that log in /etc/logrotate.d/rsyslog
Comment 6 caulier.gilles 2019-11-11 11:19:40 UTC
Under Centos, qt loggin configuration (all disabled by default) set in a qtlogging.ini file hosted in the system (somewhere in /usr/share/...)

Look this page :

https://doc.qt.io/qt-5/qloggingcategory.html

... and search "qtlogging.ini" for details.

I'm sure that Qt provide a way to dispatch all Qt debug spaces in syslog/journald.

Gilles Caulier
Comment 7 Maik Qualmann 2019-11-12 08:10:49 UTC

*** This bug has been marked as a duplicate of bug 414028 ***
Comment 8 caulier.gilles 2020-01-05 06:12:53 UTC
*** Bug 415882 has been marked as a duplicate of this bug. ***
Comment 9 caulier.gilles 2020-01-05 21:39:02 UTC
digiKam AppImage 7.0.0-beta2 64 bits is updated with last changes to reduce QtLogging data stream at run-time.

File can be downloaded at this place for testing :

https://files.kde.org/digikam/

Can you reproduce the problem with this version ?

Thanks in advance

Gilles Caulier
Comment 10 MarcP 2020-01-05 21:52:09 UTC
I will try tomorrow and report back.
Comment 11 TahomaSoft 2020-01-06 00:47:43 UTC
(In reply to MarcP from comment #10)
> I will try tomorrow and report back.

I will do the same.
Comment 12 TahomaSoft 2020-01-06 11:42:03 UTC
Created attachment 124921 [details]
A run of digikam appimage 7-beta with output captured by typescript. Last 1500 lines of output further edited for relevance.

Ran digikam-7.0.0-beta2-20200105T130918-x86-64.appimage.

Threw 178,000 files at it. Got most of the way through but eventually did crash.

Running it again was successful.

Crash output attached.
Comment 13 MarcP 2020-01-06 11:57:39 UTC
Hi. I tried scanning and rebuilding the faces database this morning (well, it's still in progress), and both the /var/log/syslog and the journal seemed to have increased significantly in size (between 1 and 2 GB together) in about 1 hour.

Mostly with these two lines, repeated thousands of times:

Jan  6 12:12:24 marc-TM1703 compiz[7498]: #033[34munknown#033[0m: Case insensitive sorting unsupported in the posix collation implementation
Jan  6 12:12:24 marc-TM1703 compiz[7498]: #033[34munknown#033[0m: Numeric mode unsupported in the posix collation implementation

So I would say the problem is still reproducible.

(I am using digikam-7.0.0-beta2-20200105T130918-x86-64.appimage on Ubuntu 18.04 with Unity)
Comment 14 Maik Qualmann 2020-01-06 14:06:00 UTC
These are warnings that come directly from Qt. And of course warnings are displayed. These messages will disappear when we find the error for the local function in the AppImage. You shouldn't see any debug messages from digiKam except for warnings.

Maik
Comment 15 caulier.gilles 2020-01-06 14:22:42 UTC
Even if the Locale support in AppImage is bugous with Qt and libicu (which generate this kind of warnings), we can disable message as well when Qt is recompiled for the bundle.

In fact, Qt do not load properly ICU data and switch to Posix locale, and generate warnings :

https://github.com/qt/qtbase/blob/dev/src/corelib/text/qcollator_posix.cpp#L53

As i plan to switch Qt from 5.13.2 to 5.14 in the AppImage, i will make a patch in this way.

Gilles
Comment 16 TahomaSoft 2020-01-07 01:46:22 UTC
For what it is worth, I did receive thematically similar errors running Digikam 6.4 compiled from source.  Relevant lines are below.

digikam.metaengine: Cannot load metadata using Exiv2   (Error # 9 :  /ZuHause/PhotoDrive1/FotoAlbumStructure/Primary/DropBox-EB/Dropbox2020-Jan6/2018/Sept2018/2018-09-18 06.54.49.heic: Failed to
 open the data source: Too many open files (errno = 24)

Could not create AF_NETLINK socket (Too many open files)
Could not create AF_NETLINK socket (Too many open files)
Could not create AF_NETLINK socket (Too many open files)
Could not create AF_NETLINK socket (Too many open files)
Could not create AF_NETLINK socket (Too many open files)
Could not create AF_NETLINK socket (Too many open files)
Could not create AF_NETLINK socket (Too many open files)
Could not create AF_NETLINK socket (Too many open files)
Could not create AF_NETLINK socket (Too many open files)
Could not create AF_NETLINK socket (Too many open files)
Could not create AF_NETLINK socket (Too many open files)
Could not create AF_NETLINK socket (Too many open files)
Comment 17 caulier.gilles 2020-01-07 08:39:09 UTC
Git commit bd7adde1afc349cad5001687846ee31af766d0c7 by Gilles Caulier.
Committed on 07/01/2020 at 08:37.
Pushed by cgilles into branch 'master'.

digiKam AppImage: Drop Qt core debug traces dispatched by Qt Logging categories
Related: bug 414028, bug 415882

M  +3    -0    project/bundles/appimage/data/AppRun

https://invent.kde.org/kde/digikam/commit/bd7adde1afc349cad5001687846ee31af766d0c7
Comment 18 caulier.gilles 2020-01-08 08:26:52 UTC
Git commit e613bc900c58144256e6d24e463217dabe76e495 by Gilles Caulier.
Committed on 08/01/2020 at 08:22.
Pushed by cgilles into branch 'master'.

This is a mess: some qWarning(), qInfo(), qCritical() messages are not wrapped in litteral debug spaces as expected
and are printed as "unknown". To disable these messages, the right keyword is "default" (it's logic of course!)
Now AppImage do not export the huge warning strings from Qt core in log files. ouf...
Related: bug 415882, bug 414028

M  +1    -1    project/bundles/appimage/data/AppRun

https://invent.kde.org/kde/digikam/commit/e613bc900c58144256e6d24e463217dabe76e495