Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
* [sup-talk] Sup and Ruby 1.9.1 - deadlock?
@ 2009-09-15 16:20 Michael Hamann
  2009-09-15 17:53 ` Sean Escriva
  2009-09-15 20:32 ` Rich Lane
  0 siblings, 2 replies; 5+ messages in thread
From: Michael Hamann @ 2009-09-15 16:20 UTC (permalink / raw)


Hi,

as Arch Linux has decided to put Ruby 1.9.1 into the extra repository I've got
Ruby 1.8 replaced by 1.9.1 today. I then tried reinstalling all dependencies of
sup again with Ruby 1.9.1. I've also found a Ferret gem for Ruby 1.9.1 at
http://pennysmalls.com/2009/03/24/ferret-on-ruby-191/.

After that I tried running sup and after seeing the main screen for a few
moments sup crashed with the following error (I'm using the latest version from
next, but with master it's the same):

ThreadError from thread: load threads for thread-index-mode
deadlock; recursive locking
<internal:prelude>:6:in `lock'
<internal:prelude>:6:in `synchronize'
/home/michitux/pub/software/sup/lib/sup/modes/thread-index-mode.rb:757:in `regen_text'
/home/michitux/pub/software/sup/lib/sup/modes/thread-index-mode.rb:687:in `resize'
/home/michitux/pub/software/sup/lib/sup/buffer.rb:87:in `resize'
/home/michitux/pub/software/sup/lib/sup/buffer.rb:328:in `draw_screen'
/home/michitux/pub/software/sup/lib/sup/buffer.rb:728:in `flash'
/home/michitux/pub/software/sup/lib/sup/util.rb:520:in `method_missing'
/home/michitux/pub/software/sup/lib/sup/hook.rb:87:in `rescue in run'
/home/michitux/pub/software/sup/lib/sup/hook.rb:81:in `run'
/home/michitux/pub/software/sup/lib/sup/util.rb:520:in `method_missing'
/home/michitux/pub/software/sup/lib/sup/modes/thread-index-mode.rb:714:in `size_widget_for_thread'
/home/michitux/pub/software/sup/lib/sup/modes/thread-index-mode.rb:226:in `block (2 levels) in update'
/home/michitux/pub/software/sup/lib/sup/modes/thread-index-mode.rb:226:in `map'
/home/michitux/pub/software/sup/lib/sup/modes/thread-index-mode.rb:226:in `block in update'
<internal:prelude>:8:in `synchronize'
/home/michitux/pub/software/sup/lib/sup/modes/thread-index-mode.rb:223:in `update'
/home/michitux/pub/software/sup/lib/sup/modes/thread-index-mode.rb:637:in `load_n_threads'
(eval):12:in `load_n_threads'
/home/michitux/pub/software/sup/lib/sup/modes/thread-index-mode.rb:609:in `block in load_n_threads_background'
/home/michitux/pub/software/sup/lib/sup.rb:77:in `block in reporting_thread

I then tried running sup-dump, it worked without problems, the results looks
correct (just a few changed lines that represent the changes of the last days).

I then installed xapian and tried reimporting my mails and all I've got after
importing 46 mails of about 44000 is:

Scanning maildir:/home/michitux/mail...
/home/michitux/pub/software/sup/lib/sup/message.rb:103:in `gsub': invalid byte sequence in US-ASCII (ArgumentError)
from /home/michitux/pub/software/sup/lib/sup/message.rb:103:in `parse_header'
from /home/michitux/pub/software/sup/lib/sup/message.rb:238:in `load_from_source!'
from /home/michitux/pub/software/sup/lib/sup/message.rb:335:in `build_from_source'
from /home/michitux/pub/software/sup/lib/sup/poll.rb:145:in `block in each_message_from'
from /home/michitux/pub/software/sup/lib/sup/maildir.rb:160:in `block in each'
from /home/michitux/pub/software/sup/lib/sup/maildir.rb:157:in `upto'
from /home/michitux/pub/software/sup/lib/sup/maildir.rb:157:in `each'
from /home/michitux/pub/software/sup/lib/sup/util.rb:560:in `__pass'
from /home/michitux/pub/software/sup/lib/sup/util.rb:547:in `method_missing'
from /home/michitux/pub/software/sup/lib/sup/poll.rb:139:in `each_message_from'
from /home/michitux/pub/software/sup/lib/sup/util.rb:520:in `method_missing'
from bin/sup-sync:146:in `block in <main>'
from bin/sup-sync:141:in `each'
from bin/sup-sync:141:in `<main>'

Running sup with xapian and ruby 1.9.1 works as long as there aren't any mails
displayed, when I e.g. select a label that contains mails, sub crashes again
with the same exception as with ferret.

Is there anything I'm missing, is sup just not ready for Ruby 1.9.1 or is there
another issue?

Greetings
Michael Hamann


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

* [sup-talk] Sup and Ruby 1.9.1 - deadlock?
  2009-09-15 16:20 [sup-talk] Sup and Ruby 1.9.1 - deadlock? Michael Hamann
@ 2009-09-15 17:53 ` Sean Escriva
  2009-09-15 21:24   ` Dusan
  2009-09-15 20:32 ` Rich Lane
  1 sibling, 1 reply; 5+ messages in thread
From: Sean Escriva @ 2009-09-15 17:53 UTC (permalink / raw)


Excerpts from Michael Hamann's message of Tue Sep 15 06:20:59 +0200 2009: 
> Hi,
> 
> as Arch Linux has decided to put Ruby 1.9.1 into the extra repository I've got
> Ruby 1.8 replaced by 1.9.1 today. I then tried reinstalling all dependencies of
> sup again with Ruby 1.9.1. I've also found a Ferret gem for Ruby 1.9.1 at
> http://pennysmalls.com/2009/03/24/ferret-on-ruby-191/.

I followed a similar path after the recent upgrade to no avail. In the
end I downgraded ruby back to 1.8.7_p160 from older arch packages
available here: 

    http://www.schlunix.org/archlinux/extra/os/x86_64/

I'd like a better solution, but I've become dependent on sup for daily
work. 

> [..snip..]


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

* [sup-talk] Sup and Ruby 1.9.1 - deadlock?
  2009-09-15 16:20 [sup-talk] Sup and Ruby 1.9.1 - deadlock? Michael Hamann
  2009-09-15 17:53 ` Sean Escriva
@ 2009-09-15 20:32 ` Rich Lane
  2009-09-26 14:48   ` William Morgan
  1 sibling, 1 reply; 5+ messages in thread
From: Rich Lane @ 2009-09-15 20:32 UTC (permalink / raw)


Excerpts from Michael Hamann's message of Tue Sep 15 12:20:59 -0400 2009:
> Hi,
> 
> as Arch Linux has decided to put Ruby 1.9.1 into the extra repository I've got
> Ruby 1.8 replaced by 1.9.1 today. I then tried reinstalling all dependencies of
> sup again with Ruby 1.9.1. I've also found a Ferret gem for Ruby 1.9.1 at
> http://pennysmalls.com/2009/03/24/ferret-on-ruby-191/.
> 
> After that I tried running sup and after seeing the main screen for a few
> moments sup crashed with the following error (I'm using the latest version from
> next, but with master it's the same):
> 
> ThreadError from thread: load threads for thread-index-mode
> deadlock; recursive locking
> <internal:prelude>:6:in `lock'
> <internal:prelude>:6:in `synchronize'
> /home/michitux/pub/software/sup/lib/sup/modes/thread-index-mode.rb:757:in
> `regen_text'
> /home/michitux/pub/software/sup/lib/sup/modes/thread-index-mode.rb:687:in
> `resize'
> /home/michitux/pub/software/sup/lib/sup/buffer.rb:87:in `resize'
> /home/michitux/pub/software/sup/lib/sup/buffer.rb:328:in `draw_screen'
> /home/michitux/pub/software/sup/lib/sup/buffer.rb:728:in `flash'
> /home/michitux/pub/software/sup/lib/sup/util.rb:520:in `method_missing'
> /home/michitux/pub/software/sup/lib/sup/hook.rb:87:in `rescue in run'
> /home/michitux/pub/software/sup/lib/sup/hook.rb:81:in `run'
> /home/michitux/pub/software/sup/lib/sup/util.rb:520:in `method_missing'
> /home/michitux/pub/software/sup/lib/sup/modes/thread-index-mode.rb:714:in
> `size_widget_for_thread'
> /home/michitux/pub/software/sup/lib/sup/modes/thread-index-mode.rb:226:in
> `block (2 levels) in update'
> /home/michitux/pub/software/sup/lib/sup/modes/thread-index-mode.rb:226:in `map'
> /home/michitux/pub/software/sup/lib/sup/modes/thread-index-mode.rb:226:in
> `block in update'
> <internal:prelude>:8:in `synchronize'
> /home/michitux/pub/software/sup/lib/sup/modes/thread-index-mode.rb:223:in
> `update'
> /home/michitux/pub/software/sup/lib/sup/modes/thread-index-mode.rb:637:in
> `load_n_threads'
> (eval):12:in `load_n_threads'
> /home/michitux/pub/software/sup/lib/sup/modes/thread-index-mode.rb:609:in
> `block in load_n_threads_background'
> /home/michitux/pub/software/sup/lib/sup.rb:77:in `block in reporting_thread
> 

We're calling the size widget hook while holding the thread-index-mode
lock, then the hook throws an exception that results in trying to
acquire the lock again. We shouldn't be calling arbitrary code with
locks held. Until we figure that change out we could just change the
mutex to be a monitor.

> I then tried running sup-dump, it worked without problems, the results looks
> correct (just a few changed lines that represent the changes of the last days).
> 
> I then installed xapian and tried reimporting my mails and all I've got after
> importing 46 mails of about 44000 is:
> 
> Scanning maildir:/home/michitux/mail...
> /home/michitux/pub/software/sup/lib/sup/message.rb:103:in `gsub': invalid byte
> sequence in US-ASCII (ArgumentError)
> from /home/michitux/pub/software/sup/lib/sup/message.rb:103:in `parse_header'
> from /home/michitux/pub/software/sup/lib/sup/message.rb:238:in
> `load_from_source!'
> from /home/michitux/pub/software/sup/lib/sup/message.rb:335:in
> `build_from_source'
> from /home/michitux/pub/software/sup/lib/sup/poll.rb:145:in `block in
> each_message_from'
> from /home/michitux/pub/software/sup/lib/sup/maildir.rb:160:in `block in each'
> from /home/michitux/pub/software/sup/lib/sup/maildir.rb:157:in `upto'
> from /home/michitux/pub/software/sup/lib/sup/maildir.rb:157:in `each'
> from /home/michitux/pub/software/sup/lib/sup/util.rb:560:in `__pass'
> from /home/michitux/pub/software/sup/lib/sup/util.rb:547:in `method_missing'
> from /home/michitux/pub/software/sup/lib/sup/poll.rb:139:in `each_message_from'
> from /home/michitux/pub/software/sup/lib/sup/util.rb:520:in `method_missing'
> from bin/sup-sync:146:in `block in <main>'
> from bin/sup-sync:141:in `each'
> from bin/sup-sync:141:in `<main>'

This is a 1.9 encoding issue. I imagine we have a number of these, even
outside of rmail.

> Running sup with xapian and ruby 1.9.1 works as long as there aren't any mails
> displayed, when I e.g. select a label that contains mails, sub crashes again
> with the same exception as with ferret.
> 
> Is there anything I'm missing, is sup just not ready for Ruby 1.9.1 or is there
> another issue?

I think William said he's been doing some 1.9 work recently. I wouldn't
say it's ready just yet.


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

* [sup-talk] Sup and Ruby 1.9.1 - deadlock?
  2009-09-15 17:53 ` Sean Escriva
@ 2009-09-15 21:24   ` Dusan
  0 siblings, 0 replies; 5+ messages in thread
From: Dusan @ 2009-09-15 21:24 UTC (permalink / raw)


Excerpts from Sean Escriva's message of Tue Sep 15 19:53:39 +0200 2009:
> Excerpts from Michael Hamann's message of Tue Sep 15 06:20:59 +0200 2009: 
> > Hi,
> > 
> > as Arch Linux has decided to put Ruby 1.9.1 into the extra repository I've got
> > Ruby 1.8 replaced by 1.9.1 today. I then tried reinstalling all dependencies of
> > sup again with Ruby 1.9.1. I've also found a Ferret gem for Ruby 1.9.1 at
> > http://pennysmalls.com/2009/03/24/ferret-on-ruby-191/.
> 
> I followed a similar path after the recent upgrade to no avail. In the
> end I downgraded ruby back to 1.8.7_p160 from older arch packages
> available here: 
> 
>     http://www.schlunix.org/archlinux/extra/os/x86_64/
> 
> I'd like a better solution, but I've become dependent on sup for daily
> work. 
> 
> > [..snip..]

This is pretty big question for arch users, including me. I can block
ruby upgrade but it's few month before other distros start using 1.9


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

* [sup-talk] Sup and Ruby 1.9.1 - deadlock?
  2009-09-15 20:32 ` Rich Lane
@ 2009-09-26 14:48   ` William Morgan
  0 siblings, 0 replies; 5+ messages in thread
From: William Morgan @ 2009-09-26 14:48 UTC (permalink / raw)


Reformatted excerpts from Rich Lane's message of 2009-09-15:
> I think William said he's been doing some 1.9 work recently. I wouldn't
> say it's ready just yet.

My current plan is to release an 0.9 tomorrow or so (probably without
advertising the Xapian support), and to focus on Ruby 1.9 support for
the next release.
-- 
William <wmorgan-sup at masanjin.net>


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

end of thread, other threads:[~2009-09-26 14:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-15 16:20 [sup-talk] Sup and Ruby 1.9.1 - deadlock? Michael Hamann
2009-09-15 17:53 ` Sean Escriva
2009-09-15 21:24   ` Dusan
2009-09-15 20:32 ` Rich Lane
2009-09-26 14:48   ` William Morgan

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