Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Debuging Github CI #4603

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/ci_integration_tests_macos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,13 @@ jobs:
runs-on: macos-12
steps:
- uses: actions/checkout@v3
- name: Setup upterm session
uses: lhotari/action-upterm@v1
- run: |
if [[ ${{ needs.prologue.outputs.os_skip }} == run ]] && [[ ${{ needs.prologue.outputs.job_skip }} == run ]];then
devtools/ci/ci_main.sh
else
echo "skip job"
exit 0
devtools/ci/ci_main.sh
fi
shell: bash
- name: upload log files
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ CKB_FEATURES ?= deadlock_detection,with_sentry
ALL_FEATURES := deadlock_detection,with_sentry,with_dns_seeding,profiling,march-native
CKB_BENCH_FEATURES ?= ci
CKB_BUILD_TARGET ?=
INTEGRATION_RUST_LOG := info,ckb_test=debug,ckb_sync=debug,ckb_relay=debug,ckb_network=debug
INTEGRATION_RUST_LOG := debug,ckb_test=debug,ckb_sync=debug,ckb_relay=debug,ckb_network=debug
CARGO_TARGET_DIR ?= $(shell pwd)/target
BINARY_NAME ?= "ckb"
COV_PROFRAW_DIR = ${CARGO_TARGET_DIR}/cov
Expand Down
4 changes: 2 additions & 2 deletions test/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ fn canonicalize_path<P: AsRef<Path>>(path: P) -> PathBuf {
}

fn all_specs() -> Vec<Box<dyn Spec>> {
let mut specs: Vec<Box<dyn Spec>> = vec![
let mut _specs: Vec<Box<dyn Spec>> = vec![
Box::new(BlockSyncFromOne),
Box::new(BlockSyncForks),
Box::new(BlockSyncDuplicatedAndReconnect),
Expand Down Expand Up @@ -468,7 +468,6 @@ fn all_specs() -> Vec<Box<dyn Spec>> {
Box::new(ValidSince),
Box::new(SendLowFeeRateTx),
Box::new(SendLargeCyclesTxInBlock::new()),
Box::new(SendLargeCyclesTxToRelay::new()),
Box::new(NotifyLargeCyclesTx::new()),
Box::new(LoadProgramFailedTx::new()),
Box::new(RelayWithWrongTx::new()),
Expand Down Expand Up @@ -598,6 +597,7 @@ fn all_specs() -> Vec<Box<dyn Spec>> {
Box::new(RandomlyKill),
Box::new(SyncChurn),
];
let mut specs: Vec<Box<dyn Spec>> = vec![Box::new(DAOWithSatoshiCellOccupied)];
specs.shuffle(&mut thread_rng());
specs
}
Expand Down
2 changes: 1 addition & 1 deletion test/src/specs/tx_pool/send_large_cycles_tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ impl Spec for SendLargeCyclesTxToRelay {
info!("Generate large cycles tx");

let tx = build_tx(node1, &self.random_key.privkey, self.random_key.lock_arg());
// send tx
// send tx to node1
let ret = node1.rpc_client().send_transaction_result(tx.data().into());
assert!(ret.is_ok());

Expand Down
8 changes: 5 additions & 3 deletions test/src/specs/tx_pool/valid_since.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,12 @@ impl ValidSince {
{
let since = since_from_relative_timestamp(median_time_seconds - 1);
let transaction = node.new_transaction_with_since(cellbase.hash(), since);
let res = node
.rpc_client()
.send_transaction_result(transaction.data().into());
info!("res test_since_relative_median_time {:?}", res);
assert!(
node.rpc_client()
.send_transaction_result(transaction.data().into())
.is_ok(),
res.is_ok(),
"transaction's since is greater than tip's median time",
);
}
Expand Down
10 changes: 10 additions & 0 deletions tx-pool/src/verify_mgr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,20 @@ impl Worker {

async fn process_inner(&mut self) {
loop {
eprintln!("Worker process_inner begin ....");
if self.status != ChunkCommand::Resume {
eprintln!(
"Worker is not in resume status, current status: {:?}",
self.status
);
// sleep a while to avoid busy loop
tokio::time::sleep(tokio::time::Duration::from_millis(100)).await;
self.tasks.write().await.re_notify();
return;
}
// cheap query to check queue is not empty
if self.tasks.read().await.is_empty() {
eprintln!("Worker queue is empty");
return;
}

Expand Down Expand Up @@ -137,6 +146,7 @@ impl VerifyMgr {
// `num_cpus::get()` will always return at least 1,
// don't use too many cpu cores to avoid high workload on the system
let worker_num = std::cmp::max(num_cpus::get() * 3 / 4, 1);
eprintln!("verify worker_num: {}", worker_num);
let workers: Vec<_> = (0..worker_num)
.map({
let tasks = Arc::clone(&service.verify_queue);
Expand Down
Loading