Skip to content
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
13 changes: 13 additions & 0 deletions src/bio/bio_xstream.c
Original file line number Diff line number Diff line change
Expand Up @@ -1710,6 +1710,19 @@ bio_xsctxt_init_by_config(struct common_cp_arg *cp_arg)
return -DER_NOMEM;
}

/**
* Initially, this was called internally spdk_subsystem_load_config() -> ... ->
* spdk_rpc_initialize(). However, since commit
* https://github.com/spdk/spdk/commit/fba209c7324a11b9230533144c02e7a66bc738ea (>=v24.01)
* SPDK_RPC_STARTUP has become the initial value of the underlying global variable and it
* is no longer reset automatically. This makes no difference for applications that
* initialize SPDK only once during the lifetime of the process. But some BIO module
* consumers—such as DDB—expect to be able to initialize, finalize, and then reinitialize
* SPDK multiple times within the same process, for example when inspecting multiple pools
* sequentially. For those use cases, the RPC state must now be reset explicitly.
*/
spdk_rpc_set_state(SPDK_RPC_STARTUP);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe move it after init_arg allocation?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I chose this location deliberately because:

  1. It is next to the spdk_subsystem_load_config() which called spdk_rpc_set_state() previously.
  2. But before anything related to init_arg so the preparation of the argument for the spdk_subsystem_load_config() remains undisturbed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks this change didn't solve the issue?

Copy link
Copy Markdown
Contributor Author

@janekmi janekmi Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It solved the issue for me and for @knard38. 😁

I still work with @shimizukko to pin point why his case is different.


D_ALLOC_PTR(init_arg);
if (init_arg == NULL) {
free(json_data);
Expand Down
Loading