I/O Error

Help
Ftc
2006-10-11
2013-04-24
  • Ftc

    Ftc - 2006-10-11

    I am trying to profile a simple application that has only one small object. I am getting an error that reads as "Could not refresh memory info:I/O error". The maximum heap memory is one less than the memory allocation. I have increased the memory to 1024m from 64 m but I continue to get the same error. What is it that I need to do differently?

     
    • Antonio S. R. Gomes

      This means that the console lost the connection to the remote agent. This happens in two cases: the agent crashed or your application exited while the P4J Console was still connected.

      Send the logs generated by your application.

       
    • Ftc

      Ftc - 2006-10-11

      Here is the log message after the starting of the agent.

      [PROFILER4J:0] Listening on port 7890...
      [PROFILER4J:0] JVM waiting connection from Profiler4j Console...
      [PROFILER4J:0] Serving connection from /127.0.0.1:1694
      [PROFILER4J:1] Transforming class com.ftc.util.TicGenerator
      [PROFILER4J:1] Transforming class com.ftc.util.DataObject
      1.16
      [PROFILER4J:0] Profiler stopped

      If you would like to have it, I can send the source code to you.
      Thank you Jeremy

       
    • Antonio S. R. Gomes

      It seems to me that your application has terminated (cleanly) while the console was still connected. When the agent (which runs in the same JVM as your application) completes unilaterally the console shows an error just like the one you posted in your first message.

      You must keep you application running during the whole profiling session (be it 1 minute or 1 hour). This is implicit with application servers and graphical applications, which require an explicit shutdown. Command line applications usually start, do the stuff it is supposed to do, and then exit.

      To sum up, Profiler4j can olny be used if your application does not exit while the profiling session is active.

      Hope this helps.

      -Antonio

       
    • Ftc

      Ftc - 2006-10-12

      Thank you for you info, which I implemented but was still given the error. I was running the application with a piped input/output stream which is what I found out was giving me the error. I removed all coding related to that and the profiler ran without error. Taking that into consideration how would I have the profiler work with the stream. Any advise for that?

       
    • Antonio S. R. Gomes

      Can you provide more details about your application? Is it a command line app? What does it do? What exacly do you use the streams for?

       
    • Ftc

      Ftc - 2006-10-12

      Our application simulates a real-time sock quote provider. It sends out on an ObjectOutputStream data object that encapsulates the tic information objects associated with a stock quote. The ObjectOutputStream is sent to a PipedOutputStream which is connected to the PipedInputStream provided by the calling program. This ensures that the calling program gets a regular stream of stock quotes. The data object that is sent out on the stream is serializable.

      The calling program is run from the command line. At  this time the calling program simply prints out the stock quotes.

       
    • Antonio S. R. Gomes

      Thanks for the explanation. But I don´t quite understand why the profiler stops if your application keeps running. It´s either a bug in Profiler4j or I could not grasp your problem. I´ve tested profiler4j in some fairly complex applications (JBoss, for instance, which contains very complex I/O and threading stuff) and found no major problem.

      You´ve mentioned in your first post that I could have the source code to reproduce the error. I can´t promiss much right now, but I can investigate this a bit further in a few days.

       
    • Ftc

      Ftc - 2006-10-13

      Ok it turns out it is not the Stream at all; it is the log4j coding that seems to be creating the problem. Is there something in the command line that I should be doing. Profiler4j runs just fine without the log4j coding. Any suggestions? If you still need the coding let me know I can send it to you.

       
    • Antonio S. R. Gomes

      Ok then. Mail me with the sample code. Try to include only the minimal features that cause the error. I´ll see what I can do.

      --Antonio

       
    • Ftc

      Ftc - 2006-10-16

      Antonio, I sent you the coding if you did not receive it let me know and I will try again. Again thank you for the help, it is much appreciated.

       

Log in to post a comment.