Package: libnss-pgsql1
Version: 1.3
Severity: important

When our PostgreSQL server is not available, commands like 'id root'
hang. The only output is "Could not connect to database". Unfortunately,
libnss-pgsql1 doesn't terminate after that but hangs.

We tried to debug the problem a little but just

'id root' calls _nss_pgsql_setgrent() trying to open the database
connection (with open_backend()), which fails. After that it still tries
_nss_pgsql_getgrent_r() which detects that the backend is not open and
tries to open it (just in case). For this it calls
_nss_pgsql_setgrent().

Since _nss_pgsql_getgrent_r() acquires a lock and _nss_pgsql_setgrent()
tries to acquire the same lock it ends in a deadlock - it hangs.

Shouldn't nss have noticed after the first call of _nss_pgsql_setgrent()
that the database is unavailable?

Any help is much appreciated. If you need some more debug info don't
hesitate to ask.

Yours
  Micha

-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.6.10-1-386
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15)

Versions of packages libnss-pgsql1 depends on:
ii  libc6                      2.3.2.ds1-22  GNU C Library: Shared libraries an
ii  libpq3                     7.4.7-6sarge1 PostgreSQL C client library

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to