Uploaded image for project: 'Jira Service Management Data Center'
  1. Jira Service Management Data Center
  2. JSDSERVER-1762

Issue Creation via Email failed if Email contain Base64 attachments

      NOTE: This bug report is for JIRA Service Desk Server. Using JIRA Service Desk Cloud? See the corresponding bug report.

      Problem Description

      • The SD incoming mail stops processing further.
      • At times, if the issue is already created, it returns error as Unable to create comment. Note: This does not halt the email from further processing.

      Diagnostic

      On the logs with incoming mail debug enabled, it seems to stuck on a particular mail.

      2015-03-20 11:25:09,133 atlassian-scheduler-quartz1.clustered_Worker-2 DEBUG ServiceRunner     [mail.incoming.jepp.processor] Starts processing mail item [id: 3063] ...
      2015-03-20 11:25:09,133 atlassian-scheduler-quartz1.clustered_Worker-2 DEBUG ServiceRunner     [mail.incoming.jepp.processor] Checking if mail item [id: 3063] is a mail loop ...
      2015-03-20 11:25:09,138 atlassian-scheduler-quartz1.clustered_Worker-2 DEBUG ServiceRunner     [mail.incoming.jepp.processor] Detected mail item [id: 3063] as a mail loop
      

      The example above shows ID: 3063

      Verify whether is the ID being returned from the query below:

      select count(*),"MAIL_ITEM_ID" from "AO_2C4E5C_MAILITEMCHUNK" where "MAIL_ITEM_ID" in (select "ID" from "AO_2C4E5C_MAILITEM" where "STATUS" = 'NEW') group by "MAIL_ITEM_ID" having count(*)>=2 order by count(*) desc;
      

      If yes, then it is most likely to hit into this bug.

      Explanation

      Email stores attachment as base64 embedded to the mail body. When the mail process trying to process, it only process the first row where it ends up halt due to the incomplete data to decode the base64 attachment.

      At times when the email is detected to be added as comment, it will not halt the email processing but will return as error. The cause for it is the same, it somehow error out when decoding the base64.

      Workaround

      If you wish to recover the email content before deletion, follow the KB below:

      Then you can proceed with deleting the affected ID that stuck, refer to the steps below:

      1. Backup the database
      2. Delete following the command below:
        delete from "AO_2C4E5C_MAILITEMCHUNK" where "MAIL_ITEM_ID" = <id from above>;
        delete from "AO_2C4E5C_MAILITEM" where "ID" = <id from above>;
        

      NOTE: For Cloud customer, please inform support team to perform troubleshooting and workaround for this bug.

      JEPP version 1.0.28-D20150313T043758

          Form Name

            [JSDSERVER-1762] Issue Creation via Email failed if Email contain Base64 attachments

            Owen made changes -
            Workflow Original: JSD Bug Workflow v5 - TEMP [ 2304219 ] New: JAC Bug Workflow v3 [ 3124999 ]
            Status Original: Done [ 10044 ] New: Closed [ 6 ]
            Katherine Yabut made changes -
            Workflow Original: JSD Bug Workflow v5 [ 2058196 ] New: JSD Bug Workflow v5 - TEMP [ 2304219 ]
            Katherine Yabut made changes -
            Workflow Original: JSD Bug Workflow v5 - TEMP [ 2055748 ] New: JSD Bug Workflow v5 [ 2058196 ]
            Katherine Yabut made changes -
            Workflow Original: JSD Bug Workflow v5 [ 1956191 ] New: JSD Bug Workflow v5 - TEMP [ 2055748 ]
            Katherine Yabut made changes -
            Workflow Original: JSD Bug Workflow v4 [ 1615568 ] New: JSD Bug Workflow v5 [ 1956191 ]
            jonah (Inactive) made changes -
            Description Original: h3. Problem Description

            * The SD incoming mail stops processing further.
            * At times, if the issue is already created, it returns error as *Unable to create comment*. Note: This does not halt the email from further processing.

            h3. Diagnostic

            On the logs with incoming mail debug enabled, it seems to stuck on a particular mail.

            {noformat}
            2015-03-20 11:25:09,133 atlassian-scheduler-quartz1.clustered_Worker-2 DEBUG ServiceRunner [mail.incoming.jepp.processor] Starts processing mail item [id: 3063] ...
            2015-03-20 11:25:09,133 atlassian-scheduler-quartz1.clustered_Worker-2 DEBUG ServiceRunner [mail.incoming.jepp.processor] Checking if mail item [id: 3063] is a mail loop ...
            2015-03-20 11:25:09,138 atlassian-scheduler-quartz1.clustered_Worker-2 DEBUG ServiceRunner [mail.incoming.jepp.processor] Detected mail item [id: 3063] as a mail loop
            {noformat}
            (i) The example above shows {{ID: 3063}}

            Verify whether is the ID being returned from the query below:
            {noformat}
            select count(*),"MAIL_ITEM_ID" from "AO_2C4E5C_MAILITEMCHUNK" where "MAIL_ITEM_ID" in (select "ID" from "AO_2C4E5C_MAILITEM" where "STATUS" = 'NEW') group by "MAIL_ITEM_ID" having count(*)>=2 order by count(*) desc;
            {noformat}

            If yes, then it is most likely to hit into this bug.

            h3. Explanation

            Email stores attachment as base64 embedded to the mail body. When the mail process trying to process, it only process the first row where it ends up halt due to the incomplete data to decode the base64 attachment.

            At times when the email is detected to be added as comment, it will not halt the email processing but will return as error. The cause for it is the same, it somehow error out when decoding the base64.

            h3. Workaround

            If you wish to recover the email content before deletion, follow the KB below:

            * https://confluence.atlassian.com/pages/viewpage.action?pageId=728138770

            Then you can proceed with deleting the affected ID that stuck, refer to the steps below:
            # Backup the database
            # Delete following the command below:
            {noformat}
            delete from "AO_2C4E5C_MAILITEMCHUNK" where "MAIL_ITEM_ID" = <id from above>;
            delete from "AO_2C4E5C_MAILITEM" where "ID" = <id from above>;
            {noformat}

            NOTE: For Cloud customer, please inform support team to perform troubleshooting and workaround for this bug.

            JEPP version {{1.0.28-D20150313T043758}}
            New: {panel:bgColor=#e7f4fa}
              *NOTE:* This bug report is for *JIRA Service Desk Server*. Using *JIRA Service Desk Cloud*? [See the corresponding bug report|http://jira.atlassian.com/browse/JSDCLOUD-1762].
              {panel}

            h3. Problem Description

            * The SD incoming mail stops processing further.
            * At times, if the issue is already created, it returns error as *Unable to create comment*. Note: This does not halt the email from further processing.

            h3. Diagnostic

            On the logs with incoming mail debug enabled, it seems to stuck on a particular mail.

            {noformat}
            2015-03-20 11:25:09,133 atlassian-scheduler-quartz1.clustered_Worker-2 DEBUG ServiceRunner [mail.incoming.jepp.processor] Starts processing mail item [id: 3063] ...
            2015-03-20 11:25:09,133 atlassian-scheduler-quartz1.clustered_Worker-2 DEBUG ServiceRunner [mail.incoming.jepp.processor] Checking if mail item [id: 3063] is a mail loop ...
            2015-03-20 11:25:09,138 atlassian-scheduler-quartz1.clustered_Worker-2 DEBUG ServiceRunner [mail.incoming.jepp.processor] Detected mail item [id: 3063] as a mail loop
            {noformat}
            (i) The example above shows {{ID: 3063}}

            Verify whether is the ID being returned from the query below:
            {noformat}
            select count(*),"MAIL_ITEM_ID" from "AO_2C4E5C_MAILITEMCHUNK" where "MAIL_ITEM_ID" in (select "ID" from "AO_2C4E5C_MAILITEM" where "STATUS" = 'NEW') group by "MAIL_ITEM_ID" having count(*)>=2 order by count(*) desc;
            {noformat}

            If yes, then it is most likely to hit into this bug.

            h3. Explanation

            Email stores attachment as base64 embedded to the mail body. When the mail process trying to process, it only process the first row where it ends up halt due to the incomplete data to decode the base64 attachment.

            At times when the email is detected to be added as comment, it will not halt the email processing but will return as error. The cause for it is the same, it somehow error out when decoding the base64.

            h3. Workaround

            If you wish to recover the email content before deletion, follow the KB below:

            * https://confluence.atlassian.com/pages/viewpage.action?pageId=728138770

            Then you can proceed with deleting the affected ID that stuck, refer to the steps below:
            # Backup the database
            # Delete following the command below:
            {noformat}
            delete from "AO_2C4E5C_MAILITEMCHUNK" where "MAIL_ITEM_ID" = <id from above>;
            delete from "AO_2C4E5C_MAILITEM" where "ID" = <id from above>;
            {noformat}

            NOTE: For Cloud customer, please inform support team to perform troubleshooting and workaround for this bug.

            JEPP version {{1.0.28-D20150313T043758}}
            jonah (Inactive) made changes -
            Link New: This issue relates to JSDCLOUD-1762 [ JSDCLOUD-1762 ]
            Confluence Escalation Bot (Inactive) made changes -
            Labels Original: affects-cloud warranty New: affects-cloud affects-server warranty
            Michael S made changes -
            Remote Link Original: This issue links to "Page (Extranet)" [ 268809 ]
            Michael S made changes -
            Remote Link Original: This issue links to "Page (Extranet)" [ 268808 ]

              knguyen@atlassian.com Kha Nguyen (Inactive)
              rgee Richie Gee (Inactive)
              Affected customers:
              1 This affects my team
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: