Bug 493759 - improve network io debug output when bugzilla submission fails
Summary: improve network io debug output when bugzilla submission fails
Status: REPORTED
Alias: None
Product: drkonqi
Classification: Applications
Component: general (show other bugs)
Version: 6.1.5
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-27 22:30 UTC by stephan.laenge
Modified: 2024-10-16 12:53 UTC (History)
1 user (show)

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


Attachments
Section from journalctl (37.94 KB, text/plain)
2024-10-16 12:48 UTC, stephan.laenge
Details

Note You need to log in before you can comment on or make changes to this bug.
Description stephan.laenge 2024-09-27 22:30:58 UTC
SUMMARY
Plasmashell crashed and DrKonqi opened. I tried to submit bug report, but DrKonqi refuses to upload the report.

STEPS TO REPRODUCE
1. Get DrKonqi to open.
2. File a reaaally long bug report (>65535 Characters)
3. Try to submit the bug report.

OBSERVED RESULT
DrKonqi: Failed to submit bug report: Error transferring https://bugs.kde.org/rest/bug?token=REDACTED somethingsomething.

EXPECTED RESULT
Bug report is uploaded.

SOFTWARE/OS VERSIONS
Operating System: Gentoo Linux 2.15
KDE Plasma Version: 6.1.5
KDE Frameworks Version: 6.5.0
Qt Version: 6.7.2
Kernel Version: 6.6.47-gentoo-shadowfly (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 7700X 8-Core Processor
Memory: 31.1 GiB of RAM
Graphics Processor: AMD Radeon RX 6800 XT

ADDITIONAL INFORMATION
I have all debug stuff enabled (-Og -ggdb) + installsources as described here:
https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces
https://wiki.gentoo.org/wiki/Debugging#Per-package
This means my crash report is really long. When i tried to upload the bug report using DrKonqi, it says:

Failed to submit bug report: Error transferring https://bugs.kde.org/rest/bug?token=REDACTED somethingsomethingDoesNotSayAnything.

When i visit https://bugs.kde.org/rest/bug?token=REDACTED: 
{
   "code" : 1000,
   "documentation" : "https://bugzilla.readthedocs.org/en/5.0/api/",
   "error" : true,
   "message" : "You may not search, or create saved searches, without any search terms."
}

Initially i did not understand what was wrong, so i tried to submit the report manually here https://bugs.kde.org/show_bug.cgi?id=493314.

However, when adding the bug report as comment it says: >>Comments cannot be longer than 65535 characters.<<
As DrKonqi reports are added as comments, i think this is the problem.
Maybe uploading the stackTraces as attachments would help.
May be related to https://bugs.kde.org/show_bug.cgi?id=461340
Comment 1 Harald Sitter 2024-10-03 11:59:25 UTC
There is logic that removes the trace when it is too long. How did you manage to exhaust 65535 with your comment?
Comment 2 stephan.laenge 2024-10-03 16:05:59 UTC
> There is logic that removes the trace when it is too long. How did you manage to exhaust 65535 with your comment?

Actually, you are right (and i was wrong)! 

I just made plasmashell crash and generated a 84k character crash report. It was sent without problems, and the stackTrace was added as attachment, just as i had suggested should be done.
The resulting bug report is here:
https://bugs.kde.org/show_bug.cgi?id=494041

I did this by doing what i described here: https://bugs.kde.org/show_bug.cgi?id=493314#c4

This means that the 64k character limit is not the problem. Me not having internet was also not the problem, because i could open https://bugs.kde.org/rest/bug?token=REDACTED in Firefox, which was a link provided by DrKonqi in the error message. And this maybe also means the bug reporting system was not down either?

So at the moment i don't know what could be wrong. If i produce a few crashes and test if they can be reported i will just spam the bug report system (and maybe get banned or so).
And even if i could somehow reproduce the problem, it's not like DrKonqi crashes, so how would i know what's wrong?

Maybe you or i will come up with a idea how to reproduce this. If not, i guess now that it's not a character limit it's not going to be a big problem if the bug remains.
Comment 3 stephan.laenge 2024-10-03 16:11:07 UTC
> How did you manage to exhaust 65535 with your comment?

After sending the bug report failed, I saved it and tried to add it to the corresponding bug report as a comment.
Comment 4 Harald Sitter 2024-10-04 11:10:06 UTC
I guess an action item to derive is to improve the debug output when things go wrong. I am not sure we can, but needs looking into.
Comment 5 Harald Sitter 2024-10-15 12:39:03 UTC
Turns out according to the code the somethingsomething would have been the important bit.
Comment 6 stephan.laenge 2024-10-16 12:34:10 UTC
Unfortunately i did not save or screenshot the error message. The "Failed to submit bug report: Error transferring" is just what i remembered a few hours later. And the token-link was saved in my browser history from when i clicked it.

HOWEVER, when you said that the code says the message was important, this made me curious enough to check out the code. And there it is:
> SendingPage.qml: console.log("ERRROR" + msg)
Therefore:
> journalctl | grep ERRROR
> Sep 27 20:44:32 drkonqi-coredump-launcher[2176]: qml: ERRRORError transferring https://bugs.kde.org/rest/bug?token=TOKEN - server replied:
> Sep 27 20:44:56 drkonqi-coredump-launcher[2176]: qml: ERRRORError transferring https://bugs.kde.org/rest/bug?token=TOKEN - server replied:
> Sep 27 20:44:56 drkonqi-coredump-launcher[2176]: qml: ERRRORError transferring https://bugs.kde.org/rest/bug?token=TOKEN - server replied:
> Sep 27 20:46:01 drkonqi-coredump-launcher[2176]: qml: ERRRORError transferring https://bugs.kde.org/rest/bug?token=TOKEN - server replied:
> Sep 27 20:46:01 drkonqi-coredump-launcher[2176]: qml: ERRRORError transferring https://bugs.kde.org/rest/bug?token=TOKEN - server replied:
> Sep 27 20:46:01 drkonqi-coredump-launcher[2176]: qml: ERRRORError transferring https://bugs.kde.org/rest/bug?token=TOKEN - server replied:
> Sep 27 20:46:04 drkonqi-coredump-launcher[2176]: qml: ERRRORError transferring https://bugs.kde.org/rest/bug?token=TOKEN - server replied:
> Sep 27 20:46:04 drkonqi-coredump-launcher[2176]: qml: ERRRORError transferring https://bugs.kde.org/rest/bug?token=TOKEN - server replied:
> Sep 27 20:46:04 drkonqi-coredump-launcher[2176]: qml: ERRRORError transferring https://bugs.kde.org/rest/bug?token=TOKEN - server replied:
> Sep 27 20:46:04 drkonqi-coredump-launcher[2176]: qml: ERRRORError transferring https://bugs.kde.org/rest/bug?token=TOKEN - server replied:
> Sep 27 20:46:17 drkonqi-coredump-launcher[2176]: qml: ERRRORError transferring https://bugs.kde.org/rest/bug?token=TOKEN - server replied:
> Sep 27 20:46:17 drkonqi-coredump-launcher[2176]: qml: ERRRORError transferring https://bugs.kde.org/rest/bug?token=TOKEN - server replied:
> Sep 27 20:46:17 drkonqi-coredump-launcher[2176]: qml: ERRRORError transferring https://bugs.kde.org/rest/bug?token=TOKEN - server replied:
> Sep 27 20:46:17 drkonqi-coredump-launcher[2176]: qml: ERRRORError transferring https://bugs.kde.org/rest/bug?token=TOKEN - server replied:
> Sep 27 20:46:17 drkonqi-coredump-launcher[2176]: qml: ERRRORError transferring https://bugs.kde.org/rest/bug?token=TOKEN - server replied:
> Sep 27 20:53:41 drkonqi-coredump-launcher[2176]: qml: ERRRORError transferring https://bugs.kde.org/rest/bug?token=TOKEN - server replied:
> Sep 27 20:53:41 drkonqi-coredump-launcher[2176]: qml: ERRRORError transferring https://bugs.kde.org/rest/bug?token=TOKEN - server replied:
> Sep 27 20:53:41 drkonqi-coredump-launcher[2176]: qml: ERRRORError transferring https://bugs.kde.org/rest/bug?token=TOKEN - server replied:
> Sep 27 20:53:41 drkonqi-coredump-launcher[2176]: qml: ERRRORError transferring https://bugs.kde.org/rest/bug?token=TOKEN - server replied:
> Sep 27 20:53:41 drkonqi-coredump-launcher[2176]: qml: ERRRORError transferring https://bugs.kde.org/rest/bug?token=TOKEN - server replied:
> Sep 27 20:53:41 drkonqi-coredump-launcher[2176]: qml: ERRRORError transferring https://bugs.kde.org/rest/bug?token=TOKEN - server replied:

And before you ask: What about the text after "server replied:"? I am pretty certain that this is the reason why i did not record the error message: There was just nothing.
The only thing making me worried is that the token is really censored like this in the log. I did not censor the token this time.

Unrelated things i came up with:
1. If the crash report could not be sent, the error message could be added to the crash report, so if the report is saved manually, this information is not lost.
2. Much more complicated: If the crash report could not be sent, the user can click "Send later automatically". Then the report, reason why sending failed and the KDE credentials are saved locally. Sending is then retried once per day for up to one month or so.
Comment 7 stephan.laenge 2024-10-16 12:47:42 UTC
I added a cut from my journal when submission failed to the attachments.
Comment 8 stephan.laenge 2024-10-16 12:48:57 UTC
Created attachment 174887 [details]
Section from journalctl

A short excerpt from when the submission failed. Tell me if you need more.
Comment 9 stephan.laenge 2024-10-16 12:53:27 UTC
As i just saw the error log says "203", but i am quite certain this was not shown in the GUI.