Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
* [sup-talk] curses pinentry woes (still)
@ 2010-02-07 19:10 Sven Moritz Hallberg
  2010-02-07 20:25 ` Michael Stapelberg
  0 siblings, 1 reply; 7+ messages in thread
From: Sven Moritz Hallberg @ 2010-02-07 19:10 UTC (permalink / raw)
  To: sup-talk

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
_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [sup-talk] curses pinentry woes (still)
  2010-02-07 19:10 [sup-talk] curses pinentry woes (still) Sven Moritz Hallberg
@ 2010-02-07 20:25 ` Michael Stapelberg
  2010-02-18 18:10   ` Michael Stapelberg
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Stapelberg @ 2010-02-07 20:25 UTC (permalink / raw)
  To: sup-talk

Hi Sven,

Excerpts from Sven Moritz Hallberg's message of So Feb 07 20:10:04 +0100 2010:
> 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.
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
_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [sup-talk] curses pinentry woes (still)
  2010-02-07 20:25 ` Michael Stapelberg
@ 2010-02-18 18:10   ` Michael Stapelberg
  2010-02-18 18:35     ` Sven Schober
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Stapelberg @ 2010-02-18 18:10 UTC (permalink / raw)
  To: sup-talk

[-- Attachment #1: Type: text/plain, Size: 1053 bytes --]

Hi,

Excerpts from Michael Stapelberg's message of So Feb 07 21:25:57 +0100 2010:
> Excerpts from Sven Moritz Hallberg's message of So Feb 07 20:10:04 +0100 2010:
> > 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.
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.

Could anyone with a little more insight into ruby threads have a look at this
issue please?

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

[-- Attachment #2: poc.rb --]
[-- Type: application/octet-stream, Size: 410 bytes --]

#!/usr/bin/env ruby

require 'thread'

o = Thread.new {
  count = 0
  while count < 3 do
    puts "ohai from #{Process.pid}"
    sleep 1
    count = count + 1
  end
}

Thread.critical = true

# This does not work:
pid = system "sleep 2; echo done"

# This does work (output does not get interrupted):
#count = 0
#while count < 5 do
#  puts "wait!"
#  count = count + 1
#  sleep 2
#end

Thread.critical = false

[-- Attachment #3: Type: text/plain, Size: 140 bytes --]

_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [sup-talk] curses pinentry woes (still)
  2010-02-18 18:10   ` Michael Stapelberg
@ 2010-02-18 18:35     ` Sven Schober
  2010-02-19  3:29       ` Michael Stapelberg
  0 siblings, 1 reply; 7+ messages in thread
From: Sven Schober @ 2010-02-18 18:35 UTC (permalink / raw)
  To: sup-talk

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, sven.schober@uni-ulm.de                    |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
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [sup-talk] curses pinentry woes (still)
  2010-02-18 18:35     ` Sven Schober
@ 2010-02-19  3:29       ` Michael Stapelberg
  2010-02-19 10:30         ` Sven Schober
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Stapelberg @ 2010-02-19  3:29 UTC (permalink / raw)
  To: sup-talk

Hi,

Excerpts from Sven Schober's message of Do Feb 18 19:35:24 +0100 2010:
> 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?
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
_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [sup-talk] curses pinentry woes (still)
  2010-02-19  3:29       ` Michael Stapelberg
@ 2010-02-19 10:30         ` Sven Schober
  2010-02-21 11:13           ` Sven Schober
  0 siblings, 1 reply; 7+ messages in thread
From: Sven Schober @ 2010-02-19 10:30 UTC (permalink / raw)
  To: sup-talk

Excerpts from Michael Stapelberg's message of Fri Feb 19 04:29:28 +0100 2010:
> 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
> 
Thanks, i'll give it a try :)!

> Best regards,
> Michael

Ciao,
 Sven
-- 
Sven Schober, sven.schober@uni-ulm.de                    |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
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [sup-talk] curses pinentry woes (still)
  2010-02-19 10:30         ` Sven Schober
@ 2010-02-21 11:13           ` Sven Schober
  0 siblings, 0 replies; 7+ messages in thread
From: Sven Schober @ 2010-02-21 11:13 UTC (permalink / raw)
  To: sup-talk

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:
> > 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
> > 
> Thanks, i'll give it a try :)!
> 

Works like a charm :).

> > Best regards,
> > Michael
> 
> Ciao,
>  Sven
-- 
Sven Schober, sven.schober@uni-ulm.de                    |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
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-02-21 11:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-07 19:10 [sup-talk] curses pinentry woes (still) Sven Moritz Hallberg
2010-02-07 20:25 ` Michael Stapelberg
2010-02-18 18:10   ` Michael Stapelberg
2010-02-18 18:35     ` Sven Schober
2010-02-19  3:29       ` Michael Stapelberg
2010-02-19 10:30         ` Sven Schober
2010-02-21 11:13           ` Sven Schober

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox