" Self-attach to current VM error " using Lucee 5.3 (Docker image Lucee-nginx) Java 11

Description

When trying to access a network file ( a .cfm file via url) that has been modified since lucee first loaded it, lucee 5.3 will stall and generate this error:

Error Type: java.lang.IllegalStateException
Could not self-attach to current VM using external process

The file being accessed is on windows network share.

To work around this error the lucee docker images require the following instruction to the Java options in dockerfile:

-Djdk.attach.allowAttachSelf=true

On 5.2 (JAVA 8) it works flawlessly, we can update a cfm file multiple times and reload it in lucee without any problem, on 5.3 (JAVA 11) it fails every time after the file has been updated/modified.

We have confirmed this error with lucee 5.3 current release 5.3.1.102 and 5.3.2.74-RC
Our environment is running Lucee-nginx official docker images on a Linux Ubuntu host.

The files being accessed are on a windows share on a Windows 2008r2 server and we verified that the files can be read from the linux docker host after they are modified even when Lucee 5.3 throws this error.

Other than changing the lucee version in the Dockerfile (switching between "FROM lucee/lucee:5.2-nginx" to "FROM lucee/lucee:5.3-nginx") the two instances we are testing with are completely identical.

Lucee 5.3 runs on Java 11 instead of Java 8 for lucee 5.2, so maybe this is an underlying Java issue,

Environment

Lucee-nginx official docker images on a Linux Ubuntu host
files being accessed are on a windows share on a Windows 2008r2 server

Activity

Show:

Brad Wood 15 June 2019 at 16:12

Wow, this is a great find! Thanks for cracking this. I’m looking forward to the increased performance from it.

Michael Offner 15 June 2019 at 15:19

actually the fallback solution is much better than the current/old class update solution with help of Instrumentation.

The new solution uses a new name for the class created every time and garbage collection can remove the old one. That does not use more memory than the update solution and is more than 10 times faster!

modify and load a template a 100 times takes around 8000ms with the old solution and 600ms with the new one!!!

So the fallback solution will not be a fallback solution it will replace the old way

Michael Offner 14 June 2019 at 16:09

I’m working on a fallback for this, so in case Lucee is not able to get the imstrumentation, i will “update“ the class in an other way. so we will be able to get rid of this issue completely.

Michael Offner 14 June 2019 at 14:07

tested again with openJDK 11.0.2

and openJDK 12

works in my case as expected

Fixed

Details

Assignee

Reporter

Priority

Fix versions

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Sprint

Affects versions

Created 7 May 2019 at 21:31
Updated 4 March 2021 at 07:36
Resolved 15 June 2019 at 15:51

Flag notifications