cvsd: no such system user -- missing library in chroot jail?

Bug #801675 reported by Dr. Stefan Rapp
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
cvsd (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

After installing cvsd and moving an (already existing) cvs repository from a 08.04 ubuntu machine to a 11.04 machine, all attempts to check out fail in

cvs -d :pserver:username@localhost:/some/repository co something
Fatal error, aborting.
cvsd: no such system user

It seems that the error message is misleading, as the cvsd user is properly set up in both /etc/passwd and the chroot jail /var/lib/cvsd/etc/passwd.

Instead it seems to me that a subprocess can't get started, possibly because of a missing library in the chroot jail. After a simple copy of all libraries into the chroot jail

cp -ar /lib /var/lib/cvsd

checkout works again as expected.

I could not find out which library or libraries are missing exactly -- copying all the libraries is just a quick hack as it is compromising the whole chroot concept.

I tried to find out with ldd,

ldd /var/lib/cvsd/bin/cvs

but all listed libraries seem to be there already before the copy.

Also other users are reporting the same problem, for instance:
http://www.linuxquestions.org/questions/linux-server-73/ubuntu-server-11-04-cvsd-no-such-system-user-in-cvs-886059/

Kind regards,
Stefan

lsb_release -rd
Description: Ubuntu 11.04
Release: 11.04

apt-cache policy cvsd
cvsd:
  Installed: 1.0.21
  Candidate: 1.0.21
  Version table:
 *** 1.0.21 0
        500 http://de.archive.ubuntu.com/ubuntu/ natty/universe amd64 Packages
        100 /var/lib/dpkg/status

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: cvsd 1.0.21
ProcVersionSignature: Ubuntu 2.6.38-8.42-generic 2.6.38.2
Uname: Linux 2.6.38-8-generic x86_64
NonfreeKernelModules: fglrx
Architecture: amd64
Date: Fri Jun 24 18:58:31 2011
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release amd64 (20101007)
ProcEnviron:
 LANGUAGE=en_US:en
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: cvsd
UpgradeStatus: Upgraded to natty on 2011-05-24 (30 days ago)

Related branches

Revision history for this message
Dr. Stefan Rapp (rapp) wrote :
Lonnie Blansett (lonnie)
description: updated
Revision history for this message
Lonnie Blansett (lonnie) wrote :

I am having this same problem, except that copying /lib didn't help.

Revision history for this message
Arthur de Jong (adejong) wrote :

Can you try cvsd-buildroot from cvsd 1.0.22? If that doesn't help please include the output of cvsd-buginfo.

Revision history for this message
Dr. Stefan Rapp (rapp) wrote :
Download full text (4.5 KiB)

I ran cvsd-buildroot from 1.0.22 against the installed 1.0.21: it did not help.

This is what I did, together with the requested output from cvsd-buginfo (from the installed 1.0.21, anonymized)

apt-get purge cvsd #...and remove /var/lib/cvsd
apt-get install cvsd
cd /var/lib/cvsd/
tar xzvf /root/myrepo.tgz
chown cvsd.cvsd myrepo/

cvs -d :pserver:user@localhost:/myrepo co something
Fatal error, aborting.
cvsd: no such system user

tar xzf cvsd-1.0.22.tar.gz
cd cvsd-1.0.22/
./configure
make
./cvsd-buildroot /var/lib/cvsd/
creating directory structure under /var/lib/cvsd/... done.
installing binaries... cvs.
looking for non-linked system libraries... done.
installing libraries... done.
creating /var/lib/cvsd//dev devices... already there.
adding users to /var/lib/cvsd//etc/passwd....
fixing ownership... done.
chrooted system created in /var/lib/cvsd/
if your cvs binary changes (new version) you should rerun cvsd-buildroot

cvs -d :pserver:user@localhost:/myrepo co something
Fatal error, aborting.
cvsd: no such system user

cvsd-buginfo
Warning: be sure to review this information to make sure it does
         not contain any sensitive data!

cvsd 1.0.21 built with:
 ./configure --build x86_64-linux-gnu --prefix=/usr --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --enable-warnings --disable-dependency-tracking --with-cvs=/usr/bin/cvs --with-perl=/usr/bin/perl build_alias=x86_64-linux-gnu CFLAGS=-g -O2 LDFLAGS=-Wl,-Bsymbolic-functions CPPFLAGS=

uname -a output:
 Linux some-name 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:24 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

/etc/cvsd/cvsd.conf:
 RootJail /var/lib/cvsd
 Uid cvsd
 Gid cvsd
 Nice 1
 Umask 027
 PidFile /var/run/cvsd.pid
 MaxConnections 10
 Log syslog info
 Listen * 2401
 Repos /myrepo

/var/lib/cvsd:
 drwxr-xr-x root root 4096 Jun 26 15:02 /var/lib/cvsd
 drwxr-xr-x root root 4096 Jun 26 14:38 bin
 -rwxr-xr-x root root 756720 Jun 26 15:05 bin/cvs
 drwxr-xr-x root root 4096 Jun 26 14:38 dev
 crw-rw-rw- root root 1, 3 Jun 26 14:35 dev/null
 crw-rw-rw- root root 1, 5 Jun 26 14:35 dev/zero
 drwxr-xr-x root root 4096 Jun 26 14:38 etc
 -rw-r--r-- root root 113 Jun 26 14:38 etc/passwd
 drwxr-xr-x root root 4096 Jun 26 14:38 lib
 -rwxr-xr-x root root 117960 Jun 26 15:05 lib/ld-linux.so.2
 drwxr-xr-x root root 4096 Jun 26 14:38 lib/x86_64-linux-gnu
 -rwxr-xr-x root root 1638120 Jun 26 15:05 lib/x86_64-linux-gnu/libc.so.6
 -rwxr-xr-x root root 43296 Jun 26 15:05 lib/x86_64-linux-gnu/libcrypt.so.1
 -rwxr-xr-x root root 14696 Jun 26 15:05 lib/x86_64-linux-gnu/libdl.so.2
 -rwxr-xr-x root root 97248 Jun 26 15:05 lib/x86_64-linux-gnu/libnsl.so.1
 -rwxr-xr-x root root 51712 Jun 26 15:05 lib/x86_64-linux-gnu/libpam.so.0
 -rwxr-xr-x root root 140254 Jun 26 15:05 lib/x86_64-linux-gnu/libpthread.so.0
 -rwxr-xr-x root root 31752 Jun 26 15:05 lib/x86_64-linux-gnu/librt.so.1
 -rwxr-xr-x root root 96816 Jun 26 15:05 lib/x86_64-linux-gnu/libz.so.1
 drwxr-xr-x root root 4096 Jun 26 15:02 lib32
 -rwxr-xr-x root root 79672 Jun 26 15:05 lib32/libnsl.so.1
 -rwxr-xr-x root root 26400 Jun 26 15:05 lib32/libnss_compat.so....

Read more...

Revision history for this message
Lonnie Blansett (lonnie) wrote :

YES! That worked. I installed the cvsd package from oneiric, re-ran cvsd-buildroot and that worked. Whatever was changed / fixed in that version should be back-ported to natty...

Thanks!

Revision history for this message
Dr. Stefan Rapp (rapp) wrote :

By selectively copying /lib/a*, /lib/b*, ... I found out that the missing libraries seem to be one of (or all of)
/lib/x86_64-linux-gnu/libnss_*

So, as a temporary workaround, it is sufficient to

cp /lib/x86_64-linux-gnu/libnss_*.so.2 /var/lib/cvsd/lib/x86_64-linux-gnu

Revision history for this message
Arthur de Jong (adejong) wrote :

Could you provide the output of the following:
  find /etc/ld.so.conf* -type f | xargs cat | grep '^/'

On my system it includes the /lib/*-linux-gnu directory. This is what cvsd-buildroot uses (from 1.0.22).

If anyone with more multiarch know-how then myself could provide a better way to do this than to search /lib/*-*-*/libnss_compat.so.2 it would be nice.

Revision history for this message
Dr. Stefan Rapp (rapp) wrote :

find /etc/ld.so.conf* -type f | xargs cat | grep '^/'
/usr/local/lib
/usr/lib32/alsa-lib
/lib32
/usr/lib32
/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu
/usr/lib/alsa-lib

So, /lib/x86_64-linux-gnu is here for me as well.

Also, there are some libraries in the /var/lib/cvsd/usr/lib/x86_64-linux-gnu directory already, also with the 1.0.21 cvsd-buildroot: libcrypt.so.1 libc.so.6 libdl.so.2 libnsl.so.1 libpam.so.0 libpthread.so.0 librt.so.1 libz.so.1. So I do not think it is a problem that the directory is not found, but maybe something else?

I added two 'echo' s in your loop that installs the libraries to see what it tries to install:

 /lib32/libnsl.so.1
cp /lib32/libnsl.so.1 /var/lib/cvsd//lib32/libnsl.so.1
/lib32/libnss_compat.so.2
cp /lib32/libnss_compat.so.2 /var/lib/cvsd//lib32/libnss_compat.so.2
/lib/ld-linux.so.2
cp /lib/ld-linux.so.2 /var/lib/cvsd//lib/ld-linux.so.2
/lib64/ld-linux-x86-64.so.2
cp /lib64/ld-linux-x86-64.so.2 /var/lib/cvsd//lib64/ld-linux-x86-64.so.2
/lib32/libnss_compat.so.2
cp /lib32/libnss_compat.so.2 /var/lib/cvsd//lib32/libnss_compat.so.2
/lib32/libnss_files.so.2
cp /lib32/libnss_files.so.2 /var/lib/cvsd//lib32/libnss_files.so.2
/lib/x86_64-linux-gnu/librt.so.1
cp /lib/x86_64-linux-gnu/librt.so.1 /var/lib/cvsd//lib/x86_64-linux-gnu/librt.so.1
/lib/x86_64-linux-gnu/libcrypt.so.1
cp /lib/x86_64-linux-gnu/libcrypt.so.1 /var/lib/cvsd//lib/x86_64-linux-gnu/libcrypt.so.1
/lib/x86_64-linux-gnu/libnsl.so.1
cp /lib/x86_64-linux-gnu/libnsl.so.1 /var/lib/cvsd//lib/x86_64-linux-gnu/libnsl.so.1
/lib/x86_64-linux-gnu/libz.so.1
cp /lib/x86_64-linux-gnu/libz.so.1 /var/lib/cvsd//lib/x86_64-linux-gnu/libz.so.1
/lib/x86_64-linux-gnu/libpam.so.0
cp /lib/x86_64-linux-gnu/libpam.so.0 /var/lib/cvsd//lib/x86_64-linux-gnu/libpam.so.0
/lib/x86_64-linux-gnu/libc.so.6
cp /lib/x86_64-linux-gnu/libc.so.6 /var/lib/cvsd//lib/x86_64-linux-gnu/libc.so.6
/lib/x86_64-linux-gnu/libpthread.so.0
cp /lib/x86_64-linux-gnu/libpthread.so.0 /var/lib/cvsd//lib/x86_64-linux-gnu/libpthread.so.0
/lib64/ld-linux-x86-64.so.2
cp /lib64/ld-linux-x86-64.so.2 /var/lib/cvsd//lib64/ld-linux-x86-64.so.2
/lib/x86_64-linux-gnu/libdl.so.2
cp /lib/x86_64-linux-gnu/libdl.so.2 /var/lib/cvsd//lib/x86_64-linux-gnu/libdl.so.2

It appears that some libnss_compat.so.2 is copied from/into the lib32 subdirectories, but seemingly a 64-bit version is also needed (or maybe instead?).

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cvsd - 1.0.23

---------------
cvsd (1.0.23) unstable; urgency=low

  * have cvsd-buildroot look in all multiarch subdirectories of /lib for
    NSS libraries (LP: #801675)
  * portability improvement by Eric Schnoebelen
  * switch to dh for debian/rules and bump debhelper compatibility to 8
  * switch to machine-readable debian/copyright format
  * upgrade to standards-version 3.9.2 (no changes needed)
  * update Vietnamese debconf translation to use correct paragraph markers
  * added Italian debconf translation by Beatrice Torracca (closes: #662119)

 -- Arthur de Jong <email address hidden> Sun, 04 Mar 2012 11:00:00 +0100

Changed in cvsd (Ubuntu):
status: New → Fix Released
Revision history for this message
AntoineM (antoine-merle) wrote :

So why not upgrade this package to 1.0.23 (or even 1.0.24) in supported distributions (I use ubuntu 12.04 myself) ...

Revision history for this message
Horacio Hiroiti Sawame (horacio-h) wrote :

Lost 1 day in this issue.

Why it is not corrected in a LTS version !?!?!

Ubuntu Server 12.04.02 LTS
linux kernel 3.2.0-39-generic

Revision history for this message
Horacio Hiroiti Sawame (horacio-h) wrote :

And the repositories ownership are wrong too !

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.