Question on jmh.lock
ecki at zusammenkunft.net
ecki at zusammenkunft.net
Tue Jan 12 23:02:32 UTC 2016
Hello,
World-writeable files are a problem on multi user systems (for quota reasons). At least I would not chmod the file by default. Maybe printing some instructions on how to chmod or delete the file? (And an option to use a user-specific lock?)
Bernd
--
http://bernd.eckenfels.net
-----Original Message-----
From: Aleksey Shipilev <aleksey.shipilev at oracle.com>
To: Alun Evans <alun at badgerous.net>
Cc: jmh-dev at openjdk.java.net
Sent: Di., 12 Jan. 2016 23:44
Subject: Re: Question on jmh.lock
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.
Thanks,
-Aleksey
More information about the jmh-dev
mailing list