Closed mohammedyaqub closed 2 years ago
Hi @mohammedyaqub, I sent the PR #56 for solving the segmentation fault problem.
Moreover, If you confused on the time testing error, you can check the time zone in your system environment first:
timedatectl
If the result doesn't match with your actual time zone, you can use the following commands for calibration:
timedatectl list-timezones # select the correct time zone
sudo timedatectl set-timezone TIME_ZONE_NAME
Thanks.
Hi @ianchen0119 Thank you for fixing the segmentation fault. Further about compiling As suggested I check the time zone and its looks matching with current date and time.
Local time: Tue 2022-04-19 20:08:03 IST
Universal time: Tue 2022-04-19 14:38:03 UTC
RTC time: Tue 2022-04-19 14:38:03
Time zone: Asia/Kolkata (IST, +0530)
System clock synchronized: yes
systemd-timesyncd.service active: yes
RTC in local TZ: no
Although the compilation issue are still same. Below is the output could you please check.
[1/14][YamlTest] : status OK
[2/14][TimerTest] : status OK
[3/14][TimeTest] : 2022-04-19T20:17:27+05:30 [ERRO][UPF][Util] TimeConvert GMT error: need 2019-08-22 14:24:47.445585 [234 Thu], not 2019-08-22 11:54:47.445585 [234 Thu]
2022-04-19T20:17:27+05:30 [ERRO][UPF][Util] TestTime_3 fail
status error
[4/14][ThreadTest] : status OK
[5/14][PoolTest] : 2022-04-19T20:17:27+05:30 [WARN][UPF][Util] Pool is empty
2022-04-19T20:17:27+05:30 [ERRO][UPF][Util] Pool is full, it may not belong to this pool
status OK
[6/14][NetworkTest] : status OK
[7/14][MqTest] : status OK
[8/14][ListTest] : status OK
[9/14][IndexTest] : status OK
[10/14][HashTest] : status OK
[11/14][EventTest] : status OK
[12/14][DebugTest] : 2022-04-19T20:17:38+05:30 [ERRO][UPF][Util]
status OK
[13/14][BuffTest] : status OK
[14/14][3gppTypesTest] : status OK
2022-04-19T20:17:38+05:30 [INFO][UPF][Util] Remove test node 0
2022-04-19T20:17:38+05:30 [INFO][UPF][Util] Remove test node 1
2022-04-19T20:17:38+05:30 [INFO][UPF][Util] Remove test node 2
2022-04-19T20:17:38+05:30 [INFO][UPF][Util] Remove test node 3
2022-04-19T20:17:38+05:30 [INFO][UPF][Util] Remove test node 4
2022-04-19T20:17:38+05:30 [INFO][UPF][Util] Remove test node 5
2022-04-19T20:17:38+05:30 [INFO][UPF][Util] Remove test node 6
2022-04-19T20:17:38+05:30 [INFO][UPF][Util] Remove test node 7
2022-04-19T20:17:38+05:30 [INFO][UPF][Util] Remove test node 8
2022-04-19T20:17:38+05:30 [INFO][UPF][Util] Remove test node 9
2022-04-19T20:17:38+05:30 [INFO][UPF][Util] Remove test node 10
2022-04-19T20:17:38+05:30 [INFO][UPF][Util] Remove test node 11
2022-04-19T20:17:38+05:30 [INFO][UPF][Util] Remove test node 12
2022-04-19T20:17:38+05:30 [INFO][UPF][Util] Remove test node 13
@mohammedyaqub
I think I gave the wrong information with you,
you should try to switch the time zone to the Asia/Taipei
because of the compared data is expect the GMT+8.
sudo timedatectl set-timezone Asia/Taipei
Thanks.
@ianchen0119 Now its works fine thank you for correction.
Further any help regarding previously mentioned UTLT_Error(Pool is full, it may not belong to this pool);
would be appreciated.
As still confused with warning Pool is empty,UTLT_Error Pool is full with status as OK, mentioned in below Output at[5/14][PoolTest].
And [12/14][DebugTest]
with status OK.
[1/14][YamlTest] : status OK
[2/14][TimerTest] : status OK
[3/14][TimeTest] : status OK
[4/14][ThreadTest] : status OK
[5/14][PoolTest] : 2022-04-20T13:59:03+08:00 [WARN][UPF][Util] Pool is empty
2022-04-20T13:59:03+08:00 [ERRO][UPF][Util] Pool is full, it may not belong to this pool
status OK
[6/14][NetworkTest] : status OK
[7/14][MqTest] : status OK
[8/14][ListTest] : status OK
[9/14][IndexTest] : status OK
[10/14][HashTest] : status OK
[11/14][EventTest] : status OK
[12/14][DebugTest] : 2022-04-20T13:59:17+08:00 [ERRO][UPF][Util]
status OK
[13/14][BuffTest] : status OK
[14/14][3gppTypesTest] : status OK
2022-04-20T13:59:17+08:00 [INFO][UPF][Util] Remove test node 0
2022-04-20T13:59:17+08:00 [INFO][UPF][Util] Remove test node 1
2022-04-20T13:59:17+08:00 [INFO][UPF][Util] Remove test node 2
2022-04-20T13:59:17+08:00 [INFO][UPF][Util] Remove test node 3
2022-04-20T13:59:17+08:00 [INFO][UPF][Util] Remove test node 4
2022-04-20T13:59:17+08:00 [INFO][UPF][Util] Remove test node 5
2022-04-20T13:59:17+08:00 [INFO][UPF][Util] Remove test node 6
2022-04-20T13:59:17+08:00 [INFO][UPF][Util] Remove test node 7
2022-04-20T13:59:17+08:00 [INFO][UPF][Util] Remove test node 8
2022-04-20T13:59:17+08:00 [INFO][UPF][Util] Remove test node 9
2022-04-20T13:59:17+08:00 [INFO][UPF][Util] Remove test node 10
2022-04-20T13:59:17+08:00 [INFO][UPF][Util] Remove test node 11
2022-04-20T13:59:17+08:00 [INFO][UPF][Util] Remove test node 12
2022-04-20T13:59:17+08:00 [INFO][UPF][Util] Remove test node 13
Below is the macro defination.
#define PoolFree(__nameptr, __assignedPtr) do { \
pthread_mutex_lock(&(__nameptr)->lock); \
if (PoolSize(__nameptr) < (__nameptr)->qCap) { \
(__nameptr)->queueAvail[(__nameptr)->qEnd] = (__assignedPtr); \
(__nameptr)->qEnd = ((__nameptr)->qEnd + 1) % ((__nameptr)->qCap + 1); \
UTLT_Debug("Pool Free successful, total capacity[%d], available[%d]" \
, PoolCap(__nameptr), PoolSize(__nameptr)); \
} else { \
UTLT_Error("Pool is full, it may not belong to this pool"); \
} \
pthread_mutex_unlock(&(__nameptr)->lock); \
} while(0)
Thanks.
According to the documentation while running the separate
testutlt
binary causes Compile Time Errors and Undefined Behavior through gdb seg fault occurs due toTestTerminate()
.The following is the Output.
Below is the function which causes seg fault and memory leak. Following is the source path
lib/utlt/src/utlt_test.c
And memory leaks.
As a request would you please look into this @free5gc-org.