Starting IDEA in terminal on OS X

Hi,

I've gotten in a situtation where IntelliJ won't start. The icon bounces in the dock, then stops bouncing, but the CPU stays at 100% and nothing ever happens.  I've tried deleting my caches and plugins directories, but no luck.  I'm now trying to started the app in terminal so that I can kill it an get a thread dump.  The threaddumps in ~/Library/Logs have nothing for today.  Below is the output of open files/ports from activity monitor in case that's useful. But mainly right now I want to get a threaddump to see where its hanging.

Thank you,
Evan

/Applications/IntelliJ IDEA 9.0.3.app/bin
/System/Library/Frameworks/JavaVM.framework/Versions/A/Resources/MacOS/JavaApplicationStub
/System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Versions/A/JavaApplicationLauncher
/System/Library/Frameworks/JavaVM.framework/Versions/A/JavaVM
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Libraries/libjvmlinkage.dylib
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Libraries/libverify.dylib
/System/Library/Frameworks/JavaVM.framework/Versions/A/Frameworks/JavaNativeFoundation.framework/Versions/A/JavaNativeFoundation
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Libraries/libjava.jnilib
/private/var/folders/F+/F+I7uomuGyu7w-CY84pzEE+++TI/-Tmp-/hsperfdata_evan/1860
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Libraries/libzip.jnilib
/System/Library/Frameworks/JavaVM.framework/Versions/A/Frameworks/JavaRuntimeSupport.framework/Versions/A/Resources/Java/JavaRuntimeSupport.jar
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/jsse.jar
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/jce.jar
/System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Versions/A/Resources/LauncherSupport.jar
/Applications/IntelliJ IDEA 9.0.3.app/lib/boot.jar
/System/Library/Java/Extensions/AppleScriptEngine.jar
/System/Library/Java/Extensions/dns_sd.jar
/usr/share/icu/icudt40l.dat
/System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Versions/A/Resources/liblauncher.jnilib
/System/Library/Java/Extensions/mlibwrapper_jai.jar
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Libraries/libclient.dylib
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/ui.jar
/System/Library/Java/Extensions/j3daudio.jar
/System/Library/Java/Extensions/jai_codec.jar
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/charsets.jar
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar
/System/Library/Java/Extensions/j3dcore.jar
/System/Library/Java/Extensions/j3dutils.jar
/System/Library/Java/Extensions/jai_core.jar
/System/Library/Java/Extensions/MRJToolkit.jar
/System/Library/Java/Extensions/QTJava.zip
/System/Library/Java/Extensions/vecmath.jar
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/apple_provider.jar
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/dnsns.jar
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/localedata.jar
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/sunjce_provider.jar
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/sunpkcs11.jar
/Applications/IntelliJ IDEA 9.0.3.app/lib/bootstrap.jar
/Applications/IntelliJ IDEA 9.0.3.app/lib/extensions.jar
/Applications/IntelliJ IDEA 9.0.3.app/lib/util.jar
/Applications/IntelliJ IDEA 9.0.3.app/lib/jdom.jar
/Applications/IntelliJ IDEA 9.0.3.app/lib/log4j.jar
/usr/lib/dyld
/private/var/db/dyld/dyld_shared_cache_i386
/dev/null
->0x0fe0ac88
->0x0fe0ac88
/private/etc/security/audit_control
count=1, state=0x2
count=1, state=0x2
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar
/System/Library/Frameworks/JavaVM.framework/Versions/A/Frameworks/JavaRuntimeSupport.framework/Versions/A/Resources/Java/JavaRuntimeSupport.jar
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/ui.jar
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/jsse.jar
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/jce.jar
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/charsets.jar
/System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Versions/A/Resources/LauncherSupport.jar
/Applications/IntelliJ IDEA 9.0.3.app/lib/boot.jar
/System/Library/Java/Extensions/AppleScriptEngine.jar
/System/Library/Java/Extensions/dns_sd.jar
/System/Library/Java/Extensions/j3daudio.jar
/System/Library/Java/Extensions/j3dcore.jar
/System/Library/Java/Extensions/j3dutils.jar
/System/Library/Java/Extensions/jai_codec.jar
/System/Library/Java/Extensions/jai_core.jar
/System/Library/Java/Extensions/mlibwrapper_jai.jar
/System/Library/Java/Extensions/MRJToolkit.jar
/System/Library/Java/Extensions/QTJava.zip
/System/Library/Java/Extensions/vecmath.jar
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/apple_provider.jar
/dev/random
/dev/urandom
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/dnsns.jar
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/localedata.jar
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/sunjce_provider.jar
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/sunpkcs11.jar
/Applications/IntelliJ IDEA 9.0.3.app/lib/bootstrap.jar
/Applications/IntelliJ IDEA 9.0.3.app/lib/extensions.jar
/Applications/IntelliJ IDEA 9.0.3.app/lib/util.jar
/Applications/IntelliJ IDEA 9.0.3.app/lib/jdom.jar
/Applications/IntelliJ IDEA 9.0.3.app/lib/log4j.jar
/private/etc/security/audit_class

7 comments
Comment actions Permalink

:(  So I found these instructions which still seem to work w/ v9 on OS X, but the strange this is that this actually worked. But started back at the "enter a license" screen

http://techbrew.net/articles/200711/how-to-put-intellij-idea-on-ubuntu/


So... what's different about starting from the terminal and starting up w/ these instructions?

Evan

0
Comment actions Permalink

Okay, so I figured out that you can just run this command to start IDEA properly from the terminal:
/Applications/IntelliJ IDEA 9.0.3.app/Contents/MacOS> ./idea

And then I could get a thread dump below. Looks like the thread is blocked at at java.io.UnixFileSystem.list(Native Method)

What would cause this?

Evan

---

/Applications/IntelliJ IDEA 9.0.3.app/Contents/MacOS> ./idea
2010-11-09 10:56:08
Full thread dump Java HotSpot(TM) Client VM (17.1-b03-307 mixed mode):

"timed reference disposer" prio=2 tid=0000000003928000 nid=0xb161f000 waiting on condition [00000000b161e000]
   java.lang.Thread.State: TIMED_WAITING (parking)
 at sun.misc.Unsafe.park(Native Method)
 - parking to wait for  <0000000008021db0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
 at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:198)
 at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2025)
 at java.util.concurrent.DelayQueue.take(DelayQueue.java:164)
 at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:609)
 at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:602)
 at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
 at java.lang.Thread.run(Thread.java:680)

"Low Memory Detector" daemon prio=5 tid=00000000038b4400 nid=0xb141b000 runnable [0000000000000000]
   java.lang.Thread.State: RUNNABLE

"CompilerThread0" daemon prio=9 tid=00000000038b3400 nid=0xb1319000 waiting on condition [0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Signal Dispatcher" daemon prio=9 tid=00000000038b2400 nid=0xb1217000 waiting on condition [0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Surrogate Locker Thread (CMS)" daemon prio=5 tid=00000000038b1400 nid=0xb1115000 waiting on condition [0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Finalizer" daemon prio=8 tid=0000000003009400 nid=0xb1013000 in Object.wait() [00000000b1012000]
   java.lang.Thread.State: WAITING (on object monitor)
 at java.lang.Object.wait(Native Method)
 - waiting on <0000000008021f30> (a java.lang.ref.ReferenceQueue$Lock)
 at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
 - locked <0000000008021f30> (a java.lang.ref.ReferenceQueue$Lock)
 at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134)
 at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)

"Reference Handler" daemon prio=10 tid=0000000003008400 nid=0xb0f11000 in Object.wait() [00000000b0f10000]
   java.lang.Thread.State: WAITING (on object monitor)
 at java.lang.Object.wait(Native Method)
 - waiting on <0000000008021f40> (a java.lang.ref.Reference$Lock)
 at java.lang.Object.wait(Object.java:485)
 at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
 - locked <0000000008021f40> (a java.lang.ref.Reference$Lock)

"main" prio=5 tid=0000000003801400 nid=0xb0905000 runnable [00000000b0902000]
   java.lang.Thread.State: RUNNABLE
 at java.io.UnixFileSystem.list(Native Method)
 at java.io.File.list(File.java:973)
 at java.io.File.listFiles(File.java:1051)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:48)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:63)
 at com.intellij.util.lang.FileLoader.buildCache(FileLoader.java:109)
 at com.intellij.util.lang.ClassPath.getLoader(ClassPath.java:179)
 at com.intellij.util.lang.ClassPath.getLoader(ClassPath.java:149)
 - locked <0000000008135b40> (a com.intellij.util.lang.ClassPath)
 at com.intellij.util.lang.ClassPath.getResource(ClassPath.java:115)
 at com.intellij.util.lang.UrlClassLoader.findClass(UrlClassLoader.java:65)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
 - locked <0000000008022cb0> (a com.intellij.util.lang.UrlClassLoader)
 at com.intellij.util.lang.UrlClassLoader.loadClass(UrlClassLoader.java:80)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
 at java.lang.Class.forName0(Native Method)
 at java.lang.Class.forName(Class.java:247)
 at com.intellij.ide.Bootstrap.main(Bootstrap.java:41)
 at com.intellij.ide.Bootstrap.main(Bootstrap.java:35)
 at com.intellij.idea.Main.main(Main.java:54)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at apple.launcher.LaunchRunner.run(LaunchRunner.java:115)
 at apple.launcher.LaunchRunner.callMain(LaunchRunner.java:50)
 at apple.launcher.JavaApplicationLauncher.launch(JavaApplicationLauncher.java:52)

"VM Thread" prio=9 tid=00000000038a7c00 nid=0xb0e0f000 runnable

"Gang worker#0 (Parallel GC Threads)" prio=9 tid=0000000003803000 nid=0xb0b09000 runnable

"Gang worker#1 (Parallel GC Threads)" prio=9 tid=0000000003803c00 nid=0xb0c0b000 runnable

"Concurrent Mark-Sweep GC Thread" prio=9 tid=000000000386e800 nid=0xb0d0d000 runnable
"VM Periodic Task Thread" prio=10 tid=00000000038bd800 nid=0xb151d000 waiting on condition

"Exception Catcher Thread" prio=10 tid=0000000003801c00 nid=0xb0a07000 runnable
JNI global references: 1056

Heap
par new generation   total 14784K, used 1691K [0000000006010000, 0000000007010000, 0000000008010000)
  eden space 13184K,   6% used [0000000006010000, 00000000060df308, 0000000006cf0000)
  from space 1600K,  53% used [0000000006e80000, 0000000006f57988, 0000000007010000)
  to   space 1600K,   0% used [0000000006cf0000, 0000000006cf0000, 0000000006e80000)
concurrent mark-sweep generation total 114688K, used 30563K [0000000008010000, 000000000f010000, 0000000026010000)
concurrent-mark-sweep perm gen total 12288K, used 4081K [0000000026010000, 0000000026c10000, 0000000035a10000)

0
Comment actions Permalink

Thank you forum for being my teddy bear and letting me talk to you all by myself.

Googling around for "at java.io.UnixFileSystem.list(Native Method)" led me to this page http://www.mail-archive.com/users@tomcat.apache.org/msg42354.html  which reminded me that I had created a pseudo "jre" directory in my java 1.6 home which partially pointed back to the home dir creating the potential for an infinite loop which Idea's startup seems to have fallen into.
So, well, there we have it.

0
Comment actions Permalink

Out of curiousity why do you want to start IntelliJ from the terminal? What is wrong with the app icon in the Applications folder?

0
Comment actions Permalink

so that I can send a "kill -QUIT <pid>" from another terminal to get a thread dump.
Evan

0
Comment actions Permalink

If you have Java 1.6 (it may be in Java 1.5 as well) the SDK comes with jstack which lets you get a thread dump of any running java process. You can redirect output as desired.

You don't need to start from the terminal to get it.


mjparme:~:98> ps auxww | grep -i intellij
mjparme  34075   1.4 14.1  2462044 591600   ??  S    Mon08AM  99:28.47 /Applications/IntelliJ IDEA 9.0.3.app/Contents/MacOS/idea -psn_0_7251690
mjparme  34079   0.0  0.0   611100    492   ??  S    Mon08AM   0:04.08 /Applications/IntelliJ IDEA 9.0.3.app/bin/fsnotifier





jstack 34075 > mythreaddump.txt


Please note you have to match the specific version of jstack to the version of the VM you are getting a thread dump of. So if IntelliJ is running under 1.6 make sure the jstack being ran is from the 1.6 bin directory: /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/bin
0
Comment actions Permalink

Ah! Good to know.

Thank you!
Evan

0

Please sign in to leave a comment.