Bug 248807 - Report with a long backtrace can't be sent (bugzilla 65k limit per comment)
Summary: Report with a long backtrace can't be sent (bugzilla 65k limit per comment)
Status: RESOLVED FIXED
Alias: None
Product: drkonqi
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
: 266172 271154 302376 323083 344611 385721 415100 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-08-23 13:55 UTC by Eric Thiele
Modified: 2019-12-12 16:47 UTC (History)
16 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.17.0


Attachments
Screenshot (31.09 KB, image/png)
2015-04-25 22:59 UTC, Ettore Atalan
Details
DrKonqi will not submit bug report (142.87 KB, image/png)
2015-04-26 10:23 UTC, wodencafe
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Thiele 2010-08-23 13:55:18 UTC
Version:           4.4 (using KDE 4.4.5) 
OS:                Linux

when a kdevelop krash happend i wrote ~10 additional lines for version info and what had happend, but the Assistant was telling me /Comments cannot be longer than 65,535 characters../ the saveable kcrash file was 560199 bytes long.

Reproducible: Didn't try

Steps to Reproduce:
trigger a crash in 45 Threads prog with strace depth of about 120 

Actual Results:  
assistant won't send report

Expected Results:  
assistant will send report or make it possible to remove some thread data (hence only on of these threads crasched)
Comment 1 Dario Andres 2011-02-12 23:51:30 UTC
*** Bug 266172 has been marked as a duplicate of this bug. ***
Comment 2 George Kiagiadakis 2011-04-23 18:25:37 UTC
*** Bug 271154 has been marked as a duplicate of this bug. ***
Comment 3 Christoph Feck 2012-06-23 01:10:06 UTC
*** Bug 302376 has been marked as a duplicate of this bug. ***
Comment 4 Mike Schneider 2012-10-07 13:05:52 UTC
Some problem here, a crash report from digikam was > 200k, thanks to many boost-debug messages.
Comment 5 Jekyll Wu 2013-01-19 00:06:37 UTC
Just some notes for future implemnation. 

According to http://www.bugzilla.org/docs/4.2/en/html/api/Bugzilla/WebService/Bug.html :

Errors 

114 (Comment Too Long)
    You tried to add a comment longer than the maximum allowed length (65,535 characters).

So that 65535 looks like a hard limit (no idea whethter that limit is configurable by sysadmins of bugs.kde.org). 

Anyway, DrKonqi should check the length of the full report text before sending it out. If it is above the limit, DrKonqi should first create the new bug report only contaiing system informtions, user description,  minimum useful backtrace and posible duplicates, then upload the full report text as attachment (which now allows for 4MB, much safer than the 65535 limit for comment).
Comment 6 Jekyll Wu 2013-08-02 07:13:25 UTC
*** Bug 323083 has been marked as a duplicate of this bug. ***
Comment 7 Elias Probst 2015-01-10 23:34:07 UTC
Just ran into this too.
I wonder whether it would make sense to strip the backtrace in the comment down to only the last thread.
This would reduce the size of the BT in most cases drastically.

The full non-stripped BT could still be attached, but this would ensure that the relevant lines are being posted inline and are therefor indexable for duplicate lookups, search engines etc.
Comment 8 Christoph Feck 2015-04-25 09:33:12 UTC
*** Bug 344611 has been marked as a duplicate of this bug. ***
Comment 9 Ettore Atalan 2015-04-25 22:59:05 UTC
Created attachment 92223 [details]
Screenshot

I got the same error today.
Comment 10 wodencafe 2015-04-26 10:23:27 UTC
Created attachment 92225 [details]
DrKonqi will not submit bug report

As you can see, DrKonqi is complaining about the length of the bug report, but the back button is disabled so I can't go back and fix it.
Comment 11 32025mvs 2015-04-28 00:39:28 UTC
This just happened to me too. I can't send my report of Plasma crashing because the report is too long. Does anybody know if there is a way I can upload the report somewhere else? What would be safe to trim from the report so it fits the char limit?
Comment 12 happy 2015-05-28 10:56:14 UTC
Me too on the Plasma crashes with more than 40 and sometimes as many as 77 threads, just the stack trace is > 65K
Comment 13 Dennis Irrgang 2018-05-16 17:14:15 UTC
(In reply to happy from comment #12)
> Me too on the Plasma crashes with more than 40 and sometimes as many as 77
> threads, just the stack trace is > 65K

Had the same happen to me just now.
Comment 14 Alexander Mentyu 2018-09-13 15:39:50 UTC
Possible solutions:
1. Add option to paste whole backtrace in paste.kde.org service and insert link into description.
2. Add option to paste whole backtrace in attachment.
3. Paste beginning of backtrace in attachment/paste.kde.org and rest with max available characters in description/comment.
Comment 15 Maarten ter Huurne 2018-09-13 16:34:13 UTC
(In reply to Alexander Mentyu from comment #14)
> Possible solutions:
> 1. Add option to paste whole backtrace in paste.kde.org service and insert
> link into description.
> 2. Add option to paste whole backtrace in attachment.
> 3. Paste beginning of backtrace in attachment/paste.kde.org and rest with
> max available characters in description/comment.

A variation of option 3:

4. Put the backtrace of the crashed thread in the comment and attach the backtrace of all threads.

I think in most cases only the backtrace of the thread that actually crashed is relevant, but for the few cases where other threads are relevant, it would be nice to have access to the full backtrace dump.
Comment 16 Harald Sitter 2019-07-11 09:15:25 UTC
*** Bug 385721 has been marked as a duplicate of this bug. ***
Comment 17 Harald Sitter 2019-07-12 12:51:07 UTC
Git commit c07434bf8e2e6b488c4293b08c7cb7c56abdf728 by Harald Sitter.
Committed on 12/07/2019 at 12:49.
Pushed by sitter into branch 'master'.

prevent exhausting the maximum size of bug reports

Summary:
bugzilla has a hardcoded server-side limit for how large a given comment
may be. this can somewhat easily get triggered by heavily threaded
applications as the backtrace would include a lot of "noise" threads.
when this previously happened drkonqi would find itself incapable of
filing the report and leaving the user to their own devices.

now we are much smarter about this
if the reportinterface finds that the bug description is too long it will
try to use a reduced backtrace (only a couple of lines from the relevant
thread) or when that too is too long to exclude the backtrace entirely.
in both events it would then additionally attach the complete backtrace
to the bug.

for this there's a bunch of rejiggering necessary:
- generateReportFullText has had its signature changed, instead of using
  a lazy bool now use enums to control the output. this should be vastly
  more readable
- new Backtrace control on generateReportFullText ranging Complete>
  Redcued>Exclude
- addedToCC was renamed to attachBacktraceWithReport which is a more
  suitable name for what it does. it's logic has been moved to a new
  attachBacktrace which requires the caller to set the actual comment
- attachBacktrace is called with a full report comment when used via \
  attachBacktraceWithReport (i.e. the user indicated that their crash
  is in fact the same as another report, so their report gets
  attached to the other one). it's called with a simplified message when
  attaching as part of a reduced/excluded backtrace dance

the end result is that the reports can no longer exhaust the hardcoded
character limit.

there is one caveat: the user can still write a super long description
manually and exhaust the limit. this is however very hard to do in
real life without "abusing" the description for something.

CHANGELOG: Bug reporting can no longer exhaust the maximum character size enforced by Bugzilla
FIXED-IN: 5.17.0

Test Plan:
- file bug report with ETOOLONGTRACE -> gets reduced and attached
- regular attaching still works
- exhausting the limit *exactly* works as expected

Reviewers: #plasma, apol

Reviewed By: apol

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D22399

M  +2    -1    src/bugzillaintegration/reportassistantdialog.cpp
M  +5    -2    src/bugzillaintegration/reportassistantpages_base.cpp
M  +4    -2    src/bugzillaintegration/reportassistantpages_bugzilla.cpp
M  +76   -15   src/bugzillaintegration/reportinterface.cpp
M  +20   -3    src/bugzillaintegration/reportinterface.h

https://commits.kde.org/drkonqi/c07434bf8e2e6b488c4293b08c7cb7c56abdf728
Comment 18 John Scott 2019-12-12 16:47:57 UTC
*** Bug 415100 has been marked as a duplicate of this bug. ***