Closed Bug 1692484 Opened 3 years ago Closed 3 years ago

Sending mail to bcc with attachment fails, corrupts mail

Categories

(MailNews Core :: Composition, defect)

Thunderbird 86
defect

Tracking

(thunderbird_esr78 unaffected)

RESOLVED FIXED
87 Branch
Tracking Status
thunderbird_esr78 --- unaffected

People

(Reporter: dmccammishjr, Assigned: rnons)

References

(Regression)

Details

(Keywords: perf)

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0

Steps to reproduce:

Attempt to forward mail to Bcc with attachment. Message shows "Assembling mail" forever. Attempt to cancel asks for wait. If cancel, forwarded mail is not editable.
Retry to To (ie, not Bcc) works. Size of attachment not material. (tried with small and very large - no difference). 86.0b2 Windows 10

Actual results:

See above Don't recall ever seeing "Message assembly - done" message before.

Expected results:

Expect message to be sent.

Also tried creating new message to Bcc with small attachment. Same "Assembling message - done" came up and message did send after a wait. Forwarded that mail to bcc with similar results. Forwarding same mail without bcc went immediately - no "Assembling ..." message appeared.

How are you attempting to forward the email?

Using the Forward button in the message header, Forward, or Forward As from the right-click context menu item on the message in the Thread pane?

If Forward As, do you select Inline or Attachment?

All of those (except Forward As > Attachment which I didn't test) worked for me using the 86.0b3 release candidate on Fedora 33 Workstation.

If you are scanning emails with an AV program you might want to disable that and try again.

Flags: needinfo?(dmccammishjr)

(In reply to doug2 from comment #0)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0

Steps to reproduce:

Attempt to forward mail to Bcc with attachment. Message shows "Assembling mail" forever. Attempt to cancel asks for wait. If cancel, forwarded mail is not editable.
Retry to To (ie, not Bcc) works. Size of attachment not material. (tried with small and very large - no difference). 86.0b2 Windows 10

Actual results:

See above Don't recall ever seeing "Message assembly - done" message before.

Expected results:

Expect message to be sent.

I tested with 86.0b3 RC, same as Walt, and it gave me the Assembling Mail" for a few seconds but then went through. Are you comfortable updating to 86.x beta and testing again?

Attached image TB20210214.jpg
Flags: needinfo?(dmccammishjr)

In latest test, I used the Forward in the original message header. Just to be clear, there were no entries in To: or CC: - only Bcc: The attachment shows the Assembling message, which stayed several minutes until I canceled the send. In previous cases, I have "cancelled" and then selected "wait" and waited longer. After cancelling, no further edit was possible - like there was a tight spin in the background. Then I "X" ed the message and got an "Are you sure"
In this case, I was forwarding a message that had an attachment. In another case, I created a message with a Bcc: and attached a small photo (jpg).
I am comfortable downloading and installing any version that will run with my profile (i.e., I can't go backward very far).

Ok. So with TB open, do a CTRL-Shift-J to open Error Console.

  1. Go back to TB and forward a message to Bcc: with attachment but don't click Send yet.
  2. Go back to Error Console and click the garbage can up at top left to clear the screen.
  3. Go back to TB and click Send.

If there are any errors, go back to Error Console and see what's there. Might hold a clue to where things are getting stuck. If there are any errors, perhaps post them here so we can see but be sure to strip out any identifying info.

Performed procedure above. No errors or warnings on error console. (Totally blank) Forwarded mail Bcc: with attachment of about 933 KB. Took probably 45-50 seconds in "assembling message" but then sent. Need to go back and time with smaller attachment.
I have no add-on email scanner unless MS Defender is scanning.

(In reply to doug2 from comment #7)

Performed procedure above. No errors or warnings on error console. (Totally blank) Forwarded mail Bcc: with attachment of about 933 KB. Took probably 45-50 seconds in "assembling message" but then sent. Need to go back and time with smaller attachment.
I have no add-on email scanner unless MS Defender is scanning.

Interesting. So the entire time it was stuck in the assembling message state, no errors? Hmm. Let's try this one.

  1. With TB running do a Ctrl-Shift-I to open Developer Toolbox
  2. An "Incoming Connection box will appear to talk locally to TB, click OK to allow it
  3. On the open Developer Tools screen, press F1 to open the Settings
  4. Click the check-box to the left for Performance. Performance tab should now appear up at the top.
  5. Click the Performance tab and you'll see a button for Start Recording Performance. Don't click it yet. This will help take a performance snapshot of what happens during the time things....stall.
  6. Go back to TB and, again, set up a situation that you know will cause the "assembling message" stall. Basically the last step(s) before you click Send and it goes into a stall. Get to that point.
  7. Once you're ready to re-create the stall, go back to thescreen with Start Recording Performance. Click start and QUICKLY go back and click on Send to start the stall.
  8. Once the stall is over, QUICKLY go back to the Start Recording Performance screen (which should still be recording) and click Stop Recording.
  9. Now, up at the top left, you'll see a blue "Recording #1. There's a Save next to it. Click Save and save the recorded profile to your desktop. It will save as a JSON file.
  10. Go to https://profiler.firefox.com
  11. Click the box that says "load a profile from file" and choose the profile.json file and click Open.
  12. You'll now see a graph looking thing in front of you. Up at the top right, you'll see an Upload button. Click it, check all the boxes and click the blue upload button. It will create a permalink in the form of https://share.firefox.dev/ with some alpha numeric after the forward slash.
  13. Post that Permalink here so it can be looked at. That will tell us more.

Thanks for reporting, the new bcc handling code was introduced in bug 1686636, I realize it is super inefficient now. Will make a fix soon.

Assignee: nobody → remotenonsense
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Regressed by: 1686636

Only parse the MIME head part in _createDeliveryFile.

Target Milestone: --- → 87 Branch
Component: Untriaged → Composition
Keywords: perf
Product: Thunderbird → MailNews Core

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/d9e3d3d48ee5
Make sending bcc mail more efficent in MessageSend.jsm. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: