Closed karim-manaouil closed 3 months ago
I'm not sure what to make of this. I can reproduce it on debian, but ld doesn't complain on RHEL, Rocky, CentOS, Ubuntu, or Void. clang's toolchain doesn't seem to do this. It seems to finish compiling successfully on debian with clang. (e.g. CXX=/usr/bin/clang++ dbt5 build-egen egendir
)
But I haven't tried running the binaries yet after compiling with clang...
Ok, thanks for taking a look. I'll try out clang and see where it goes.
@markwkm It compiled with clang++, but the post processing scripts are broken. After the running the benchmark with
dbt5 run --tpcetools=/mnt/egen -s 250 -d 600 -u 1000 pgsql /tmp/results
I opened /tmp/results/summary.rst
. It was all zeroes. I opened /tmp/results/post-process.log
and I got this log
Error: in prepare, near ")": syntax error
SELECT ( - ) / 60.0;
^--- error here
Parse error near line 1: near ";": syntax error
SELECT count(time) FROM mix WHERE time > ;
error here ---^
Parse error near line 1: near ",": syntax error
, count(time) , 100.0 * count(time) / , min(response) , avg(r
error here ---^
Parse error near line 1: near "AND": syntax error
T txn , count(time) FROM mix WHERE time > AND time < AND code = 1 G
error here ---^
Parse error near line 1: near "AND": syntax error
T txn , count(time) FROM mix WHERE time > AND time < AND code < 0 G
error here ---^
Parse error near line 1: near "AND": syntax error
T txn , count(time) FROM mix WHERE time > AND time < AND code > 1 G
error here ---^
/usr/local/bin/dbt5-post-process: 224: printf: N/A: expected numeric value
Parse error near line 1: near "AND": syntax error
response FROM mix WHERE txn = '1' AND time > AND time < ORDER BY respons
error here ---^
Parse error near line 1: near "AND": syntax error
response FROM mix WHERE txn = '2' AND time > AND time < ORDER BY respons
error here ---^
Parse error near line 1: near "AND": syntax error
response FROM mix WHERE txn = '8' AND time > AND time < ORDER BY respons
error here ---^
Parse error near line 1: near "AND": syntax error
response FROM mix WHERE txn = '3' AND time > AND time < ORDER BY respons
error here ---^
Parse error near line 1: near "AND": syntax error
response FROM mix WHERE txn = '0' AND time > AND time < ORDER BY respons
error here ---^
Parse error near line 1: near "AND": syntax error
response FROM mix WHERE txn = '5' AND time > AND time < ORDER BY respons
error here ---^
Parse error near line 1: near "AND": syntax error
response FROM mix WHERE txn = '6' AND time > AND time < ORDER BY respons
Error: in prepare, near ")": syntax error
SELECT ( - ) / 60.0;
^--- error here
Parse error near line 1: near ";": syntax error
SELECT count(time) FROM mix WHERE time > ;
error here ---^
Parse error near line 1: near ",": syntax error
, count(time) , 100.0 * count(time) / , min(response) , avg(r
error here ---^
Parse error near line 1: near "AND": syntax error
T txn , count(time) FROM mix WHERE time > AND time < AND code = 1 G
error here ---^
Parse error near line 1: near "AND": syntax error
T txn , count(time) FROM mix WHERE time > AND time < AND code < 0 G
error here ---^
Parse error near line 1: near "AND": syntax error
T txn , count(time) FROM mix WHERE time > AND time < AND code > 1 G
error here ---^
/usr/local/bin/dbt5-post-process: 224: printf: N/A: expected numeric value
Parse error near line 1: near "AND": syntax error
response FROM mix WHERE txn = '1' AND time > AND time < ORDER BY respons
error here ---^
Parse error near line 1: near "AND": syntax error
response FROM mix WHERE txn = '2' AND time > AND time < ORDER BY respons
error here ---^
Parse error near line 1: near "AND": syntax error
response FROM mix WHERE txn = '8' AND time > AND time < ORDER BY respons
error here ---^
Parse error near line 1: near "AND": syntax error
response FROM mix WHERE txn = '3' AND time > AND time < ORDER BY respons
error here ---^
Parse error near line 1: near "AND": syntax error
response FROM mix WHERE txn = '0' AND time > AND time < ORDER BY respons
error here ---^
Parse error near line 1: near "AND": syntax error
response FROM mix WHERE txn = '5' AND time > AND time < ORDER BY respons
error here ---^
Parse error near line 1: near "AND": syntax error
response FROM mix WHERE txn = '6' AND time > AND time < ORDER BY respons
Is there a chance this can be fixed?
Note: I'm running SQLite version 3.40.1 2022-12-28 14:03:47
@markwkm I did some debugging. The issue comes from dbt5-post-process
line 149 ($STARTTIME
variable).
The database is created correctly, data is loaded from the driver and me directories, and the indexes are also created fine, etc (I checked this by keeping the database around and manually connecting via sqlite3 over the command line).
The issue is the query that initialises $STARTTIME
returns an empty string.
sqlite> SELECT max(time) from mix where txn='START';
sqlite>
This line is read from CSV files and it's written by Driver.cpp
(line 236) at the end of the ram-up to indicate the start of the real benchmark results.
I grepped the CSV files at results/driver and results/me. None of them contains the string START
, which means it's never written by Driver.cpp
, in the first place. Now why is that? Is it possibly because of clang++ optimising out something?
Edit: fixed typos
Many of the scripts are not tolerant of bad data. For example it's hard to say whether it's bad because not every transaction ran, and there can be a number of reasons for that. (e.g. run duration too short, brokerage house didn't connect to the database...)
If you can upload the entire results directory somewhere, I can try to see if it's obvious to me what happened.
I still haven't made time yet to try the binaries myself on Debian + clang...
I just tried this on Ubuntu 22.04, where I also used clang++ to avoid those linker errors, and seems to work for me using default database build parameters:
========================================== ==================================
Reported Throughput: 12.00 trtps Configured Customers: 5000
========================================== ==================================
================== ========== ========== ========== ==========
Response Times (s) Minimum Average 90th %tile Maximum
================== ========== ========== ========== ==========
Broker Volume 0.00 0.00 0.00 0.00
Customer Position 0.00 0.01 0.04 0.09
Market Feed 0.03 0.03 0.03 0.03
Market Watch 0.01 0.10 0.20 0.21
Security Detail 0.00 0.01 0.01 0.03
Trade Lookup 0.02 3.20 11.08 13.83
Trade Order 0.00 0.01 0.01 0.04
Trade Result 0.00 0.01 0.03 0.07
Trade Status 0.01 0.03 0.04 0.09
Trade Update 0.03 2.06 10.68 10.68
Data Maintenance 0.00 0.01 N/A 0.01
================== ========== ========== ========== ==========
================== ========== ========== ========== ========== ==========
Transaction Mix Txn Count Mix %tile Rollbacks Warnings Invalid
================== ========== ========== ========== ========== ==========
Broker Volume 12 3.614 0 0 0
Customer Position 38 11.446 0 0 0
Market Feed 2 0.602 0 0 0
Market Watch 62 18.675 0 0 0
Security Detail 53 15.964 0 0 0
Trade Lookup 28 8.434 0 0 0
Trade Order 26 7.831 0 0 0
Trade Result 24 7.229 0 0 0
Trade Status 71 21.386 0 0 0
Trade Update 10 3.012 0 0 0
Data Maintenance 2 N/A 0 0 0
================== ========== ========== ========== ========== ==========
================================================================== ==========
Test Duration and Timings
================================================================== ==========
Ramp-up Time (minutes) 0.0
Measurement Interval (minutes) 2.0
Total Number of Transactions Completed in Measurement Interval 332
================================================================== ==========
I think I figured this out. It's because of the order of linker flags. I have a patch baking to use the LIBS env var instead of LDFALGS.
diff --git a/scripts/dbt5-build-egen.in b/scripts/dbt5-build-egen.in
index 9427e3b4..3ef2d65d 100755
--- a/scripts/dbt5-build-egen.in
+++ b/scripts/dbt5-build-egen.in
@@ -151,6 +151,7 @@ fi
(cd "${EGENDIR}/prj" && \
make -f Makefile clean && \
CCFLAGS="-Wall -D__unix -g -std=c++98 -ansi -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -D_LARGEFILE64_SOURCE -DCOMPILE_CUSTOM_LOAD -DPGSQL -I${EGENDIR}/inc ${INCLUDEDIR} -I${EGENDIR}/Utilities/inc ${EXTRAINCLUDE}" \
- LDFLAGS="-lpthread -lpq ${EXTRALDDIR}" \
+ LDFLAGS="${EXTRALDDIR}" \
+ LIBS="-lpthread -lpq" \
make -j$(nproc) -f Makefile) \
|| (echo "ERROR: cannot build egen" && exit 1)
Hopefully now fixed in https://github.com/osdldbt/dbt5/commit/e7015d6a215ba2b994c97f166e3c064b0f3dea01. Released in v0.10.1.
I have a debian 12 with libpq-dev and the library installed.
I always get those build issues when I try to build tpc-e tools: