Question on jmh.lock
Aleksey Shipilev
aleksey.shipilev at oracle.com
Tue Jan 12 22:51:20 UTC 2016
On 01/13/2016 01:33 AM, Aleksey Shipilev wrote:
> On 01/13/2016 12:19 AM, Alun Evans wrote:
>>> On 12 Jan 2016, at 10:46, Aleksey Shipilev <aleksey.shipilev at oracle.com> wrote:
>>> It's unclear if you actually run into the problem with this mechanism?
>>
>> Sorry, yes I have, I’m hitting a permissions problem:
>>
>> [alun at poweredge ~]$ ll /tmp/jmh.lock
>> -rw-rw-r--. 1 misha misha 0 Jan 11 20:26 /tmp/jmh.lock
>> [alun at poweredge ~]$ rm /tmp/jmh.lock
>> rm: remove write-protected regular empty file `/tmp/jmh.lock'? y
>> rm: cannot remove `/tmp/jmh.lock': Operation not permitted
>> [alun at poweredge ~]$
>>
>> [INFO] -------------------------------------------------------
>> [INFO] T E S T S
>> [INFO] -------------------------------------------------------
>> [INFO] Running com.xockets.InterfaceBenchmark
>> [INFO] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.081 sec <<< FAILURE! - in com.xockets.InterfaceBenchmark
>> [INFO] run(com.xockets.InterfaceBenchmark) Time elapsed: 0.079 sec <<< ERROR!
>> [INFO] org.openjdk.jmh.runner.RunnerException: ERROR: Exception while trying to acquire the JMH lock (/tmp/jmh.lock): /tmp/jmh.lock (Permission denied), exiting. Use -Djmh.ignoreLock=true to forcefully continue.
>> [INFO] at org.openjdk.jmh.runner.Runner.run(Runner.java:209)
>> [INFO] at com.xockets.AbstractBenchmark.run(AbstractBenchmark.java:92)
>> [INFO] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> [INFO] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>
> I see. That's indeed problematic! The file should indeed be
> world-writeable for this to work properly. I'll take a look how to
> fix/workaround this.
That seems simple:
https://bugs.openjdk.java.net/browse/CODETOOLS-7901577
Can you test? The owner would need to run JMH at least once to set the
permissions right, or remove the lock file completely.
-Aleksey
More information about the jmh-dev
mailing list