edquota crashes when used with libnss-db

Bug #761463 reported by Ballock
28
This bug affects 4 people
Affects Status Importance Assigned to Milestone
quota (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: libnss-db

Hello,

This is from Ubuntu Lucid, libnss-db 2.2.3pre1-3.1ubuntu4.

I am using nss-updatedb to get user information from LDAP and I am using nsswitch.conf with the 'db' backend. Everything was fine until I tried to setup quota on one of the machines. edquota segfaults. I changed the backend to 'ldap', and this worked so this showed that the problem is in libnss-db.

LD_PRELOAD=/lib/libpthread.so.0 gdb --args edquota -f /home -u bt
GNU gdb (GDB) 7.1-ubuntu
[...]
(gdb) run
Starting program: /usr/sbin/edquota -f /home -u bt
[Thread debugging using libthread_db enabled]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff81ff8f0 in dirname ()
(gdb) bt
#0 0x00007ffff81ff8f0 in dirname ()
#1 0x00007ffff741b893 in ?? () from /usr/lib/libnss_db.so.2
#2 0x00007ffff741a21a in ?? () from /usr/lib/libnss_db.so.2
#3 0x00007ffff741a59b in _nss_db_getpwnam_r () from /usr/lib/libnss_db.so.2
#4 0x00007ffff78d449d in getpwnam_r () from /lib/libc.so.6
#5 0x00007ffff78d3e80 in getpwnam () from /lib/libc.so.6
#6 0x00007ffff7ff4fec in ?? ()
#7 0x00007ffff7ff0a4c in main ()

This was not very communicative, so I recompiled the package without dh_strip, and tried the same:
LD_PRELOAD=/lib/libpthread.so.0 gdb --args edquota -f /home -u bt
[...]
(gdb) run
Starting program: /usr/sbin/edquota -f /home -u bt
[Thread debugging using libthread_db enabled]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff81ff8f0 in dirname ()
(gdb) bt
#0 0x00007ffff81ff8f0 in dirname ()
#1 0x00007ffff741b893 in internal_setent (
    file=0x7ffff741ba87 "/var/lib/misc/passwd.db", dbp=0x7ffff761d290,
    dbenvp=0x7ffff761d288) at db-open.c:66
#2 0x00007ffff741a21a in lookup (key=0x7fffffffe4a0, result=0x7ffff7baace0,
    buffer=0x7ffff820a000, buflen=1024, errnop=0x7ffff7fd06a8) at db-XXX.c:116
#3 0x00007ffff741a59b in _nss_db_getpwnam_r (name=0x7fffffffe972 "bt",
    result=0x7ffff7baace0, buffer=0x7ffff820a000 "qatools", buflen=1024,
    errnop=0x7ffff7fd06a8) at files-pwd.c:33
#4 0x00007ffff78d449d in getpwnam_r () from /lib/libc.so.6
#5 0x00007ffff78d3e80 in getpwnam () from /lib/libc.so.6
#6 0x00007ffff7ff4fec in ?? ()
#7 0x00007ffff7ff0a4c in main ()

Well, I am no developer, so I don't give a clue about why this fails.

Could somebody please fix it?

Best regards,
Boleslaw Tokarski

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

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in libnss-db (Ubuntu):
status: New → Confirmed
Revision history for this message
jablko (ms419) wrote :

I think that this is the same bug described here:

  * https://bugzilla.redhat.com/show_bug.cgi?id=703567
  * http://sourceforge.net/tracker/index.php?func=detail&aid=3300978&group_id=18136&atid=118136

Apparently a fix was committed upstream in version 4.00_pre2, so I guess this bug is fixed in Ubuntu release 12.04 and higher

http://lists.fedoraproject.org/pipermail/scm-commits/2011-May/604785.html

affects: libnss-db (Ubuntu) → quota (Ubuntu)
Revision history for this message
Ballock (ballock) wrote :

Hello, jabłko,

Thanks for the details. The problem was found on our Lucid build-servers, so this is still a problem there.

However, knowing that the problem is fixed in some particular version lets us backport the particular package.

I am not sure if anyone will bother with backporting the fix to lucid?

Cheers,
Ballock

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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