https://bz.apache.org/bugzilla/show_bug.cgi?id=66050

--- Comment #5 from Felix Schumacher <[email protected]> ---
Thanks for the information, especially the thread dump shows a probable
candidate for your problems. The JDBC driver has trouble to format the numbers
to string under high thread load. Most of the threads are waiting like the
following:

"node2 2-39" #122 prio=5 os_prio=0 tid=0x00007fa8bc2dc000 nid=0x4479e waiting
for monitor entry [0x00007fa8092d1000]
   java.lang.Thread.State: BLOCKED (on object monitor)
        at java.text.DecimalFormat.format(DecimalFormat.java:615)
        - waiting to lock <0x00000005e4768f68> (a java.text.DigitList)
        at java.text.DecimalFormat.format(DecimalFormat.java:544)
        at java.text.NumberFormat.format(NumberFormat.java:296)
        at com.xxdb.data.BasicDouble.getString(BasicDouble.java:76)
        at com.xxdb.data.AbstractScalar.toString(AbstractScalar.java:33)
        at java.lang.String.valueOf(String.java:2994)
        at java.lang.StringBuilder.append(StringBuilder.java:131)
        at
org.apache.jmeter.protocol.jdbc.AbstractJDBCTestElement.processRow(AbstractJDBCTestElement.java:602)
        at
org.apache.jmeter.protocol.jdbc.AbstractJDBCTestElement.getStringFromResultSet(AbstractJDBCTestElement.java:558)
        at
org.apache.jmeter.protocol.jdbc.AbstractJDBCTestElement.execute(AbstractJDBCTestElement.java:175)
        at
org.apache.jmeter.protocol.jdbc.sampler.JDBCSampler.sample(JDBCSampler.java:85)
        at
org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:638)
        at
org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:558)
        at
org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:489)
        at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:256)
        at java.lang.Thread.run(Thread.java:748)

That should probably be fixed by the maintainers of the driver. (The API for
DecimalFormat even states, that it is not thread safe, but that might have
changed internally for the format method, as it is clearly synchronized now.)

You could add the formatting logic to your tests and see, whether your code
falls into the same trap (it should).

To mitigate this on JMeters side, you could try to change the setting of
"Handle ResultSet" from "Store as String" to "Store as Object". (But reading
the source, it looks to me, that we always build the string, so it will
probably not help)

If it doesn't help (which I fear, it will not), we should think about changing
this part of the code in JMeter.

We have to think about:
  * should we use special cases for the JDBC data types to get the values and
format them on our own?
  * should we skip formatting them, when the result set is not stored as a
string?
  * more?

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to