[Pkg-clamav-devel] Bug#1060889: Bug#1060889: clamav cannot be cross-arch installed?

Sebastian Andrzej Siewior sebastian at breakpoint.cc
Wed Jan 17 21:00:49 GMT 2024


On 2024-01-16 17:59:21 [+1100], Trent W. Buck wrote:
> Package: clamav-base
> Version: 1.0.3+dfsg-1~deb12u1
> Severity: minor
> 
> When trying to install clamav for non-default architecture,
> I get this error from apt:
> 
>     The following packages have unmet dependencies:
>      clamav-daemon:i386 : Depends: clamav-base:i386 (= 1.0.3+dfsg-1~deb12u1) but it is not installable
>      clamav-freshclam:i386 : Depends: clamav-base:i386 (>= 1.0.3+dfsg-1~deb12u1) but it is not installable
> 
> This is really weird and confusing, because clamav-base is
> an Architecture: all package, not
> an Architecture: any package.
> 
> I speculate that either:
> 
> 1. apt has a bug that clamav happens to trigger; or
> 2. clamav's Depends/Conflicts/Replaces are subtly bugged, and should be "fixed"; or
> 3. I've misunderstood something fundamental about how to use multiple architectures in apt.

The multi-arch fields could be wrong. Let me check that.

> PS: while not really relevant to this bug report,
>     the original context was:
> 
>      <twb> grr, clamd keeps getting OOM-killed because
>            it loads all definitions into RAM (not mmaped or anything) which
>            is 1300MB on this 4000MB system.

1.3GiB is what I see here, too. Keep in mind, there is this
ConcurrentDatabaseReload which is enabled by default. This will load a
new database (after signature update) from scratch while keeping the old
around. The old is removed once the new is completly loaded. Assuming
the DB requires 1GiB of memory then it will consume another 1GiB until
it is fully loaded.

>      <twb> /var/lib/clamav/ is only 223M, not 1300MB!

Probably compressed content, data structurs and so on.

>      <twb> I wonder if clamav:i386 halves the RAM usage?
> 
>      <twb> dpkg --add-architecture=i386;
>            apt update;
>            apt install clamav:i386 clamav-daemon:i386
>            [doesn't work, start investigating]

On i386 I see 1,1GiB after clamav-daemon started and got idle (after
loading the database).

Sebastian



More information about the Pkg-clamav-devel mailing list