Skip to content
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

fix: fddev monitor tries to join shmem without init #3670

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/app/fddev/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,12 @@ agave_main1( void * args ) {
debugging convenience. */

static void
run_firedancer_threaded( config_t * config ) {
run_firedancer_threaded( config_t * config , int init_workspaces) {
install_parent_signals();

fd_topo_print_log( 0, &config->topo );

run_firedancer_init( config, 1 );
run_firedancer_init( config, init_workspaces );

if( FD_UNLIKELY( config->development.debug_tile ) ) {
fd_log_private_shared_lock[ 1 ] = 1;
Expand Down Expand Up @@ -215,13 +215,13 @@ dev_cmd_fn( args_t * args,

if( FD_LIKELY( !args->dev.monitor ) ) {
if( FD_LIKELY( !config->development.no_clone ) ) run_firedancer( config, args->dev.parent_pipefd, !args->dev.no_init_workspaces );
else run_firedancer_threaded( config );
else run_firedancer_threaded( config , !args->dev.no_init_workspaces);
} else {
install_parent_signals();

int pipefd[2];
if( FD_UNLIKELY( pipe2( pipefd, O_NONBLOCK ) ) ) FD_LOG_ERR(( "pipe2() failed (%i-%s)", errno, fd_io_strerror( errno ) ));

initialize_workspaces(config);
firedancer_pid = fork();
if( !firedancer_pid ) {
if( FD_UNLIKELY( close( pipefd[0] ) ) ) FD_LOG_ERR(( "close() failed (%i-%s)", errno, fd_io_strerror( errno ) ));
Expand All @@ -230,8 +230,8 @@ dev_cmd_fn( args_t * args,
if( FD_UNLIKELY( close( pipefd[1] ) ) ) FD_LOG_ERR(( "close() failed (%i-%s)", errno, fd_io_strerror( errno ) ));
if( FD_UNLIKELY( setenv( "RUST_LOG_STYLE", "always", 1 ) ) ) /* otherwise RUST_LOG will not be colorized to the pipe */
FD_LOG_ERR(( "setenv() failed (%i-%s)", errno, fd_io_strerror( errno ) ));
if( FD_LIKELY( !config->development.no_clone ) ) run_firedancer( config, -1, 1 );
else run_firedancer_threaded( config );
if( FD_LIKELY( !config->development.no_clone ) ) run_firedancer( config, -1, 0 );
else run_firedancer_threaded( config , 0);
} else {
if( FD_UNLIKELY( close( pipefd[1] ) ) ) FD_LOG_ERR(( "close() failed (%i-%s)", errno, fd_io_strerror( errno ) ));
}
Expand Down
Loading