You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pylucene-dev@lucene.apache.org by Michael McCandless <lu...@mikemccandless.com> on 2011/11/19 23:09:01 UTC
SIGSEGV if I give wrong args to IndexWriterConfig ctor
Does anyone else see this?
import lucene
lucene.initVM()
lucene.IndexWriterConfig(lucene.Version.LUCENE_34)
--> SIGSEGV?
IndexWriterConfig expects an analyzer as a 2nd argument... but I would
expect a nice "lucene.InvalidArgsError" instead (that's what I hit if
I pass no args to IWC).
NOTE: it could be I somehow screwed something up... I built PyLucene
off 3.x tip (to be 3.5.0), and enabled the spellchecker module.
Mike McCandless
http://blog.mikemccandless.com
Re: SIGSEGV if I give wrong args to IndexWriterConfig ctor
Posted by Andi Vajda <va...@apache.org>.
On Sat, 19 Nov 2011, Michael McCandless wrote:
>> I need to take a closer look about what's different with this class.
>
> Strange...
>
> As long as I pass the analyzer as the 2nd arg (as I'm supposed to!)
> everything works fine; it's only if I leave off that 2nd arg that I
> hit the SEGV.
Wow, that's even stranger. That's not what I saw in gdb...
Could you please send me a small piece of Python that reproduces this ?
Andi..
Re: SIGSEGV if I give wrong args to IndexWriterConfig ctor
Posted by Michael McCandless <lu...@mikemccandless.com>.
On Sat, Nov 19, 2011 at 6:34 PM, Andi Vajda <va...@apache.org> wrote:
>
> On Sat, 19 Nov 2011, Andi Vajda wrote:
>
>>>> I need to take a closer look about what's different with this class.
>>>
>>> Strange...
>>>
>>> As long as I pass the analyzer as the 2nd arg (as I'm supposed to!)
>>> everything works fine; it's only if I leave off that 2nd arg that I
>>> hit the SEGV.
>>
>> Wow, you're right. There is indeed a bug with argument parsing here.
>> I just added a sanity check and the crash no longer reproduces.
>> Very strange...
>
> Fixed in 1204103.
> I wonder how this bug went undetected for so long :-( (yes, more unit tests)
Thanks Andi!
Mike McCandless
http://blog.mikemccandless.com
Re: SIGSEGV if I give wrong args to IndexWriterConfig ctor
Posted by Andi Vajda <va...@apache.org>.
On Sat, 19 Nov 2011, Andi Vajda wrote:
>>> I need to take a closer look about what's different with this class.
>>
>> Strange...
>>
>> As long as I pass the analyzer as the 2nd arg (as I'm supposed to!)
>> everything works fine; it's only if I leave off that 2nd arg that I
>> hit the SEGV.
>
> Wow, you're right. There is indeed a bug with argument parsing here.
> I just added a sanity check and the crash no longer reproduces.
> Very strange...
Fixed in 1204103.
I wonder how this bug went undetected for so long :-( (yes, more unit tests)
Andi..
Re: SIGSEGV if I give wrong args to IndexWriterConfig ctor
Posted by Andi Vajda <va...@apache.org>.
On Sat, 19 Nov 2011, Michael McCandless wrote:
> On Sat, Nov 19, 2011 at 5:53 PM, Andi Vajda <va...@apache.org> wrote:
>>
>> On Sat, 19 Nov 2011, Andi Vajda wrote:
>>
>>> Hi Mike,
>>>
>>> On Sat, 19 Nov 2011, Michael McCandless wrote:
>>>
>>>> Does anyone else see this?
>>>>
>>>> import lucene
>>>>
>>>> lucene.initVM()
>>>> lucene.IndexWriterConfig(lucene.Version.LUCENE_34)
>>>>
>>>> --> SIGSEGV?
>>>>
>>>>
>>>> IndexWriterConfig expects an analyzer as a 2nd argument... but I would
>>>> expect a nice "lucene.InvalidArgsError" instead (that's what I hit if
>>>> I pass no args to IWC).
>>>>
>>>> NOTE: it could be I somehow screwed something up... I built PyLucene
>>>> off 3.x tip (to be 3.5.0), and enabled the spellchecker module.
>>>
>>> I can reproduce this here too and it doesn't look like the missing
>>> argument is the problem. It's crashing when handling the first one...
>>
>> There's got to be something wrong with IndexWriterConfig's wrapper since
>> StopAnalyzer(Version.LUCENE_34) works fine and all tests pass.
>>
>> I need to take a closer look about what's different with this class.
>
> Strange...
>
> As long as I pass the analyzer as the 2nd arg (as I'm supposed to!)
> everything works fine; it's only if I leave off that 2nd arg that I
> hit the SEGV.
Wow, you're right. There is indeed a bug with argument parsing here.
I just added a sanity check and the crash no longer reproduces.
Very strange...
Andi..
Re: SIGSEGV if I give wrong args to IndexWriterConfig ctor
Posted by Michael McCandless <lu...@mikemccandless.com>.
On Sat, Nov 19, 2011 at 5:53 PM, Andi Vajda <va...@apache.org> wrote:
>
> On Sat, 19 Nov 2011, Andi Vajda wrote:
>
>> Hi Mike,
>>
>> On Sat, 19 Nov 2011, Michael McCandless wrote:
>>
>>> Does anyone else see this?
>>>
>>> import lucene
>>>
>>> lucene.initVM()
>>> lucene.IndexWriterConfig(lucene.Version.LUCENE_34)
>>>
>>> --> SIGSEGV?
>>>
>>>
>>> IndexWriterConfig expects an analyzer as a 2nd argument... but I would
>>> expect a nice "lucene.InvalidArgsError" instead (that's what I hit if
>>> I pass no args to IWC).
>>>
>>> NOTE: it could be I somehow screwed something up... I built PyLucene
>>> off 3.x tip (to be 3.5.0), and enabled the spellchecker module.
>>
>> I can reproduce this here too and it doesn't look like the missing
>> argument is the problem. It's crashing when handling the first one...
>
> There's got to be something wrong with IndexWriterConfig's wrapper since
> StopAnalyzer(Version.LUCENE_34) works fine and all tests pass.
>
> I need to take a closer look about what's different with this class.
Strange...
As long as I pass the analyzer as the 2nd arg (as I'm supposed to!)
everything works fine; it's only if I leave off that 2nd arg that I
hit the SEGV.
Mike McCandless
http://blog.mikemccandless.com
Re: SIGSEGV if I give wrong args to IndexWriterConfig ctor
Posted by Andi Vajda <va...@apache.org>.
On Sat, 19 Nov 2011, Andi Vajda wrote:
> Hi Mike,
>
> On Sat, 19 Nov 2011, Michael McCandless wrote:
>
>> Does anyone else see this?
>>
>> import lucene
>>
>> lucene.initVM()
>> lucene.IndexWriterConfig(lucene.Version.LUCENE_34)
>>
>> --> SIGSEGV?
>>
>>
>> IndexWriterConfig expects an analyzer as a 2nd argument... but I would
>> expect a nice "lucene.InvalidArgsError" instead (that's what I hit if
>> I pass no args to IWC).
>>
>> NOTE: it could be I somehow screwed something up... I built PyLucene
>> off 3.x tip (to be 3.5.0), and enabled the spellchecker module.
>
> I can reproduce this here too and it doesn't look like the missing argument
> is the problem. It's crashing when handling the first one...
There's got to be something wrong with IndexWriterConfig's wrapper since
StopAnalyzer(Version.LUCENE_34) works fine and all tests pass.
I need to take a closer look about what's different with this class.
Andi..
Re: SIGSEGV if I give wrong args to IndexWriterConfig ctor
Posted by Andi Vajda <va...@apache.org>.
Hi Mike,
On Sat, 19 Nov 2011, Michael McCandless wrote:
> Does anyone else see this?
>
> import lucene
>
> lucene.initVM()
> lucene.IndexWriterConfig(lucene.Version.LUCENE_34)
>
> --> SIGSEGV?
>
>
> IndexWriterConfig expects an analyzer as a 2nd argument... but I would
> expect a nice "lucene.InvalidArgsError" instead (that's what I hit if
> I pass no args to IWC).
>
> NOTE: it could be I somehow screwed something up... I built PyLucene
> off 3.x tip (to be 3.5.0), and enabled the spellchecker module.
I can reproduce this here too and it doesn't look like the missing argument
is the problem. It's crashing when handling the first one...
Andi..