Package: cvs
Version: 2:1.12.13+real-30
Severity: important

Dear Maintainer,

CVS has serious performance issues due to use of suboptimal Gnulib 
pagealign_alloc.c
code. The way the CVS uses pagealign_xalloc() / pagealign_free() and stores the 
results
in a list and the suboptimal code in Gnulib has a combined effect of consuming 
CPU time
unnecessarily. In pathological cases CVS can be stuck in buf_free_datas() 
function for
hours.

In particular get_buffer_data() calls pagealign_xalloc(). pagealign_xalloc() 
itself
stores the allocated memory in a linked list. Then buf_free_datas() will call
pagealign_free() for each buffer_data node. pagealign_free() will again scan its
internal list looking for the pointer. This is a O(n) operation, and since the 
CVS
list and Gnulib pagealign_alloc.c list store the nodes in exactly opposite 
order,
this results in n * (n - 1) / 2 unnecessary operations.

For example, allocating 2GB buffers on a system with 4K pagesize it would lead 
to
137438691328 unnecessary operations, seriously bogging down the CVS process.

Upstream Gnulib has released a fix to pagealign code here:
https://cgit.git.savannah.gnu.org/cgit/gnulib.git/commit/?id=7c96b402be00117225a6943ab53bb9e5e6e2c02b

I suggest Debian picks up on this change to remedy this performance issue.

-- System Information:
Debian Release: 13.1
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.12.43+deb13-amd64 (SMP w/8 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: sysvinit (via /sbin/init)
LSM: AppArmor: enabled

Versions of packages cvs depends on:
ii  adduser           3.152
ii  libbsd0           0.12.2-2
ii  libc6             2.41-12
ii  libcrypt1         1:4.4.38-1
ii  libgssapi-krb5-2  1.21.3-5
ii  libkrb5-3         1.21.3-5
ii  zlib1g            1:1.3.dfsg+really1.3.1-1+b1

Versions of packages cvs recommends:
ii  openssh-client  1:10.0p1-7

Versions of packages cvs suggests:
pn  mksh  <none>
pn  rcs   <none>

-- no debconf information

Reply via email to