Good afternoon,
We use the database_attachments plugin which ships with Roundcube so that attachments can be shared between several frontend HTTP servers.
Yesterday two separate users reported if they tried to add more than four attachments to a message as a single action (using the + icon on the "Attach a file" popup dialogue) then they ended up with a subset of the attachments in the message which is actually sent. If they add one attachment at a time then things work correctly.
I can reproduce the effect using a vanilla Roundcube 0.9.5 installation on my workstation, where database_attachments is the only plugin enabled.
The database backend is the version of PostgresSQL which ships with Ubuntu 12.04. However I don't think that this is relevant: I see the same effect using a MySQL database backend (Although the set of attachments which are included seems to be different. I suspect that is down to how long it takes the database to respond).
If I try to upload eight separate one megabyte attachments named "1" through "8" to a message then a couple of error_log()s in plugins/database_attachments/database_attachments.php demonstrate that:
upload() is called eight times with eight different values of $key and $args['path']) :
error_log("$key: " . $args['path']);
[05-Nov-2013 15:35:34 UTC] db_attach788020912527910211f9a04443d5710812137b8ebe4c25dc8bf2c1: /tmp/phpDgncns [05-Nov-2013 15:35:34 UTC] db_attach788020912527910211f9a08a18b3ac92fc39795bb3901b6c19a3b6: /tmp/phpCqcYsA [05-Nov-2013 15:35:34 UTC] db_attach788020912527910211f9a0aa3a8e27f74529ebb28e27deb966785f: /tmp/phpk13kEI [05-Nov-2013 15:35:34 UTC] db_attach788020912527910211f9a0350d6337c754f8af149d10b6ff66b83c: /tmp/phpTnwbWQ [05-Nov-2013 15:35:35 UTC] db_attach788020912527910211f9a094052dd72eb685039d2bd6b4b487f383: /tmp/phpG5s8lZ [05-Nov-2013 15:35:35 UTC] db_attach788020912527910211f9a0cca944717a5bdc8bad02c7b33b56168b: /tmp/phpzFTHT7 [05-Nov-2013 15:35:35 UTC] db_attach788020912527910211f9a0b628e62fac77af94bfbfefcdaa16d12e: /tmp/phpLmfRzg [05-Nov-2013 15:35:35 UTC] db_attach788020912527910211f9a0eb80e6847af8534a93432c6b45df87bc: /tmp/phpbCBMnp
However the get() method lower down the same file is only called for four of these key values:
/**
* When displaying or sending the attachment the file contents are
fetched * using this method. This is also called by the attachment_display hook. */ function get($args)
error_log($args['id']);
[05-Nov-2013 15:35:40 UTC] db_attach788020912527910211f9a094052dd72eb685039d2bd6b4b487f383 [05-Nov-2013 15:35:40 UTC] db_attach788020912527910211f9a0cca944717a5bdc8bad02c7b33b56168b [05-Nov-2013 15:35:40 UTC] db_attach788020912527910211f9a0b628e62fac77af94bfbfefcdaa16d12e [05-Nov-2013 15:35:40 UTC] db_attach788020912527910211f9a0eb80e6847af8534a93432c6b45df87bc
My suspicion is that this is some variation on the following bug report:
http://trac.roundcube.net/ticket/1488422
where the Roundcube session state loses track of the asynchronous upload requests.
Things work correctly if I disable database_attachments and use the file store instead. While I can probably rig things to work without database_attachments, I would prefer to fix the plugin if that is possible.
I'm happy to write this up as a ticket on trac.roundcube.net. I thought that I would just ask here first to see if anyone else had encountered the same problem and had a workaround.
Thanks in advance for any help which people can provide.