Bug: Logos crashes doing a Syntax Search on an unordered group

Page 1 of 2 (22 items) 1 2 Next >
This post has 21 Replies | 0 Followers

Posts 21917
Forum MVP
Graham Criddle | Forum Activity | Posted: Tue, Nov 30 2010 7:38 AM | Locked

Hi

As per the discussion in http://community.logos.com/forums/p/26601/196424.aspx#196424 doing a particular Syntax Search against an unordered group causes a crash:

 

On my system this produces the crash log below:

1715.Logos4Crash.txt

but as you can see from http://community.logos.com/forums/p/26601/196407.aspx#196407 other crash types can occur as well.

I am running 4.2 B7

Graham

Posts 4077
Melissa Snyder | Forum Activity | Replied: Tue, Nov 30 2010 10:23 AM | Locked

Both crash logs (yours and Ka-Liong's) appear to be from previous crashes. Yours is dated 11-25 and his is dated 10-16. The program seems to be closing, but not producing a Logos4Crash.txt file (I'm seeing the same thing). 

I'll submit a report. Thanks.

Posts 21917
Forum MVP
Graham Criddle | Forum Activity | Replied: Tue, Nov 30 2010 11:09 AM | Locked

Thanks Melissa

Melissa Snyder:
Yours is dated 11-25

I spotted something strange about the timestamp but didn't chase it down!

Graham

Posts 1288
LogosEmployee
Rick Brannan (Faithlife) | Forum Activity | Replied: Tue, Nov 30 2010 11:20 AM | Locked

Hi Graham

Typically when you run an unordered group, you want to anchor it in some containing structure of some sort (a phrase or clause for LSGNT?). Otherwise, particularly with this example, the search needs to try all permutations of all options between the first word and last word of the NT. (An unordered group means something, followed by anything, followed by another something).

I'd recommend you anchor this to a clause or phrase and see what happens.

Rick Brannan
Data Wrangler, Faithlife
My books in print

Posts 8010
LogosEmployee
Bradley Grainger (Faithlife) | Forum Activity | Replied: Tue, Nov 30 2010 6:45 PM | Locked

Without a top-level containing structure, this query will use up all the memory in your system, eventually fail to allocate new memory (after many minutes of execution), then crash (and the nature of the crash actually prevents any diagnostic information from being written to the log, so we can't tell from the log file what really happened).

Posts 21917
Forum MVP
Graham Criddle | Forum Activity | Replied: Wed, Dec 1 2010 12:14 AM | Locked

Rick / Bradley

Thanks for the responses - makes a lot of sense. I had come across this and need to remember it!

Anchoring in a clause component (for example) works fine

Thanks again

Graham

Posts 18668
Rosie Perera | Forum Activity | Replied: Wed, Dec 1 2010 12:38 AM | Locked

Bradley Grainger:

Without a top-level containing structure, this query will use up all the memory in your system, eventually fail to allocate new memory (after many minutes of execution), then crash (and the nature of the crash actually prevents any diagnostic information from being written to the log, so we can't tell from the log file what really happened).

Can't you detect ahead of time that there's no top-level containing structure and thus the query will use up all the memory in your system and cause a crash? If so, couldn't you refuse to run it rather than allowing it to crash? I know Logos's philosophy is not to put up explanatory error messages. But something like "This query needs a top-level containing structure" would be better than crashing. Users who don't find this thread on the forum won't have any idea why it's crashing or how to avoid it.

Posts 24926
Forum MVP
Dave Hooton | Forum Activity | Replied: Wed, Dec 1 2010 4:00 AM | Locked

Rosie Perera:
Can't you detect ahead of time that there's no top-level containing structure and thus the query will use up all the memory in your system and cause a crash? If so, couldn't you refuse to run it rather than allowing it to crash?

That reminds me that, in general, only a valid search query should be allowed to runSmile

Dave
===

Windows & Android

Posts 1288
LogosEmployee
Rick Brannan (Faithlife) | Forum Activity | Replied: Wed, Dec 1 2010 6:30 AM | Locked

Hi Rosie

Rosie Perera:

Bradley Grainger:

Without a top-level containing structure, this query will use up all the memory in your system, eventually fail to allocate new memory (after many minutes of execution), then crash (and the nature of the crash actually prevents any diagnostic information from being written to the log, so we can't tell from the log file what really happened).

Can't you detect ahead of time that there's no top-level containing structure and thus the query will use up all the memory in your system and cause a crash? If so, couldn't you refuse to run it rather than allowing it to crash? I know Logos's philosophy is not to put up explanatory error messages. But something like "This query needs a top-level containing structure" would be better than crashing. Users who don't find this thread on the forum won't have any idea why it's crashing or how to avoid it.

The crash here, I believe, depends on the range specified. I might be able to make a valid case to run this query in, say, 2 John or perhaps in a range like Eph 1.3-17. With a small enough range, I don't think this will crash, I think it will actually have enough memory to complete and return hits.

I'm not saying we (Logos) shouldn't do anything, I'm just saying the query itself is valid and there might actually be a case for someone wanting to try it.

Rick Brannan
Data Wrangler, Faithlife
My books in print

Posts 3163
Dominick Sela | Forum Activity | Replied: Wed, Dec 1 2010 6:47 AM | Locked

I agree that if possible Logos should do something to not let queries that users do incorrectly, crash the user out of their system. In fact, if you check here, I mentioned it in July and Melissa said development was working on a fix. I wonder if anything came of that?

So I will reiterate again, the way to stop this, is the following logic:

<within the search code>

If request for memory fails, (assume that this is because of a run-away condition of a badly constructed search),

then release all memory and resources owned by the task, display an appropriate user message (the search failed due to out of memory, check it and run it again), and then end the search processing, giving control of the system back to the user.

This could be made very friendly.  In fact, the error message could point to something in the help file that outlines the top tips on what to look for (like the tip in this thread, anchor the search in a containing structure.) Or maybe the message directs the user to the forums or wiki for help if they can't get their search to work. Something friendly could be displayed here.

This is exactly what databases do - they do not let a user query consume all system resources and crash, it's very bad for uptime and reliability. Can't we do something similar here, it's just not good software design to let a user do something within the bounds of the program usage that crashes the system!!

 

Posts 24926
Forum MVP
Dave Hooton | Forum Activity | Replied: Wed, Dec 1 2010 7:19 AM | Locked

Rick Brannan:
I'm not saying we (Logos) shouldn't do anything, I'm just saying the query itself is valid and there might actually be a case for someone wanting to try it.

The original request was "noun followed by an adjective and they agree in gender and number". Then it became "the same search that allows the noun and adjective within certain number of words between them?" and the user crashed using the Unordered Group; not knowing that it is essentially unbound. There were plenty examples of  searches crashing or taking a very long time in L3 with unbound queries. My point is that none of the queries were constructed correctly because of ignorance and I doubt that an unbound search is ever meaningful! The simplest solution is to regard it as invalid.

Dave
===

Windows & Android

Posts 48
Caleb Lau | Forum Activity | Replied: Wed, Dec 1 2010 4:57 PM | Locked

Hi,

I just learn how to use syntax search. This is why I unintentionally created a nonsense query. Obviously, I did not realize my query is "unbound".  I am especially having problem understanding how "Anything", "Gap", "Group", "Unordered Group" and "OR" work. Some guidance is very much appreciated with the following two morphological queries to get me going in the right direction. Thanks.

1) Noun and verb in any order and within 1 word from each other, and they agree in number.

2) Noun followed by adjective and within 3 words from each other, and they agree in case, number and gender.

 

The following pictures are query 1 & 2 that I did using my Biblework. This is the queries that I want to perform in Logos 4.

Posts 24926
Forum MVP
Dave Hooton | Forum Activity | Replied: Wed, Dec 1 2010 6:23 PM | Locked

Ka-Liong Lau:
2) Noun followed by adjective and within 3 words from each other, and they agree in case, number and gender.

The query below stops hits occurring between clauses, but the terms could still be unrelated due to the arbitrary separation! Note that you have to set Anything as indicated in red! The dotted lines indicate that I have ticked "Matching skips levels" by right clicking the Word terms.

Try the search without the Clause  ie. Word 1

                                                       Anything

                                                       Word 2

and compare the two sets of results to see which is more meaningful.

Dave
===

Windows & Android

Posts 48
Caleb Lau | Forum Activity | Replied: Wed, Dec 1 2010 6:41 PM | Locked

Hi Dave,

Thanks for your help. I follow your example wiht "Anything set to "repeats 0 to 3" but getting 0 results. Probably the query is not correct. Biblework returns over 2000 hits.

 

 

Posts 48
Caleb Lau | Forum Activity | Replied: Wed, Dec 1 2010 6:44 PM | Locked

Hi Dave,

I forgot to tick "Matching skips levels". Now, the query returns 1942 results. Thanks.

 

Posts 24926
Forum MVP
Dave Hooton | Forum Activity | Replied: Wed, Dec 1 2010 7:05 PM | Locked

Ka-Liong Lau:
1) Noun and verb in any order and within 1 word from each other, and they agree in number.

Because Unordered is unbound we have to use an OR term to specify the terms in any order and with the maximum separation of 1 word.

Again, you can link the terms with a Clause and compare the sets of results.

Dave
===

Windows & Android

Posts 48
Caleb Lau | Forum Activity | Replied: Wed, Dec 1 2010 7:30 PM | Locked

The search seems to match words criteria within clause boundary. Am I correct? If true, this is not the same as morphological search which ignores the syntax. This feature is in Graphical query editor. Hence, this is one of the missing feature in Logos 4.

Posts 48
Caleb Lau | Forum Activity | Replied: Wed, Dec 1 2010 7:34 PM | Locked

Hi Dave,

I tried the following "Unordered" query and seem to get the correct result. Thanks.

Posts 24926
Forum MVP
Dave Hooton | Forum Activity | Replied: Thu, Dec 2 2010 12:22 AM | Locked

Ka-Liong Lau:
The search seems to match words criteria within clause boundary. Am I correct?

Yes! Clause sets the bounds for the terms below it (or subordinate to it).

Ka-Liong Lau:
If true, this is not the same as morphological search which ignores the syntax. This feature is in Graphical query editor.

Both Morph Search and Graphical Query editor (GQE) are text searches, so both ignore the syntax. GQE has great power in comparing terms via AGREE and is definitely needed in L4.

 

Dave
===

Windows & Android

Posts 24926
Forum MVP
Dave Hooton | Forum Activity | Replied: Thu, Dec 2 2010 12:36 AM | Locked

Ka-Liong Lau:
I tried the following "Unordered" query and seem to get the correct result. Thanks.

It's not quite what you were asking! The Anything term is totally ignored within Unordered, so you may as well remove it; the word separation is determined by the size of the Clause. If you are happy with the results then you have taken one step toward mastery of syntax searches!

Dave
===

Windows & Android

Page 1 of 2 (22 items) 1 2 Next > | RSS