Opened 14 months ago
Closed 3 months ago
#1488422 closed Bugs (fixed)
attachment lost problem
| Reported by: | neglau | Owned by: | |
|---|---|---|---|
| Priority: | 5 | Milestone: | 0.9-stable |
| Component: | Core functionality | Version: | 0.7.2 |
| Severity: | major | Keywords: | |
| Cc: |
Description
When I sent multiple attachments in the same time, if two or more finished the upload in the exact same time, only one attachment is add to mail.
I think it's a concurrency probleme of the session var.
There is not return info of the problem and the list still contain all the attachments
Change History (9)
comment:1 Changed 12 months ago by alec
comment:2 Changed 12 months ago by DmDS
same problem... fix it please!
comment:3 Changed 12 months ago by alec
#1488554 marked as duplicate of this issue.
comment:4 Changed 11 months ago by alec
- Milestone changed from later to 0.9-beta
In race-condition case the attachment isn't really removed but only attachment info is removed from the session. We could keep attachment info in browser and try to fix session when message is sent/saved.
comment:5 Changed 4 months ago by thomasb
Maybe we should consider using array_merge_recursive() in rcube_session::_fixvars().
comment:6 Changed 4 months ago by thomasb
I found a solution to reduce race conditions when uploading attachments synchronously. See commit [f0a7159c]. Please test with latest checkout from git master.
comment:7 Changed 3 months ago by thomasb
Was anybody able to test the latest git master version? I'd like to get some feedback before backporting the changes to the 0.9 release branch.
comment:8 Changed 3 months ago by alec
It's hard to confirm the fix, because it's hard to confirm the issue by itself. With many tries I wasn't able to reproduce the issue again. I however found another case of it. I wasn't able to save the draft (and send) the message after: 1. upload many files, 2. while next bigger file uploading process is pending remove some of already uploaded files. It looks that after this some attachments already removed are still referenced in the session. This however is not 100% reproducible case, because hitting session race-condition is not simple.
comment:9 Changed 3 months ago by thomasb
- Resolution set to fixed
- Status changed from new to closed
Fixed in release-0.9 branch with commits [d6cbdea0..bd723e56].

Session race-condition would happen and it would be hard to get rid of them. However, we could return number of attachments in session on every upload request response. If the number is different than number of list rows we could send additional (verification) request and remove these which have disapeared from session.