Print the OS version in the crash report #2904

Closed
opened 2026-02-21 16:28:31 -05:00 by deekerman · 16 comments
Owner

Originally created by @ngosang on GitHub (Aug 6, 2015).

Now we are displaying this info in the log but the OS will be really useful:

qBittorrent version: v3.2.3
Libtorrent version: 1.0.6.0
Qt version: 4.8.7
Boost version: 1.55.0
....

http://pastebin.com/nk8Pcy9R

In Linux we can do:

uname -a
Linux jkuhh 4.1.2-2-ARCH #1 SMP PREEMPT Wed Jul 15 08:51:45 UTC 2015 i686 GNU/Linux
Originally created by @ngosang on GitHub (Aug 6, 2015). Now we are displaying this info in the log but the OS will be really useful: ``` qBittorrent version: v3.2.3 Libtorrent version: 1.0.6.0 Qt version: 4.8.7 Boost version: 1.55.0 .... ``` http://pastebin.com/nk8Pcy9R In Linux we can do: ``` uname -a Linux jkuhh 4.1.2-2-ARCH #1 SMP PREEMPT Wed Jul 15 08:51:45 UTC 2015 i686 GNU/Linux ```
Author
Owner

@pmzqla commented on GitHub (Aug 6, 2015):

I don't think we need that. lsb_release -idrc is probably more useful (but it's not guaranteed that it's available), but I think the information printed are enough. The problem is that often we don't have those information because the bug report is not about a crash for which a stackstrace is generated.

We could maybe create a CONTRIBUTING.md file (https://github.com/blog/1184-contributing-guidelines).

@pmzqla commented on GitHub (Aug 6, 2015): I don't think we need that. `lsb_release -idrc` is probably more useful (but it's not guaranteed that it's available), but I think the information printed are enough. The problem is that often we don't have those information because the bug report is not about a crash for which a stackstrace is generated. We could maybe create a `CONTRIBUTING.md` file (https://github.com/blog/1184-contributing-guidelines).
Author
Owner

@Chocobo1 commented on GitHub (Aug 7, 2015):

I plan to add a copy to clipboard button to gather required info for bug reports in "About qbittorrent" tab Library.
Something like this:
1

It's output:

MPC-HC (Nightly, 64-bit)
------------------------

Build information:
    Version:            1.7.9.14 (b61ee85) (develop)
    Compiler:           MSVC 2013 Update 4
    Build date:         Jun 12 2015 01:11:33

LAV Filters:
    LAV Splitter:
    LAV Video:
    LAV Audio:
    FFmpeg compiler:    MinGW-w64 GCC 4.9.2

Operating system:
    Name:               Windows NT 6.3 (build 9600)
    Version:            6.3 (64-bit)

Hardware:
    CPU:                Intel(R) Core(TM) i5...(omitted)
    GPU:                NVIDIA GeForce GTX ...(omitted)

I need some ideas about what info should be included.

@Chocobo1 commented on GitHub (Aug 7, 2015): I plan to add a `copy to clipboard` button to gather required info for bug reports in "About qbittorrent" tab Library. Something like this: ![1](https://cloud.githubusercontent.com/assets/9395168/9128592/a60450c0-3cfd-11e5-8a45-7c5d2ec63b39.png) It's output: ``` MPC-HC (Nightly, 64-bit) ------------------------ Build information: Version: 1.7.9.14 (b61ee85) (develop) Compiler: MSVC 2013 Update 4 Build date: Jun 12 2015 01:11:33 LAV Filters: LAV Splitter: LAV Video: LAV Audio: FFmpeg compiler: MinGW-w64 GCC 4.9.2 Operating system: Name: Windows NT 6.3 (build 9600) Version: 6.3 (64-bit) Hardware: CPU: Intel(R) Core(TM) i5...(omitted) GPU: NVIDIA GeForce GTX ...(omitted) ``` I need some ideas about what info should be included.
Author
Owner

@Chocobo1 commented on GitHub (Aug 7, 2015):

Oh, about the original issue. I think adding a simple OS string won't hurt, no need for it's full name.
ex:

  • Linux <kernel_ver> x64
  • Windows 7 x64
@Chocobo1 commented on GitHub (Aug 7, 2015): Oh, about the original issue. I think adding a simple OS string won't hurt, no need for it's full name. ex: - Linux <kernel_ver> x64 - Windows 7 x64
Author
Owner

@ngosang commented on GitHub (Aug 7, 2015):

I need some ideas about what info should be included.

qBittorrent version: v3.2.3
Libtorrent version: 1.0.6.0
Qt version: 4.8.7
Boost version: 1.55.0
Operating system: Windows 7 x64

Detected Python version? SSL version? If you want to include the compiler and the build time but it's not useful.

Linux < kernel_ver> x64
Windows 7 x64

For Windows and Mac the OS version and the architecture is enough but in Linux it's not. We don't use advanced kernel features so the kernel version doesn't matter. Instead, it is important to know the distribution and the window manager (GNOME, KDE ...) The problem is there is not a perfect way to obtain that info. lsb_release -idrc mentioned by @pmzqla it's available only in Debian based distributions. I think uname -a is available in all UNIX like systems but the info is incomplete:

Linux jkuhh 4.1.2-2-ARCH #1 SMP PREEMPT Wed Jul 15 08:51:45 UTC 2015 i686 GNU/Linux

Instead of Arch Linux you will get 4.1.2-2-ARCH (the distribution compilation number) but in some distributions can be just a number.

For the window manager you can read the environment var echo $XDG_CURRENT_DESKTOP but it gives few information. https://askubuntu.com/questions/72549/how-to-determine-which-window-manager-is-running

Before implementing anything find out if Qt has something to obtain that info.

@ngosang commented on GitHub (Aug 7, 2015): > I need some ideas about what info should be included. ``` qBittorrent version: v3.2.3 Libtorrent version: 1.0.6.0 Qt version: 4.8.7 Boost version: 1.55.0 Operating system: Windows 7 x64 ``` Detected Python version? SSL version? If you want to include the compiler and the build time but it's not useful. > Linux < kernel_ver> x64 > Windows 7 x64 For Windows and Mac the OS version and the architecture is enough but in Linux it's not. We don't use advanced kernel features so the kernel version doesn't matter. Instead, it is important to know the distribution and the window manager (GNOME, KDE ...) The problem is there is not a perfect way to obtain that info. `lsb_release -idrc` mentioned by @pmzqla it's available only in Debian based distributions. I think `uname -a` is available in all UNIX like systems but the info is incomplete: Linux jkuhh **4.1.2-2-ARCH** #1 SMP PREEMPT Wed Jul 15 08:51:45 UTC 2015 **i686 GNU/Linux** Instead of **Arch Linux** you will get **4.1.2-2-ARCH** (the distribution compilation number) but in some distributions can be just a number. For the window manager you can read the environment var `echo $XDG_CURRENT_DESKTOP` but it gives few information. https://askubuntu.com/questions/72549/how-to-determine-which-window-manager-is-running **Before implementing anything find out if Qt has something to obtain that info.**
Author
Owner

@Chocobo1 commented on GitHub (Aug 7, 2015):

Detected Python version...

Is there a data field recording this? Or I need to ask python -V explicitly?

compiler and the build time...

IMO it's useful to figure out the user is on what specific version and if he is using an official build.

kernel version doesn't matter...

It gives a hint about the user environment (modern or old) and maybe can correlate with DE/distro. It doesn't carry much useful info, I agree.

For the window manager...

About distro version, DE version, I guess gathering all available info is the way...

@Chocobo1 commented on GitHub (Aug 7, 2015): > Detected Python version... Is there a data field recording this? Or I need to ask `python -V` explicitly? > compiler and the build time... IMO it's useful to figure out the user is on what specific version and if he is using an official build. > kernel version doesn't matter... It gives a hint about the user environment (modern or old) and maybe can correlate with DE/distro. It doesn't carry much useful info, I agree. > For the window manager... About distro version, DE version, I guess gathering all available info is the way...
Author
Owner

@ngosang commented on GitHub (Aug 7, 2015):

Is there a data field recording this? Or I need to ask python -V explicitly?

Utils::Misc::pythonVersionComplete(). You can take a look at Utils::Misc::pythonExecutable() and Utils::Misc::pythonVersion() also.

IMO it's useful to figure out the user is on what specific version and if he is using an official build.

If it's a development version in qBittorrent version you will see v3.3.0beta (I think it's enough)

It gives a hint about the user environment (modern or old) and maybe can correlate with DE/distro.

No. You can not deduct anything about DE/distro. Neither if user environment is old or modern because some distributions as Debian uses old kernels for stability reasons.

Before implementing anything find out if Qt has something to obtain that info.
Look at http://doc.qt.io/qt-5/qsysinfo.html but I think this is only for Windows/Mac.

@ngosang commented on GitHub (Aug 7, 2015): > Is there a data field recording this? Or I need to ask python -V explicitly? `Utils::Misc::pythonVersionComplete()`. You can take a look at `Utils::Misc::pythonExecutable()` and `Utils::Misc::pythonVersion()` also. > IMO it's useful to figure out the user is on what specific version and if he is using an official build. If it's a development version in qBittorrent version you will see v3.3.0**beta** (I think it's enough) > It gives a hint about the user environment (modern or old) and maybe can correlate with DE/distro. No. You can not deduct anything about DE/distro. Neither if user environment is old or modern because some distributions as Debian uses old kernels for stability reasons. **Before implementing anything find out if Qt has something to obtain that info.** Look at http://doc.qt.io/qt-5/qsysinfo.html but I think this is only for Windows/Mac.
Author
Owner

@Chocobo1 commented on GitHub (Aug 7, 2015):

Before implementing anything find out if Qt has something to obtain that info.

I've read that.

Many useful functions are Qt5 only, which means it's no use to us right now (since official builds are Qt4).
It will cripple this feature (for now).

I need some ideas about what info should be included.

Some qbt settings should also be included? ideas?

@Chocobo1 commented on GitHub (Aug 7, 2015): > Before implementing anything find out if Qt has something to obtain that info. I've read that. Many useful functions are Qt5 only, which means it's no use to us right now (since official builds are Qt4). It will cripple this feature (for now). > I need some ideas about what info should be included. Some qbt settings should also be included? ideas?
Author
Owner

@pmzqla commented on GitHub (Aug 7, 2015):

lsb_release -idrc mentioned by @pmzqla it's available only in Debian based distributions. I think uname -a is available in all UNIX like systems but the info is incomplete:

I think lsb_release is available for any distro. It's maybe not there by default, but it's not a Debian thing. This is maybe better: http://www.freedesktop.org/software/systemd/man/os-release.html and most of the old distro should at lease have a /etc/*-release file.

@pmzqla commented on GitHub (Aug 7, 2015): > `lsb_release -idrc` mentioned by @pmzqla it's available only in Debian based distributions. I think `uname -a` is available in all UNIX like systems but the info is incomplete: I think `lsb_release` is available for any distro. It's maybe not there by default, but it's not a Debian thing. This is maybe better: http://www.freedesktop.org/software/systemd/man/os-release.html and most of the old distro should at lease have a `/etc/*-release` file.
Author
Owner

@sledgehammer999 commented on GitHub (Aug 7, 2015):

Some thoughts on this:

  1. Adding a "copy to clipboard" button IMO won't help much. Why? Just observe the various recent bug reports. People are lazy and/or forgetful. They rarely write in their reports the qbt version and OS. We constantly have to ask them. If they forget this I really doubt that they will go and hit "copy to clipboard" before reporting.
  2. uname -a, at least on Debian, gives only the distro name, not the version
  3. Avoid printing openssl version. Now qbt indirectly depends on openssl via libtorrent+QtNetwork. Adding any openssl headers will result in direct dependency of openssl. (ok I agree that this isn't a big deal)
  4. Also if qbt has crashed and is in a bad state, I don't know if it is a good idea to do a lot of calls to outside programs and setting up pipes etc to receive output. Maybe the OS kills us or we are in a state that only a subset of functions work eg calls to backtracing facilities. However, don't my word for it. I haven't tested it and I could be very wrong.
@sledgehammer999 commented on GitHub (Aug 7, 2015): Some thoughts on this: 1. Adding a "copy to clipboard" button IMO won't help much. Why? Just observe the various recent bug reports. People are lazy and/or forgetful. They rarely write in their reports the qbt version and OS. We constantly have to ask them. If they forget this I really doubt that they will go and hit "copy to clipboard" before reporting. 2. `uname -a`, at least on Debian, gives only the distro name, not the version 3. Avoid printing openssl version. Now qbt indirectly depends on openssl via libtorrent+QtNetwork. Adding any openssl headers will result in direct dependency of openssl. (ok I agree that this isn't a big deal) 3. Also if qbt has crashed and is in a bad state, I don't know if it is a good idea to do a lot of calls to outside programs and setting up pipes etc to receive output. Maybe the OS kills us or we are in a state that only a subset of functions work eg calls to backtracing facilities. **However**, don't my word for it. I haven't tested it and I could be very wrong.
Author
Owner

@Chocobo1 commented on GitHub (Aug 7, 2015):

Also if qbt has crashed and is in a bad state

In this case, we can try store OS name (or whatever info if possible) on qbt startup, and just use these strings when crash occurs.

Avoid printing openssl version.

I always wanted to ask, if recent openssl security holes/fixes affects us too? What subset of openssl function do we (indirectly) utilize?

I think lsb_release is available for any distro

My arch installation has it...

@Chocobo1 commented on GitHub (Aug 7, 2015): > Also if qbt has crashed and is in a bad state In this case, we can try store OS name (or whatever info if possible) on qbt startup, and just use these strings when crash occurs. > Avoid printing openssl version. I always wanted to ask, if recent openssl security holes/fixes affects us too? What subset of openssl function do we (indirectly) utilize? > I think lsb_release is available for any distro My arch installation has it...
Author
Owner

@sledgehammer999 commented on GitHub (Aug 7, 2015):

I always wanted to ask, if recent openssl security holes/fixes affects us too? What subset of openssl function do we (indirectly) utilize?

I am not sure we are affected by it at all. I think libtorrent uses it for encrypted peers, and for https web seeds and trackers.
We use it in the webui (if user has enabled it in the settings), in the rss, in the updater, in the link downloader.
In my -known expert- opinion even if heartbleed was possible against qbt, the attackers wouldn't find any info. qbt doesn't manage sensitive data/passwards anyway.

@sledgehammer999 commented on GitHub (Aug 7, 2015): > I always wanted to ask, if recent openssl security holes/fixes affects us too? What subset of openssl function do we (indirectly) utilize? I am not sure we are affected by it at all. I think libtorrent uses it for encrypted peers, and for https web seeds and trackers. We use it in the webui (if user has enabled it in the settings), in the rss, in the updater, in the link downloader. In my -known expert- opinion even if heartbleed was possible against qbt, the attackers wouldn't find any info. qbt doesn't manage sensitive data/passwards anyway.
Author
Owner

@pmzqla commented on GitHub (Aug 7, 2015):

  1. Adding a "copy to clipboard" button IMO won't help much. Why? Just observe the various recent bug reports. People are lazy and/or forgetful. They rarely write in their reports the qbt version and OS. We constantly have to ask them. If they forget this I really doubt that they will go and hit "copy to clipboard" before reporting.

Not sure of this. A button is definitely something that comes in handy. For instance, I can't select and copy the text in the about dialog. A button would make things easier and less error-prone. Not to mention that you can just tell users to open the dialog a click a button.

It would be nice to have the possibility to create templates for bug reports, but this (I guess that if you need to sign up to report a bug, the template created through the URL gets lost) is the best that can be done I think, along with the CONTRIBUTING.md file.

@pmzqla commented on GitHub (Aug 7, 2015): > 1. Adding a "copy to clipboard" button IMO won't help much. Why? Just observe the various recent bug reports. People are lazy and/or forgetful. They rarely write in their reports the qbt version and OS. We constantly have to ask them. If they forget this I really doubt that they will go and hit "copy to clipboard" before reporting. Not sure of this. A button is definitely something that comes in handy. For instance, I can't select and copy the text in the about dialog. A button would make things easier and less error-prone. Not to mention that you can just tell users to open the dialog a click a button. It would be nice to have the possibility to create templates for bug reports, but [this](https://github.com/qbittorrent/qBittorrent/issues/new?title=TEST&body=SOME%20TEXT) (I guess that if you need to sign up to report a bug, the template created through the URL gets lost) is the best that can be done I think, along with the CONTRIBUTING.md file.
Author
Owner

@sledgehammer999 commented on GitHub (Aug 15, 2015):

Since I seem to have left his unfinished before leaving for vacation:
I don't have a problem with a button that copies to clipboard basic info. (like the MPC pic)

@sledgehammer999 commented on GitHub (Aug 15, 2015): Since I seem to have left his unfinished before leaving for vacation: I don't have a problem with a button that copies to clipboard basic info. (like the MPC pic)
Author
Owner

@ngosang commented on GitHub (Aug 23, 2015):

I think lsb_release is available for any distro.

In my Archlinux distribution is not installed but most distributions are Debian based and it can be useful.

@ngosang commented on GitHub (Aug 23, 2015): > I think lsb_release is available for any distro. In my Archlinux distribution is not installed but most distributions are Debian based and it can be useful.
Author
Owner

@ngosang commented on GitHub (Apr 15, 2016):

@Chocobo1 I didn't remember but I think you already did that?

@ngosang commented on GitHub (Apr 15, 2016): @Chocobo1 I didn't remember but I think you already did that?
Author
Owner

@Chocobo1 commented on GitHub (Apr 15, 2016):

I didn't remember but I think you already did that?

Not exactly the way I proposed before, but it's already merged in qbt (when using Qt5).

@Chocobo1 commented on GitHub (Apr 15, 2016): > I didn't remember but I think you already did that? Not exactly the way I proposed before, but it's already merged in qbt (when using Qt5).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/qBittorrent#2904
No description provided.