Project

General

Profile

Bug #6398

Tails OpenPGP Applet hangs on large text

Added by sajolida almost 5 years ago. Updated 5 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
11/03/2013
Due date:
% Done:

100%

QA Check:
Pass
Feature Branch:
feature/6398-openpgp-applet-1.1
Type of work:
Code
Blueprint:
Starter:
No
Affected tool:
OpenPGP Applet

Description

When trying to decrypt large text using gpgApplet, the applet becomes unresponsive:

- Encrypt a large piece of text: hexdump /bin/bash | gpg --armor --encrypt
- Copy to the clipboard.
- Decrypt using gpgApplet.

The applet starts a GnuPG command (gpg --batch --no-tty --armor --decrypt) but does not terminate even after 45 minutes. Meanwhile, clicking on the gpgApplet does nothing.

Decrypting such text on the command line is almost instantaneous.

Associated revisions

Revision baefee38 (diff)
Added by intrigeri 6 months ago

Install OpenPGP Applet 1.1 (refs: #6398).

This fixes a number of bugs, including failure to decrypt large text.

Revision 68a0c062
Added by bertagaz 6 months ago

Merge remote-tracking branch 'origin/feature/6398-openpgp-applet-1.1' into devel

Fix-committed: #6398

History

#1 Updated by intrigeri almost 5 years ago

When trying to decrypt large text using gpgApplet, the applet becomes unresponsive:

Given our OpenPGP applet has been around for quite long, and now the
first time we are reported this problem, I guess this is not a common
usecase. Therefore, I propose we make this ticket low priority.

#2 Updated by sajolida almost 5 years ago

  • Priority changed from Normal to Low

#3 Updated by nodens about 4 years ago

It looks like a buffering problem.

However simply set the "direct" option on $gnupg->handles causes illegal seeks / print to closed FH, since we use the same FH to check whether it's a message or not. So it would need a different approach (duplicate filehandle ?).

#4 Updated by nodens about 4 years ago

  • Subject changed from gpgApplet hangs on large text to Tails OpenPGP Applet hangs on large text

#5 Updated by BitingBird over 3 years ago

  • Affected tool set to OpenPGP Applet

#6 Updated by nodens almost 2 years ago

For what it's worth, this problem still exists after switching to gpg2 and gtk3 (which confirm the probable buffering pb in perl)

#7 Updated by nodens 10 months ago

  • Assignee set to nodens

I had a look into it again.

The issue is indeed a buffer deadlock problem. Both openpgp-applet and the spawned gpg process lock on write while decrypting the large block.

Mail::Gnupg, using GnuPG::Interface as well, used to have a similar problem, until it switched to a select(2) based loop to read/write simultaneously from the gpg process: https://rt.cpan.org/Public/Bug/Display.html?id=21276#txn-407915

We should do the same.

#8 Updated by nodens 10 months ago

  • Status changed from Confirmed to In Progress
  • % Done changed from 0 to 70
  • Feature Branch set to bug/6398-hangs_on_large_text

First tests are good!
I pushed it on the corresponding branch of openpgp-applet git repo.
I need to test all the cases for unforeseen breakage, but it should be ready for review & merge soon.

#9 Updated by nodens 10 months ago

  • Assignee changed from nodens to intrigeri
  • % Done changed from 70 to 80
  • QA Check set to Ready for QA

Tests are OK on my side.

Assigning to intrigeri since I'm not sure anyone else is familiar with OpenPGP Applet code anymore (beside me).

#10 Updated by intrigeri 10 months ago

  • Feature Branch changed from bug/6398-hangs_on_large_text to nodens/openpgp-applet.git:bug/6398-hangs_on_large_text

#11 Updated by intrigeri 10 months ago

  • Assignee changed from intrigeri to nodens
  • % Done changed from 80 to 90
  • QA Check changed from Ready for QA to Dev Needed
  • Wrt. my $DEBUG = 0;, I generally prefer the more flexible my $DEBUG = $ENV{'DEBUG'}; that allows one to enable debugging output without editing the program itself.
  • Please keep imports (use) sorted (Errno).

Other than these minor nitpicks, looks good to me!

#12 Updated by nodens 10 months ago

  • Status changed from In Progress to Fix committed
  • % Done changed from 90 to 100
  • QA Check deleted (Dev Needed)

intrigeri wrote:

  • Wrt. my $DEBUG = 0;, I generally prefer the more flexible my $DEBUG = $ENV{'DEBUG'}; that allows one to enable debugging output without editing the program itself.

Good idea. Done.

  • Please keep imports (use) sorted (Errno).

Done as well, except for Locale stuff which makes more sens appart IMO (it's more configuration than import since we define the TextDomain).

Other than these minor nitpicks, looks good to me!

Thanks, merged!
Will mark as resolved on next OpenPGP applet release.

#13 Updated by anonym 9 months ago

  • Target version set to Tails_3.5

We didn't get this fix in Tails 3.3.

#14 Updated by intrigeri 9 months ago

anonym wrote:

We didn't get this fix in Tails 3.3.

I've filed #14982 to track the workflow issue that anonym has noticed here.

#15 Updated by intrigeri 8 months ago

  • Target version changed from Tails_3.5 to Tails_3.6

(I doubt we'll bump our APT snapshots again for 3.5, so even if a new upstream release was uploaded to sid and we added APT pinning to get it, we would not have it in Tails 3.5.)

#16 Updated by nodens 6 months ago

  • Subject changed from Tails OpenPGP Applet hangs on large text to Tails OpenPGP Applet hangs on large text (fixed upstream)
  • Status changed from Fix committed to Confirmed
  • Assignee deleted (nodens)
  • Priority changed from Low to Normal
  • Feature Branch deleted (nodens/openpgp-applet.git:bug/6398-hangs_on_large_text)

This this is fixed upstream, and the fix is in Debian, let's try to fix the workflow by updating some fields ;)

The actual thing to do is take a newer snapshot from Sid. Or I can provide a backport in stretch-backport but it looks like useless work since we currently use a Sid snapshot...

#17 Updated by intrigeri 6 months ago

  • Assignee set to intrigeri

I'll take a look to see if we can trivially install the new package in 3.6.

#18 Updated by intrigeri 6 months ago

  • Status changed from Confirmed to In Progress
  • Assignee changed from intrigeri to nodens
  • % Done changed from 100 to 50
  • QA Check set to Info Needed

nodens wrote:

This this is fixed upstream, and the fix is in Debian

In which version is this fixed, exactly? I see nothing about this in the 1.0-2 changelog entry.

#19 Updated by nodens 6 months ago

  • QA Check changed from Info Needed to Dev Needed

You're right, I got confused, sorry.

There wasn't any release since the fix was commited _

So let's release 1.1 - well, maybe postpone the actual release until openpgp-applet.pages.debian.net is actually reachable using TLS.

#20 Updated by intrigeri 6 months ago

So let's release 1.1 - well, maybe postpone the actual release until openpgp-applet.pages.debian.net is actually reachable using TLS.

If that's not planned to happen by the end of the month, I'd rather not block on this.

#21 Updated by nodens 6 months ago

Let's encrypt wildcard support is planned for 02/27.
I'll try to find out if it's planned to have it right away on pages.debian.net, but anyway we can always release on salsa and communicate only after the homepage is actually working.

#22 Updated by nodens 6 months ago

Upstream issue: https://salsa.debian.org/openpgp-applet-team/openpgp-applet/issues/3

Not closing it here since there is Tails' work to be done to have it in Tails.

#23 Updated by intrigeri 6 months ago

Not closing it here since there is Tails' work to be done to have it in Tails.

Right. Please ping me here if OpenPGP Applet reaches the Debian archive in time for the 3.6 freeze!

#24 Updated by nodens 6 months ago

  • Assignee changed from nodens to intrigeri

The new version has been uploaded a moment ago. It should reach the archive soon :)
https://tracker.debian.org/news/936454

#25 Updated by intrigeri 6 months ago

  • Feature Branch set to feature/6398-openpgp-applet-1.1

#26 Updated by intrigeri 6 months ago

  • Subject changed from Tails OpenPGP Applet hangs on large text (fixed upstream) to Tails OpenPGP Applet hangs on large text

#27 Updated by intrigeri 6 months ago

  • Assignee changed from intrigeri to bertagaz
  • QA Check changed from Dev Needed to Ready for QA

Passes (locally) all scenarios that use OpenPGP Applet.

#28 Updated by nodens 6 months ago

FYI, manual tests on en_US and fr_FR are OK too.

#29 Updated by bertagaz 6 months ago

  • Status changed from In Progress to Fix committed
  • Assignee deleted (bertagaz)
  • % Done changed from 50 to 100
  • QA Check changed from Ready for QA to Pass

Ok, passes manual and automated tests, so I've merged it so that it will be shipped in 3.6. Congats!

#30 Updated by bertagaz 5 months ago

  • Status changed from Fix committed to Resolved

Also available in: Atom PDF