tikv/tikv · error
unable to create tso worker thread
Error message
unable to create tso worker thread
What it means
TimestampOracle construction spawns the dedicated TSO worker thread via thread::Builder; the spawn failed (thread/resource limits, e.g. RLIMIT_NPROC or memory), so the panic fires on the unwrap. The input at fault is the process's ability to create a new named thread at TSO client startup.
Source
Thrown at components/pd_client/src/tso.rs:78
call_option: CallOption,
) -> Result<TimestampOracle> {
let (request_tx, request_rx) = mpsc::channel(MAX_BATCH_SIZE);
let (rpc_sender, rpc_receiver) = pd_client.tso_opt(call_option)?;
let (close_tx, close_rx) = watch::channel(());
// Start a background thread to handle TSO requests and responses
thread::Builder::new()
.name(TSO_WORKER_THREAD.to_string())
.spawn_wrapper(move || {
block_on(run_tso(
cluster_id,
rpc_sender.sink_err_into(),
rpc_receiver.err_into(),
request_rx,
close_tx,
))
})
.expect("unable to create tso worker thread");
Ok(TimestampOracle {
request_tx,
close_rx,
})
}
pub(crate) fn get_timestamp(
&self,
count: u32,
) -> impl Future<Output = Result<TimeStamp>> + 'static {
let (request, response) = oneshot::channel();
let request_tx = self.request_tx.clone();
async move {
request_tx
.send(TimestampRequest {
sender: request,
count,View on GitHub (pinned to 78aedc1c81)
Solutions
- Raise thread/memory limits for the TiKV process or host
- Reduce other process thread pressure and retry startup
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at components/pd_client/src/tso.rs:78 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of tikv/tikv@78aedc1c81 (2026-09-03).
Data as JSON: /api/errors/a5e85e53ac47c872.
Report an issue: GitHub.