-
Notifications
You must be signed in to change notification settings - Fork 728
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
LibClamAV Warning: cli_realpath: Invalid arguments. Using --fdpass --multiscan #298
Comments
Removing --multiscan removes the error but limits to a single core. |
clam.txt |
That's great news. Thanks @paulhargreaves |
I'd like to follow up on this issue as I'm seeing it on Debian 11 with ClamAV version 0.103.3+dfsg-0+deb11u1 and I'd rather see this fixed there than compiling from source myself. Some observations that may or may not be helpful:
So, it seems an empty file descriptor is passed to clamd... Does anyone have a clue what might be going on here?
|
I'm seeing the same warnings on 0.104.1.
|
@jonasmalacofilho Nice workaround with the glob. It works for me as well. So, when I replace I'm starting to wonder whether the issue is related to the filesystem in use. Do you happen to use btrfs @jonasmalacofilho ? @micahsnyder Sine Jonas is seeing this issue on the current release version, I guess this bug should be reopened. Is there something else we could try to identify the cause of the issue? |
Actually, I saw those warnings while scanning an etx4 partition. |
If it helps: I'm getting this with 103.5 on two machines using Debian 11 (ext4): Both machines are almost identical, one major difference is the number of docker containers running. Machine A is a single container, gets only a single warning:
Machine B has lots of containers and gets loads of warnings, not only complaining about backingFsBlockDev but basically about every single file path like /var/lib/docker/overlay2//dev/... Edit: I have excluded /var/lib/docker/overlay2/*. "Not supported file type" is now gone, but the amazing number of "invalid arguments" is still there. This somewhat makes the notification emails unreadable, unless I |
I have this on Ubuntu 20.04 LTS running clamav 0.103.6 using clamdscan / with -fdpass --multiscan but not every day! |
Like many aggravating clamav messages, no indication as to what path it was working! Is there some mystery to multiple lwp mutex operation? It seems like any mutex would work, since one VM, to ensure the threads did not step on each other, assuming they read or copy into local (stack/instance not global/static) variables before releasing the lock? Several pages again today! 749 times scanning / today. |
I am on Archlinux as well, and seeing the same messages with the latest v0.105.1 . Also attaching my clamconf.txt. Unlike described in one of the messages prior, I still see the messages even when I glob the path as follows:
|
We have the same issue on Debian bullseye and ClamAV 0.103.7 :( I tried the workaround with the glob, but didn't work for me: Here is my
|
The issue is about the depth file tree. It can be reproduced with these steps:
The issue is not a too big depth from
This explains why using tested with libclamav9 0.103.7+dfsg-0+deb11u1 on debian bullseye (11) |
Adding
The message is more obvious when the directory contents is not scanned in parallel. Removing the
The error can be fixed by changing the configuration. In It would be nice if the warning message would have been clearer about what occurs. Our new value:
|
@sblondon Indeed, at first I thought --fdpass was just throwing the error due to something specific about my OS (Void) but as it so seems, it's just that the error message doesn't express the whole picture and can be easily avoided by incrementing maxrecursion. Thank you. |
Got this error, and came to this page. Changing |
@danieljai can you check what is the maximum depth of the directories scanned by ClamAV (in case it's more than 30)? |
@sblondon Sorry, how do I check that? run in --verbose? The only thing I can see in my .conf is |
My hypothesis is the directory depth is more than 30, so the warning is displayed. You need to check if the hypothesis is true or not. To do that, you need to find the maximum depth of the scanned directories: cd SCANNED_DIRECTORY
find . | awk 'FS="/" {print(NF)}' | sort --general-numeric-sort | tail --lines 1 (Replace SCANNED_DIRECTORY by each directory passed as parameter to |
sudo clamdscan --fdpass --multiscan --infected /path
LibClamAV Warning: cli_realpath: Invalid arguments.
LibClamAV Warning: cli_realpath: Invalid arguments.
LibClamAV Warning: cli_realpath: Invalid arguments.
LibClamAV Warning: cli_realpath: Invalid arguments.
LibClamAV Warning: cli_realpath: Invalid arguments.
LibClamAV Warning: cli_realpath: Invalid arguments.
LibClamAV Warning: cli_realpath: Invalid arguments.
LibClamAV Warning: cli_realpath: Invalid arguments.
LibClamAV Warning: cli_realpath: Invalid arguments.
LibClamAV Warning: cli_realpath: Invalid arguments.
LibClamAV Warning: cli_realpath: Invalid arguments.
LibClamAV Warning: cli_realpath: Invalid arguments.
^C
Clam AntiVirus: Daemon Client 0.104.0
The text was updated successfully, but these errors were encountered: