Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Submissions are exported twice #1240

Closed
conorsch opened this issue Mar 15, 2021 · 6 comments · Fixed by #1241
Closed

Submissions are exported twice #1240

conorsch opened this issue Mar 15, 2021 · 6 comments · Fixed by #1241

Comments

@conorsch
Copy link
Contributor

Recently during Workstation QA, I was surprised to see that files exported to a physical USB stick were exported twice from the client. After tinkering for a bit with package versions, it appears that on my system the latest nightly securedrop-export_0.2.4-dev-20210315-061408 reliably doubles exports, whereas the prod version 0.2.4 does not.

Here's an example of the timestamps generated:

$ find /media/conor/Transfer/ | sort
/media/conor/Transfer/
/media/conor/Transfer/lost+found
/media/conor/Transfer/sd-export-20210315-161039
/media/conor/Transfer/sd-export-20210315-161039/export_data
/media/conor/Transfer/sd-export-20210315-161039/export_data/surf.mp4
/media/conor/Transfer/sd-export-20210315-161048
/media/conor/Transfer/sd-export-20210315-161048/export_data
/media/conor/Transfer/sd-export-20210315-161048/export_data/surf.mp4
/media/conor/Transfer/sd-export-20210315-161439
/media/conor/Transfer/sd-export-20210315-161439/export_data
/media/conor/Transfer/sd-export-20210315-161439/export_data/wikipedia.jpg
/media/conor/Transfer/sd-export-20210315-161455
/media/conor/Transfer/sd-export-20210315-161455/export_data
/media/conor/Transfer/sd-export-20210315-161455/export_data/wikipedia.jpg
/media/conor/Transfer/sd-export-20210315-161939
/media/conor/Transfer/sd-export-20210315-161939/export_data
/media/conor/Transfer/sd-export-20210315-161939/export_data/surf.mp4

There were three (3) export operations performed:

  • surf.mp4 on latest nightly, was doubled
  • wikipedia.jpg on latest nightly, was doubled
  • surf.mp4 on 0.2.4 prod, was not doubled
@eloquence
Copy link
Member

eloquence commented Mar 16, 2021

I've not been able to reproduce with the same nightly version yet -- I only get one copy per export operation. If you can reliably reproduce, it would be helpful to have exact steps, as the order of operations (when does sd-devices VM start, when is USB plugged in, when removed) and the system toast notifications displayed could be significant.

@emkll
Copy link
Contributor

emkll commented Mar 16, 2021

I can reproduce on the latest nightly (20210316) as well, regardless of the order of operations (plug in before sd-devices VM is started, plug in before the "insert usb drive" prompt)

@eloquence
Copy link
Member

Still no "luck" reproducing it here. @creviera mentioned that it may be related to the USB device or formatting; I've only tested with the same export device so far. It is formatted as follows:

Screenshot from 2021-03-16 21-39-40

Or in lsblk language:

sdb                                             8:16   1  29.7G  0 disk  
└─sdb1                                          8:17   1  29.7G  0 part  
  └─luks-0dba726c-fdff-4f35-aede-2dfac81c0230 253:1    0  29.7G  0 crypt /media/erik/Backup

The device itself is a USB-based Flash Card reader, not a traditional USB stick. I'll test with the same device using the latest nightlies with the changes in freedomofpress/securedrop-export#67 to test for any regression on this device. For folks who've seen the issue, it would be useful to compare the above output or other debugging info.

@eloquence
Copy link
Member

eloquence commented Mar 17, 2021

OK, I think we can discount the device/formatting hypothesis. After updating (including the nightlies with freedomofpress/securedrop-export#67) I've now seen the issue a couple of times with the exact same device. However, I'm still not able to reliably reproduce it -- I restarted sys-usb and the issue went away on the next couple of exports.

Note that my last update also pulled in dom0 updates, so it's not necessarily related to any change in the nightlies, especially since Conor/Mickael reported seeing the issue with older nightlies.

@sssoleileraaa
Copy link
Contributor

Based on logs, it looks like the continue_button from the GUI is sending a clicked signal twice when exporting sometimes. So I'm switching my focus to the client code instead of changes that were made here: freedomofpress/securedrop-export#67

@sssoleileraaa sssoleileraaa transferred this issue from freedomofpress/securedrop-export Apr 9, 2021
@sssoleileraaa
Copy link
Contributor

I'm able to repro every time by pressing "Enter" instead of clicking the "Continue" button, which tells you that our QKeyEvent handler isn't handling the even properly. I'll have a fix shortly and would appreciate some extra eyes on testing in case there's another way to repro the issue.

SecureDrop Team Board automation moved this from 1.8.1 Release Period (Kanban Mode) to Done Apr 13, 2021
@conorsch conorsch added this to the 0.5.0 milestone Sep 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

4 participants