10 ms overhead when calling Thread.sleep on Linux

Hi,
I have been working on a traffic shaping simulation that requires me to send packets on a ms basis. When I call Thread.sleep(11) on Linux 2.4, I get a constant return around 30 ms. I tried to bypass the Thread.sleep function and called directly the select() function under linux with a timeout of 11 ms then I get a constant return around 20 ms. Then if I create a test.c program that loop 100 times calling the select(11), I get a very accurate rate around 10-11 ms. Anyone knows where that 10 ms overhead comes from? I tried executing the java program with Thread.sleep and the -XX:ForceTimeHighResolution but it doesn;t seem to change anything ! Any info would be very welcome ! Thanks

Actually I get this behavior only on a machine with kernel 2.4. On a different machine with kernel 2.6 I get an accuracy of 10ms for a select call with 10 ms timeout. I know there was some improvements on the jiffy for kernel2.6 but I still don't get why calling select timeout 10ms from a C program return an accuracy of 10ms on linux 2.4 and the same select() timeout 10ms called from java return an accuracy of only 20 ms on kernel 2.4..... :( still looking

Similar Messages

  • Argh: Timers get finalized when calling Thread is finalized!

    I'm hunting a bug in my application where a global static cash is not refreshed anymore after the first thread that using the cache (and therefore creating the cache and its refersh timer initially) is exiting.
    Is there some JVM internal automatism that all timers that were created through (not by!) a thread will stop when this thread exits? Even though the timer was created within the singleton object that is held by a static field and therefore is always there?

    I use 1.5.0_04 on Windows (Sun J2SDK).
    Well, in my case it's not that simple, of course. I
    don't see a static referecne in your code for the
    object that creates the timer, That's true, but you will instead notice that the timer reference falls out of scope.
    for example.
    I also don't have any join() calls for my threads.I do only have that join so that the main thread will know when the timer has been created.
    And perhaps your thread doesn't schedule the task,
    but your main app. Check the code, both the main thread, and my own thread schedules one task each.
    Other than that you should end
    your application by waiting a while so that the
    garbage collector get's a chance to gc your thread
    (and call finalizers, perhaps). To see if your timer
    still works.Both threads ends their execution, but the thread created by the timer still executes. This is a sample output.
    First thread exits
    Executing Task from first thread
    Main thread exits
    Executing Task from main thread
    Executing Task from main thread
    Executing Task from first thread
    Executing Task from first thread
    Executing Task from main thread
    Executing Task from main thread
    Executing Task from first thread
    Executing Task from first threadWhere task from first only indicates that is is my own thread that posted the task (the same thread that created the timer). Task from main thread does only indicate that that task was created by the main thread.
    /Kaj

  • Performance overhead of calling Thread.currentThread().getStackTrace()

    All I can see is it is calling native function
    private static native StackTraceElement[][] dumpThreads(Thread athread[]);
    Just wonder if I call this method for every transaction, will this causing performance issue? Is this method considered slow to execute?

    How about compare with String concat?
    We now having our own transaction framework, at the end of the transaction the module call transaction.start() must call either commit() / close() . If that module doesn't do that, next module cannot start() another transaction. I understand this is not a good design, but this is what this is and I am not the module owner so I can say nothing about that.
    However, I would still like to have some checking to see if any the transaction starter forget to commit / close the transaction. I just thought of in method start() I save a copy of stacktrace() element. If the transaction cannot start then I show the printStack() of last saved copy so that I know which module have that problem.
    How do you think about that?

  • Anyone about Thread.sleep() in solaris???

    hi
    can anyone pls tell me how to make sure that a thread sleeps exactly for a given amount of time inspite of its processing time in solaris?
    i have noticed that when i say Thread.sleep(10000)
    it is not exacly sleeping for 10 secs every time.sometime it sleeps for more than 3 mts.
    why is it so different in solaris?
    In winNT it is working fine.
    Thank you

    I my experience, on a idle Solaris system, a call to Thread.sleep(n) will sleep n plus or minus 1 millisecond. Of course, what Solaris box is really idle. The sleeping thread is able to run after the the requested time but must compete with other threads. Generally, unless the box is VERY busy, calling Thread.Sleep(10000) should wake up in not too much more than 10 seconds - 20 would be unusual.
    Is the thread running at a lower priority than normal or are high-priority threads busying the system?
    Chuck

  • Thread.sleep takes a lot of CPU time!

    Hi,
    I have the run method like this:
    public void run()
    while(true)
    //some set of operations
    Thread.sleep(5*1000*60);
    The above code's performance was measured under stress test. . The sleep operation seems to take a lot of CPU time
    though ideally sleep is like a no-operation mode, meaning since no operation
    is done when a thread sleeps, it should not use any/minimal CPU time.
    But it seems to take over 30% of CPU time!
    Any ideas on why such a weird thing's happening?
    In fact, in one more similar method also, sleep is taking similar CPU
    time.

    A sleeping thread uses no CPU. Try the following, both with and without the for loop. If you see a constant high CPU usage, even when the thread is sleeping, it's probably that the CPU usage is measured as an average over the last second or several seconds, so when the tasks you're performing are intense and take a significant fraction of the time you're sleeping, the average CPU usage doesn't go down that much.
    public class Sleeper {
        public static void main(String[] args) throws Exception {
            while(true) {
                for (int ix = 0; ix < 100000000; ix++) {
                    int jx = ix * 2;
                    ix = --jx;
                Thread.sleep(5 * 1000* 60);
    }

  • Updating frame content between Thread.sleep() calls

    I have several JLabels in a Frame. What I want is to update the content of the labels (to be more precise, the ImageIcons), but with pauses in between each update (lets say 1 second). So, I want to change the content of one label, have those changes show on screen, then, wait for a second and change the content of the second label, show the changes, wait for a second, change the next label, and so on...
    What I'm doing is:
    change label 1
    Thread.sleep(1000);
    change label 2
    Thread.sleep(1000);
    change label 3
    Thread.sleep(1000);
    ...And the problem is that the individual changes are not shown on screen until the whole process has finished. It does pause after each change, but the change to the particular label is not shown afterwards. Then, when the whole process is finished, the changes to all the labels are shown simultaneously on screen.
    I have tried calling repaint() and validate() after each call to Thread.sleep(), but it makes no difference.
    Why are the changes not updated on screen until the end?
    How can I achieve what I'm trying to do?
    Many thanks in advance.

    You're sleeping in the main thread, so you're holding up the paint thread too...
    I'd trying extending each label / visual component, to include it's own timer and thread.
    eg. ( not compiled nor tested, but addresses all the main points... )
    regards,
    Owen
    public class myLabel extends JLabel implements runnable
        boolean animate = true;
        Thread paintThread;
         public myLabel ( )
              super();
              paintThread = new Thread ( this );
         public void startAnimation ( )
              if ( animate == false )
                 animate = true;
                 paintThread.start();
         pubic void stopAnimation ( )
             animate = false;
         public void run ( )
               while ( !animate )
                   Thread.sleep ( 1000 );
                    final Runnable runnable = new Runnable()
                        public void run()
                              // change label text
                              // Make any Swing / GUI changes here                      
                        } // run
                   };    // runnable
                   // force/flag this label as requiring a repaint
                   invalidate();              
                   // NB : You must use this to avoid multi-threaded problems with Swing
                   SwingUtilities.invokeLater(runnable);
    }

  • I have read the thread about turning off dialpad sounds when calling a number. I used to always be able to do this on my 4S but not so since the latest software on the 5. Keyboard clicks are turned off and still have dialpad sound. I've NEVER had to mute.

    I have read the thread about turning off dialpad sounds when calling a number. I used to always be able to do this on my 4S but not so since the latest software on the 5. Keyboard clicks are turned off and still have dialpad sound. I've NEVER had to mute to dial before.

    I really do not think it is the iPad or your network connection. Other users have reported this very same issue. Try this and see if it works for you - it may not work - but it's easy to try - harmless - and it has worked in the past for others.
    Try signing out of your account and restart your iPad.
    Go to Settings>Store>Apple ID and tap the ID and sign out. Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button. Go back to Settings>Store> Apple ID and sign in again.

  • Correct clipping when calling "paint()" from thread

    How do I achieve correct clipping around JMenus or JTooltips when calling paint() for a Component from a background thread?
    The whole story:
    Trying to implement some blinking GUI symbols (visualizing alerts), I implemented a subclass of JPanel which is linked to a Swing timer and thus receives periodic calls to its "actionPerformed()" methods.
    In the "actionPerformed()" method, the symbol's state is toggled and and repainting the object should be triggered.
    Unfortunately, "repaint()" has huge overhead (part of the background would need to be repainted, too) and I decided to call "paint( getGraphics() )" instead of it.
    This works fine as long as there is nothing (like a JMenu, a JComboBox or a JTooltip) hiding the symbol (partially or completely). In such case the call to paint() simply "overpaints" the object.
    I suppose setting a clipping region would help, but where from can I get it?
    Any help welcome! (I alread spent hours in search of a solution, but I still have no idea...)

    For all those interested in the topic:
    It seems as if there is no reliable way to do proper clipping when calling
    "paint()".
    The problem was that when my sub-component called "repaint()" for itself, the underlying component's "paintComponent()" method was called as well. Painting of that component was complex and avoiding complexity by restricting
    on the clipping region is not easily possible.
    I have several sub-components to be repainted regularly, resulting in lots of calls to my parent component's "paintComponent()" method. This makes the
    repainting of the sub-components awfully slow; the user can see each one begin painted!
    Finally I decided I had to speed up the update of the parent component. I found two possible solutions:
    a) Store the background of each of the sub-components in a BufferedImage:
    When "paintComponent()" is called: test, if the clipping rectangle solely
    contains the region of a sub-component. If this is true check if there
    is a "cached" BufferedImage for this region. If not, create one, filling
    it with the "real" "paintComponent()" method using the Graphic object of
    the BufferedImage. Once we have such a cached image, simply copy it the
    the screen (i.e. the Graphics object passed as method parameter).
    b) To avoid the handling of several of such "cached" image tiles, simply
    store the whole parent component's visible part ("computeVisibleRect()")
    in a BufferedImage. Take care to re-allocate/re-paint this image each
    time the visible part changes. (I need to restrict the image buffer to
    the visible part since I use a zooming feature: Storing the whole image
    would easily eat up all RAM!) In the "paintComponent()", simple check
    if the currently buffered image is still valid - repaint if not -
    and copy the requested part of it (clip rect) to the screen. That's it!
    The whole procedure works fine.
    Best regards,
    Armin

  • Form displays modeless despite being called using ShowDialog() when called in a separate thread

    I have a java application which loads a C++ dll in order to launch VB components.
    Recently the VB activex components were upgraded to C# .NET.But some of the activex components referenced within the C# dlls had to be retained as is.
    There were issues of the C# components  not being launched since the Activex components cannot be Instantiated 
    in a Multi threaded Aparatment thread. Java as far as I know does not support single threaded apartments.
    So we had to create a new thread in the C++ dll (which acts like the interface between Java and C#) and then
    the components were launching properly.
    Now the issue is that even when the forms are being called using ShowDialog, the modality is lost.
    Does anybody know why this happens and a possible solution to the issue.

    I have a java application which loads a C++ dll in order to launch VB components.
    Recently the VB activex components were upgraded to C# .NET.But some of the activex components referenced within the C# dlls had to be retained as is.
    There were issues of the C# components  not being launched since the Activex components cannot be Instantiated 
    in a Multi threaded Aparatment thread. Java as far as I know does not support single threaded apartments.
    So we had to create a new thread in the C++ dll (which acts like the interface between Java and C#) and then
    the components were launching properly.
    Now the issue is that even when the forms are being called using ShowDialog, the modality is lost.
    Does anybody know why this happens and a possible solution to the issue.
    Hello,
    It seems like this issue is similar to this one
    ShowDialog call of a windows form is not really modal when called from a java Application.
    Since we could not test it directly, I would recommend you try to call it by specifying the owner for that form.
    Regards.
    Carl
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. &lt;br/&gt; Click
    &lt;a href=&quot;http://support.microsoft.com/common/survey.aspx?showpage=1&amp;scid=sw%3Ben%3B3559&amp;theme=tech&quot;&gt; HERE&lt;/a&gt; to participate the survey.

  • Java Thread.sleep(timeout) is influenced by changes to System time on Linux

    Java Thread.sleep(timeout) is influenced by changes to System time on Linux
    bugId : 6311057
    I encountered this problem in redhat6/ jdk 1.6

    890651 wrote:
    Java Thread.sleep(timeout) is influenced by changes to System time on Linux
    bugId : 6311057
    I encountered this problem in redhat6/ jdk 1.6At least half the time I use it, I'd want it to be, the other half I wouldn't care.
    What are you doing with it where this might be a problem?
    Changing the system clock abruptly can cause all kinds of problems with your system anyway, because various background activities etc. often depend on file dates. Wherever possible use the "skew" method to adjust your system clock, rather than just plonking in a new value, especially if you are setting the clock backwards.

  • Since last week my date & time have not worked on my 5c. The date & time are constantly wrong. I've shut down, doesn't work. Set it automatically, doesn't work. I don't get texts or calls when it's sleeping. Any suggestions?

    Since last week my date & time have not worked on my 5c. The date & time are constantly wrong. I've shut down, doesn't work. Set it automatically, doesn't work. I don't get texts or calls when it's sleeping. Any suggestions?

    try a reset.
    Hold the home & power buttons down simultaneously until you see the Apple logo appear.
    Note: no data will be lost.

  • Possible thread issues when calling java from C++/Delphi/C#

    Hi,
    We have a java API for one of our applications. This API has wrapper API's in C++, Delphi and C#. There are two main top level classes in te API - Client and Receiver. Both haave a receive() method.
    We used to ship JRE1.3 with the API installation - this was needed to suport the user applications. Recently we haev moved to java 1.4 as the least suported version.
    We have two ways of using the java API in our wrapper API's.
    Method one, we instantiate the client, and call client.receive(). There are no threads etc involved here. This is working fine.
    In the second method, we set a callback on the client, which starts a thread (in C++/Delphi or C#) which calls receiver.receive() and tries to get the message. This is failing.
    It fails at a line which simply says "DocumentBuilderFactory.newInstance()".
    This call has already been made when connecting the client and it is successful because we can see the client connected.
    Whether we do client.receive() or receiver.receive() in a thread, the code passes through this line.But is throwing the exception only when we come to it through a thread.
    Any ideas on what I need to watch out for when calling methods on a JVM from a thread in C++/Delphi or C#?
    Thanks
    Hari
    PS: I know we are using some really old versions, but thats needed and out of my control.

    Hi,
    I managed to solve this - finally!
    This is what was the cause in our case - should apply to all situations though.
    We had the Xerces classes packaged in a custom jar file along with other XML stuff we have. And this mega-jar was on the class path.
    We were running everything on Java 1.3 and it worked fine.
    But Java 1.4 wrecked all havoc.
    So here is what I did:
    1. I tried explicitly doing Class.forName() with the name of the Xerces class that was not found. I did this at the same point in the code where the exception was being thrown.
    2. The class was successfully loaded indicating that it was on the class path somewhere.
    3. Java 1.4 made some changes in terms of class loaders - so suspecting that, I tried printing out the System and the Context class loaders at the point where the exception was being thrown - the system class loader was a valid object, but context class loader was null
    4. We have another point in the code base where the exact same lines were used, and these are getting successfully executed even in the multi threaded situation - this is the start up sequence.
    5. I printed the two class loaders at this point - they are both valid objects, no nulls.
    With this, I narrowed down the scope and was convinced that the class loaders are the cause.
    A search on Google and after looking the the source code for Xerces, we realized that the Xerces API uses the Context Class Loader to resolve and load the DocumentFactoryImpl class - this change is from Java 1.4 onwards.
    In our case, the JNI AttachCurrentThread method called from C++/C# and Delphi was attaching the thread to the JVM, but each time the context class loader was null.
    We could not find anything on how we could make the method to put a non null context classloader.
    So, we changed all our JNI interfaces to do the following
    //attach the current thred
    jvm->AttachCurrentThread(...)
    //now get the system class loader and set it as the context class loader on the current thread
    //get things from the Thread class
    jclass thread = get the thread class
    jmethod currentThread = get the static method currentThread()
    jobject thread_object = get the current thread object into this
    jmethod setContextClassLoader = get the setContextClassLoader() method on the thread
    //get the SystemClassLoader
    jclass clsLoader = get the class for ClassLoader
    jmethodid getSysClsLoader = get the method ID for the getSystemClassLoader() method
    jobect sysClsLoader = get the system class loader by calling the above method
    //set the context class loader on the thread by calling set context class loader with the sys class loader as the argumentUnfortunately I don't have the code with me right now,otherwise would have shared the same.

  • IMac loses connection to network when waking from sleep

    Hi There,
    We are a small mixed environment of Macs and PCs running on a Windows 2008 domain. One of 2 iMacs that now run Mountain Lion 10.8.5 is having problems when waking from sleep. One of our designers will go for lunch and the machine will sleep for about 30 to 40 minutes. Upon her return the iMac will kick her off of the 3 shares she usually logs into (2 are on Win2008 machines, and 1 is a MacPro running 10.6.8 Server).
    If she has files open in any of the Creative Suite Apps, the app will crash and she will have to restart the whole machine. If no files are open then she can usually reconnect to the shares after a short while.  Obviously I told her not to leave any files open, but its causing her some headaches.
    Its also creating srv errors (id 2012) on our domain controllers, when she tries to wake her machine.
    This Imac is a late 2009, and we have a 2011 model that has no issues at all. Both are set exactly the same.
    I have reset SMC, Pram, and rebinded to the domain, and searched through these forums quite a bit to no avail.
    Any thoughts or suggestions would be much appreciated.

    I am continuing to work on this issue, and have tried a number of things based on searching here and elsewhere.
    And Lucky Me, I have been able to replicate this behavior on one of other Macs (imac 2011, on 10.8.5). I also see errors on 2 separate Windows file servers on the domain (Event ID: srv 2012).
    Below I am posting what seems to be the relevant area of the log.
    Nov 14 11:48:04 PrePressMac2 kernel[0]: Wake reason: EHC1
    Nov 14 11:48:04 PrePressMac2 kernel[0]: Previous Sleep Cause: 5
    Nov 14 11:48:04 PrePressMac2 kernel[0]: The USB device HubDevice (Port 1 of Hub at 0xfd000000) may have caused a wake by issuing a remote wakeup (2)
    Nov 14 11:48:04 PrePressMac2 kernel[0]: 18323.795216: setDISASSOC from ATH_INTERFACE_CLASS disconnectVap
    Nov 14 11:48:04 PrePressMac2 kernel[0]: 18323.795224: switchVap from 1 to 1
    Nov 14 11:48:04 PrePressMac2 kernel[0]: The USB device Keyboard Hub (Port 3 of Hub at 0xfd100000) may have caused a wake by issuing a remote wakeup (3)
    Nov 14 11:48:04 PrePressMac2 kernel[0]: The USB device Apple Keyboard (Port 2 of Hub at 0xfd130000) may have caused a wake by issuing a remote wakeup (3)
    Nov 14 11:48:04 PrePressMac2 kernel[0]: HID tickle 117 ms
    Nov 14 11:48:04 PrePressMac2 kernel[0]: TBT W (1): 0 [x]
    Nov 14 11:48:04 PrePressMac2.local WindowServer[90]: handle_will_sleep_auth_and_shield_windows: no action for lock state 1
    Nov 14 11:48:04 PrePressMac2.local WindowServer[90]: Created shield window 0x1e1 for display 0x003f003d
    Nov 14 11:48:04 PrePressMac2.local WindowServer[90]: handle_will_sleep_auth_and_shield_windows: no action for lock state 1
    Nov 14 11:48:04 PrePressMac2.local WindowServer[90]: Created shield window 0x1e2 for display 0x003f003e
    Nov 14 11:48:04 PrePressMac2.local WindowServer[90]: handle_will_sleep_auth_and_shield_windows: no action for lock state 1
    Nov 14 11:48:04 PrePressMac2.local WindowServer[90]: Created shield window 0x1e3 for display 0x003f003f
    Nov 14 11:48:04 PrePressMac2.local WindowServer[90]: handle_will_sleep_auth_and_shield_windows: no action for lock state 1
    Nov 14 11:48:04 PrePressMac2.local WindowServer[90]: Created shield window 0x1e4 for display 0x003f0040
    Nov 14 11:48:04 PrePressMac2.local WindowServer[90]: handle_will_sleep_auth_and_shield_windows: no action for lock state 1
    Nov 14 11:48:05 PrePressMac2 kernel[0]: AppleBCM5701::selectMedium - autoselect, any duplex, EEE allowed, flow control allowed
    Nov 14 11:48:05 PrePressMac2 kernel[0]: Ethernet [AppleBCM5701Ethernet]: Link down on en0
    Nov 14 11:48:06 PrePressMac2.local KernelEventAgent[47]: tid 00000000 received event(s) VQ_NOTRESP (1)
    Nov 14 11:48:06 PrePressMac2.local KernelEventAgent[47]: tid 00000000 type 'smbfs', mounted on '/Volumes/PrePress', from '//aconti@GAIA/PrePress', not responding
    Nov 14 11:48:06 PrePressMac2.local KernelEventAgent[47]: tid 00000000 found 1 filesystem(s) with problem(s)
    Nov 14 11:48:10 PrePressMac2 kernel[0]: Ethernet [AppleBCM5701Ethernet]: Link up on en0, 1-Gigabit, Full-duplex, Symmetric flow-control, Debug [796d,0321,0de1,0300,c5e1,7800]
    Nov 14 11:48:12 PrePressMac2.local configd[19]: network changed: v4(en0+:192.168.1.184) DNS+ Proxy+ SMB+
    Nov 14 11:48:12 PrePressMac2.local SophosAntiVirus[67]: reloading scheduled scans...
    Nov 14 11:48:12 prepressmac2.cutpasteandprint.net configd[19]: setting hostname to "prepressmac2.cutpasteandprint.net"
    Nov 14 11:48:12 prepressmac2.cutpasteandprint.net digest-service[1048]: label: default
    Nov 14 11:48:12 prepressmac2.cutpasteandprint.net digest-service[1048]:           dbname: od:/Local/Default
    Nov 14 11:48:12 prepressmac2.cutpasteandprint.net digest-service[1048]:           mkey_file: /var/db/krb5kdc/m-key
    Nov 14 11:48:12 prepressmac2.cutpasteandprint.net digest-service[1048]:           acl_file: /var/db/krb5kdc/kadmind.acl
    Nov 14 11:48:12 prepressmac2.cutpasteandprint.net digest-service[1048]: digest-request: uid=0
    Nov 14 11:48:12 prepressmac2.cutpasteandprint.net rpcsvchost[1049]: sandbox_init: com.apple.msrpc.netlogon.sb succeeded
    Nov 14 11:48:12 prepressmac2.cutpasteandprint.net digest-service[1048]: digest-request: init request
    Nov 14 11:48:12 prepressmac2.cutpasteandprint.net digest-service[1048]: digest-request: init return domain: CPP server: PREPRESSMAC2
    Nov 14 11:48:12 prepressmac2 kernel[0]: Sandbox: sandboxd(1050) deny mach-lookup com.apple.coresymbolicationd
    Nov 14 11:48:12 prepressmac2.cutpasteandprint.net sandboxd[1050] ([1049]): rpcsvchost(1049) deny file-read-data /private/var/root/Library/Preferences/ByHost/.GlobalPreferences.037506C4-0B10-5 70D-A7B6-B3B8F7AE0CC6.plist
    Nov 14 11:48:12 prepressmac2.cutpasteandprint.net sandboxd[1050] ([1049]): rpcsvchost(1049) deny file-read-data /private/var/root/Library/Preferences/.GlobalPreferences.plist
    Nov 14 11:48:13 prepressmac2.cutpasteandprint.net nsupdate[1055]: krb5_sendto_context is called on main thread, its a blocking api
    Nov 14 11:48:13 prepressmac2.cutpasteandprint.net nsupdate[1055]: gss_init_sec_context is called on main thread, its a blocking api
    Nov 14 11:48:13 prepressmac2.cutpasteandprint.net nsupdate[1056]: gss_init_sec_context is called on main thread, its a blocking api
    Nov 14 11:48:14 prepressmac2.cutpasteandprint.net nsupdate[1057]: krb5_sendto_context is called on main thread, its a blocking api
    Nov 14 11:48:14 prepressmac2.cutpasteandprint.net nsupdate[1057]: gss_init_sec_context is called on main thread, its a blocking api
    Nov 14 11:48:14 prepressmac2.cutpasteandprint.net nsupdate[1058]: gss_init_sec_context is called on main thread, its a blocking api
    Nov 14 11:48:15 prepressmac2.cutpasteandprint.net nsupdate[1060]: krb5_sendto_context is called on main thread, its a blocking api
    Nov 14 11:48:15 prepressmac2.cutpasteandprint.net nsupdate[1060]: gss_init_sec_context is called on main thread, its a blocking api
    Nov 14 11:48:16 prepressmac2.cutpasteandprint.net nsupdate[1061]: gss_init_sec_context is called on main thread, its a blocking api
    Nov 14 11:48:17 prepressmac2 com.apple.launchd[1] (com.apple.smb.preferences): Throttling respawn: Will start in 5 seconds
    Nov 14 11:48:17 --- last message repeated 2 times ---
    Nov 14 11:48:17 prepressmac2.cutpasteandprint.net nsupdate[1063]: krb5_sendto_context is called on main thread, its a blocking api
    Nov 14 11:48:17 prepressmac2.cutpasteandprint.net nsupdate[1063]: gss_init_sec_context is called on main thread, its a blocking api
    Nov 14 11:48:18 prepressmac2.cutpasteandprint.net nsupdate[1067]: gss_init_sec_context is called on main thread, its a blocking api
    Nov 14 11:48:18 prepressmac2.cutpasteandprint.net netbiosd[92]: name servers down?
    Nov 14 11:48:19 prepressmac2.cutpasteandprint.net nsupdate[1068]: krb5_sendto_context is called on main thread, its a blocking api
    Nov 14 11:48:19 prepressmac2.cutpasteandprint.net nsupdate[1068]: gss_init_sec_context is called on main thread, its a blocking api
    Nov 14 11:48:19 prepressmac2.cutpasteandprint.net nsupdate[1069]: gss_init_sec_context is called on main thread, its a blocking api
    Nov 14 11:48:22 prepressmac2.cutpasteandprint.net digest-service[1048]: digest-request: uid=0
    Nov 14 11:48:22 prepressmac2.cutpasteandprint.net digest-service[1048]: digest-request: init request
    Nov 14 11:48:22 prepressmac2.cutpasteandprint.net digest-service[1048]: digest-request: init return domain: CPP server: PREPRESSMAC2
    Nov 14 11:48:22 prepressmac2.cutpasteandprint.net KernelEventAgent[47]: tid 00000000 received event(s) VQ_NOTRESP (1)
    Nov 14 11:48:22 prepressmac2 kernel[0]: smb_iod_reconnect: Reconnected share PREPRESS with server GAIA
    Nov 14 11:48:32 prepressmac2.cutpasteandprint.net ManagedClient[1077]: ODUGetMCXRecordWithCache(): record unique ID for 'PrePressMac2' not set
    Nov 14 11:48:32 prepressmac2.cutpasteandprint.net ManagedClient[1077]: ODUGetMCXRecordWithCache() Accessing network user record from Active Directory not allowed because no authentication information was supplied.
    Nov 14 11:56:25 prepressmac2 com.apple.launchd.peruser.1997381720[389] ([0x0-0x4a04a].com.adobe.InDesign[630]): Exited: Terminated: 15
    Nov 14 11:56:34 prepressmac2.cutpasteandprint.net spindump[1100]: Saved hang report for Adobe InDesign CS5.5 version 7.5.3.333 (7530) to /Library/Logs/DiagnosticReports/Adobe InDesign CS5.5_2013-11-14-115634_PrePressMac2.hang
    This is from the 2011 iMac, and I see something very similar to this on the 2009 machine. 
    I continue to think this is a software issue related to 10.8.5 and Adobe CS (CS5 on the 2009 machine and CS 5.5 on the 2011) as this appears to have come up only since the recent update.
    Any help would be appreciated.

  • What's wrong to put Thread.sleep in a session bean?

    i am working on a trading platform and i think there is a design flaw. The part i am working on is the Order Management module. When an order value object is published to a JMS topic and picked up by a MDB. The MDB, in turn, calls a session bean (could be stateless, I didn't check), OrderEngineBean. After this bean saves the order vo into database and broadcast the message to all involved parties, it suspends for 12 sec, using Thread.sleep, so other parities might have a chance to update the vo. If no update occurs, the order is considered expired and abandoned.
    It looks awkward to me to use a Thread.sleep in a session, but I haven't come out with a better idea to deal with the scenario like above.
    Anyone can help me out?
    Thanks a lot!
    Sway

    Setting the property "max-beans-in-free-pool" is not the answer to this issue. By setting this property to 1, the container merely instantiates and keeps one instance of the bean in the free pool at the "start" of the app server. But if the container comes across more than one requests for the same EJB simultaneoulsy, then it will create new instances at that time to handle the requests simultaneously.
    You are seeing intermixed log messages between two threads because these messages are being logged from two different instances of the EJB and NOT the same instance of the EJB. The container does synchronizes the calls on "a method" on "a instance". So what you are seeing are the messages coming from "a method" on "two different instances" of the same EJB.
    You can refer to the EJB 2.0 specification section 6.11.6 Non-reentrant instances for details about simultaneous access to the same session object.

  • Kernel Panics when waking from sleep? 2012 MBA Base Model

    I've been having some trouble with my 2012 MacBook Air. It was running perfectly until about 2 weeks ago. Now, when waking from sleep, I am getting Kernel Panics that force the restart of my Mac. I was wondering if anyone could provide insight on the issue.
    An example log file is below:
    Mon Jun 17 18:34:31 2013
    panic(cpu 0 caller 0xffffff802c4b8655): Kernel trap at 0xffffff7fac9bb786, type 14=page fault, registers:
    CR0: 0x000000008001003b, CR2: 0x0000000000000000, CR3: 0x000000002e792000, CR4: 0x00000000001606e0
    RAX: 0xffffff80389af900, RBX: 0xffffff8096e07000, RCX: 0x0000000000000002, RDX: 0x0000000000000004
    RSP: 0xffffff80a54f3dc0, RBP: 0xffffff80a54f3de0, RSI: 0x0000000000000002, RDI: 0x0000000000000000
    R8:  0xffffff80389c4000, R9:  0x00000000000003ff, R10: 0xffffffffffffffff, R11: 0x00000000ffffffff
    R12: 0xffffff8038986800, R13: 0x0000000000000002, R14: 0x0000000000000004, R15: 0x0000000000000002
    RFL: 0x0000000000010246, RIP: 0xffffff7fac9bb786, CS:  0x0000000000000008, SS:  0x0000000000000000
    Fault CR2: 0x0000000000000000, Error code: 0x0000000000000000, Fault CPU: 0x0
    Backtrace (CPU 0), Frame : Return Address
    0xffffff80a54f3a60 : 0xffffff802c41d626
    0xffffff80a54f3ad0 : 0xffffff802c4b8655
    0xffffff80a54f3ca0 : 0xffffff802c4ce17d
    0xffffff80a54f3cc0 : 0xffffff7fac9bb786
    0xffffff80a54f3de0 : 0xffffff802c83a02c
    0xffffff80a54f3e30 : 0xffffff802c8364f1
    0xffffff80a54f3e80 : 0xffffff802c841694
    0xffffff80a54f3ec0 : 0xffffff802c835ccb
    0xffffff80a54f3ef0 : 0xffffff802c84138d
    0xffffff80a54f3f30 : 0xffffff802c84708a
    0xffffff80a54f3f80 : 0xffffff802c8471b9
    0xffffff80a54f3fb0 : 0xffffff802c4b3137
          Kernel Extensions in backtrace:
             com.apple.iokit.IOUSBFamily(5.6)[065077C5-A49E-3C52-BDC0-60169E293563]@0xffffff 7fac99b000->0xffffff7fac9f6fff
                dependency: com.apple.iokit.IOPCIFamily(2.7.3)[1D668879-BEF8-3C58-ABFE-FAC6B3E9A292]@0xffff ff7fac972000
    BSD process name corresponding to current thread: kernel_task
    Mac OS version:
    12E55
    Kernel version:
    Darwin Kernel Version 12.4.0: Wed May  1 17:57:12 PDT 2013; root:xnu-2050.24.15~1/RELEASE_X86_64
    Kernel UUID: 896CB1E3-AB79-3DF1-B595-549DFFDF3D36
    Kernel slide:     0x000000002c200000
    Kernel text base: 0xffffff802c400000
    System model name: MacBookAir5,2 (Mac-2E6FAB96566FE58C)
    System uptime in nanoseconds: 4372661007505
    last loaded kext at 244544510921: com.apple.filesystems.msdosfs          1.8.1 (addr 0xffffff7fae0e8000, size 65536)
    last unloaded kext at 304724110055: com.apple.filesystems.msdosfs          1.8.1 (addr 0xffffff7fae0e8000, size 57344)
    loaded kexts:
    org.virtualbox.kext.VBoxNetAdp          4.2.6
    org.virtualbox.kext.VBoxNetFlt          4.2.6
    org.virtualbox.kext.VBoxUSB          4.2.6
    org.virtualbox.kext.VBoxDrv          4.2.6
    com.silex.driver.sxuptp          1.10.1
    com.globaldelight.driver.BoomDevice          1.1
    com.apple.filesystems.autofs          3.0
    com.apple.iokit.IOBluetoothSerialManager          4.1.4f2
    com.apple.driver.AGPM          100.12.87
    com.apple.driver.X86PlatformShim          1.0.0
    com.apple.driver.ApplePlatformEnabler          2.0.6d1
    com.apple.driver.AppleMikeyHIDDriver          122
    com.apple.driver.AppleHDA          2.3.7fc4
    com.apple.driver.AppleSMCLMU          2.0.3d0
    com.apple.driver.AudioAUUC          1.60
    com.apple.iokit.IOUserEthernet          1.0.0d1
    com.apple.Dont_Steal_Mac_OS_X          7.0.0
    com.apple.driver.AppleLPC          1.6.0
    com.apple.driver.AppleBacklight          170.2.5
    com.apple.driver.AppleSMCPDRC          1.0.0
    com.apple.iokit.BroadcomBluetoothHCIControllerUSBTransport          4.1.4f2
    com.apple.driver.AppleMikeyDriver          2.3.7fc4
    com.apple.driver.AppleUpstreamUserClient          3.5.10
    com.apple.driver.AppleMCCSControl          1.1.11
    com.apple.driver.ApplePolicyControl          3.4.5
    com.apple.driver.AppleIntelHD4000Graphics          8.1.2
    com.apple.driver.AppleIntelFramebufferCapri          8.1.2
    com.apple.driver.AppleUSBTCButtons          237.1
    com.apple.driver.AppleUSBTCKeyboard          237.1
    com.apple.driver.AppleUSBCardReader          3.1.7
    com.apple.driver.XsanFilter          404
    com.apple.AppleFSCompression.AppleFSCompressionTypeDataless          1.0.0d1
    com.apple.AppleFSCompression.AppleFSCompressionTypeZlib          1.0.0d1
    com.apple.BootCache          34
    com.apple.iokit.IOAHCIBlockStorage          2.3.1
    com.apple.driver.AppleUSBHub          5.5.5
    com.apple.driver.AirPort.Brcm4331          615.20.17
    com.apple.driver.AppleAHCIPort          2.5.2
    com.apple.driver.AppleUSBEHCI          5.5.0
    com.apple.driver.AppleUSBXHCI          5.6.0
    com.apple.driver.AppleEFINVRAM          1.7
    com.apple.driver.AppleSmartBatteryManager          161.0.0
    com.apple.driver.AppleRTC          1.5
    com.apple.driver.AppleACPIButtons          1.7
    com.apple.driver.AppleHPET          1.8
    com.apple.driver.AppleSMBIOS          1.9
    com.apple.driver.AppleACPIEC          1.7
    com.apple.driver.AppleAPIC          1.6
    com.apple.driver.AppleIntelCPUPowerManagementClient          196.0.0
    com.apple.nke.applicationfirewall          4.0.39
    com.apple.security.quarantine          2.1
    com.apple.driver.AppleIntelCPUPowerManagement          196.0.0
    com.apple.kext.triggers          1.0
    com.apple.iokit.IOSerialFamily          10.0.6
    com.apple.driver.DspFuncLib          2.3.7fc4
    com.apple.iokit.IOSurface          86.0.4
    com.apple.iokit.IOAudioFamily          1.8.9fc11
    com.apple.kext.OSvKernDSPLib          1.6
    com.apple.driver.AppleBacklightExpert          1.0.4
    com.apple.iokit.AppleBluetoothHCIControllerUSBTransport          4.1.4f2
    com.apple.driver.AppleSMBusController          1.0.11d0
    com.apple.driver.AppleHDAController          2.3.7fc4
    com.apple.iokit.IOHDAFamily          2.3.7fc4
    com.apple.driver.AppleSMBusPCI          1.0.11d0
    com.apple.driver.AppleGraphicsControl          3.4.5
    com.apple.driver.X86PlatformPlugin          1.0.0
    com.apple.driver.AppleSMC          3.1.4d2
    com.apple.driver.IOPlatformPluginFamily          5.3.0d51
    com.apple.iokit.IOAcceleratorFamily          74.5.1
    com.apple.iokit.IONDRVSupport          2.3.7
    com.apple.iokit.IOGraphicsFamily          2.3.7
    com.apple.driver.AppleUSBMultitouch          237.3
    com.apple.iokit.IOBluetoothFamily          4.1.4f2
    com.apple.iokit.IOUSBHIDDriver          5.2.5
    com.apple.iokit.IOSCSIBlockCommandsDevice          3.5.5
    com.apple.iokit.IOUSBMassStorageClass          3.5.1
    com.apple.iokit.IOSCSIArchitectureModelFamily          3.5.5
    com.apple.driver.AppleThunderboltDPInAdapter          1.8.9
    com.apple.driver.AppleThunderboltDPAdapterFamily          1.8.9
    com.apple.driver.AppleThunderboltPCIDownAdapter          1.2.6
    com.apple.driver.AppleUSBMergeNub          5.5.5
    com.apple.driver.AppleUSBComposite          5.2.5
    com.apple.driver.AppleThunderboltNHI          1.7.8
    com.apple.iokit.IOThunderboltFamily          2.4.0
    com.apple.iokit.IOUSBUserClient          5.5.5
    com.apple.iokit.IO80211Family          530.4
    com.apple.iokit.IONetworkingFamily          3.0
    com.apple.iokit.IOAHCIFamily          2.3.1
    com.apple.iokit.IOUSBFamily          5.6.0
    com.apple.driver.AppleEFIRuntime          1.7
    com.apple.iokit.IOHIDFamily          1.8.1
    com.apple.iokit.IOSMBusFamily          1.1
    com.apple.security.sandbox          220.3
    com.apple.kext.AppleMatch          1.0.0d1
    com.apple.security.TMSafetyNet          7
    com.apple.driver.DiskImages          345
    com.apple.iokit.IOStorageFamily          1.8
    com.apple.driver.AppleKeyStore          28.21
    com.apple.driver.AppleACPIPlatform          1.7
    com.apple.iokit.IOPCIFamily          2.7.3
    com.apple.iokit.IOACPIFamily          1.4
    com.apple.kec.corecrypto          1.0

    The problem stemmed from something related to USB. I suggest uninstalling the third-party software responsible for installing these items:
    org.virtualbox.kext.VBoxNetAdp          4.2.6
    org.virtualbox.kext.VBoxNetFlt          4.2.6
    org.virtualbox.kext.VBoxUSB          4.2.6
    org.virtualbox.kext.VBoxDrv          4.2.6
    com.silex.driver.sxuptp          1.10.1
    com.globaldelight.driver.BoomDevice          1.1
    Alternatively you can boot into Safe Mode which will not load those device drivers, and see if you panics cease. If they do, then you can uninstall the software. BTW, the current version of Virtual Box is VirtualBox-4.2.12-84980-OSX.

Maybe you are looking for

  • Getting other people's messages on iMessage after losing my #? Help!

    I used to have phone service through T-Mobile but I ran out of money to pay for bills, and T-Mobile canceled my account eventually. Someone else in the area got an account with them and now they have my number. However, all my friends who had me in t

  • A_Player, A New Creative MediaSource Player S

    Hmm, I don't believe this violates any rule or regulation (let me know if it does), but I skimmed through the configs for themes and decided I could make my own. It took hours and hours of digging through undocumented config files, but I think it was

  • Artifacts in clips

    I am getting severe artifacts occasionally in my clips when I drag them into the time line... they aren't there in the original clips.  Using CS6.   When I scrub through them in the Source window or look at them in CS6 Browser, these artifacts don't

  • WM TO error

    HI gurus while creating TO system give error message Storage unit type E1 not maintained for material T-BW04 What could be the config.

  • How to reverse array display order?

    Is there a way to reverse the way labview displays array data?  When using a boolean array I would like the LSB to be on the right side. I know that you can use the reverse array function, but that changes the actual data. I would rather just change