Guidelines and HOWTOs/Debugging/Debugging IOSlaves/Debugging kio smb

From KDE Community Wiki

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

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

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='(%{pid})/(%{category}) %{function}: %{message}'
export QT_LOGGING_RULES='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.