Drools hangs on Class.getDeclaredConstructors0(Native Method)

394 views
Skip to first unread message

Brachi

unread,
Apr 6, 2016, 9:16:15 AM4/6/16
to Drools Usage
Hi all.

After some executions with drools, I start to see slowness in the execution time.
In the stack trace I see a lot of threads like this:

"Thread-2139" daemon prio=10 tid=0x00007f0008035800 nid=0x6ffd runnable [0x00007efeb5897000]
   java.lang.Thread.State: RUNNABLE
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2595)
at java.lang.Class.getConstructor0(Class.java:2895)
at java.lang.Class.getConstructor(Class.java:1731)
at org.drools.rule.builder.dialect.asm.ClassGenerator.newInstance(ClassGenerator.java:199)
at org.drools.rule.constraint.ASMConditionEvaluatorJitter.jitEvaluator(ASMConditionEvaluatorJitter.java:55)
at org.drools.rule.constraint.MvelConstraint.executeJitting(MvelConstraint.java:291)
at org.drools.rule.constraint.MvelConstraint.access$200(MvelConstraint.java:55)
at org.drools.rule.constraint.MvelConstraint$ConditionJitter.run(MvelConstraint.java:268)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)

setting this is the kb configuration solve my problem:
drools.permgenThreshold=0

I read this value disable the drools jit.
I want t know what will be the impact of this change, and what else you suggest me to do to avoid this hanging.

thanks in advanced.

more details:
I use
1.drools 5.6
2. statefull session
3. multi threads, but they don't run in the same time on the same KB, but some can run at the same time on different KB.

Mario Fusco

unread,
Apr 6, 2016, 9:56:49 AM4/6/16
to Drools Usage
Hi,

That stack refers to just in time compilation of constraints and setting drools.permgenThreshold=0 prevents it (but not on Java 8 where permgen space doesn't exist anymore). Anyway I don't suggest you to do that because this process translates interpreted constraints in compiled ones and should greatly speed up constraints evaluation after this transitory phase.

I strongly suggest to upgrade to drools 6.x where constraint jitting has been largely improved.

Cheers,
Mario

--
You received this message because you are subscribed to the Google Groups "Drools Usage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-usage...@googlegroups.com.
To post to this group, send email to drools...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-usage/2ecbce90-a3d5-4e68-91ca-3c14ba7ac0fb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

brachi packter

unread,
Apr 6, 2016, 10:05:53 AM4/6/16
to drools...@googlegroups.com

Thanks.

The performance after doing it is the same as before... also after heavy loading...

Also when jit is enabled I get a lot of warnings: exception jitting....mvl constraint...

So I want a way to disable jit..

Won't you have a way to disable jit with Java 8? Do u plan to?

Meantime... I'll test the behavior with drools 6.

You received this message because you are subscribed to a topic in the Google Groups "Drools Usage" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/drools-usage/U2L2p6YtN50/unsubscribe.
To unsubscribe from this group and all its topics, send an email to drools-usage...@googlegroups.com.

To post to this group, send email to drools...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages