Skip to content

Commit b2e15a6

Browse files
Kvssink leak fix and ci (#1250)
* fix memory leak from shared ptr * Fix kvssink memory leak & add CI * Move from s3-hosted media and factor out common code * Upgrade Ubuntu 20->22 and aws-configure-creds to v4 * Add log statement if the shared pointer ref count is not 0 --------- Co-authored-by: Mahesh Ramesh Kumar <[email protected]>
1 parent c82b73b commit b2e15a6

File tree

8 files changed

+282
-72
lines changed

8 files changed

+282
-72
lines changed

.github/configs/no_logs_configuration

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
log4cplus.rootLogger=OFF

.github/valgrind/glib.supp

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
glib-dl-memory-leak-ubuntu-22.04
3+
Memcheck:Leak
4+
match-leak-kinds: definite
5+
fun:malloc
6+
fun:g_malloc
7+
obj:/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7200.4
8+
obj:/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7200.4
9+
fun:call_init.part.0
10+
fun:call_init
11+
fun:_dl_init
12+
obj:/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
13+
obj:*
14+
obj:*
15+
obj:*
16+
obj:*
17+
obj:*
18+
}
19+
20+
{
21+
glib-dl-memory-leak-ubuntu-20.04
22+
Memcheck:Leak
23+
match-leak-kinds: definite
24+
fun:malloc
25+
fun:g_malloc
26+
obj:/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.6400.6
27+
fun:call_init.part.0
28+
fun:call_init
29+
fun:_dl_init
30+
obj:/usr/lib/x86_64-linux-gnu/ld-2.31.so
31+
obj:*
32+
obj:*
33+
obj:*
34+
obj:*
35+
obj:*
36+
obj:*
37+
}

.github/workflows/ci.yml

+23-23
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ jobs:
3535
make
3636
make install
3737
- name: Configure AWS Credentials
38-
uses: aws-actions/configure-aws-credentials@v1-node16
38+
uses: aws-actions/configure-aws-credentials@v4
3939
with:
4040
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
4141
role-session-name: ${{ secrets.AWS_ROLE_SESSION_NAME }}
4242
aws-region: ${{ secrets.AWS_REGION }}
43-
role-duration-seconds: 10800
43+
role-duration-seconds: 3600
4444
- name: Run tests
4545
run: |
4646
cd build
@@ -87,20 +87,20 @@ jobs:
8787
fi
8888
- name: Configure AWS Credentials
8989
if: ${{ matrix.parallel-build == 'ON' }} # Only need to run the tests once
90-
uses: aws-actions/configure-aws-credentials@v1-node16
90+
uses: aws-actions/configure-aws-credentials@v4
9191
with:
9292
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
9393
role-session-name: ${{ secrets.AWS_ROLE_SESSION_NAME }}
9494
aws-region: ${{ secrets.AWS_REGION }}
95-
role-duration-seconds: 10800
95+
role-duration-seconds: 3600
9696
- name: Run tests
9797
if: ${{ matrix.parallel-build == 'ON' }}
9898
run: |
9999
cd build
100100
./tst/producerTest
101101
102102
linux-gcc-code-coverage:
103-
runs-on: ubuntu-20.04
103+
runs-on: ubuntu-22.04
104104
env:
105105
AWS_KVS_LOG_LEVEL: 2
106106
permissions:
@@ -121,12 +121,12 @@ jobs:
121121
make
122122
make install
123123
- name: Configure AWS Credentials
124-
uses: aws-actions/configure-aws-credentials@v1-node16
124+
uses: aws-actions/configure-aws-credentials@v4
125125
with:
126126
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
127127
role-session-name: ${{ secrets.AWS_ROLE_SESSION_NAME }}
128128
aws-region: ${{ secrets.AWS_REGION }}
129-
role-duration-seconds: 10800
129+
role-duration-seconds: 3600
130130
- name: Run tests
131131
run: |
132132
cd build
@@ -139,7 +139,7 @@ jobs:
139139
bash <(curl -s https://codecov.io/bash)
140140
141141
address-sanitizer:
142-
runs-on: ubuntu-20.04
142+
runs-on: ubuntu-22.04
143143
permissions:
144144
id-token: write
145145
contents: read
@@ -162,20 +162,20 @@ jobs:
162162
make
163163
make install
164164
- name: Configure AWS Credentials
165-
uses: aws-actions/configure-aws-credentials@v1-node16
165+
uses: aws-actions/configure-aws-credentials@v4
166166
with:
167167
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
168168
role-session-name: ${{ secrets.AWS_ROLE_SESSION_NAME }}
169169
aws-region: ${{ secrets.AWS_REGION }}
170-
role-duration-seconds: 10800
170+
role-duration-seconds: 3600
171171
- name: Run tests
172172
run: |
173173
cd build
174174
ulimit -c unlimited -S
175175
timeout --signal=SIGABRT 60m ./tst/producerTest
176176
177177
undefined-behavior-sanitizer:
178-
runs-on: ubuntu-20.04
178+
runs-on: ubuntu-22.04
179179
permissions:
180180
id-token: write
181181
contents: read
@@ -198,12 +198,12 @@ jobs:
198198
make
199199
make install
200200
- name: Configure AWS Credentials
201-
uses: aws-actions/configure-aws-credentials@v1-node16
201+
uses: aws-actions/configure-aws-credentials@v4
202202
with:
203203
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
204204
role-session-name: ${{ secrets.AWS_ROLE_SESSION_NAME }}
205205
aws-region: ${{ secrets.AWS_REGION }}
206-
role-duration-seconds: 10800
206+
role-duration-seconds: 3600
207207
- name: Run tests
208208
run: |
209209
cd build
@@ -263,7 +263,7 @@ jobs:
263263
# timeout --signal=SIGABRT 20m ./tst/producerTest
264264

265265
ubuntu-gcc:
266-
runs-on: ubuntu-20.04
266+
runs-on: ubuntu-22.04
267267

268268
strategy:
269269
matrix:
@@ -301,12 +301,12 @@ jobs:
301301
302302
- name: Configure AWS Credentials
303303
if: ${{ matrix.parallel-build == 'ON' }} # Only need to run the tests once
304-
uses: aws-actions/configure-aws-credentials@v1-node16
304+
uses: aws-actions/configure-aws-credentials@v4
305305
with:
306306
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
307307
role-session-name: ${{ secrets.AWS_ROLE_SESSION_NAME }}
308308
aws-region: ${{ secrets.AWS_REGION }}
309-
role-duration-seconds: 10800
309+
role-duration-seconds: 3600
310310
- name: Run tests
311311
if: ${{ matrix.parallel-build == 'ON' }}
312312
run: |
@@ -345,19 +345,19 @@ jobs:
345345
dir
346346
.\build_windows.bat
347347
- name: Configure AWS Credentials
348-
uses: aws-actions/configure-aws-credentials@v1-node16
348+
uses: aws-actions/configure-aws-credentials@v4
349349
with:
350350
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
351351
role-session-name: ${{ secrets.AWS_ROLE_SESSION_NAME }}
352352
aws-region: ${{ secrets.AWS_REGION }}
353-
role-duration-seconds: 10800
353+
role-duration-seconds: 3600
354354
- name: Run tests
355355
run: |
356356
$env:Path += ';C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Strawberry\c\bin;C:\Program Files\NASM;D:\producer\open-source\local\lib;D:\producer\open-source\local\bin'
357357
& "D:\producer\build\tst\producerTest.exe"
358358
359359
arm64-cross-compilation:
360-
runs-on: ubuntu-20.04
360+
runs-on: ubuntu-22.04
361361
env:
362362
CC: aarch64-linux-gnu-gcc
363363
CXX: aarch64-linux-gnu-g++
@@ -380,7 +380,7 @@ jobs:
380380
file libKinesisVideoProducer.so
381381
382382
linux-aarch64-cross-compilation:
383-
runs-on: ubuntu-20.04
383+
runs-on: ubuntu-22.04
384384
env:
385385
CC: aarch64-linux-gnu-gcc
386386
CXX: aarch64-linux-gnu-g++
@@ -403,7 +403,7 @@ jobs:
403403
file libKinesisVideoProducer.so
404404
405405
arm32-cross-compilation:
406-
runs-on: ubuntu-20.04
406+
runs-on: ubuntu-22.04
407407
env:
408408
CC: arm-linux-gnueabi-gcc
409409
CXX: arm-linux-gnueabi-g++
@@ -426,7 +426,7 @@ jobs:
426426
file libKinesisVideoProducer.so
427427
428428
linux-build-gcc-static:
429-
runs-on: ubuntu-20.04
429+
runs-on: ubuntu-22.04
430430
steps:
431431
- name: Clone repository
432432
uses: actions/checkout@v3
@@ -442,7 +442,7 @@ jobs:
442442
make
443443
444444
linux-build-gcc-shared:
445-
runs-on: ubuntu-20.04
445+
runs-on: ubuntu-22.04
446446
steps:
447447
- name: Clone repository
448448
uses: actions/checkout@v3

0 commit comments

Comments
 (0)