Extreme CPU load

memesaregood2 years ago

The load seems OK on the old jxls. No memory leak, but I had to ditch variables during this example as the empty() function doesn't work the same way it does in recent version, so the test might not be accurate.

Anton Tananaev2 years ago

So if you compare same expressions (without variables) on different JXLS versions, is there a difference?

memesaregood2 years ago

Yes. On the recent version, the memory leak is present.

Anton Tananaev2 years ago

So even with exactly the same expressions? And everything else the same? Only the JXLS version is different?

memesaregood2 years ago

Yeah, I didn't change any expressions between these two tests (old jxls test and current jxls test).
The old JXLS mem usage even stays below 2G, and in VisualVM I can see some heap memory being freed in the VM.

Anton Tananaev2 years ago

What is the easiest way to reproduce it?

memesaregood2 years ago

Standby

memesaregood2 years ago

Here's the idea: if you have an open port, we can probably setup a ton of device emulators to create a data flow for you. Might as well also prepare a fresh DB for you with pre-set devices, device attributes and attributes, but I guess I'd need to talk to my supervisor about this just in case.

Which JEXL version do you want me to setup Traccar for? The current one, or the old one?

Anton Tananaev2 years ago

I just need a way to reproduce it locally to investigate myself. Need to investigate the current latest version.

memesaregood2 years ago

Well, that's the way I can think of. Мои атрибуты используют кучу атрибутов устройств, а вычисляемые атрибуты выполняются только после получения сообщения от устройства. Вам нужно что-то уже готовое, чтобы это воспроизвести. If you can handle devices emulation yourself, I can just send you a preset Traccar DB with all my attributes. If you've got other ideas to reproduce this - I'm all ears.

Anton Tananaev2 years ago

Please send the attributes. We do have a script to emulate devices.

memesaregood2 years ago

Have you managed to reproduce the issue?

Anton Tananaev2 years ago

Have not had time to investigate it yet.

Anton Tananaev2 years ago

Seems like upgrading JEXL solves the issue:

https://github.com/traccar/traccar/commit/ee39f67d21078da595a819255b59d88c30e66d7a

Can you please test it on your full setup and see if it helped.

Anton Tananaev2 years ago

There was a memory leak problem in JEXL 3.2, which is fixed in 3.3:

https://issues.apache.org/jira/browse/JEXL-352