Closed vkurup closed 3 months ago
Hi, this error usually happens when jdk.attach.allowAttachSelf
is not enabled, but you are definitely trying to enable it. Please check if (System/getProperty "jdk.attach.allowAttachSelf")
in the REPL returns ""
(an empty string) for you.
Hmm, it actually returns nil
:
user=> (System/getProperty "jdk.attach.allowAttachSelf")
nil
I also tried to set it via setProperty
in the REPL (to "1" and "true") but neither attempt seemed to get the profiler to attach.
Yeah, chaging it at runtime wouldn't help. Try doing it like this:
;; deps.edn
{:paths ["src"]
:deps {com.clojure-goes-fast/clj-async-profiler {:mvn/version "1.2.0"}}
:aliases {:attach {:jvm-opts ["-Djdk.attach.allowAttachSelf"]}}
}
Then clj -A:attach
and then so on.
Could it be by chance that your clj
binary is some sort of alias/wrapper that doesn't pass all the arguments down?
Ahh, that was it! I'm not sure what my clj
binary is doing, but switching to the clojure
binary fixes my issue. Thanks for the help debugging my setup!
No probs, that was a tricky one.
Hi, I'm guessing I'm doing something wrong, but I haven't figured out what yet. I'm trying to run through the first steps of the tutorial on a M3 Macbook Pro, but I get the
Can not attach to current VM
error. I've followed all of the steps in the tutorial: