[Logcat] Logcat terminated with code 1, signal null

Hi All,

I have written a script which executes appium cases and run adb logcat command to fetch some data from logs, but for some devices and that too intermittently I am getting following error:
[Logcat] Logcat terminated with code 1, signal null

I am using appium installed through brew and version is: 1.22.3

automationName desired capability is set to ‘appium’ which is defaulting it to UiAutomator2.

I am having this issue for some devices (3-4/10), and it’s not always occuring.

I am running 10 iterations of the tests, and it occurs randomly at any iteration and then adb is not working for further iterations, though appium runs tests without any impact.

I need support in resolving this issue, and where can I find logs related to sudden crash of logcat?