Bug 472125 - Connections to remote mariadb are aborted when digikam is closed
Summary: Connections to remote mariadb are aborted when digikam is closed
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Database-Mysql (show other bugs)
Version: 8.1.0
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-10 11:19 UTC by Paul Worrall
Modified: 2023-07-10 20:15 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 8.2.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Worrall 2023-07-10 11:19:11 UTC
SUMMARY
Using digiKam with a maria database on a remote device, when I close digiKam a set of warning messages appear in the journal of the remote device saying "error reading communication packets".

STEPS TO REPRODUCE
1. Configure digiKam to use a mariadb on a remote device, and monitor the journal on that device (journalctl -f)
2. Launch digiKam (no journal messages)
3. Close digiKam either by closing the window or selecting Browse->Quit
4. Wait a few seconds

OBSERVED RESULT
Example warning messages:
Jul 10 12:06:47 b3 mariadbd[622]: 2023-07-10 12:06:47 4118 [Warning] Aborted connection 4118 to db: 'digikamThumbs' user: 'paul' host: 'fe80::779b:c418:de09:7b29%eth0' (Got an error reading communication packets)
Jul 10 12:06:47 b3 mariadbd[622]: 2023-07-10 12:06:47 4121 [Warning] Aborted connection 4121 to db: 'digikamCore' user: 'paul' host: 'fe80::779b:c418:de09:7b29%eth0' (Got an error reading communication packets)
Jul 10 12:06:47 b3 mariadbd[622]: 2023-07-10 12:06:47 4117 [Warning] Aborted connection 4117 to db: 'digikamCore' user: 'paul' host: 'fe80::779b:c418:de09:7b29%eth0' (Got an error reading communication packets)
Jul 10 12:06:47 b3 mariadbd[622]: 2023-07-10 12:06:47 4119 [Warning] Aborted connection 4119 to db: 'digikamCore' user: 'paul' host: 'fe80::779b:c418:de09:7b29%eth0' (Got an error reading communication packets)
Jul 10 12:06:47 b3 mariadbd[622]: 2023-07-10 12:06:47 4120 [Warning] Aborted connection 4120 to db: 'digikamThumbs' user: 'paul' host: 'fe80::779b:c418:de09:7b29%eth0' (Got an error reading communication packets)
Jul 10 12:06:47 b3 mariadbd[622]: 2023-07-10 12:06:47 4122 [Warning] Aborted connection 4122 to db: 'digikamThumbs' user: 'paul' host: 'fe80::779b:c418:de09:7b29%eth0' (Got an error reading communication packets)

EXPECTED RESULT
No dodgy looking messages

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.27.6
KDE Frameworks Version: 5.108.0
Qt Version: 5.15.10
Graphics Platform: Wayland

ADDITIONAL INFORMATION
Comment 1 Maik Qualmann 2023-07-10 20:11:02 UTC
Git commit bff94845113399790f631f22e5adfce677ca6839 by Maik Qualmann.
Committed on 10/07/2023 at 20:09.
Pushed by mqualmann into branch 'master'.

hold only the connection name in the QThreadStorage
FIXED-IN: 8.2.0

M  +1    -1    NEWS
M  +37   -27   core/libs/database/engine/dbenginebackend.cpp
M  +7    -7    core/libs/database/engine/dbenginebackend_p.h

https://invent.kde.org/graphics/digikam/-/commit/bff94845113399790f631f22e5adfce677ca6839
Comment 2 Maik Qualmann 2023-07-10 20:15:31 UTC
Thanks for reporting this bug. Although we correctly closed all databases and removed connections. When the database was in QThreadStorage, even though we destroyed it with a new QSQLDatabase(), it still kept a connection.

Maik