perf counters are used by ovsdb_txn_commit(), which can be called while opening a database file. This means we have to move the call to perf_counters_init() before. Failed cases of Valgrind: 104, 106, 107
Signed-off-by: William Tu <[email protected]> Signed-off-by: Daniele Di Proietto <[email protected]> Co-authored-by: Daniele Di Proietto <[email protected]> --- ovsdb/ovsdb-server.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ovsdb/ovsdb-server.c b/ovsdb/ovsdb-server.c index 97b65b6..e14a644 100644 --- a/ovsdb/ovsdb-server.c +++ b/ovsdb/ovsdb-server.c @@ -258,6 +258,9 @@ main(int argc, char *argv[]) shash_init(&all_dbs); server_config.all_dbs = &all_dbs; server_config.jsonrpc = jsonrpc; + + perf_counters_init(); + SSET_FOR_EACH (db_filename, &db_filenames) { error = open_db(&server_config, db_filename); if (error) { @@ -296,8 +299,6 @@ main(int argc, char *argv[]) daemonize_complete(); - perf_counters_init(); - if (!run_command) { /* ovsdb-server is usually a long-running process, in which case it * makes plenty of sense to log the version, but --run makes -- 2.5.0 _______________________________________________ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
