Python time - kernel reports TIME_ERROR: 0x41: Clock Unsynchronized - google-compute-engine

I'm running a Python app on Google Compute Engine that is dependent on time.sleep and I keep getting an error on start up of kernel reports TIME_ERROR: 0x41: Clock Unsynchronized at which point the app stops running. What's causing this?

I changed my machine image to --image=debian-8 and it seems to be working again and I'm no longer getting this error, but this is pretty dumb, can someone from the GCloud team look into this? I wasted several hours trying to troubleshoot this. Seems there is something wrong with the debian-9 image

Related

Transfer Fault on SAME70 Xplained Microcontroller

I am using a SAME70 Xplained microcontroller for a project I am working on. I program it using an editor made by Microchip called MPLAB X. About a week ago, suddenly I could no longer upload any code to the board as I keep receiving the error
java.lang.RuntimeException: java.lang.RuntimeException: TransferFault
Resetting the board, uploading different code or using other features in the program to interact with it do nothing. An important note is that when I got ahold of a brand new board of the same type and tried to upload to the board, it actually succeeded the first time. But then for some reason later the same error pops up again. It seems the issue is a bit more than downloading code as the function in the program which allow for uploading code or pausing the controller throw the same error. I have been struggling with this issue for over a week now and cannot use the board because of it. I cannot find any mention of this issue on the internet. Has anyone ever encountered this? Does anyone know the specifics of what a transfer fault is and can point me in the right direction?

How to fix Timeout_expired crashes in Windows Phone 81 app?

I am getting a lot of crashes in failure report on my Dev Center account like:
XXXXXXX!{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}
_Timeout_expired:_event_type_=_TargetStateChanged,_timeout_modifier_type_=_None,_server_task_currentState_=_NavigatingTo,_tar
MISSING_DUMP_EM_WATCHDOG_TIMEOUT_DEADA444_XXXXXXX!{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}
_Timeout_expired:_event_type_=_TargetStateChanged,_timeout_modifier_type_=_None,_server_task_currentState_=_NavigatingTo,_tar
EM_WATCHDOG_TIMEOUT_DEADA444_XXXXXXX!{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}
_Timeout_expired:_event_type_=_TargetStateChanged,_timeout_modifier_type_=_None,_server_task_currentState_=_Showing,_targetSt
MISSING_DUMP_EM_WATCHDOG_TIMEOUT_DEADA444_XXXXXXX!{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}
_Timeout_expired:_event_type_=_SystemKeyPressed,_timeout_modifier_type_=_None,_server_task_currentState_=_Active,_targetState
I'm not able to fix them in my app because in Failure Log there is no stacktrace for them and this kind of crashes are not catched by Application Insights.
The EM_WATCHDOG_TIMEOUT_DEADA444 error is a big mystery to everyone.
a lot of developers have them in the dashboard and they are not reproducable, and and they suddenly came when the Dashboard got a mayor update.
The error occurs in all kind of apps; with c++ runtime components and without, in background thread and in apps that do not use background threads at all....
Finally; there is not way to get the stacktrace and there is no way to catch it yourself because UnhandledException event doesn't get hit.
Meanwhile I'm ignoring the error, up until MSFT gives a proper explanation in the dashboard what this error means.
PS: if someone magically knows to solve/get more info out of this exceptions; I would love to hear about it.

Windows Phone background task stops prematurely

I'm developing a WP8.1 SL app which uses background tasks (not agents!).
My task is triggered by a TimerTrigger - once every 30 minutes (which I believe is the minimum interval for Windows Phone, right?). It is doing a lot of work, and for some reason, sometimes it gets interrupted - that is, it stops in the middle of it. The way I know it's in the middle of it is because I log what's happening and the task's work is basically the same every time.
I deployed the app to my device yesterday to test a new approach, and everything was working fine - the background task was doing everything every time it was started - worked like a charm. Today my device needed a soft reset, so I did it (nothing was working, it happens from time to time since I updated to WP8.1). Since that moment, the background task gets interrupted every time, right in the middle of it, just as with the previous approach.
Any ideas what can cause this? I'm thinking it may be connected to the soft reset, because - 100% success rate before it, 0% after that.
What I've tried so far:
I'm logging errors, I have a try-catch around everything, I've subscribed to the UnobservedException event and to the task's Canceled event, and I'm logging the suspension count - none of these things help. There seem to be no errors, it's not suspended, and it's not canceled.
I'm logging the current memory usage from time to time, and it's about 16-17MB. On my device, the limit should be 30MB, so I don't think that's a problem.
I'm calling RequestAccessAsync wherever I can. I thought once should be enough, but since that soft-reset issue, i decided to put it in 1-2 other places to check if it's causing the issue. Well, it's not, or at least this didn't fix it.
What I'm not sure about:
I have no idea how to check the CPU time my task has consumed. I can't find a good/reliable way to do so. Also, I can't find any info that would explain why the task would be stopped in the middle sometimes, and other times - it would work fine.
Any ideas why my background task is sometimes stopped at the middle? I'm really having a hard time determining how to fix/improve the app and will it work at all.
Thanks.
So, I think I found what my problem was.
First of all, the background task just needed a lot of CPU time, more than the limit, and that's why it was getting killed in the middle.
The reason why it was working sometimes, was because sometimes the device on which I was testing treated the app as being in debug (or with attached debugger). In this case the restriction on CPU time is removed.
So, even if I uninstall the app and rebuild it in Release and redeploy, and start it without the debugger attached, the device was NOT enforcing the constraints. That only happens, if I have started the app with the debugger at least once (or maybe the first time) after it's deployed. Restarting the device (just power off and then turn on) fixes this.
While I was testing, using the same build of an app, its background task ran for 40 MINUTES on one device, and just 3-4 seconds on another. After I restarted the first device, the background task started behaving normally (running for just a few seconds).
So, if you want to test your background task for the CPU constraint:
You must be testing on a device, not on the Emulator.
Uninstall the app, if it's installed.
Restart the device.
Deploy a Release build of the app.
Run the app, so that it can register the background task, and then close it.
Wait for the background task to be invoked. (You could add a trigger that can be forced, like TimeZoneChanged or UserPresent, so that you could quickly test it.)
P.S. This may not be the perfect answer, but these are my observations, and they helped me solve my problem. This by far is the best method I have found for testing the CPU time, and it's far from perfect. So, if anyone has better ideas, please share them.

Adobe Air app stucks after being in background (or inactive) to much time

We have an air application (native for windows) that after being unused or background for about some hours after you try to use it it got stuck and "not responding" windows message.
No log or error or crash just got stuck.
The best behaviour that we have got is that after some seconds it unstucks but then stucks and unstucks every 30 seconds aprox, so it is anusable.
We have tried some "ugly" tricks like after being out of focus/background for some minutes, goes into front, it goes, but this haven't resolved the above problems.
I understand clearly, that SO (Windows) has removed the cached memory pages associated to this process, however, this is normal for each program, so, it is normal that program (specially visually heavy like ours) come back to use, it takes some seconds to go into memory again.
However after that time of re caching into memory any programs (most) works like a charm.
This is not the case of air app.
is there any trick or recommendation for fixing this?
Maybe we should combine the "to front" trick with some other "dumb processing" to keep the program in memory?
thanks in advance.

Java SE binary crash

I have a Java swing application that subscribes to a lot of data and displays this data in various ways. Under heavy load I have come to encounter that the JRE simply stops working with message "Java(TM) Platform SE binary has stopped working". This obviously shuts down my application and I need to restart it. I have tried to google for ways to troubleshoot this issue as I do not get a stacktrace in my code or anything that I can work with but I have found very little useful information beyond upgrading/re-installing the JRE and running virus scans. I have done both of these measures and rebooted the server but the problem still persists. I have tried to monitor the process with Java VisualVM (see dump below) but I am no expert on this tool and may not know what to look for. The observation that I have made is that the 'crashes' appear to coincide with Garbage Collections.
The issue is quite easy to reproduce and occurs after about 10 minutes of running the application. I do not run the application with any specific jvm parameters. The Java version is 1.6.0_31 (was _25 before upgrade) and I run on Windows 7 64-bit.
In the pic below from VisualVM the Java binary has just stopped working which appears to coincide with the GC-run.
Any help or ideas so that I can troubleshoot or remedy the problem is greatly appreciated. Thanks.
Three things to check:
If you've implemented the finalize() method anywhere, make sure it doesn't directly or indirectly lock any objects; this can cause a catatrophic deadlock correlated with GC.
If you've got native code, any number of weird things can happen if the code is not using global references correctly, including deadlocks and weird memory corruption, which would again correlate with GC activity.
Finally, GC might just be "stirring the pot" and exposing vanilla deadlocks which exist otherwise in the application; check your synchronization protocols.
Garbage collection pauses the VM's application threads while it happens, which might be exposing a race condition somewhere.