You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let sched = match std::fs::read_to_string("/proc/1/sched"){
480
+
Ok(s) => s,
481
+
Err(error) => {
482
+
tracing::warn!(
483
+
%error,
484
+
"unable to read /proc/1/sched to determine if quilkin is in a container"
485
+
);
486
+
returnfalse;
487
+
}
488
+
};
489
+
letSome(line) = sched.lines().next()else{
490
+
tracing::warn!("/proc/1/sched was empty");
491
+
returnfalse;
492
+
};
493
+
letSome(proc) = line.split(' ').next()else{
494
+
tracing::warn!("first line of /proc/1/sched was empty");
495
+
returnfalse;
496
+
};
497
+
proc != "init" && proc != "systemd"
498
+
}
499
+
500
+
if err.kind() == std::io::ErrorKind::PermissionDenied && in_container(){
501
+
eyre::bail!(
502
+
"failed to call `io_uring_setup` due to EPERM ({err}), quilkin seems to be running inside a container meaning this is likely due to the seccomp profile not allowing the syscall"
503
+
);
504
+
}else{
505
+
eyre::bail!("failed to call `io_uring_setup` due to {err}");
506
+
}
507
+
}
508
+
}
509
+
471
510
let socket = crate::net::raw_socket_with_reuse(self.udp_port)?;
472
511
let workers = self.udp_workers.get();
473
512
let buffer_pool = Arc::new(crate::collections::BufferPool::new(workers,2*1024));
0 commit comments