Caliper loses track of worker with "Error: Could not find or load main class" - caliper

I'm trying to run Caliper, but I got the dreaded benchmark death exception:
java.lang.RuntimeException: Got no response!
at com.google.caliper.runner.CaliperRun.measure(CaliperRun.java:241)
at com.google.caliper.runner.CaliperRun.run(CaliperRun.java:132)
at com.google.caliper.runner.CaliperMain.exitlessMain(CaliperMain.java:88)
at com.google.caliper.runner.CaliperMain.main(CaliperMain.java:58)
at com.google.caliper.runner.CaliperMain.main(CaliperMain.java:47)
at FastBigBenchmark.main(bench.mirah:22)
The errorLog in CaliperRun contains "Error: Could not find or load main class", but doesn't have a stack trace or anything else useful.
As you can tell from the stack trace, I'm using Mirah to generate the benchmark class, but before you suspect Mirah is the problem, here is the javap-decompiled main method generated in my benchmark class:
public static void main(java.lang.String[]);
Code:
0: ldc #2 // class FastBigBenchmark
2: aload_0
3: invokestatic #36 // Method com/google/caliper/runner/CaliperMain.main:(Ljava/lang/Class;[Ljava/lang/String;)V
6: return
(You can see that this exists in the stack trace, too.)
Any tip on where to start digging to debug this problem? I don't know where this problem might be originating from in Caliper.

Related

Debug exception in tRootTask in VxWorks

Using VxWorks A653 v2.5.0.2 I am getting an exception being generated in tRootTask during startup:
data storage
Exception current instruction address: 0x50000120
Machine Status Register: 0x0000fb30
Data Exception Address Register: 0x00000008
Integer Exception Register XER: 0x00000000
Condition Register: 0x40000088
Exception Syndrome Register: 0x01000000
Partition Domain ID: 0x007539a0
Task: 0x521f5920 "tRootTask"
the tRootTask does spawn a number of other kernel tasks and also creates a task for the user partition. But the entry point to the user task in the user partition never seems to run (printf() statement is not hit). After the exception occurs it is possible to attach a debugger, but the tRootTask itself is deleted by the exception. If I access the shell after the exception, attempting to display the contents at 0x50000000 contains fails, as if it is unmapped memory. This may be the root cause of the exception, but why it's inaccessible is unclear.
So I am searching for a way to debug why the exception is happening. I'm new to this OS.itself
Look in your linker map for the
"Exception current instruction address: 0x50000120"
Or if the shell has "lkup"
-> lkup 0x50000120
should give the nearest global function that's throwing exception.
Data Exception Address Register: 0x00000008
looks like zero page access, but you need decipher the "Exception Syndrome Register" in PowerPC manual to see if it's the right condition code?
"tRootTask" is the first thread in the context, so it's some sort of startup code that's failing. But it's so early, you probably need a JTAG debugger to get a breakpoint on it.

InvalidClassException and serialization issues

So i have an exercise given from my lecturer to build a registration system.
My job is to test the program. My friends gave me the source code, but i cant seem to get it running, although one of my friend can open it without any problems
Here is the error message
java.io.InvalidClassException: javax.swing.JComponent; local class incompatible: stream classdesc serialVersionUID = -3424753864000836906, local class serialVersionUID = 3742318830738515599
at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:621)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1623)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1518)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1623)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1518)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1623)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1518)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1774)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:371)
at java.beans.Beans.instantiate(Beans.java:199)
at java.beans.Beans.instantiate(Beans.java:80)
at gui.MainWindow.initComponents(MainWindow.java:208)
at gui.MainWindow.<init>(MainWindow.java:34)
at srs.Driver.main(Driver.java:17)
Exception in thread "main" java.lang.IllegalArgumentException:
Component must be non-null
at javax.swing.GroupLayout$ComponentSpring.<init>(GroupLayout.java:2953)
at javax.swing.GroupLayout$ComponentSpring.<init>(GroupLayout.java:2933)
at javax.swing.GroupLayout$Group.addComponent(GroupLayout.java:1524)
at javax.swing.GroupLayout$ParallelGroup.addComponent(GroupLayout.java:2484)
at javax.swing.GroupLayout$ParallelGroup.addComponent(GroupLayout.java:2454)
at javax.swing.GroupLayout$Group.addComponent(GroupLayout.java:1505)
at javax.swing.GroupLayout$ParallelGroup.addComponent(GroupLayout.java:2476)
at gui.MainWindow.initComponents(MainWindow.java:1680)
at gui.MainWindow.<init>(MainWindow.java:34)
at srs.Driver.main(Driver.java:17)
Java Result: 1
In one of the package i have this class called "MainWindow.java", and "MainWindow_creditsField2.ser". This package is for GUI purposes.
I am assuming the error has something to do with the .ser file. When I asked my friend what that file is, he did not know what that file is, and said that it's
automatically generated
When I clicked on 3 of the last errors,
Driver tells me the line MainWindow mainWindow = new MainWindow();
MainWindow tells me line initComponents();
I think that is all the leads I can give you
The problem is with the serialization . Here is the link where it is described nicely why it occurs. Go through this thoroughly to understand how that field is used to make sure the serialized version and what the JVM wants to create from the serialized object are the same.

"Operation could destabilize the runtime" when using ANTS profiler on a StructureMap application

We are recently upgraded a web/mvc application to use StrucutreMap 3.0.4
Now, when attempting to profile the application using RedGate Ant's profiler at the "Line Level Timings, All Methods with Source" or greater level, we get the following error
Operation could destabilize the runtime.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Security.VerificationException: Operation could destabilize the runtime.
Source Error:
Line 174:
Line 175: Initialise(context);
Line 176: ObjectFactory.Initialize(x => { x.AddRegistry<BWebsiteIoc>(); });
Line 177: }
Line 178: }
Source File: c:\_Development\NT\Platform\WebSite\Global.asax.cs Line: 176
Stack Trace:
[VerificationException: Operation could destabilize the runtime.]
StructureMap.ObjectFactory.Initialize(Action`1 action) in c:\BuildAgent\work\996e173a8ceccdca\src\StructureMap\ObjectFactory.cs:42
Nga.Platform.Website.FirstRequestInitialisation.Initialise(HttpContext context) in c:\_Development\NT\Platform\WebSite\Global.asax.cs:176
Nga.Platform.Website.MvcApplication.Application_BeginRequest(Object source, EventArgs e) in c:\_Development\NT\Platform\WebSite\Global.asax.cs:106
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +182
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +165
I've tried adding to system.web in web.config as per http://documentation.red-gate.com/display/APP8/Operation+could+destabilize+the+runtime+error+profiling+ASP.NET
May be an old question, but it's still one of the first for me on google results, so here goes.
I was able to solve the issue by deleting structuremap's pdb files before profiling.
Added
<assemblyName>StructureMap</assemblyName> to %LOCALAPPDATA%\Red Gate\ANTS Performance Profiler 9\LineLevelBlacklist.xml which did the trick.
I was able to work around the problem by adding the following to the AssemblyInfo.cs of the class library causing the problem.
[assembly: System.Security.SecurityRules(System.Security.SecurityRuleSet.Level1)]
I found this solution in a Redgate forum discussion.

Cryptic PHP error invloving Zend Framework and Doctrine

I'm currently receiving the following error message with Zend Framework and Doctrine. I'm trying to figure out how to solve this issue..
Fatal error: Uncaught exception 'LogicException' with message 'Passed array does not specify an existing static method (class 'Doctrine' does not have a method 'modelsAutoload')' in /home/bellalun/library/Smallunch/lib/Bootstrap.php:173 Stack trace: #0 /home/bellalun/library/Smallunch/lib/Bootstrap.php(173): spl_autoload_register(Array) #1 /etc/ZendFramework/1.9.0/Zend/Application/Bootstrap/BootstrapAbstract.php(660): Bootstrap->_initDoctrine() #2 /etc/ZendFramework/1.9.0/Zend/Application/Bootstrap/BootstrapAbstract.php(613): Zend_Application_Bootstrap_BootstrapAbstract->_executeResource('doctrine') #3 /etc/ZendFramework/1.9.0/Zend/Application/Bootstrap/BootstrapAbstract.php(577): Zend_Application_Bootstrap_BootstrapAbstract->_bootstrap(NULL) #4 /etc/ZendFramework/1.9.0/Zend/Application.php(324): Zend_Application_Bootstrap_BootstrapAbstract->bootstrap() #5 /home/bellalun/application/bootstrap.php(14): Zend_Application->bootstrap() #6 /home/bellalun/public_html/dev.php(8): require('/home/bellalun/...') #7 {main} thrown in /home/bellalun/library/Smallunch/lib/Bootstrap.php on line 173
Here's what's on line 173
$this->getApplication()->getAutoloader()
->pushAutoloader(array('Doctrine', 'autoload'));
spl_autoload_register(array('Doctrine', 'modelsAutoload'));
$manager = Doctrine_Manager::getInstance();
$manager->setAttribute(Doctrine_Core::ATTR_AUTO_ACCESSOR_OVERRIDE, true);
My hosting company made some changes over the weekend that messed up a few of my sites, taking them down. They switched me from Apache to LiteSpeed and my PHP handler from DSO to SuPHP. Not sure if this is related or not..
I don't use Doctrine, but the code sample you've posted doesn't make a lot of sense. On the first line you're registering Doctrine's autoload function with the ZF autoloader. This looks good, and seems to match this tutorial. On the next line, you're registering another autoloader with SPL directly (this is bad), and doing so using another, apparently non-existent function (modelsAutoload). Since this is the line that's erroring I'd guess commenting that line out will fix your problem.

Interpreting data from crash dump using winDbg

I am trying to debug a WCF service which is crashing from time to time. I have created a crash dump file using adplus, that was the easy part, I used this command.
adplus.exe -crash -pmn myservicehost.exe -o c:\dump
I am opening the file .dmp file with winDbg x64 version 6.2.9200. When I look at the threads !Threads I see there are a bunch of threads that that are waiting for a callback to complete (I think).
0:031> ~~[1b00]s
ntdll!NtWaitForMultipleObjects+0xa:
00000000`778d18ca c3 ret
0:029> ~~[1b00]s
ntdll!NtWaitForMultipleObjects+0xa:
00000000`778d18ca c3 ret
Eventually it crashes. Here is the output when I look at the call stack from that exception using !PrintException /d -nested 00000002814ad6d0
Exception object: 00000002814af4c8
Exception type: System.Runtime.CallbackException
Message: A user callback threw an exception. Check the exception stack and inner exception to determine the callback that failed.
InnerException: System.ServiceModel.CommunicationObjectAbortedException, Use !PrintException 00000002814ad6d0 to see more.
StackTrace (generated):
SP IP Function
000000000FA89D40 000007FEDD9AD3E2 System_ServiceModel_ni!System.ServiceModel.Channels.CommunicationObject.OnClosed()+0x262
000000000FA8C240 000007FEDD93759D System_ServiceModel_ni!System.ServiceModel.ServiceHostBase.OnClosed()+0x6d
000000000FA8C290 000007FEDD9433D0 System_ServiceModel_ni!System.ServiceModel.ServiceHost.OnClosed()+0x10
000000000FA8C2C0 000007FEDE185B86 System_ServiceModel_ni!System.ServiceModel.Channels.CommunicationObject.Abort()+0x2b6
000000000FA8C3C0 000007FE8ABAC89C MyCompany_WcfApp_WcfAppServiceHost!MyCompany.WcfApp.WcfAppServiceHost.WcfAppServiceHost.FaultedServiceHandler(System.Object, System.EventArgs)+0x26c
000000000FA8C5F0 0000000000000000 mscorlib_ni!System.EventHandler.Invoke(System.Object, System.EventArgs)+0x1
000000000FA8C5F0 000007FEDE184E9A System_ServiceModel_ni!System.ServiceModel.Channels.CommunicationObject.OnFaulted()+0x1ca
000000000FA8C670 000007FEDE184784 System_ServiceModel_ni!System.ServiceModel.Channels.CommunicationObject.Fault()+0x94
000000000FA8C6E0 000007FEDE184E9A System_ServiceModel_ni!System.ServiceModel.Channels.CommunicationObject.OnFaulted()+0x1ca
000000000FA8C760 000007FEDE184784 System_ServiceModel_ni!System.ServiceModel.Channels.CommunicationObject.Fault()+0x94
000000000FA8C7D0 000007FEDE184E9A System_ServiceModel_ni!System.ServiceModel.Channels.CommunicationObject.OnFaulted()+0x1ca
000000000FA8C850 000007FEDE184784 System_ServiceModel_ni!System.ServiceModel.Channels.CommunicationObject.Fault()+0x94
000000000FA8C8C0 000007FEDE475407 System_ServiceModel_ni!System.ServiceModel.Channels.MsmqInputChannelBase.TryReceive(System.TimeSpan, System.ServiceModel.Channels.Message ByRef)+0x4f7
000000000FA8EBF0 000007FEDE5409AE System_ServiceModel_ni!System.ServiceModel.Dispatcher.InputChannelBinder.TryReceive(System.TimeSpan, System.ServiceModel.Channels.RequestContext ByRef)+0x2e
000000000FA8EC50 000007FEDEAC29E2 System_ServiceModel_ni!System.ServiceModel.Dispatcher.ErrorHandlingReceiver.TryReceive(System.TimeSpan, System.ServiceModel.Channels.RequestContext ByRef)+0x646022
000000000FA8ECB0 000007FEDE47C8D6 System_ServiceModel_ni!System.ServiceModel.Dispatcher.ChannelHandler.TryTransactionalReceive(System.Transactions.Transaction, System.ServiceModel.Channels.RequestContext ByRef)+0x396
000000000FA8ED70 000007FEDE47BE07 System_ServiceModel_ni!System.ServiceModel.Dispatcher.ChannelHandler.TransactedLoop()+0xb7
000000000FA8EDF0 000007FEDE47BD31 System_ServiceModel_ni!System.ServiceModel.Dispatcher.ChannelHandler.SyncTransactionalMessagePump()+0x21
000000000FA8EE20 000007FEDE47A829 System_ServiceModel_ni!System.ServiceModel.Dispatcher.ChannelHandler.OnStartSyncMessagePump(System.Object)+0x209
000000000FA8EED0 000007FEDB6DE651 System_ServiceModel_Internals_ni!System.Runtime.IOThreadScheduler+ScheduledOverlapped.IOCallback(UInt32, UInt32, System.Threading.NativeOverlapped*)+0x71
000000000FA8EF30 000007FEDB77A260 System_ServiceModel_Internals_ni!System.Runtime.Fx+IOCompletionThunk.UnhandledExceptionFrame(UInt32, UInt32, System.Threading.NativeOverlapped*)+0x9bcd0
000000000FA8EF90 000007FEDF225C26 mscorlib_ni!System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32, UInt32, System.Threading.NativeOverlapped*)+0x96
Problem is, this isn't really helping me. I need to find out what is creating all these locks. Does anyone have any suggestions on how I might do that? I have never had an issue that required this level of debugging and to be honest I am not 100% sure what I am doing. If I haven't given enough info please let me know I will happily provide you with whatever else I can.
Thanks
Try using !SyncBlk command of SOS to determine deadlocks if any.