-
1. Re: Rule condition causes VerifyError
adinn Oct 15, 2012 4:26 AM (in response to whitingjr)Hi Jeremy,
Jeremy Whiting wrote:
I am having a problem defining a bm script that has the following condition
IF -1 != $e.getMessage().indexOf("timed")
Is there something wrong with this condition ? I am expecting to check the presence of the text "timed" in an exception message. The e reference is in scope.
I am not quite sure why this passes the type checker but does not pass the verifier. It may be a bug in the type checker or it may be something much more subtle. I'll need to take a proper look at this in order to work out what the verify error is. Can you provide me with either the code and rule script which is manifesting the problem or a reproducer for the bug based on a simpler program/script?
-
2. Re: Rule condition causes VerifyError
whitingjr Oct 15, 2012 6:32 AM (in response to adinn)Hi Andrew,
I tried creating a reproducer but the message is different. Instead there are two warning messages. Shall I start another forum discussion for the different topic and continue on here when that is solved ?
Regards,
Jeremy
-
3. Re: Rule condition causes VerifyError
adinn Oct 15, 2012 6:50 AM (in response to whitingjr)Hi Jeremy
Jeremy Whiting wrote:
Hi Andrew,
I tried creating a reproducer but the message is different. Instead there are two warning messages. Shall I start another forum discussion for the different topic and continue on here when that is solved ?
Yes, please start another thread. Meanwhiel I guess I'll ned to see your code for this problem.
-
4. Re: Rule condition causes VerifyError
whitingjr Oct 17, 2012 12:32 PM (in response to adinn)Hi,
Now the warning messages have been resolved the reproducer does not generate the VerifyError. I will need to investigate further why. This is the java application and the byteman script used to replicate the boolean rule condition that was causing the VerifyError in the original application. When using bmsubmit.sh
package org.jboss.perf;
import java.lang.Exception;
public class TimedOutExceptionThrower
{
public static void main(String args[])
{
while (true)
{// this will never stop, you do need to terminate the process
try
{
throw new Exception("connection timed out");
}
catch (Exception e)
{
System.out.println("An exceptional situation ocurred.");
}
}
}
}
########################################################################
#
# Print a debug message when the cause has "timed" in the message text
#
HELPER org.jboss.byteman.sample.helper.JMXHelper
RULE Connection timed key info
CLASS org.jboss.byteman.sample.helper.JMXHelper
METHOD keyInfo()
BIND keyInfo : KeyInfo = new KeyInfo("recreate issue")
IF TRUE
DO
keyInfo.addKey("timed out", KeyInfo.KEY_TYPE_CUMULATIVE, "timed out");
RETURN keyInfo
ENDRULE
RULE debug cause of exception
CLASS org.jboss.perf.TimedOutExceptionThrower
METHOD main
AT LINE 17
IF -1 != $e.getMessage().indexOf("timed")
DO
incrementCounter("timed out")
ENDRULE
Regards,
Jeremy