Skip to content
This repository was archived by the owner on Feb 20, 2023. It is now read-only.

Commit 041fe8f

Browse files
authored
Add calls to lsof in Jenkins. (#1395)
* Add calls to lsof in Jenkins. Before and after everything that might spawn a NoisePage instance. * Pipes? * Testing. * Testing. * DANGER * Remove danger. * Testing. * Testing. * DANGER. Testing. * Testing. * Fix danger. Maybe it was working? * Fun fact: the man page lies about grep -q exit code. That, or some weird obscure Docker interaction.
1 parent 7f2f6a2 commit 041fe8f

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

Jenkinsfile

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,14 @@ pipeline {
110110
sh script: 'cd build && timeout 10s sudo python3 -B ../script/testing/kill_server.py 15721', label: 'Kill PID(15721)'
111111
sh script: 'cd build && timeout 10s sudo python3 -B ../script/testing/kill_server.py 15722', label: 'Kill PID(15722)'
112112
sh script: 'cd build && timeout 10s sudo python3 -B ../script/testing/kill_server.py 15723', label: 'Kill PID(15723)'
113+
sh script: 'sudo lsof -i -P -n | grep LISTEN || true', label: 'Check ports.'
113114
sh 'cd build && timeout 1h ninja jumbotests'
114115
sh 'cd build && timeout 1h ninja check-tpl'
116+
sh script: 'sudo lsof -i -P -n | grep LISTEN || true', label: 'Check ports.'
115117
sh script: 'cd build && timeout 20m python3 ../script/testing/junit/run_junit.py --build-type=debug --query-mode=simple', label: 'UnitTest (Simple)'
116118
sh script: 'cd build && timeout 20m python3 ../script/testing/junit/run_junit.py --build-type=debug --query-mode=extended', label: 'UnitTest (Extended)'
117119
sh script: 'cd build && timeout 20m python3 ../script/testing/junit/run_junit.py --build-type=debug --query-mode=extended -a "pipeline_metrics_enable=True" -a "pipeline_metrics_interval=0" -a "counters_enable=True" -a "query_trace_metrics_enable=True"', label: 'UnitTest (Extended with pipeline metrics, counters, and query trace metrics)'
120+
sh script: 'sudo lsof -i -P -n | grep LISTEN || true', label: 'Check ports.'
118121
}
119122
post {
120123
always {
@@ -150,10 +153,13 @@ pipeline {
150153
sh script: 'cd build && timeout 10s sudo python3 -B ../script/testing/kill_server.py 15721', label: 'Kill PID(15721)'
151154
sh script: 'cd build && timeout 10s sudo python3 -B ../script/testing/kill_server.py 15722', label: 'Kill PID(15722)'
152155
sh script: 'cd build && timeout 10s sudo python3 -B ../script/testing/kill_server.py 15723', label: 'Kill PID(15723)'
156+
sh script: 'sudo lsof -i -P -n | grep LISTEN || true', label: 'Check ports.'
153157
sh 'cd build && timeout 1h ninja unittest'
154158
sh 'cd build && timeout 1h ninja check-tpl'
159+
sh script: 'sudo lsof -i -P -n | grep LISTEN || true', label: 'Check ports.'
155160
sh script: 'cd build && timeout 20m python3 ../script/testing/junit/run_junit.py --build-type=debug --query-mode=simple', label: 'UnitTest (Simple)'
156161
sh script: 'cd build && timeout 20m python3 ../script/testing/junit/run_junit.py --build-type=debug --query-mode=extended', label: 'UnitTest (Extended)'
162+
sh script: 'sudo lsof -i -P -n | grep LISTEN || true', label: 'Check ports.'
157163
sh 'cd build && lcov --directory . --capture --output-file coverage.info'
158164
sh 'cd build && lcov --remove coverage.info \'/usr/*\' --output-file coverage.info'
159165
sh 'cd build && lcov --remove coverage.info \'*/build/*\' --output-file coverage.info'
@@ -202,10 +208,13 @@ pipeline {
202208
sh script: 'cd build && timeout 10s sudo python3 -B ../script/testing/kill_server.py 15721', label: 'Kill PID(15721)'
203209
sh script: 'cd build && timeout 10s sudo python3 -B ../script/testing/kill_server.py 15722', label: 'Kill PID(15722)'
204210
sh script: 'cd build && timeout 10s sudo python3 -B ../script/testing/kill_server.py 15723', label: 'Kill PID(15723)'
211+
sh script: 'sudo lsof -i -P -n | grep LISTEN || true', label: 'Check ports.'
205212
sh 'cd build && timeout 1h ninja jumbotests'
206213
sh 'cd build && timeout 1h ninja check-tpl'
214+
sh script: 'sudo lsof -i -P -n | grep LISTEN || true', label: 'Check ports.'
207215
sh script: 'cd build && timeout 20m python3 ../script/testing/junit/run_junit.py --build-type=debug --query-mode=simple', label: 'UnitTest (Simple)'
208216
sh script: 'cd build && timeout 20m python3 ../script/testing/junit/run_junit.py --build-type=debug --query-mode=extended', label: 'UnitTest (Extended)'
217+
sh script: 'sudo lsof -i -P -n | grep LISTEN || true', label: 'Check ports.'
209218
}
210219
post {
211220
always {
@@ -238,10 +247,13 @@ pipeline {
238247
sh script: 'cd build && timeout 10s sudo python3 -B ../script/testing/kill_server.py 15721', label: 'Kill PID(15721)'
239248
sh script: 'cd build && timeout 10s sudo python3 -B ../script/testing/kill_server.py 15722', label: 'Kill PID(15722)'
240249
sh script: 'cd build && timeout 10s sudo python3 -B ../script/testing/kill_server.py 15723', label: 'Kill PID(15723)'
250+
sh script: 'sudo lsof -i -P -n | grep LISTEN || true', label: 'Check ports.'
241251
sh 'cd build && timeout 1h ninja jumbotests'
242252
sh 'cd build && timeout 1h ninja check-tpl'
253+
sh script: 'sudo lsof -i -P -n | grep LISTEN || true', label: 'Check ports.'
243254
sh script: 'cd build && timeout 20m python3 ../script/testing/junit/run_junit.py --build-type=release --query-mode=simple', label: 'UnitTest (Simple)'
244255
sh script: 'cd build && timeout 20m python3 ../script/testing/junit/run_junit.py --build-type=release --query-mode=extended', label: 'UnitTest (Extended)'
256+
sh script: 'sudo lsof -i -P -n | grep LISTEN || true', label: 'Check ports.'
245257
}
246258
post {
247259
always {
@@ -278,10 +290,13 @@ pipeline {
278290
sh script: 'cd build && timeout 10s sudo python3 -B ../script/testing/kill_server.py 15721', label: 'Kill PID(15721)'
279291
sh script: 'cd build && timeout 10s sudo python3 -B ../script/testing/kill_server.py 15722', label: 'Kill PID(15722)'
280292
sh script: 'cd build && timeout 10s sudo python3 -B ../script/testing/kill_server.py 15723', label: 'Kill PID(15723)'
293+
sh script: 'sudo lsof -i -P -n | grep LISTEN || true', label: 'Check ports.'
281294
sh 'cd build && timeout 1h ninja jumbotests'
282295
sh 'cd build && timeout 1h ninja check-tpl'
296+
sh script: 'sudo lsof -i -P -n | grep LISTEN || true', label: 'Check ports.'
283297
sh script: 'cd build && timeout 20m python3 ../script/testing/junit/run_junit.py --build-type=release --query-mode=simple', label: 'UnitTest (Simple)'
284298
sh script: 'cd build && timeout 20m python3 ../script/testing/junit/run_junit.py --build-type=release --query-mode=extended', label: 'UnitTest (Extended)'
299+
sh script: 'sudo lsof -i -P -n | grep LISTEN || true', label: 'Check ports.'
285300
}
286301
post {
287302
always {
@@ -315,6 +330,8 @@ pipeline {
315330
cmake -GNinja -DNOISEPAGE_UNITY_BUILD=ON -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Debug -DNOISEPAGE_USE_ASAN=ON ..
316331
ninja noisepage''', label: 'Compiling'
317332

333+
sh script: 'sudo lsof -i -P -n | grep LISTEN || true', label: 'Check ports.'
334+
318335
sh script: '''
319336
cd build
320337
timeout 10m python3 ../script/testing/oltpbench/run_oltpbench.py --config-file=../script/testing/oltpbench/configs/end_to_end_debug/tatp.json --build-type=debug
@@ -350,6 +367,8 @@ pipeline {
350367
cd build
351368
timeout 30m python3 ../script/testing/oltpbench/run_oltpbench.py --config-file=../script/testing/oltpbench/configs/end_to_end_debug/tpcc_parallel_disabled.json --build-type=debug
352369
''', label: 'OLTPBench (No Parallel)'
370+
371+
sh script: 'sudo lsof -i -P -n | grep LISTEN || true', label: 'Check ports.'
353372
}
354373
post {
355374
cleanup {
@@ -371,6 +390,8 @@ pipeline {
371390
cmake -GNinja -DNOISEPAGE_UNITY_BUILD=ON -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Release -DNOISEPAGE_USE_ASAN=OFF -DNOISEPAGE_USE_JEMALLOC=ON ..
372391
ninja noisepage''', label: 'Compiling'
373392

393+
sh script: 'sudo lsof -i -P -n | grep LISTEN || true', label: 'Check ports.'
394+
374395
sh script:'''
375396
cd build
376397
timeout 10m python3 ../script/testing/oltpbench/run_oltpbench.py --config-file=../script/testing/oltpbench/configs/end_to_end_performance/tatp.json --build-type=release
@@ -400,6 +421,8 @@ pipeline {
400421
cd build
401422
timeout 30m python3 ../script/testing/oltpbench/run_oltpbench.py --config-file=../script/testing/oltpbench/configs/end_to_end_performance/tpcc_wal_ramdisk.json --build-type=release
402423
''', label: 'OLTPBench (TPCC RamDisk WAL)'
424+
425+
sh script: 'sudo lsof -i -P -n | grep LISTEN || true', label: 'Check ports.'
403426
}
404427
post {
405428
cleanup {
@@ -435,11 +458,15 @@ pipeline {
435458
../benchmark/mini_runners --mini_runner_rows_limit=100 --rerun=0 --warm_num=1
436459
''', label: 'Mini-trainer input generation'
437460

461+
sh script: 'sudo lsof -i -P -n | grep LISTEN || true', label: 'Check ports.'
462+
438463
sh script: '''
439464
cd build
440465
export BUILD_ABS_PATH=`pwd`
441466
timeout 10m ninja self_driving_test
442467
''', label: 'Running self-driving test'
468+
469+
sh script: 'sudo lsof -i -P -n | grep LISTEN || true', label: 'Check ports.'
443470
}
444471
post {
445472
cleanup {

Jenkinsfile-nightly

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ pipeline {
5757
cmake -GNinja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Release -DNOISEPAGE_USE_ASAN=OFF -DNOISEPAGE_USE_JEMALLOC=ON -DNOISEPAGE_BUILD_TESTS=OFF ..
5858
ninja noisepage''', label: 'Compiling'
5959

60+
sh script: 'sudo lsof -i -P -n | grep LISTEN || true', label: 'Check ports.'
61+
6062
catchError(stageResult: 'Failure'){
6163
sh script:'''
6264
cd build
@@ -76,6 +78,8 @@ pipeline {
7678
''', label: 'OLTPBench (No WAL)'
7779
}
7880

81+
sh script: 'sudo lsof -i -P -n | grep LISTEN || true', label: 'Check ports.'
82+
7983
archiveArtifacts(artifacts: 'build/oltp_result/**/*.*', excludes: 'build/oltp_result/**/*.csv', fingerprint: true)
8084
}
8185
post {
@@ -97,6 +101,8 @@ pipeline {
97101
cmake -GNinja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Release -DNOISEPAGE_USE_ASAN=OFF -DNOISEPAGE_USE_JEMALLOC=ON -DNOISEPAGE_BUILD_TESTS=OFF ..
98102
ninja''', label: 'Compiling'
99103

104+
sh script: 'sudo lsof -i -P -n | grep LISTEN || true', label: 'Check ports.'
105+
100106
script { // TODO: This script block is temporary to get some initial data into microbenchmarks
101107
def iterations = 4
102108
for(int i = 0;i < iterations; i++){
@@ -117,6 +123,8 @@ pipeline {
117123

118124
}
119125

126+
sh script: 'sudo lsof -i -P -n | grep LISTEN || true', label: 'Check ports.'
127+
120128
}
121129
post {
122130
cleanup {

0 commit comments

Comments
 (0)