Results 1 to 3 of 3
  1. #1
    Rajin Das is offline Member
    Join Date
    Mar 2009
    Rep Power

    Default Application freezing and recovering with Strange behaviour found in Thread Dump & GC

    Hi All,

    I am facing a problem in my SWINGS application. The application is a real time data streaming application its working in TCP/IP sockets, which is reading and writing data in string format. I noticed that the data streaming getting freeze sometimes and recovers after a few minutes. To find out why it is behaving like that i took the Thread Dump and Garbage Collection Trace of the application and found some thing strange. Find below the line taken from the Thread Dump, the third line in the log below shows that the time have jumped backwards, I don't know why that happened.

    2009-03-12 17:07:48
    Full thread dump Java HotSpot(TM) Client VM (1.6.0-b105 mixed mode, sharing):

    2009-03-12 17:07:57
    Full thread dump Java HotSpot(TM) Client VM (1.6.0-b105 mixed mode, sharing):

    2009-03-12 17:04:08
    Full thread dump Java HotSpot(TM) Client VM (1.6.0-b105 mixed mode, sharing):

    2009-03-12 17:04:15
    Full thread dump Java HotSpot(TM) Client VM (1.6.0-b105 mixed mode, sharing):

    2009-03-12 17:04:28
    Full thread dump Java HotSpot(TM) Client VM (1.6.0-b105 mixed mode, sharing):

    Almost during the same time in Garbage Collector log, normally the garbage collector was running multiple times a second and during that time the frequency of garbage collection reduced. please find the details below

    3682.686: [GC 28265K->25644K(41312K), 0.0009666 secs]
    3682.731: [GC 28268K->25645K(41312K), 0.0009825 secs]
    3682.817: [GC 28269K->25647K(41312K), 0.0010381 secs]
    3682.934: [GC 28271K->25649K(41312K), 0.0009364 secs]
    3682.943: [GC 28273K->25649K(41312K), 0.0008954 secs]
    3682.985: [GC 28273K->25650K(41312K), 0.0008845 secs]
    3683.037: [GC 28274K->25651K(41312K), 0.0008747 secs]
    3683.199: [GC 28275K->25651K(41312K), 0.0010448 secs]

    3698.250: [GC 28275K->25728K(41312K), 0.0009655 secs]
    3720.655: [GC 28352K->25867K(41312K), 0.0010588 secs]
    3743.011: [GC 28491K->26000K(41312K), 0.0015047 secs]
    3765.935: [GC 28624K->26130K(41312K), 0.0010180 secs]
    3788.487: [GC 28754K->26260K(41312K), 0.0011328 secs]
    3810.348: [GC 28884K->26402K(41312K), 0.0010091 secs]
    3832.596: [GC 29026K->26523K(41312K), 0.0010373 secs]
    3855.048: [GC 29147K->26652K(41312K), 0.0010029 secs]
    3877.230: [GC 29276K->26795K(41312K), 0.0010387 secs]
    3899.420: [GC 29419K->26915K(41312K), 0.0009959 secs]

    3922.146: [GC 29539K->27042K(41312K), 0.0010088 secs]
    3922.201: [GC 29666K->27043K(41312K), 0.0010297 secs]
    3922.231: [GC 29667K->27046K(41312K), 0.0008521 secs]
    3922.260: [GC 29670K->27048K(41312K), 0.0009208 secs]
    3922.269: [GC 29672K->27048K(41312K), 0.0009831 secs]
    3922.298: [GC 29672K->27049K(41312K), 0.0008867 secs]
    3922.308: [GC 29673K->27050K(41312K), 0.0009264 secs]

    can any one please explain whats happening, I am getting no clue from these
    Thanks in Advance
    Rajin Das

  2. #2
    OrangeDog's Avatar
    OrangeDog is offline Senior Member
    Join Date
    Jan 2009
    Cambridge, UK
    Rep Power


    What does the actual code that does the processing look like? If you're using Swing make sure you're following Lesson: Concurrency in Swing (The Java™ Tutorials > Creating a GUI with JFC/Swing)

  3. #3
    Steve11235's Avatar
    Steve11235 is offline Senior Member
    Join Date
    Dec 2008
    Rep Power


    OrangeDog is correct. Your comm code needs to run in its own thread and post results to the GUI using EventQueue.invokeLater().

Similar Threads

  1. Replies: 0
    Last Post: 03-16-2009, 02:41 PM
  2. Java applet strange painting behaviour
    By sirdori in forum New To Java
    Replies: 1
    Last Post: 01-07-2009, 02:14 PM
  3. AffinedTransform strange behaviour
    By Echilon in forum AWT / Swing
    Replies: 3
    Last Post: 12-11-2008, 10:58 AM
  4. Strange behaviour in swing
    By cbalu in forum AWT / Swing
    Replies: 1
    Last Post: 05-23-2008, 10:23 PM
  5. freezing when use socket.accept() inside of a thread
    By tamayo in forum Advanced Java
    Replies: 0
    Last Post: 07-24-2007, 12:48 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts