-
Notifications
You must be signed in to change notification settings - Fork 405
Fix firedancer-dev bench startup crash #8565
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -515,7 +515,6 @@ monitor_cmd_fn( args_t * args, | |
| 0U, | ||
| 0, | ||
| 0U, | ||
| 1, | ||
| !config->is_firedancer ); | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| #define _GNU_SOURCE | ||
| #include "bench.h" | ||
| #include "../../../shared/commands/configure/configure.h" | ||
| #include "../../../shared/commands/run/run.h" | ||
|
|
||
|
|
@@ -32,7 +33,8 @@ void | |
| bench_cmd_args( int * pargc, | ||
| char *** pargv, | ||
| args_t * args ) { | ||
| args->load.no_quic = fd_env_strip_cmdline_contains( pargc, pargv, "--no-quic" ); | ||
| args->load.no_quic = fd_env_strip_cmdline_contains( pargc, pargv, "--no-quic" ); | ||
| args->load.no_watch = fd_env_strip_cmdline_contains( pargc, pargv, "--no-watch" ); | ||
| } | ||
|
|
||
| void | ||
|
|
@@ -49,7 +51,6 @@ add_bench_topo( fd_topo_t * topo, | |
| uint send_to_ip_addr, | ||
| ushort rpc_port, | ||
| uint rpc_ip_addr, | ||
ripatel-fd marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| int no_quic, | ||
| int reserve_agave_cores ) { | ||
|
|
||
| fd_topob_wksp( topo, "bench" ); | ||
|
|
@@ -101,7 +102,6 @@ add_bench_topo( fd_topo_t * topo, | |
| benchs->benchs.send_to_ip_addr = send_to_ip_addr; | ||
| benchs->benchs.send_to_port = send_to_port; | ||
| benchs->benchs.conn_cnt = conn_cnt; | ||
| benchs->benchs.no_quic = no_quic; | ||
| } | ||
|
|
||
| fd_topob_tile_out( topo, "bencho", 0UL, "bencho_out", 0UL ); | ||
|
|
@@ -123,13 +123,11 @@ add_bench_topo( fd_topo_t * topo, | |
| extern int * fd_log_private_shared_lock; | ||
|
|
||
| void | ||
| bench_cmd_fn( args_t * args, | ||
| config_t * config, | ||
| int watch ) { | ||
| fd_topo_initialize( config_t * config ); | ||
|
|
||
| ushort dest_port = fd_ushort_if( args->load.no_quic, | ||
| config->tiles.quic.regular_transaction_listen_port, | ||
| config->tiles.quic.quic_transaction_listen_port ); | ||
| void | ||
| bench_topo( config_t * config ) { | ||
| fd_topo_initialize( config ); | ||
|
Comment on lines
125
to
+130
|
||
|
|
||
| ushort rpc_port; | ||
| uint rpc_ip_addr; | ||
|
|
@@ -166,12 +164,26 @@ bench_cmd_fn( args_t * args, | |
| config->development.genesis.fund_initial_accounts, | ||
| 0, 0.0f, 0.0f, | ||
| config->layout.quic_tile_count, | ||
| dest_port, | ||
| config->tiles.quic.quic_transaction_listen_port, | ||
| config->net.ip_addr, | ||
| rpc_port, | ||
| rpc_ip_addr, | ||
| args->load.no_quic, | ||
| !config->is_firedancer ); | ||
| } | ||
|
|
||
| void | ||
| bench_cmd_fn( args_t * args, | ||
| config_t * config ) { | ||
|
|
||
| if( args->load.no_quic ) { | ||
| ushort port = config->tiles.quic.regular_transaction_listen_port; | ||
| ulong benchs_tile_cnt = fd_topo_tile_name_cnt( &config->topo, "benchs" ); | ||
| for( ulong i=0UL; i<benchs_tile_cnt; i++ ) { | ||
| fd_topo_tile_t * benchs = &config->topo.tiles[ fd_topo_find_tile( &config->topo, "benchs", i ) ]; | ||
| benchs->benchs.no_quic = 1; | ||
| benchs->benchs.send_to_port = port; | ||
| } | ||
| } | ||
|
|
||
| args_t configure_args = { | ||
| .configure.command = CONFIGURE_CMD_INIT, | ||
|
|
@@ -192,7 +204,11 @@ bench_cmd_fn( args_t * args, | |
| fd_log_private_shared_lock[ 1 ] = 0; | ||
| fd_topo_join_workspaces( &config->topo, FD_SHMEM_JOIN_MODE_READ_WRITE, FD_TOPO_CORE_DUMP_LEVEL_DISABLED ); | ||
|
|
||
| if( watch ) { | ||
| if( !args->load.no_watch ) { | ||
| /* watch incompatible with sandbox */ | ||
| config->development.sandbox = 0; | ||
| config->development.no_clone = 1; | ||
|
|
||
| int pipefd[2]; | ||
| if( FD_UNLIKELY( pipe2( pipefd, O_NONBLOCK ) ) ) FD_LOG_ERR(( "pipe2() failed (%i-%s)", errno, fd_io_strerror( errno ) )); | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.