akara / faban Goto Github PK
View Code? Open in Web Editor NEWA framework for developing workload drivers and automation of performance tests
Home Page: http://faban.sunsource.net/
A framework for developing workload drivers and automation of performance tests
Home Page: http://faban.sunsource.net/
When the following objects are created they are allocated a default port of 0. The included patch changes Faban to assign a fixed port of 9982.
This helps running Faban with SUTs operating with a firewall.
Regards,
Jeremy
The bind ids for the run.xml forms are incorrectly generated due to logic that attempts to ensure unique element ids.
A hack fix is attached:
=================================================================== File: harness\src\com\sun\faban\harness\formsgen\DriverConfigElement.java =================================================================== --- harness\src\com\sun\faban\harness\formsgen\DriverConfigElement.java;64735 (server) 3/16/2011 1:39 PM +++ harness\src\com\sun\faban\harness\formsgen\DriverConfigElement.java;65282 (server) 3/24/2011 7:51 AM @@ -47,12 +47,13 @@ * @param id The element identifier * @return The buffer with the XForms code block */ - public StringBuilder getBuffer(Node eNode, String id) { + public StringBuilder getBuffer(Node eNode, String id, int c) { loadIgnoreStack(); - XformsUtil xu = new XformsUtil(); + XformsUtil xu = new XformsUtil(c); xu.buildPropertyLabelsStack(eNode); casesBuffer = new StringBuilder( xu.buildXformsCases(eNode, 0, id, ignoreNodesStack)); return casesBuffer; } + } =================================================================== File: harness\src\com\sun\faban\harness\formsgen\ElementHandler.java =================================================================== --- harness\src\com\sun\faban\harness\formsgen\ElementHandler.java;64735 (server) 3/16/2011 1:39 PM +++ harness\src\com\sun\faban\harness\formsgen\ElementHandler.java;65282 (server) 3/24/2011 7:51 AM @@ -36,6 +36,5 @@ * @param id The element identifier * @return The buffer with the XForms code block */ - public StringBuilder getBuffer(Node eNode, String id); - + public StringBuilder getBuffer(Node eNode, String id, int c); } =================================================================== File: harness\src\com\sun\faban\harness\formsgen\GenericElement.java =================================================================== --- harness\src\com\sun\faban\harness\formsgen\GenericElement.java;64735 (server) 3/16/2011 1:39 PM +++ harness\src\com\sun\faban\harness\formsgen\GenericElement.java;65282 (server) 3/24/2011 7:51 AM @@ -44,11 +44,13 @@ * @param id The element identifier * @return The buffer with the XForms code block */ - public StringBuilder getBuffer(Node eNode, String id) { + public StringBuilder getBuffer(Node eNode, String id, int c) { loadIgnoreStack(); - XformsUtil xu = new XformsUtil(); + XformsUtil xu = new XformsUtil(c); casesBuffer = new StringBuilder( xu.buildXformsCases(eNode, 0, id, ignoreNodesStack)); return casesBuffer; } + + } =================================================================== File: harness\src\com\sun\faban\harness\formsgen\HostConfigElement.java =================================================================== --- harness\src\com\sun\faban\harness\formsgen\HostConfigElement.java;64735 (server) 3/16/2011 1:39 PM +++ harness\src\com\sun\faban\harness\formsgen\HostConfigElement.java;65282 (server) 3/24/2011 7:51 AM @@ -43,11 +43,13 @@ * @param id The element identifier * @return The buffer with the XForms code block */ - public StringBuilder getBuffer(Node eNode, String id) { + public StringBuilder getBuffer(Node eNode, String id, int c) { loadIgnoreStack(); - XformsUtil xu = new XformsUtil(); + XformsUtil xu = new XformsUtil(c); casesBuffer = new StringBuilder( xu.buildXformsCases(eNode, 0, id, ignoreNodesStack)); return casesBuffer; } + + } =================================================================== File: harness\src\com\sun\faban\harness\formsgen\RunControlElement.java =================================================================== --- harness\src\com\sun\faban\harness\formsgen\RunControlElement.java;64735 (server) 3/16/2011 1:39 PM +++ harness\src\com\sun\faban\harness\formsgen\RunControlElement.java;65282 (server) 3/24/2011 7:51 AM @@ -43,11 +43,12 @@ * @param id The element identifier * @return The buffer with the XForms code block */ - public StringBuilder getBuffer(Node eNode, String id) { + public StringBuilder getBuffer(Node eNode, String id, int c) { loadIgnoreStack(); - XformsUtil xu = new XformsUtil(); + XformsUtil xu = new XformsUtil(c); casesBuffer = new StringBuilder( xu.buildXformsCases(eNode, 0, id, ignoreNodesStack)); return casesBuffer; } + } =================================================================== File: harness\src\com\sun\faban\harness\formsgen\ServiceElement.java =================================================================== --- harness\src\com\sun\faban\harness\formsgen\ServiceElement.java;64735 (server) 3/16/2011 1:39 PM +++ harness\src\com\sun\faban\harness\formsgen\ServiceElement.java;65282 (server) 3/24/2011 7:51 AM @@ -43,11 +43,12 @@ * @param id The element identifier * @return The buffer with the XForms code block */ - public StringBuilder getBuffer(Node eNode, String id) { + public StringBuilder getBuffer(Node eNode, String id, int c) { loadIgnoreStack(); - XformsUtil xu = new XformsUtil(); + XformsUtil xu = new XformsUtil(c); casesBuffer = new StringBuilder( xu.buildXformsCases(eNode, 0, id, ignoreNodesStack)); return casesBuffer; } + } =================================================================== File: harness\src\com\sun\faban\harness\formsgen\ThreadStartElement.java =================================================================== --- harness\src\com\sun\faban\harness\formsgen\ThreadStartElement.java;64735 (server) 3/16/2011 1:39 PM +++ harness\src\com\sun\faban\harness\formsgen\ThreadStartElement.java;65282 (server) 3/24/2011 7:51 AM @@ -43,11 +43,12 @@ * @param id The element identifier * @return The buffer with the XForms code block */ - public StringBuilder getBuffer(Node eNode, String id) { + public StringBuilder getBuffer(Node eNode, String id, int c) { loadIgnoreStack(); - XformsUtil xu = new XformsUtil(); + XformsUtil xu = new XformsUtil(c); casesBuffer = new StringBuilder( xu.buildXformsCases(eNode, 0, id, ignoreNodesStack)); return casesBuffer; } + } =================================================================== File: harness\src\com\sun\faban\harness\formsgen\XformsGenerator.java =================================================================== --- harness\src\com\sun\faban\harness\formsgen\XformsGenerator.java;64735 (server) 3/16/2011 1:39 PM +++ harness\src\com\sun\faban\harness\formsgen\XformsGenerator.java;65282 (server) 3/24/2011 7:51 AM @@ -63,7 +63,7 @@ } private static void startDocument() { - XformsUtil xu = new XformsUtil(); + XformsUtil xu = new XformsUtil(0); xu.buildXforms(); } =================================================================== File: harness\src\com\sun\faban\harness\formsgen\XformsHandler.java =================================================================== --- harness\src\com\sun\faban\harness\formsgen\XformsHandler.java;64735 (server) 3/16/2011 1:39 PM +++ harness\src\com\sun\faban\harness\formsgen\XformsHandler.java;65282 (server) 3/24/2011 7:51 AM @@ -48,7 +48,7 @@ String handlerName = getHandlerName(eNode.getLocalName()); try { - this.handleElement = Class.forName( + this.handleElement = Class.forName( "com.sun.faban.harness.formsgen." + handlerName). asSubclass(ElementHandler.class).newInstance(); } catch (Exception e) { @@ -60,8 +60,8 @@ * Executes the specific element handler. * @return The buffer containing the xforms output for the element. */ - public StringBuilder executeElement() { - return handleElement.getBuffer(eNode, id); + public StringBuilder executeElement(int c) { + return handleElement.getBuffer(eNode, id, c); } private String getHandlerName(String s) { =================================================================== File: harness\src\com\sun\faban\harness\formsgen\XformsUtil.java =================================================================== --- harness\src\com\sun\faban\harness\formsgen\XformsUtil.java;64735 (server) 3/16/2011 1:39 PM +++ harness\src\com\sun\faban\harness\formsgen\XformsUtil.java;65282 (server) 3/24/2011 7:51 AM @@ -53,6 +53,10 @@ static HashMap selectsMap = new HashMap(); XformsHandler handle; + public XformsUtil (int c) { + idCount = c; + } + private void loadMap() { map.put("scale", "positiveInteger"); map.put("rampup", "positiveInteger"); @@ -248,7 +252,7 @@ } else if (eNode.getParentNode().getParentNode() == doc.getDocumentElement()) { if (hasMoreElements(eNode)) { handle = new XformsHandler(eNode, id); - inputs = handle.executeElement().toString(); + inputs = handle.executeElement(idCount).toString(); } else { if (zeroNodeCountBuff == null) { if (strg.equalsIgnoreCase("description")) {
I've run into this issue several times now. Here's the scenario.
I have a Driver that throws ConfigurationException if something is incorrectly specified in the config file. This is pretty standard.
What I'm noticing is that when the driver throws this exception, the run doesn't exit.
I do see the following in the log:
TestAgent[0].0: Error initializing driver object.
and the stack trace shows the exception correctly.
But after this, the driver continues and I see the following messages:
INFO: Ramp up started
WARNING: TestAgent[0]: Killing benchmark run
INFO: TestAgent[0]: Performing busy timer check
...
INFO: Steady state completed
So, even though there is a WARNING message that it is killing the benchmark run, it actually doesn't do so. The run proceeds and I get to Steady state completed. At this point everything hangs. I have to manually find and kill the MasterImpl java process.
I took a jstack dump before killing the process, and I see this :
"main" prio=5 tid=103000800 nid=0x100501000 waiting on condition [100500000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <10987a460> (a java.util.concurrent.CountDownLatch$Sync)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:811)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:969)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1281)
at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:207)
at com.sun.faban.driver.engine.AgentImpl.join(AgentImpl.java:589)
at com.sun.faban.driver.engine.MasterImpl.executeRun(MasterImpl.java:788)
at com.sun.faban.driver.engine.MasterImpl.runBenchmark(MasterImpl.java:276)
at com.sun.faban.driver.engine.MasterImpl.main(MasterImpl.java:1567)
A freshly checked out faban source tree has no top-level build target which can be used to build a usable installation. This makes it harder to build that it should be for the casual user/contributor.
(Instead, one needs to copy the template in four separate subdirectories, edit them, then run ant manually four times in each subdirectory in the correct order.)
It'd be much nicer if I can check out the source and just type make or ant and get an installable binary without additional steps.
While (cause != null) may cause endless loop in line 1365 and also in line 1422
Hi,
I just ran: ./fhb -W 100 http://myURL... and got the following exception:
INFO: Detail finished. Results written to /tmp/fhb/2.
ops/sec: 6,853
% errors: 0.0
avg. time: 0,047
max time: 0,282
90th %: 0,050
Jun 03, 2014 4:27:23 PM com.sun.faban.driver.engine.AgentImpl$1 uncaughtException
SEVERE: main: For input string: "0,050"
java.lang.NumberFormatException: For input string: "0,050"
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1241)
at java.lang.Double.parseDouble(Double.java:540)
at com.sun.faban.driver.util.FabanHTTPBench.reportResults(FabanHTTPBench.java:383)
at com.sun.faban.driver.util.FabanHTTPBench.main(FabanHTTPBench.java:129)
Jun 03, 2014 4:27:23 PM com.sun.faban.driver.engine.AgentImpl$1 uncaughtException
SEVERE: main: For input string: "0,050"
java.lang.NumberFormatException: For input string: "0,050"
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1241)
at java.lang.Double.parseDouble(Double.java:540)
at com.sun.faban.driver.util.FabanHTTPBench.reportResults(FabanHTTPBench.java:383)
at com.sun.faban.driver.util.FabanHTTPBench.main(FabanHTTPBench.java:129)
Best regards,
Ronald
Runs comparison has been broken for some time. With the elimination of fenxi, it is time to fix this using the new graphing module.
We can start with simple features such as:
Compare runs: compare throughput, average and percentile response times, average CPU utilization
Many newer REST APIs use the HTTP OPTIONS method. Currently the ApacheHc3Transport supports GET, PUT, POST and DELETE. Add OPTIONS support.
Problems reported by Doug Tollefson on the faban-users list:
1.) The build-defaults.properties file has not been updated -
faban.version=1.0.1
So the generated javadoc files say they are for version 1.0.1
2.) A couple of the release files appear to be missing from the tarball bundle. I do not see release-notes-1.2.txt or release-notes-1.3.txt files.
3.) The README file in the tarball has not been updated. the urls referenced should be changed from http://faban.sunsource.net
The build.properties file needs to be edited per each developer's build environment and as such should not be part of git. Instead, replace with a template file from which the developer can create his own build.properties. This has been done for harness, stage already. Add the same for common, driver modules.
Please increase the precision of all response time results. Several tests have response times near 1 ms. When trying out a patch, it is difficult to know how much the patch was changed.
Currently, average and maximum response times are reported to the nearest 1 ms. 90th and 99th percentile response times are reported to the nearest 10 ms. The request is to report average and maximum response times to the nearest 1 us. 90th and 99th percentile response times to the nearest 1 ms.
I realize that this will consume more memory. Please make this a configuration option so that it can be turned on for more precision and turned off for saving memory.
Here's a list of changes to com.sun.faban.driver.engine.Metrics.java needed to enable 1 us and 1 ms precision.
Note: The printSummary() changes could be made without increasing the amount of memory required. It will simply increase the number of digits printed in the result.
Do a tag search for a particular tag. Now delete one of the runs in the results. Doing the tag search again, results in:
java.lang.NullPointerException
com.sun.faban.harness.webclient.RunResult.generateTable(RunResult.java:467)
com.sun.faban.harness.webclient.RunResult.getResultTable(RunResult.java:412)
com.sun.faban.harness.webclient.Results.list(Results.java:231)
sun.reflect.GeneratedMethodAccessor65.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
com.sun.faban.harness.webclient.Dispatcher.doPost(Dispatcher.java:200)
com.sun.faban.harness.webclient.Dispatcher.doGet(Dispatcher.java:87)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
com.sun.faban.harness.engine.InitFilter.doFilter(InitFilter.java:65)
harness/src/com/sun/faban/harness/webclient/TagEngine.java, line 102: createInstance() does not release locks always
Using the Sun HTTP transport fails under JDK 7, as the private JDK class has changed signatures in releases. That's the price one pays for using private interfaces....but the performance benefit over the apache transport makes it worthwhile to fix this. e.g., fhb with a single client connection can drives 1192 ops/sec to a static html page on my fast network using the Sun transport and only 476 ops/sec using the (unfortunately default) Apache transport.
For the record (and for those searching), the error you get is this:
java.lang.NoSuchMethodError: sun.net.www.http.KeepAliveCache.get(Ljava/net/URL;Ljava/lang/Object;)Ljava/lang/Object;
at com.sun.faban.driver.transport.sunhttp.HttpClient.New(HttpClient.java:87)
at com.sun.faban.driver.transport.sunhttp.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:99)
at com.sun.faban.driver.transport.sunhttp.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:41)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:931)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:849)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1299)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
at com.sun.faban.driver.transport.sunhttp.SunHttpTransport.readURL(SunHttpTransport.java:177)
at com.sun.faban.driver.transport.sunhttp.SunHttpTransport.readURL(SunHttpTransport.java:191)
If for any reason the benchmark driver throws a NullPointerException the driver get's wedged. The call to System.exit(0) is never executed.
https://groups.google.com/forum/#!forum/faban-users
Discussed in thread headed "NPE using fhb. Causes fhb to wedge." on the user forum.
Ideally FabanHTTPBench should anticipate problems exit cleanly.
For some benchmark developers the need to work using a j.n.Socket is convenient.
Currently Faban has encapsulated the handling of j.n.Socket.
It would be very convenient to add one method to com.sun.faban.driver.transport.hc3.TimedSSLFactories exposing a reference of org.apache.commons.httpclient.protocol.SecureProtocolSocketFactory. Allowing a developer to create a Socket.
This forum thread is a discussion by a user asking about how to do access a TimedSSLSocket.
The method signature on sun.net.www.protocol.http.Handler now includes an IOException.
Which causes a build error.
[javac] /thebounty/work/redhat/java/faban/faban-git/driver/src/com/sun/faban/driver/transport/sunhttp/Handler.java:38: error: unreported exception IOException; must be caught or declared to be thrown
[javac] return new HttpURLConnection(u, p, this);
[javac] ^
I have a local test environment with multiple agents but the master is unable to reach the agents because of the use of ping -R in harness/bin/Linux/interface:20
changing
INTERFACE=`ping -R -c1 "${TARGET}" | grep RR | awk '{ print $2 }' 2>/tmp/interface.$$.err`
to use ping
INTERFACE=`ping -c1 "${TARGET}" | grep PING | cut -d "(" -f2 | cut -d ")" -f1 2>/tmp/interface.$$.err`
works in my local environment and was initially discussed in the google-group Cannot contact hostx
In the situation when the driver taking a long time to configure the run begins before that is complete.
It would be useful for the run to wait for all the Drivers to begin. Currently this only happens when the agents are started in parallel.
The GetLog methods on services are only invoked if the benchmark starts and ends without an exception. An exception in either benchmark operations will bypass the GetLog invocation and only call Stop methods. This results in data loss for benchmark runs.
harness/build has a log.xml.t19 file left over from somewhere. Remove
With newer Java Versions, Faban is exiting after 10 minutes with the message in the log:
Master terminated with exit value 143
Oracle Java versions higher than 8u60 run into this error. The issue is that CmdAgentImpl implements the Unreferenced interface. So when no one has a remote reference to the CmdAgent any longer it cleans everything up, i.e. the master and the started driver agents. In order for the CmdAgentImpl to have a reference to itself, it seems that someone needs to be using the CmdService from what I can tell which gets a reference to the CmdAgent. I don't see anyone outside of the CmdAgent in the AgentBootstrap process itself that is using it. Should the Master and/or the driver agents have a reference to the CmdAgent. The Javadoc indicates that the benchmark itself should not need to have a reference to the CmdAgent, that Faban should be taking care of it for you.
So what happens is that after a set time (10 minutes default) when a garbage collection kicks off the Unreferenced interface method gets invoked and that kicks off the killing of the Master and Driver processes. To work around this we have set that timeout to a higher number so that it never invokes the Unreferenced code as part of the run. The property we set was -Djava.rmi.dgc.leaseValue=144000000 in the agent and agent.cmd script files in the jEnterprise/faban/harness/faban/bin directory.
Apparently, the cleanup mechanism was not really working in versions of Java 8u60 and lower, so the problem was not hit then.
So far I have come across a number of problems using JDK9.
The endorsed property starting Tomcat was causing a problem.
Any reflective access to apis made by Tomcat.
JDK version check by faban.
Faban only supports jdk versions 1.5 through 1.7. For running with JDK 1.8, we have made the following modification to faban/harness/faban/master/bin/startup.sh:
$ diff -c -C 8 startup.sh startup.sh.orig
*** startup.sh 2014-05-14 02:26:11.000000000 -0400
--- startup.sh.orig 2010-05-10 12:13:58.000000000 -0400
*** 20,36 ****
JAVA_VERSION=echo $JAVA_VER_STRING | \ awk '{ print substr($3, 2, length($3) - 2)}'
case $JAVA_VERSION in
1.5_);;
1.6_);;
1.7*);;
1.8*);;
*) echo "Java version is ${JAVA_VERSION}. Faban needs 1.5 or later." >&2
echo "Please install the appropriate JDK and set JAVA_HOME accordingly." >&2
exit 1;;
esac
PRGDIR=dirname $0
--- 20,35 ----
Can this change be included into the next Faban release. We are currently modifying Faban in this way to release SPECjEnterprise submissions using JDK 1.8. Even better would be to change this in a way that it will support all versions of 1.5 or higher.
Thanks,
-Brian Chesebro
Oracle Corporation
Currently, the apache hc3 implementation of HttpTransport handles text data in the fetch* methods. This assumes that the data appears as is i.e is not compressed.
Since most web servers now use 'gzip' to optimize response sizes, we need a method to handle gzipped data that gets sent.
I have had a bug report of a NoClassDefFoundError. When using the 1.4 release.
java.lang.NoClassDefFoundError: org/apache/xerces/dom/DocumentImpl
java.lang.ClassLoader.defineClass1(Native Method)
java.lang.ClassLoader.defineClass(ClassLoader.java:763)
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1634)
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:860)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1307)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1189)
com.sun.org.apache.xerces.internal.utils.ObjectFactory.findProviderClass(ObjectFactory.java:209)
com.sun.org.apache.xerces.internal.utils.ObjectFactory.findProviderClass(ObjectFactory.java:179)
com.sun.org.apache.xerces.internal.parsers.AbstractDOMParser.setDocumentClassName(AbstractDOMParser.java:349)
com.sun.org.apache.xerces.internal.parsers.AbstractDOMParser.reset(AbstractDOMParser.java:427)
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:140)
com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:243)
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:339)
javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:121)
org.chiba.xml.xforms.ChibaBean.setXMLContainer(Unknown Source)
org.chiba.adapter.AbstractChibaAdapter.setXForms(Unknown Source)
com.sun.faban.harness.webclient.XFormServlet$Adapter.init(XFormServlet.java:398)
com.sun.faban.harness.webclient.XFormServlet.doGet(XFormServlet.java:222)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
com.sun.faban.harness.engine.InitFilter.doFilter(InitFilter.java:65)
The cause is the class is not available in the same class loader requested now to the class loader when it was earlier loaded. Really the first class loader that loads the class should be the endorsed extensions loader.
This issue occurs when the agent's FABAN_HOME is different than the master's FABAN_HOME and the RemoteCallable code is located inside the service jar. The problem is discussed in the forum:
https://groups.google.com/forum/?fromgroups=#!topic/faban-users/rC9ZEtqyevY
The issue appears to be with how the service directory is scanned for classpath entries.
driver/src/com/sun/faban/driver/transport/util/MultipleTransport.java: line 250
waitForAll() does not relese lock in exception cases
While experimenting with throttling, I found that downloads (i.e. reading from InputStream) work for a bit but then hang.
A stack trace when hanging shows that it is sleeping:
java.lang.Thread.State: TIMED_WAITING (sleeping)
at java.lang.Thread.sleep(Native Method)
at java.lang.Thread.sleep(Thread.java:298)
at com.sun.faban.driver.util.Timer.wakeupAt(Timer.java:402)
at com.sun.faban.driver.engine.DriverContext.wakeupAt(DriverContext.java:496)
at com.sun.faban.driver.transport.util.Throttle.throttle(Throttle.java:81)
at com.sun.faban.driver.transport.util.TimedInputStream.read(TimedInputStream.java:175)
at com.sun.faban.driver.transport.util.TimedInputStream.read(TimedInputStream.java:141)
However, it essentially never wakes up, so the sleep value given must be way too large.
Debugging, the problem appears to be the following sequence:
TimedInputStream.read() sets:
if (isThrottled)
startReadAt = ctx.getNanoTime();
Looking at getNanoTime(), looks like it returns a time difference. This ends up being a relatively small number.
Later (Timer.wakeupAt()) this is compared with System.nanoTime(), because it is much smaller it never calls sleep.
This goes on for a while (usually I got about ~2-6MB downloaded without any throttling, no sleeps). Eventually the difference becomes positive and results in a call to sleep with a huge number, so it effectively hangs forever.
Setting the start time to current nanoTime() appears to fix the problem. So far in my (brief) testing this never hangs and results in the desired throttling.
% git diff src/com/sun/faban/driver/transport/util/TimedInputStream.java
diff --git a/driver/src/com/sun/faban/driver/transport/util/TimedInputStream.java b/driver/src/com/sun/faban/driver/transport/util/TimedInputStream.java
index d203fe7..6c0102b 100644
--- a/driver/src/com/sun/faban/driver/transport/util/TimedInputStream.java
+++ b/driver/src/com/sun/faban/driver/transport/util/TimedInputStream.java
@@ -165,8 +165,9 @@ public class TimedInputStream extends FilterInputStream {
boolean isThrottled = false;
if (ctx != null) {
isThrottled = throttle.isThrottled(Throttle.DOWN);
- if (isThrottled)
- startReadAt = ctx.getNanoTime();
+ if (isThrottled) {
+ startReadAt = System.nanoTime();
+ }
}
int bytes = super.read(b, off, len);
if (ctx != null && bytes > 0) {
The harness tries to simplify hostnames by stripping out everything after a '.' - it assumes that these are all part of the domain name (see com.sun.faban.harness.agent.AgentBootstrap.startAgents() - lines 308-310).
But some hosts genuinely need the first '.' as this is part of the hostname itself. For example, on Macs, the default hostname has a '.local' extension. If the name is stripped, then the harness is unable to start the CmdAgent on this host.
Of course, there is no guarantee that keeping just the first '.' is sufficient. Perhaps there are hosts that have more than one dot in their names (unlikely?)
As a compromise between long hostnames in log files and having things working on Macs (as well as other machines) it might be a good idea to at least not strip the first dot extension.
I think it was fixed by but somehow I was not able to find it in latest source. Please see
https://java.net/jira/browse/FABAN-10
Looks like the harness looses track of a tool. An exception is thrown when the master calls the ToolAgent.
<record>
<date>2017-11-03T10:29:37</date>
<millis>1509719377383</millis>
<sequence>86</sequence>
<logger>com.sun.faban.harness.engine.ToolService</logger>
<level>WARNING</level>
<class>com.sun.faban.harness.engine.ToolService</class>
<method>start</method>
<thread>145</thread>
<message>Error in Starting tools on machine benchserver4G1.</message>
<exception>
<message>java.rmi.NoSuchObjectException: no such object in table</message>
<frame>
<class>sun.rmi.transport.StreamRemoteCall</class>
<method>exceptionReceivedFromServer</method>
<line>276</line>
</frame>
<frame>
<class>sun.rmi.transport.StreamRemoteCall</class>
<method>executeCall</method>
<line>253</line>
</frame>
<frame>
<class>sun.rmi.server.UnicastRef</class>
<method>invoke</method>
<line>162</line>
</frame>
<frame>
<class>com.sun.faban.harness.agent.ToolAgentImpl_Stub</class>
<method>start</method>
</frame>
<frame>
<class>com.sun.faban.harness.engine.ToolService</class>
<method>start</method>
<line>265</line>
</frame>
<frame>
<class>com.sun.faban.harness.engine.GenericBenchmark</class>
<method>start</method>
<line>287</line>
</frame>
<frame>
<class>com.sun.faban.harness.engine.RunDaemon</class>
<method>run</method>
<line>338</line>
</frame>
<frame>
<class>java.lang.Thread</class>
<method>run</method>
<line>745</line>
</frame>
</exception>
</record>
the tool is not returning as expected. The text back from a server can be "COMPLETED\n". The tool doesn't expect the control character.
The code needs to strip off any control characters then check the 3 states. Then drop out the pollStatus method.
The documentation at http://www.faban.org/1.0/docs/guide/harnessdev/configfile.html lists fh:enabled as an option under fh:service. However this element is ignored and only the fh:enabled within the fh:hostconfig is being used to decide whether the service is enabled or not.
We have a Faban environment with a master and 2 agents.
The master FABAN_HOME is ~/code/project/faban/ and FABAN_HOME on the agents is ~/faban/.
Agents load classes from jars in ~/code/project/faban if we clone our repo on the agent machine into the same path as we use on the master. This causes errors when we update faban on the master and the generated serialVersionUIDs for several classes change. The agents have the correct jars in ~/faban/ but the agent process loads the incorrect jars from the out of date local clone in ~/code/project/faban/.
The error manifests as a java.io.InvalidClassException.
java.io.InvalidClassException: com.sun.faban.driver.engine.Cycle; local class incompatible: stream classdesc serialVersionUID = 8468129937951066621, local class serialVersionUID = -3369812715063961192
Hi,
when multiple request parameters of the same name are provided to a Faban POST method only the last is preserved. Details in this faban-users forum post.
Jeremy
Was trying the latest JDK on a random EC2 box today and found that there's a dependency on non-public API. I think that's what's wrong anyway.
[javac] /root/faban/driver/src/com/sun/faban/driver/engine/RunInfo.java:937: package com.sun.tools.javac does not exist
[javac] int errorCode = com.sun.tools.javac.Main.compile(arg);
[javac] ^
This is with the Sun/Oracle JDK:
java version "1.6.0_27"
Java(TM) SE Runtime Environment (build 1.6.0_27-b07)
Java HotSpot(TM) 64-Bit Server VM (build 20.2-b06, mixed mode)
Currently, FlatMix and MatrixMix have support in run.xml using which a user can change the mix for a particular run. This does not exist for FixedSequence.
There are a multitude of fetchURL() methods supported in both the Apache hc3 and Sun http transport classes (com.sun.faban.driver.transport.hc3.ApacheHc3Transport and com.sun.faban.driver.transport.sunhttp.SunHttpTransport). But they all expect to receive valid text of a very modest size as a response.
If one is testing a request to download a file, the return type can be of arbitrary type and/or a much larger size.
I experience build errors on Fedora with a fresh clone of origin/master. It looks like driver/build.xml:43 was commented out in 5099095 but I cannot find how we are to now build the harness. Is there something I am missing in my local environment that I need to build with the new script?
There is a method to get any custom log - be it configuration, error or stat tool's output to show up in the Statistics tab. The log simply needs to be named as .log. and it will show up in the row associated with . However this information is not documented.
The build.properties files used to set properties for the build is part of the repository. However this file may need to be changed for local conditions. As such, it is more appropriate to use a template file (build.properties.template) and allow the developer to copy the template over to build.properties. This will also force the developer to review the file and edit it as required.
The xforms generator creates following msgs in both controller and site Tomcat logs (logs/catalina.out) :
Token : @BINDS@
Replacement : <xforms:bind id='bind-bWTTest' xforms:nodeset='/bWTTest'>
<xforms:bind id='bind-runConfig' xforms:nodeset='fa:runConfig' >
Title says it all
I found the XMLReader class is causing a FileNotFoundException when loading the prior run.xml for a backup.
Currently Faban allows the user to view runs by clicking the link "View Results". Using the webUI.
Add another view that provides pagination of the runs.
There is a single downloadURL method supported by ApacheHC3Transport in com.sun.faban.driver.transport.jc3. Sometimes it is necessary to add certain headers to the request. A version of the method with Map<String, String> as a second parameter is required.
com/sun/faban/driver/engine/MasterImpl.java, line 1516: repeated conditional test has redundant if statement
The current nicstat too to measure network statistics for Linux is only bundled for i386 (resides in directory bin/Linux/i386). When running on 64-bit Linux, CmdAgentImpl complains that it cannot find nicstat:
Cannot run program "nicstat": java.io.IOException: error=2, No such file or directory
When starting a service I am getting a ClassNotFoundException. Details of error are below.
Unexpected Exception processing benchmark.
Message:
java.lang.NoClassDefFoundError: com/sun/faban/driver/ConfigurationException
Stack Trace:
Class Method Line
java.lang.Class getDeclaredMethods0
java.lang.Class privateGetDeclaredMethods 2444
java.lang.Class privateGetPublicMethods 2564
java.lang.Class getMethods 1427
com.sun.faban.harness.services.ServiceWrapper 64
com.sun.faban.harness.services.ServiceManager 118
com.sun.faban.harness.engine.GenericBenchmark start 245
com.sun.faban.harness.engine.RunDaemon run 338
java.lang.Thread run 636
This issue occurs shortly after the benchmark run configuration has been downloaded to an Agent. The exception causes Faban to halt.
I have updated the build.xml to package the fabandriver.jar library into the Faban harness WAR file. After deploying Faban to the master the benchmark startup no longer has this exception on startup. A patch will be in Git soon.
Regards,
Jeremy
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.