locka99 / opcua

A client and server implementation of the OPC UA specification written in Rust
Mozilla Public License 2.0
501 stars 131 forks source link

fix out of order address_space/session locking causing deadlock #237

Closed joshuagleaton closed 1 year ago

joshuagleaton commented 1 year ago

Currently, server/services/session.rs:activate_session, locks session, then later in server/events/audit/mod.rs:AuditLog::raise_and_log, locks address_space. Meanwhile spawn_subscription_task locks address_space then session. This reorders the spawn_subscription_task lock ordering to match.