powered by Jive Software

Freeze and CPU spike while opening Open_chat room

I’ve already spoken about that with cstux, but he cant confirm this. I’ve decided to post this here, to have a place for this issue. I’m using the latest SVN build and i havent seen such problem with the official release and betas. When i login to my account on igniterealtime.org i go to Conferences tab. There i have a bookmark to Open_chat room. When i hit it Spark is freezing for ~10 secs, at that time java.exe is jumping to 60% usage on CPU. I cant find anything related in my errors.log. Just this:

Apr 10, 2009 9:09:39 PM org.jivesoftware.spark.util.log.Log error
SEVERE: Error starting Spark
java.io.IOException: Cannot run program “D:\My”: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at org.jivesoftware.MainWindow.closeConnectionAndInvoke(MainWindow.java:335)
at org.jivesoftware.MainWindow.logout(MainWindow.java:300)
at org.jivesoftware.MainWindow$2.actionPerformed(MainWindow.java:377)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.AbstractButton.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
… 34 more

Maybe this is related to that i’m launching this build with startup.bat and java.exe is running as a child process of cmd.exe. Also this error seems to be because of space in a path to this build (My Documents).

Windows XP SP3

Edit: After a freeze i get a lot of history messages in this room. Maybe this is related to a large history amount Spark needs to get.

Hi,

try JVM Settings and Debugging for Spark, using the BAT file this should be quite easy.

I would add “-Djava.net.preferIPv4Stack=true” and “-XX:+PrintGCDetails -Xloggc:/tmp/gc.log”. A long running GC will freeze the application.

LG

Hi,

I did test this with the normal installer, looks like clicking on “conference.igniterealtime.org” does send this XMPP packet:

<iq id="i60vY-92" to="conference.igniterealtime.org" type="get">
  <query xmlns="http://jabber.org/protocol/disco#items"/>
</iq>

That’s just fine, anyhow it seems that Spark does hang and repainting does work only partially for me.

This should be the blocking thread (Smack is waiting for a packet in the AWT-EventQueue):

"AWT-EventQueue-0" prio=6 tid=0x031a3400 nid=0xe94 in Object.wait() [0x035cf000..0x035cfb94]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    at org.jivesoftware.smack.PacketCollector.nextResult(PacketCollector.java:147)
    - locked <0x241406c0> (a org.jivesoftware.smack.PacketCollector)
    at org.jivesoftware.smackx.ServiceDiscoveryManager.discoverInfo(ServiceDiscoveryManager.java:441)
    at org.jivesoftware.smackx.ServiceDiscoveryManager.discoverInfo(ServiceDiscoveryManager.java:414)
    at org.jivesoftware.smackx.muc.MultiUserChat.getRoomInfo(MultiUserChat.java:207)
    at org.jivesoftware.spark.ui.conferences.ConferenceRoomBrowser$10.finished(ConferenceRoomBrowser.java:450)
    at org.jivesoftware.spark.util.SwingWorker$2$1.run(SwingWorker.java:138)
    at java.awt.event.InvocationEvent.dispatch(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)

LG

Hey, thanks for your suggestions and testng. I wonder there should i put those debug lines in mine startup.bat (compiled build), as it already has some debug stuff in there. I will paste my startup.bat here and maybe you can provide a modified one for better debugging?
startup.bat (843 Bytes)

Hi,

these parameters have little to do with debugging, anyhow I would insert them before “org.jivesoftware.launcher.Startup”.

I would also set -Xms32m -XX:NewSize=4m -XX:PermSize=16m -XX:ThreadStackSize=64 to optimize memory usage and startup.

So I did attach a bat file which looks a little bit different than the one which you did upload and it contains also upper memory limits (-Xmx64m -XX:MaxNewSize=4m -XX:MaxPermSize=16m -Xss64k -Xoss64k) which could lead to OutOfMemory errors. But maybe you can confirm that they work fine for you.

Hopefully cstux does want to redesign the BAT file with variables to make it more readable.

LG
spark.cmd (774 Bytes)

Well, i have tried your cmd script. It behaves the same to me with Open Chat. I wonder what this in cmd window means:

Apr 12, 2009 8:27:48 PM org.jivesoftware.spark.util.log.Log error
SEVERE:
org.jivesoftware.spark.ui.ChatRoomNotFoundException
at org.jivesoftware.spark.ui.ChatContainer.getActiveChatRoom(ChatContain
er.java:623)
at org.jivesoftware.spark.ui.ChatContainer.handleMessageNotification(Cha
tContainer.java:431)
at org.jivesoftware.spark.ui.ChatContainer.access$700(ChatContainer.java
:78)
at org.jivesoftware.spark.ui.ChatContainer$11.run(ChatContainer.java:690
)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Exception in thread “AWT-EventQueue-0” java.lang.ArrayIndexOutOfBoundsException:
-1
at org.jivesoftware.spark.component.tabbedPane.SparkTabbedPane.setSelect
edIndex(SparkTabbedPane.java:253)
at org.jivesoftware.spark.ui.ChatContainer.handleMessageNotification(Cha
tContainer.java:468)
at org.jivesoftware.spark.ui.ChatContainer.access$700(ChatContainer.java
:78)
at org.jivesoftware.spark.ui.ChatContainer$11.run(ChatContainer.java:690
)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

Hi,

I’m not able to recreate this issue, anyhow I get some invalid file exceptions when I enter a MUC with a special character in the name. On Windows one must not include \ / : * ? " < > | in the filename but Spark tries this when creating a local MUC chat log. This does as far as I remember also happen with JIDs which contain special characters.

I wonder whether a SPARK-issue does already exist.

java.io.FileNotFoundException:

org.jivesoftware.sparkimpl.plugin.transcripts.ChatTranscripts.writeToFile(ChatTr anscripts.java:105)
org.jivesoftware.sparkimpl.plugin.transcripts.ChatTranscripts.appendToTranscript (ChatTranscripts.java:66)
org.jivesoftware.sparkimpl.plugin.transcripts.ChatTranscriptPlugin.persistChatRo om(ChatTranscriptPlugin.java:247)
org.jivesoftware.spark.ui.ChatRoom.insertMessage(ChatRoom.java:335)
org.jivesoftware.spark.ui.rooms.GroupChatRoom.handleMessagePacket(GroupChatRoom. java:593)
org.jivesoftware.spark.ui.rooms.GroupChatRoom.access$200(GroupChatRoom.java:79)
org.jivesoftware.spark.ui.rooms.GroupChatRoom$3.run(GroupChatRoom.java:551)

LG