Skip to content
This repository has been archived by the owner on Apr 26, 2023. It is now read-only.

Registering a delegated service causes key errors #13

Open
ryankurte opened this issue Aug 6, 2021 · 1 comment
Open

Registering a delegated service causes key errors #13

ryankurte opened this issue Aug 6, 2021 · 1 comment

Comments

@ryankurte
Copy link
Contributor

Check for primary key presence occurs in src/core/services/inst.rs prior to checking whether we have a viable existing page.

Reproduction:

Setup both devices as peers, picking a random service published via delegation from dsf-iot-eval.

dsfc service register --id U3aMsMDmw9iwwtuAQDOvFm2WQs-FkoOhryXcBceRv6c= on pi3-01:

Aug 06 01:56:01.059  INFO dsf_daemon::rpc::register: Register: ServiceIdentifier { id: None, index: Some(2) }    
Aug 06 01:56:01.059 ERROR dsf_daemon::core::services::inst: no service private key (id: U3aMsMDmw9iwwtuAQDOvFm2WQs-FkoOhryXcBceRv6c=)    
Aug 06 01:56:12.001 ERROR dsf_daemon::rpc::register: DHT store error: NotFound    
Aug 06 01:56:12.001 ERROR dsf_daemon::engine: Error sending RPC response: SendError { kind: Disconnected }    

logs from pi3-03:

Aug 06 01:56:02.000 ERROR dsf_core::wire: Public key mismatch for object from U3aMsMDmw9iwwtuAQDOvFm2WQs-FkoOhryXcBceRv6c=    
thread 'async-std/runtime' panicked at 'called `Result::unwrap()` on an `Err` value: KeyIdMismatch', /cargo/git/checkouts/dsf-core-498f3386a7d46d94/e772ca1/src/net/request.rs:142:77
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'main' panicked at 'task has failed', /cargo/registry/src/github.com-1ecc6299db9ec823/async-task-4.0.3/src/task.rs:Aug 06 01:56:02.015 ERROR dsf_daemon::engine: engine::net_out_rx returned None    
368thread ':async-std/runtime45' panicked at '
Receiver::next_message called after `None`', /cargo/registry/src/github.com-1ecc6299db9ec823/futures-channel-0.3.9/src/mpsc/mod.rs:1035:41

@ryankurte
Copy link
Contributor Author

Then when the publish succeeds, this causes a fault on the receiver :-(

Aug 06 02:52:43.374 ERROR dsf_core::wire: Public key mismatch for object from KaIDkwJGbpiX_krPS2kUc-CrVSqlSoK0uQVogmUk9wg=    
thread 'async-std/runtime' panicked at 'called `Result::unwrap()` on an `Err` value: KeyIdMismatch', /cargo/git/checkouts/dsf-core-498f3386a7d46d94/e772ca1/src/net/request.rs:142:77
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'mainAug 06 02:52:43.377 ERROR dsf_daemon::engine: engine::net_out_rx returned None    
thread 'async-std/runtime' panicked at 'Receiver::next_message called after `None`', ' panicked at 'task has failed/cargo/registry/src/github.com-1ecc6299db9ec823/futures-channel-0.3.9/src/mpsc/mod.rs:1035', /cargo/registry/src/github.com-1ecc6299db9ec823/async-task-4.0.3/src/task.rs:41

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant