* [sup-talk] crash when sup-syncing to xapian
@ 2009-08-18 17:35 Ben Walton
2009-08-18 18:20 ` Benoît PIERRE
2009-08-19 18:39 ` William Morgan
0 siblings, 2 replies; 8+ messages in thread
From: Ben Walton @ 2009-08-18 17:35 UTC (permalink / raw)
I just tried to import my index to xapian and it crashed part way
through the import. I then discovered that I couldn't use ferret
either. There is something wonky with label handling, as per attached
exception log. I haven't had a chance to look at the code yet, but
I'll poke at it tonight.
Thanks
-Ben
--
Ben Walton
Systems Programmer - CHASS
University of Toronto
C:416.407.5610 | W:416.978.4302
GPG Key Id: 8E89F6D2; Key Server: pgp.mit.edu
Contact me to arrange for a CAcert assurance meeting.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: sup-exception-log.txt
URL: <http://rubyforge.org/pipermail/sup-talk/attachments/20090818/28bccae3/attachment.txt>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [sup-talk] crash when sup-syncing to xapian
2009-08-18 17:35 [sup-talk] crash when sup-syncing to xapian Ben Walton
@ 2009-08-18 18:20 ` Benoît PIERRE
2009-08-18 18:42 ` Rich Lane
2009-08-19 18:39 ` William Morgan
1 sibling, 1 reply; 8+ messages in thread
From: Benoît PIERRE @ 2009-08-18 18:20 UTC (permalink / raw)
Excerpts from Ben Walton's message of Tue Aug 18 19:35:35 +0200 2009:
>
> I just tried to import my index to xapian and it crashed part way
> through the import. I then discovered that I couldn't use ferret
> either. There is something wonky with label handling, as per attached
> exception log. I haven't had a chance to look at the code yet, but
> I'll poke at it tonight.
I think I just ran into the same problem! For now I fixed it with
the following small patch:
diff --git a/lib/sup/label.rb b/lib/sup/label.rb
index 67474c2..59c0c0f 100644
--- a/lib/sup/label.rb
+++ b/lib/sup/label.rb
@@ -61,6 +61,7 @@ class LabelManager
end
def << t
+ t = t.to_sym if t.is_a? String
raise ArgumentError, "expecting a symbol" unless t.is_a? Symbol
unless @labels.member?(t) || RESERVED_LABELS.member?(t)
@labels[t] = true
--
A: Because it destroys the flow of conversation.
Q: Why is top posting dumb?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 289 bytes
Desc: not available
URL: <http://rubyforge.org/pipermail/sup-talk/attachments/20090818/4a4ab3f7/attachment.bin>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [sup-talk] crash when sup-syncing to xapian
2009-08-18 18:20 ` Benoît PIERRE
@ 2009-08-18 18:42 ` Rich Lane
2009-08-18 19:17 ` Benoît PIERRE
0 siblings, 1 reply; 8+ messages in thread
From: Rich Lane @ 2009-08-18 18:42 UTC (permalink / raw)
Excerpts from Beno?t PIERRE's message of Tue Aug 18 14:20:41 -0400 2009:
> Excerpts from Ben Walton's message of Tue Aug 18 19:35:35 +0200 2009:
> >
> > I just tried to import my index to xapian and it crashed part way
> > through the import. I then discovered that I couldn't use ferret
> > either. There is something wonky with label handling, as per attached
> > exception log. I haven't had a chance to look at the code yet, but
> > I'll poke at it tonight.
>
> I think I just ran into the same problem! For now I fixed it with
> the following small patch:
That's odd because the Xapian code passes the labels straight through
from the message to LabelManager. Try instrumenting Message#labels= to
raise an exception if any member of the set is not a Symbol.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [sup-talk] crash when sup-syncing to xapian
2009-08-18 18:42 ` Rich Lane
@ 2009-08-18 19:17 ` Benoît PIERRE
2009-08-18 19:52 ` Rich Lane
0 siblings, 1 reply; 8+ messages in thread
From: Benoît PIERRE @ 2009-08-18 19:17 UTC (permalink / raw)
Excerpts from Rich Lane's message of Tue Aug 18 20:42:13 +0200 2009:
> Excerpts from Beno?t PIERRE's message of Tue Aug 18 14:20:41 -0400 2009:
> > Excerpts from Ben Walton's message of Tue Aug 18 19:35:35 +0200 2009:
> > >
> > > I just tried to import my index to xapian and it crashed part way
> > > through the import. I then discovered that I couldn't use ferret
> > > either. There is something wonky with label handling, as per attached
> > > exception log. I haven't had a chance to look at the code yet, but
> > > I'll poke at it tonight.
> >
> > I think I just ran into the same problem! For now I fixed it with
> > the following small patch:
>
> That's odd because the Xapian code passes the labels straight through
> from the message to LabelManager. Try instrumenting Message#labels= to
> raise an exception if any member of the set is not a Symbol.
I applied the following patch:
diff --git a/lib/sup/message.rb b/lib/sup/message.rb
index 965c10e..9156c02 100644
--- a/lib/sup/message.rb
+++ b/lib/sup/message.rb
@@ -1,4 +1,5 @@
require 'time'
+require 'pp'
module Redwood
@@ -183,6 +184,7 @@ class Message
def labels= l
raise ArgumentError, "not a set" unless l.is_a?(Set)
return if @labels == l
+ warn "labels=#{l.pretty_inspect}"
@labels = l
@dirty = true
end
And get this in the logs:
[Tue Aug 18 21:12:39 +0200 2009] WARNING: labels=#<Set: {:inbox, :unread, "aquarius", "music"}>
[Tue Aug 18 21:12:39 +0200 2009] WARNING: labels=#<Set: {:inbox, :unread, "metalblade", "music"}>
--
A: Because it destroys the flow of conversation.
Q: Why is top posting dumb?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://rubyforge.org/pipermail/sup-talk/attachments/20090818/721494a9/attachment.bin>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [sup-talk] crash when sup-syncing to xapian
2009-08-18 19:17 ` Benoît PIERRE
@ 2009-08-18 19:52 ` Rich Lane
2009-08-18 20:14 ` Benoît PIERRE
0 siblings, 1 reply; 8+ messages in thread
From: Rich Lane @ 2009-08-18 19:52 UTC (permalink / raw)
Excerpts from Beno?t PIERRE's message of Tue Aug 18 15:17:03 -0400 2009:
> Excerpts from Rich Lane's message of Tue Aug 18 20:42:13 +0200 2009:
> > Excerpts from Beno?t PIERRE's message of Tue Aug 18 14:20:41 -0400 2009:
> > > Excerpts from Ben Walton's message of Tue Aug 18 19:35:35 +0200 2009:
> > > >
> > > > I just tried to import my index to xapian and it crashed part way
> > > > through the import. I then discovered that I couldn't use ferret
> > > > either. There is something wonky with label handling, as per attached
> > > > exception log. I haven't had a chance to look at the code yet, but
> > > > I'll poke at it tonight.
> > >
> > > I think I just ran into the same problem! For now I fixed it with
> > > the following small patch:
> >
> > That's odd because the Xapian code passes the labels straight through
> > from the message to LabelManager. Try instrumenting Message#labels= to
> > raise an exception if any member of the set is not a Symbol.
>
> I applied the following patch:
>
> diff --git a/lib/sup/message.rb b/lib/sup/message.rb
> index 965c10e..9156c02 100644
> --- a/lib/sup/message.rb
> +++ b/lib/sup/message.rb
> @@ -1,4 +1,5 @@
> require 'time'
> +require 'pp'
>
> module Redwood
>
> @@ -183,6 +184,7 @@ class Message
> def labels= l
> raise ArgumentError, "not a set" unless l.is_a?(Set)
> return if @labels == l
> + warn "labels=#{l.pretty_inspect}"
> @labels = l
> @dirty = true
> end
>
> And get this in the logs:
>
> [Tue Aug 18 21:12:39 +0200 2009] WARNING: labels=#<Set: {:inbox, :unread,
> "aquarius", "music"}>
> [Tue Aug 18 21:12:39 +0200 2009] WARNING: labels=#<Set: {:inbox, :unread,
> "metalblade", "music"}>
>
It'd be nice to get a backtrace including the offending caller. I'd just
replace the warn with a fail.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [sup-talk] crash when sup-syncing to xapian
2009-08-18 19:52 ` Rich Lane
@ 2009-08-18 20:14 ` Benoît PIERRE
2009-08-19 0:03 ` Ben Walton
0 siblings, 1 reply; 8+ messages in thread
From: Benoît PIERRE @ 2009-08-18 20:14 UTC (permalink / raw)
Excerpts from Rich Lane's message of Tue Aug 18 21:52:12 +0200 2009:
> Excerpts from Beno?t PIERRE's message of Tue Aug 18 15:17:03 -0400 2009:
>
> [...]
>
> It'd be nice to get a backtrace including the offending caller. I'd just
> replace the warn with a fail.
The problem comes from my ~/.sup/sources.yaml file, the labels for a source
are not symbols:
hash:
relapse: true
music: true
After converting them to symbols it works:
hash:
:relapse: true
:music: true
--
A: Because it destroys the flow of conversation.
Q: Why is top posting dumb?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://rubyforge.org/pipermail/sup-talk/attachments/20090818/94c721f9/attachment.bin>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [sup-talk] crash when sup-syncing to xapian
2009-08-18 17:35 [sup-talk] crash when sup-syncing to xapian Ben Walton
2009-08-18 18:20 ` Benoît PIERRE
@ 2009-08-19 18:39 ` William Morgan
1 sibling, 0 replies; 8+ messages in thread
From: William Morgan @ 2009-08-19 18:39 UTC (permalink / raw)
Reformatted excerpts from Ben Walton's message of 2009-08-18:
> There is something wonky with label handling, as per attached
> exception log.
This should be fixed in next. It was a result of some of the API
refactoring I've been doing recently. Everyone's source.yaml should now
automagically revert to the format from the good ol' days.
--
William <wmorgan-sup at masanjin.net>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2009-08-19 18:39 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-18 17:35 [sup-talk] crash when sup-syncing to xapian Ben Walton
2009-08-18 18:20 ` Benoît PIERRE
2009-08-18 18:42 ` Rich Lane
2009-08-18 19:17 ` Benoît PIERRE
2009-08-18 19:52 ` Rich Lane
2009-08-18 20:14 ` Benoît PIERRE
2009-08-19 0:03 ` Ben Walton
2009-08-19 18:39 ` William Morgan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox