sysbench-tpcc icon indicating copy to clipboard operation
sysbench-tpcc copied to clipboard

Errors for Postgres run.

Open jamessewell opened this issue 5 months ago • 3 comments

Hello, I'm incoming from the PlanetScale blog.

I run this prepare:

./tpcc.lua   
    --pgsql-host=${DB_HOST}   
    --pgsql-port=${DB_PORT}   
    --pgsql-password=${DB_PASSWORD}   
    --pgsql-user=${DB_USER}   
    --pgsql-db=${DB_NAME}   
    --tables=20   
    --scale=250   
    --use_fk=0   
    --threads=20   
    --report-interval=1  
    --db-driver=pgsql   
    prepare

Which finishes with no errors, and then:

./tpcc.lua \
    --pgsql-host=${DB_HOST} \
    --pgsql-port=${DB_PORT} \
    --pgsql-password=${DB_PASSWORD} \
    --pgsql-user=${DB_USER} \
    --pgsql-db=${DB_NAME} \
    --tables=20 \
    --scale=250 \
    --use_fk=0 \
    --time=300 \
    --threads=32 \
    --report-interval=1 \
    --histogram=off \
    --percentile=99 \
    --db-driver=pgsql \
    run

Which gives me this error quickly:

sysbench 1.0.20 (using system LuaJIT 2.1.0-beta3)

Running the test with following options:
Number of threads: 32
Report intermediate results every 1 second(s)
Initializing random number generator from current time


Initializing worker threads...

DB SCHEMA public
DB SCHEMA public
DB SCHEMA public
DB SCHEMA public
DB SCHEMA public
DB SCHEMA public
DB SCHEMA public
DB SCHEMA public
DB SCHEMA public
DB SCHEMA public
DB SCHEMA public
DB SCHEMA public
DB SCHEMA public
DB SCHEMA public
DB SCHEMA public
DB SCHEMA public
DB SCHEMA public
DB SCHEMA public
DB SCHEMA public
DB SCHEMA public
DB SCHEMA public
DB SCHEMA public
DB SCHEMA public
DB SCHEMA public
DB SCHEMA public
DB SCHEMA public
DB SCHEMA public
DB SCHEMA public
DB SCHEMA public
DB SCHEMA public
DB SCHEMA public
DB SCHEMA public
Threads started!

FATAL: `thread_run' function failed: ./tpcc_run.lua:120: attempt to perform arithmetic on local 'd_next_o_id' (a nil value)
FATAL: `thread_run' function failed: ./tpcc_run.lua:363: attempt to perform arithmetic on a nil value
ALERT: attempt to fetch row from an empty result set
FATAL: `thread_run' function failed: ./tpcc_run.lua:335: attempt to index global 'row' (a nil value)
ALERT: attempt to fetch row from an empty result set
FATAL: `thread_run' function failed: ./tpcc_run.lua:335: attempt to index global 'row' (a nil value)
ALERT: attempt to fetch row from an empty result set
FATAL: `thread_run' function failed: ./tpcc_run.lua:335: attempt to index global 'row' (a nil value)

Running a check shows only PASSED.

jamessewell avatar Jul 03 '25 02:07 jamessewell

Ah, it was caused by a failure in the load ....

FATAL: `sysbench.cmdline.call_command' function failed: ./tpcc_common.lua:436: db_bulk_insert_done() failed

jamessewell avatar Jul 04 '25 02:07 jamessewell

@jamessewell I am trying to run the same PLanetScale 500g TPCC benchmark. It works fine, but I keep getting those errors during execution. Have you had the same?

2025-11-12 19:22:32.793 GMT [80511] ERROR:  could not serialize access due to concurrent update
2025-11-12 19:22:32.793 GMT [80511] STATEMENT:  UPDATE warehouse4
                          SET w_ytd = w_ytd + 1477 
                        WHERE w_id = 241
2025-11-12 19:22:32.793 GMT [80511] WARNING:  there is no transaction in progress
2025-11-12 19:22:32.874 GMT [80508] ERROR:  could not serialize access due to concurrent update
2025-11-12 19:22:32.874 GMT [80508] STATEMENT:  UPDATE warehouse15
                          SET w_ytd = w_ytd + 2456 
                        WHERE w_id = 96
2025-11-12 19:22:32.874 GMT [80508] WARNING:  there is no transaction in progress
2025-11-12 19:22:32.942 GMT [80515] ERROR:  could not serialize access due to concurrent update
2025-11-12 19:22:32.942 GMT [80515] STATEMENT:  SELECT d_next_o_id, d_tax 
                                                  FROM district11 
                                                 WHERE d_w_id = 107 
                                                   AND d_id = 4 FOR UPDATE
2025-11-12 19:22:32.946 GMT [80515] WARNING:  there is no transaction in progress
2025-11-12 19:22:33.440 GMT [80536] ERROR:  could not serialize access due to concurrent update
2025-11-12 19:22:33.440 GMT [80536] STATEMENT:  SELECT d_next_o_id, d_tax 
                                                  FROM district12 
                                                 WHERE d_w_id = 133 
                                                   AND d_id = 3 FOR UPDATE
2025-11-12 19:22:33.440 GMT [80536] WARNING:  there is no transaction in progress
2025-11-12 19:22:34.208 GMT [80507] ERROR:  could not serialize access due to concurrent update
2025-11-12 19:22:34.208 GMT [80507] STATEMENT:  UPDATE district13 
                         SET d_ytd = d_ytd + 4645 
                       WHERE d_w_id = 148 
                         AND d_id= 7
2025-11-12 19:22:34.209 GMT [80507] WARNING:  there is no transaction in progress
2025-11-12 19:22:34.238 GMT [80494] ERROR:  could not serialize access due to concurrent update
2025-11-12 19:22:34.238 GMT [80494] STATEMENT:  UPDATE warehouse20
                          SET w_ytd = w_ytd + 3387 
                        WHERE w_id = 81
2025-11-12 19:22:34.254 GMT [80494] WARNING:  there is no transaction in progress
2025-11-12 19:22:34.513 GMT [80548] ERROR:  could not serialize access due to concurrent update
2025-11-12 19:22:34.513 GMT [80548] STATEMENT:  SELECT no_o_id
                                             FROM new_orders10 
                                            WHERE no_d_id = 1 
                                              AND no_w_id = 224 
                                              ORDER BY no_o_id ASC LIMIT 1 FOR UPDATE
2025-11-12 19:22:34.523 GMT [80548] WARNING:  there is no transaction in progress
2025-11-12 19:22:35.567 GMT [80508] ERROR:  could not serialize access due to concurrent update
2025-11-12 19:22:35.567 GMT [80508] STATEMENT:  UPDATE warehouse16
                          SET w_ytd = w_ytd + 4700 
                        WHERE w_id = 182
2025-11-12 19:22:35.569 GMT [80508] WARNING:  there is no transaction in progress
2025-11-12 19:22:35.963 GMT [80534] ERROR:  could not serialize access due to concurrent update
2025-11-12 19:22:35.963 GMT [80534] STATEMENT:  SELECT d_next_o_id, d_tax 
                                                  FROM district9 
                                                 WHERE d_w_id = 36 
                                                   AND d_id = 3 FOR UPDATE
2025-11-12 19:22:35.963 GMT [80534] WARNING:  there is no transaction in progress

karim-manaouil avatar Nov 12 '25 19:11 karim-manaouil

This is your database not keeping up I think

On Thu, 13 Nov 2025 at 8:28 am, Karim Manaouil @.***> wrote:

karim-manaouil left a comment (Percona-Lab/sysbench-tpcc#54) https://github.com/Percona-Lab/sysbench-tpcc/issues/54#issuecomment-3523561798

@jamessewell https://github.com/jamessewell I am trying to run the same PLanetScale 500g TPCC benchmark. It works fine, but I keep getting those errors during execution. Have you had the same?

2025-11-12 19:22:32.793 GMT [80511] ERROR: could not serialize access due to concurrent update 2025-11-12 19:22:32.793 GMT [80511] STATEMENT: UPDATE warehouse4 SET w_ytd = w_ytd + 1477 WHERE w_id = 241 2025-11-12 19:22:32.793 GMT [80511] WARNING: there is no transaction in progress 2025-11-12 19:22:32.874 GMT [80508] ERROR: could not serialize access due to concurrent update 2025-11-12 19:22:32.874 GMT [80508] STATEMENT: UPDATE warehouse15 SET w_ytd = w_ytd + 2456 WHERE w_id = 96 2025-11-12 19:22:32.874 GMT [80508] WARNING: there is no transaction in progress 2025-11-12 19:22:32.942 GMT [80515] ERROR: could not serialize access due to concurrent update 2025-11-12 19:22:32.942 GMT [80515] STATEMENT: SELECT d_next_o_id, d_tax FROM district11 WHERE d_w_id = 107 AND d_id = 4 FOR UPDATE 2025-11-12 19:22:32.946 GMT [80515] WARNING: there is no transaction in progress 2025-11-12 19:22:33.440 GMT [80536] ERROR: could not serialize access due to concurrent update 2025-11-12 19:22:33.440 GMT [80536] STATEMENT: SELECT d_next_o_id, d_tax FROM district12 WHERE d_w_id = 133 AND d_id = 3 FOR UPDATE 2025-11-12 19:22:33.440 GMT [80536] WARNING: there is no transaction in progress 2025-11-12 19:22:34.208 GMT [80507] ERROR: could not serialize access due to concurrent update 2025-11-12 19:22:34.208 GMT [80507] STATEMENT: UPDATE district13 SET d_ytd = d_ytd + 4645 WHERE d_w_id = 148 AND d_id= 7 2025-11-12 19:22:34.209 GMT [80507] WARNING: there is no transaction in progress 2025-11-12 19:22:34.238 GMT [80494] ERROR: could not serialize access due to concurrent update 2025-11-12 19:22:34.238 GMT [80494] STATEMENT: UPDATE warehouse20 SET w_ytd = w_ytd + 3387 WHERE w_id = 81 2025-11-12 19:22:34.254 GMT [80494] WARNING: there is no transaction in progress 2025-11-12 19:22:34.513 GMT [80548] ERROR: could not serialize access due to concurrent update 2025-11-12 19:22:34.513 GMT [80548] STATEMENT: SELECT no_o_id FROM new_orders10 WHERE no_d_id = 1 AND no_w_id = 224 ORDER BY no_o_id ASC LIMIT 1 FOR UPDATE 2025-11-12 19:22:34.523 GMT [80548] WARNING: there is no transaction in progress 2025-11-12 19:22:35.567 GMT [80508] ERROR: could not serialize access due to concurrent update 2025-11-12 19:22:35.567 GMT [80508] STATEMENT: UPDATE warehouse16 SET w_ytd = w_ytd + 4700 WHERE w_id = 182 2025-11-12 19:22:35.569 GMT [80508] WARNING: there is no transaction in progress 2025-11-12 19:22:35.963 GMT [80534] ERROR: could not serialize access due to concurrent update 2025-11-12 19:22:35.963 GMT [80534] STATEMENT: SELECT d_next_o_id, d_tax FROM district9 WHERE d_w_id = 36 AND d_id = 3 FOR UPDATE 2025-11-12 19:22:35.963 GMT [80534] WARNING: there is no transaction in progress

— Reply to this email directly, view it on GitHub https://github.com/Percona-Lab/sysbench-tpcc/issues/54#issuecomment-3523561798, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJJDI5JHGY4BXPKOVA64SD34OC7RAVCNFSM6AAAAACAVPZLOWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTKMRTGU3DCNZZHA . You are receiving this because you were mentioned.Message ID: @.***>

jamessewell avatar Nov 12 '25 21:11 jamessewell