Subject: Re: [sup-talk] curses pinentry woes (still)

From: Sven Schober <[email-masked]>
Date: Thu, 18 Feb 2010 19:35:24 +0100

Excerpts from Michael Stapelberg's message of Thu Feb 18 19:10:07 +0100 2010:
> Could anyone with a little more insight into ruby threads have a look at this
> issue please?

+1

> Best regards,
> Michael

Ciao,
 Sven
-- 
Sven Schober, [email-masked]                    |UNI ULM
http://www-vs.informatik.uni-ulm.de/dept/staff/schober/  |DISTRIBUTED
Room O27-346, Phone: +49-731-5024146 [+49-179-5060182]   |SYSTEMS LAB
_______________________________________________
sup-talk mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-talk

---

From: Sven Moritz Hallberg <[email-masked]>
Date: Sun, 07 Feb 2010 20:10:04 +0100

Hi List,

I see there have been posts about this before, the last from Oct 2009.
Whenever gpg-agent starts pinentry-curses with sup running, the interface gets
"messed up". Unfortunately, I'm still experiencing such a problem with sup
version 0.10.2.

Specifically, when the pinentry screen appears and I press the first key, sup
suddenly reappears, the cursor moves to the bottom right corner and the
passphrase stars start appearing there, wrapping over to the left. When I press
Enter, pinentry reappears and almost always states "wrong passphrase", so I
presume something about the input must get mangled somewhere. Now when I try
again, everything looks as it should (in pinentry) and the passphrase is
accepted. However, after that, sup does not behave normally. The screen does
not update and commands only seem to be recognized if Enter is pressed
afterwards. So I have to press "q Enter" and restart.

On a related note, it asks for the passphrase periodically. Does it require gpg
calls every time it polls for new messages? Is there a way to stop that?

Regards,
Sven

---

From: Michael Stapelberg <[email-masked]>
Date: Fri, 19 Feb 2010 04:29:28 +0100

Hi,

> > Could anyone with a little more insight into ruby threads have a look at this
In the meantime, I fixed the problem (at least it works for me). You can get my
patch at sup-devel, see
http://rubyforge.org/pipermail/sup-devel/2010-February/000373.html

Best regards,
Michael

---

From: Michael Stapelberg <[email-masked]>
Date: Sun, 07 Feb 2010 21:25:57 +0100

Hi Sven,

> "messed up". Unfortunately, I'm still experiencing such a problem with sup
I have a similar problem, though it only happens when sup has other output to
my terminal while the pinentry is running. That is, when you catch a quiet
moment (between polling intervals), you can enter your passphrase without any
problems.

I intend to fix this problem in a few weeks, if nobody does it before I do.

Best regards,
Michael

---

From: Sven Schober <[email-masked]>
Date: Sun, 21 Feb 2010 12:13:35 +0100

Excerpts from Sven Schober's message of Fri Feb 19 11:30:49 +0100 2010:
> Excerpts from Michael Stapelberg's message of Fri Feb 19 04:29:28 +0100 2010:
> Thanks, i'll give it a try :)!
> 

Works like a charm :).

---

From: Michael Stapelberg <[email-masked]>
Date: Thu, 18 Feb 2010 19:10:07 +0100

Hi,

> > "messed up". Unfortunately, I'm still experiencing such a problem with sup
Further debugging told me that it is a thread related problem. You can work
around it by disabling threads when starting sup using the -n option.

The problem seems to be that other threads still run while one thread calls
system (which in turn uses fork, which seems to be the real cause of the
problem). Even using Thread.critical = true does not fix the problem (it is
removed in ruby 1.9 anyways). I’ve attached a proof of concept which
illustrates the problem.

Specifically, if you comment out the call to reporting_thread in
lib/sup/modes/thread-index-mode.rb:101, it seems to work.

Best regards,
Michael

---

From: Sven Schober <[email-masked]>
Date: Fri, 19 Feb 2010 11:30:49 +0100

Ciao,
 Sven