Guidelines and HOWTOs/Debugging/Debugging IOSlaves/Debugging kio smb: Difference between revisions

From KDE Community Wiki
 
(6 intermediate revisions by the same user not shown)
Line 7: Line 7:
= Reporting Bugs =
= Reporting Bugs =


If this is your first bug report please read the following document:
For efficient handling of bug reports detailed information is key. Make sure to tell us:
 
[http://www.chiark.greenend.org.uk/~sgtatham/bugs.html How to Report Bugs Effectively]
 
Then got to http://bugs.kde.org/ and create a bug report. Tell us:


* The KDE Frameworks and Dolphin version you're running
* The KDE Frameworks and Dolphin version you're running
* The libsmbclient version installed
* The libsmbclient version installed
* The type and version of the smb server (e.g. "Samba 4.12.0 on opensuse 42" or "Windows 10")
* The type and version of the smb server (e.g. "Samba 4.12.0 on opensuse 42" or "Windows 10")
* Provide log files if possible (see below)
* Provide log files (see below)


= Logging =
= Logging =
Line 24: Line 20:


{{Input|1=<nowiki>
{{Input|1=<nowiki>
KDE_FORK_SLAVES=1 QT_MESSAGE_PATTERN='(%{pid})/(%{category}) %{function}: %{message}' QT_LOGGING_RULES="log_kio_smb=true" dolphin --new-window YOUR_SMB_URL
export KDE_FORK_SLAVES=1
export QT_MESSAGE_PATTERN='[%{time process}](%{pid})/(%{category}) %{function}: %{message}'
export QT_LOGGING_RULES='kf.kio.workers.smb=true;log_kio_smb=true'
dolphin --new-window YOUR_SMB_URL
</nowiki>}}
</nowiki>}}



Latest revision as of 12:40, 11 January 2023

This page is a starting point for debugging kio_smb. Please also read how to debug IO slaves generically.

Overview

When you point file manager to smb://user@target, the smb KIO slave uses libsmbclient (part of the samba project) to open a connection to the smb server.

Reporting Bugs

For efficient handling of bug reports detailed information is key. Make sure to tell us:

  • The KDE Frameworks and Dolphin version you're running
  • The libsmbclient version installed
  • The type and version of the smb server (e.g. "Samba 4.12.0 on opensuse 42" or "Windows 10")
  • Provide log files (see below)

Logging

Most bug reports will require debug logs to be able to move ahead. To get the debug log start dolphin from konsole or another terminal with this command:

export KDE_FORK_SLAVES=1
export QT_MESSAGE_PATTERN='[%{time process}](%{pid})/(%{category}) %{function}: %{message}'
export QT_LOGGING_RULES='kf.kio.workers.smb=true;log_kio_smb=true'
dolphin --new-window YOUR_SMB_URL

Make sure to replace YOUR_SMB_URL with the actual URL that is giving you trouble (e.g. smb:// for the list of detected servers). Then reproduce whatever issue you are experiencing. When you are done simply copy and paste the entire output from the terminal to the bug report.

Logging with libsmbclient debug output

You generally do not have to provide these unless explicitly asked for.

To enable libsmbclient debug messages in addition you have to set a configuration value. It's easiest to do this using the kwriteconfig5 util:

kwriteconfig5 --file kioslaverc --group SMB --key DebugLevel 10

Then obtain a log as described above. libsmbclient is incredibly verbose this way, so you'll want to run the command again and set the DebugLevel to 0 when you are done. Also depending on your terminal configuration it may be useful to redirect the dolphin output to a file as this level of verbosity can easily exhaust the backlog of your terminal.