Ernest,
        There is only a single wait() that isn't either in the startup,
shutdown or exception portion of the code. There is only a single
wait()/notify pair that is repeatedly run, this it the one on  line 73 of
file ACE_Sender.java (this.wait(1000);).

The while loop that starts on line 67 and finishes on line 125 is the main
loop in  which the fault happens, and it is wait() on line 73 that times
out rather than wakes up due to a notify() that signals that Jess has
failed to respond to a change of the slot "status" in the ACE_Sender
shadow fact which has occurred tens or hundreds of thousands of times
already.

You can easily tell if you have reproduced the fault by looking in the
last  logfile created, this will be called TestBed_YYYYMMDD_HHMMSS.log
(multiple logfiles are created to keep the total size of each file
manageable.). At about 7 lines from the end of the last log file produced
you will see the following if the problem occured:

"Getting watch all results from JESS"

otherwise you will see at about 4 lines from the end:

"Exiting counter is now:500000"

In the other log file ACE_TESTBed_clp_[millisecond_time].log about 28
lines from the bottom you will see the following:

 <=> f-1 (PROCESS_UPDATES::ACESender (class <Java-Object:java.lang.Class>)
(counter 110858) (status 1) (watchstart 0) (OBJECT
<Java-Object:ACE_Sender>))
==> Activation: PROCESS_UPDATES::heartbeat :  f-1, f-3
<== Activation: MAIN::error_1 :  f-0,, f-3
<== Activation: MAIN::finish_1 :  f-0,, f-3
 <== Focus MAIN
 ==> Focus PROCESS_UPDATES

What will be missing is a "FIRE 1 PROCESS_UPDATES::heartbeat f-1, f-3"
which has previously occurred in the log file tens or hundreds of
thousands of times but for this identical instance has somehow failed to
occur. You will see the the data in the log files is identically repeated
patterns until the fault occurs at which time the system shuts down so all
we are interested in is what happens at the end of the logfile. On average
we have found that we need more than 100K iterations for the fault to
occur.

In the mean time I will run the example with version Jess 7.1 beta and
report back on the outcome.

Cheers
Barry

Barry Flower | Global Head eFM Strategy & Solutions | WIB Technology
Westpac Institutional Bank | Level 2, Westpac Place, 275 Kent Street,
Sydney, NSW 2000
T +61 2 8254 6308 | M +61 439 467 971 | E [EMAIL PROTECTED]









"Ernest Friedman-Hill" <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]
19/06/2008 11:56 AM
Please respond to
[email protected]


To
"jess-users" <[email protected]>
cc

Subject
Re: JESS: Potential Jess Race Condition






I must confess I'm having a little trouble following the detailed
logic, although in general I understand what you're trying to do and
it seems to be fine from Jess's perspective. What bothers me about
this code is the numerous timed waits (i.e., calls to "wait(3000)")
which aren't in a loop and aren't followed by a test for any
condition. The notifies and waits are flying around, but there seems
to be no code checking that anything's actually being waited for. I'm
concerned that there's an assumption hiding in there somewhere that a
wait() returned because of a notify, but occasionally it does not, and
there's no check for that.

In any case, Jess 7.1 is extremely close to going final, so what I'd
like you to do is check whether you still have the problem with the
latest Jess 7.1 beta. I ran the program myself, but I can't tell from
your writeup how to decide whether the problem is showing itself or
not. Do please let me know what you find out.



On Jun 18, 2008, at 3:01 AM, Barry Flower wrote:

>
> All,
>         I am experiencing a very subtle fault in Jess.Essentially we
> are passing data to Jess via a shadow fact, allowing Jess to process
> it and then informing the shadow fact that we are ready to process
> the next piece of datasynchronously. This works for hundreds of
> thousands of idential iterations and then inexplicably Jess simple
> does not recognise that a slot has been updated, and as a result a
> rule does not fire when it should. It looks like a subtle race
> condition occuring within Jess as we have reduced our Java code for
> the shawdow fact to a bare minimum.
>
> I would appreciate any insights regarding the method we are using to
> synchronously process real-time data and whether the fault is in our
> approach or that in fact we have exposed a race condition within Jess.
>
> Cheers
> Barry
>
>  I have included complete .clp and .java files to reproduce the
> problem and this contains a readme.txt file which explains in detail
> the workings of the programme, the way in which the fault manifests
> and snippets from log files that exhibit the fault.
>
>
> Barry Flower | Global Head eFM Strategy & Solutions | WIB Technology
> Westpac Institutional Bank | Level 2, Westpac Place, 275 Kent
> Street, Sydney, NSW 2000
> T +61 2 8254 6308 | M +61 439 467 971 | E [EMAIL PROTECTED]
> <ATT00002.jpg>
>
>
> Please consider our environment before printing this email.
>
> WARNING - This email and any attachments may be confidential. If
> received in error, please delete and inform us by return email.
> Because emails and attachments may be interfered with, may contain
> computer viruses or other defects and may not be successfully
> replicated on other systems, you must be cautious. Westpac cannot
> guarantee that what you receive is what we sent. If you have any
> doubts about the authenticity of an email by Westpac, please contact
> us immediately.
>
> It is also important to check for viruses and defects before opening
> or using attachments. Westpac's liability is limited to resupplying
> any affected attachments.
>
> This email and its attachments are not intended to constitute any
> form of financial advice or recommendation of, or an offer to buy or
> offer to sell, any security or other financial product. We recommend
> that you seek your own independent legal or financial advice before
> proceeding with any investment decision.
>
> Westpac Institutional Bank is a division of Westpac Banking
> Corporation, a company registered in New South Wales in Australia
> under the Corporations Act 2001 (Cth). Westpac is authorised and
> regulated in the United Kingdom by the Financial Services Authority
> and is registered at Cardiff in the United Kingdom as Branch No. BR
> 106. Westpac operates in the United States of America as a federally
> chartered branch, regulated by the Office of the Comptroller of the
> Currency.
>
> Westpac Banking Corporation ABN 33 007 457 141.
> <ACE_TestBed.zip>

---------------------------------------------------------
Ernest Friedman-Hill
Informatics & Decision Sciences, Sandia National Laboratories
PO Box 969, MS 9012, Livermore, CA 94550
http://www.jessrules.com






--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------




Please consider our environment before printing this email.

WARNING - This email and any attachments may be confidential. If received in 
error, please delete and inform us by return email. Because emails and 
attachments may be interfered with, may contain computer viruses or other 
defects and may not be successfully replicated on other systems, you must be 
cautious. Westpac cannot guarantee that what you receive is what we sent. If 
you have any doubts about the authenticity of an email by Westpac, please 
contact us immediately.

It is also important to check for viruses and defects before opening or using 
attachments. Westpac's liability is limited to resupplying any affected 
attachments.

This email and its attachments are not intended to constitute any form of 
financial advice or recommendation of, or an offer to buy or offer to sell, any 
security or other financial product. We recommend that you seek your own 
independent legal or financial advice before proceeding with any investment 
decision.

Westpac Institutional Bank is a division of Westpac Banking Corporation, a 
company registered in New South Wales in Australia under the Corporations Act 
2001 (Cth). Westpac is authorised and regulated in the United Kingdom by the 
Financial Services Authority and is registered at Cardiff in the United Kingdom 
as Branch No. BR 106. Westpac operates in the United States of America as a 
federally chartered branch, regulated by the Office of the Comptroller of the 
Currency.

Westpac Banking Corporation ABN 33 007 457 141.

<<image/jpeg>>

Reply via email to