Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intermittently ClamAV clamd INSTREAM on socket service takes more time to complete the scan #1451

Open
AThiruna opened this issue Feb 4, 2025 · 0 comments

Comments

@AThiruna
Copy link

AThiruna commented Feb 4, 2025

ClamAV (version 1.4.2) clamd service is running on Windows server. Debug and verbose logs are enabled. When 4 MB file data sent to clamd service, the data is scanned within 2 seconds and receive the response in java client. But, sometimes, it takes 8 seconds to complete the scan and log file doesn't show anything after 2 seconds, then 8th second the log shows instream ok and finished scanthread.

The following are the last 10 statements found in the log file during the latency issue. Just masked the ip address.

Tue Feb 4 07:34:33 2025 -> Got chunksize: 0
Tue Feb 4 07:34:33 2025 -> Chunks complete
Tue Feb 4 07:34:33 2025 -> Number of file descriptors polled: 0 fds
Tue Feb 4 07:34:33 2025 -> THRMGR: queue (single) crossed low threshold -> signaling
Tue Feb 4 07:34:33 2025 -> THRMGR: queue (bulk) crossed low threshold -> signaling
Tue Feb 4 07:34:41 2025 -> instream(xx.xx.xx.xx@50541): OK
Tue Feb 4 07:34:41 2025 -> Finished scanthread
Tue Feb 4 07:34:41 2025 -> Scanthread: connection shut down (FD 2476)
Tue Feb 4 07:34:41 2025 -> THRMGR: queue (single) crossed low threshold -> signaling
Tue Feb 4 07:34:41 2025 -> THRMGR: queue (bulk) crossed low threshold -> signaling

This issue is happening randomly and there is no performance issue in the server running clamd service during the latency issue.

Since the java client specified 3 seconds as read timeout for the socket, the system throws "Read timed out" error. This can be resolved by specifying read timeout as 10 seconds. But, what is the reason for taking more time to complete the scan sometimes and why the debug messages are missed in log file.

@AThiruna AThiruna changed the title intermittently ClamAV clamd INSTREAM on socket service takes more time to complete the scan Intermittently ClamAV clamd INSTREAM on socket service takes more time to complete the scan Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant