Hi,
On couple of devices running trousers-0.3.13 we observe that tcsd hangs
with infinite loop and 100% cpu usage after 2-7 days of tcsd start
This issue is observed when request is received which internally calls
ctx_verify_context() acquire "MUTEX_LOCK(tcs_ctx_lock)" and then goes in
infinte loop in get_context () which result in 100% cpu usage
src/tcs/tcs_context.c
struct tcs_context *
get_context(TCS_CONTEXT_HANDLE handle)
{
struct tcs_context *index;
index = tcs_context_table;
while (index) {
if (index->handle == handle)
break;
index = index->next;
}
return index;
}
Looks like tcs_context_table is getting corrupted.
Is this know issue ? Is it fixed in latest version ?
Here are debug logs :
{ "_ts": "2018-12-17T18:48:46.427Z", "TrouSerS
../../../trousers-0.3.13/src/tcsd/svrside.c:556 accepted socket 8""_level":
"debug" }
{ "_ts": "2018-12-17T18:48:46.427Z", "TrouSerS
../../../trousers-0.3.13/src/tcsd/svrside.c:531 Waiting for connections",
"_level": "debug" }
{ "_ts": "2018-12-17T18:48:46.427Z", "TrouSerS
../../../trousers-0.3.13/src/tcsd/tcsd_threads.c:234 total_recv_size 28,
buf_size 1024, recd_so_far 28", "_fac": "local5", "_level": "debug" }
{ "_ts": "2018-12-17T18:48:46.427Z", "TrouSerS
../../../trousers-0.3.13/src/tcsd/tcsd_threads.c:286 Rx'd packet",
"_level": "debug" }
{ "_msgid": "2018-12-17T18:48:46.427Z TCSD TCS[23439]: TrouSerS
../../../trousers-0.3.13/src/tcs/rpc/tcstp/rpc.c:581 Dispatching ordinal 1
(OpenContext)\n", "_ts": "2018-12-17T18:48:46.426Z", "_level": "debug" }
{ "_msgid": "2018-12-17T18:48:46.427Z TCSD TCS[23439]: TrouSerS
../../../trousers-0.3.13/src/tcs/rpc/tcstp/rpc_context.c:37
tcs_wrap_OpenContext: thread 140107883710208\n", "_ts":
"2018-12-17T18:48:46.426Z", "_level": "debug" }
{ "_ts": "2018-12-17T18:52:01.026Z", "TrouSerS
../../../trousers-0.3.13/src/tcsd/tcsd_threads.c:234 total_recv_size 33,
buf_size 1024, recd_so_far 28", "_fac": "local5", "_level": "debug" }
{ "_ts": "2018-12-17T18:52:01.026Z", "TrouSerS
../../../trousers-0.3.13/src/tcsd/tcsd_threads.c:279 recv_chunk_size 5
recd_so_far 28", "_fac": "local5", "_level": "debug" }
{ "_ts": "2018-12-17T18:52:01.026Z", "TrouSerS
../../../trousers-0.3.13/src/tcsd/tcsd_threads.c:286 Rx'd packet", "_fac":
"local5", "_level": "debug" }
{ "_msgid": "2018-12-17T18:52:01.026Z TCSD TCS[23439]: TrouSerS
../../../trousers-0.3.13/src/tcs/rpc/tcstp/rpc.c:581 Dispatching ordinal 23
(OIAP)\n", "_ts": "2018-12-17T18:52:01.026Z", "_level": "debug" }
One more observation , in this case we don't see "New Context creation"
debug log.
Thanks
Vijay
_______________________________________________
TrouSerS-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/trousers-tech