Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 668875

Summary: ABRT is not bringing crash report in some cases
Product: Red Hat Enterprise Linux 6 Reporter: Yogesh <ychavan>
Component: abrtAssignee: Denys Vlasenko <dvlasenk>
Status: CLOSED ERRATA QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: medium Docs Contact:
Priority: low    
Version: 6.0CC: ahecox, dvlasenk, gavin, jmoskovc, kklic, npajkovs, rvokal, vgaikwad
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: abrt-1.1.16-1.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-19 13:41:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Proposed patch none

Description Yogesh 2011-01-11 21:54:12 UTC
Description of problem:
Some abrt cases does not contain any attachment. i.e. check case 00383265 .

Version-Release number of selected component (if applicable):
abrt version: 1.1.13
architecture: x86_64
cmdline: /usr/lib64/firefox-3.6/firefox
component: firefox
crash_function: raise
kernel: 2.6.32-71.7.1.el6.x86_64

How reproducible:
random


Actual results:
case contains no attachment

Expected results:
Case should contain abrt report as attachment

Comment 1 Jiri Moskovcak 2011-01-12 13:44:35 UTC
can you please check if there is a sosreport.tar.xz where this crash is saved? should be somewhere in /var/spool/abrt/. If you find it please check the size. Thank you.

Comment 2 Jiri Moskovcak 2011-01-24 15:05:28 UTC
*** Bug 672206 has been marked as a duplicate of this bug. ***

Comment 3 Denys Vlasenko 2011-01-25 15:53:36 UTC
The reporting is done two HTTP transactions: first, we create the case per se, and then we upload the attachment.

I would hazard to guess that this bug happens when the first operation succeeds, but second one fails. Here is the relevant abrt code:


    abrt_post_string(case_state, case_url.c_str(), "application/xml", case_data);
^^^^^^^^^^^^^^^^^^^^ case creation transaction
    char *case_location = find_header_in_abrt_post_state(case_state, "Location:");
    switch (case_state->http_resp_code)
    {
    ...error handling cases...
    case 200:
    case 201:
        if (!case_location) {
            ...error handling...
            break;
        }
            
        string atch_url = concat_path_file(case_location, "/attachments");
        abrt_post_state *atch_state;
 redirect_attach:
        atch_state = new_abrt_post_state(...);
        atch_state->username = username;
        atch_state->password = password;
        abrt_post_file_as_form(atch_state, atch_url.c_str(), "application/binary", report_file_name);
^^^^^^^^^^^^^^^^^^^^ attachment transaction
        char *atch_location = find_header_in_abrt_post_state(atch_state, "Location:");
        switch (atch_state->http_resp_code)
        {
        ...error handling cases...
        case 200:
        case 201:
            retval = xasprintf("Case created: %s", /*body,*/ case_location);
        } /* switch (attach HTTP code) */
        free_abrt_post_state(atch_state);
    } /* switch (case HTTP code) */

    free_abrt_post_state(case_state);
    free(allocated);
    return retval;
}


Unfortunately, in this case all useful debugging information remains on client side. If possible, in such cases we need to ask the user the following questions:

"how big is the attachment?",

"what error message abrt showed?", "can you retry upload?"

"please show output of ls -l /var/spool/abrt/RELEVANT_CRASH_DUMP_DIR, or better, tar up and email /var/spool/abrt/RELEVANT_CRASH_DUMP_DIR to us if it is not too big"

Comment 4 Denys Vlasenko 2011-01-26 15:09:47 UTC
BTW, how often does this happen? 1% of cases? 10%? 50%?

Comment 5 Andrew Hecox 2011-01-26 18:32:50 UTC
I don't have a number yet, hopefully Yogesh can comment on that and the user interaction.

I think there are two limits to consider here: the attachment limit on the server, and the crash size limit. On my RHEL 6 box, the ABRT crash size limit is 1 GB, while the server's limit is 50 MB. If 1 GB is indeed the client side limit, then I think this is entirely on the server to fix... (which we can handle).

Comment 6 Denys Vlasenko 2011-01-31 12:57:44 UTC
abrt crash size limit is indeed 1 GB by default, but it should not be in play here: abrt will simply delete old dump directories until it brings total size down to specified size.

IOW: the limit does not affect individual files. If coredump inside dump dir is bigger than 1 GB, the whole dump dir will be deleted, therefore it cannot be reported, therefore in this case it can't result in "case without attachment" effect.

IOW2: if you see a case without attachment, then client which submitted it definitely had some dump dir, and attempted to send it. The information why sending attachment failed is, unfortunately, on the client side.

One possible improvement which springs to mind is to add information about attachment and/or its components in the "description" field. Something like this:

 abrt version: 1.1.13
 architecture: i686
 cmdline: sleep 5m
 comment: test c/c++
 component: coreutils
 ...
 time: 1290026594
 uid: 500
+sosreport.tar.xz: 241560 bytes
+coredump: 290816 bytes

backtrace
-----
...


This way, if you see, say, huge coredumps in most of such attachment-less cases, it will be possible to at least guess that the problem is likely caused by huge uploads being not reliable or aborted by user.

Comment 7 Andrew Hecox 2011-01-31 13:29:47 UTC
I think that's a good improvement.

Another suggestion (or maybe just something to test), is to confirm that whenever the attachment is rejected by the server, the message is returned, and is useful.

Comment 8 Denys Vlasenko 2011-02-03 14:39:42 UTC
Created attachment 476800 [details]
Proposed patch

in bz/rhts description, list attachments and their sizes

Comment 9 Denys Vlasenko 2011-02-03 14:56:49 UTC
Applied to git and tested.

Comment 16 errata-xmlrpc 2011-05-19 13:41:41 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0619.html