some locking and tracing support