[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Nss-mysql-users] Locking Issues?
From: |
Theo Zourzouvillys |
Subject: |
[Nss-mysql-users] Locking Issues? |
Date: |
Mon, 26 Aug 2002 02:06:32 +0100 |
User-agent: |
KMail/1.4.2 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
mooo,
I've been having some problems recently while having users logging into one of
our shell servers, where I get:
_nss_mysql_passwd_read_db: mysql_query failed: Lost connection to MySQL server
during query
while our main SQL server is under heavy load.
Now i've investigated a bit, and it seemed like it was a lockign issue, where
two threads/processes were makign a query using the same MYSQL *, so I
investigated further, by changing:
#define lockm() \
if (m) { \
pthread_mutex_lock(m); \
_nss_mysql_log(LOG_ERR, "Locked Mutex: %p", m); \
} else _nss_mysql_log(LOG_ERR, "*NOT* Locking Mutex!");
#define unlockm() \
if (m) { \
pthread_mutex_unlock(m); \
_nss_mysql_log(LOG_ERR, "UNLocked Mutex: %p", m); \
} else _nss_mysql_log(LOG_ERR, "*NOT* UnLocking Mutex!");
now running again in simulated situation where the MySQL server is heavily
loaded, and debug enabled, i get...
nss-mysql[10674]: getpwnam called for zozo
nss-mysql[10674]: _nss_mysql_read_conf_file: called for section users
nss-mysql[1352]: getpwnam called for zozo
nss-mysql[1352]: _nss_mysql_read_conf_file: called for section users
nss-mysql[10674]: _nss_mysql_read_conf_file ended for section users
nss-mysql[10674]: _nss_mysql_check_connection called
nss-mysql[10674]: _nss_mysql_check_connection: found a saved MYSQL *
(0x809bc38)
nss-mysql[1352]: _nss_mysql_read_conf_file ended for section users
nss-mysql[1352]: _nss_mysql_check_connection called
nss-mysql[1352]: _nss_mysql_check_connection: found a saved MYSQL *
(0x809bc38)
nss-mysql[10674]: _nss_mysql_check_connection: sucessfully exiting
nss-mysql[1352]: _nss_mysql_check_connection: sucessfully exiting
nss-mysql[10674]: _nss_mysql_passwd_read_db called for user zozo
nss-mysql[1352]: _nss_mysql_passwd_read_db called for user zozo
nss-mysql[10674]: _nss_mysql_passwd_read_db: SQL statement: select
Users.Username,Users.UID,NULL,Users.Name,Users.Shell,Users.Home,Users.GID
from Users where Users.Username='zozo' and Users.UID is not null and '1=1'
order by Users.UID
nss-mysql[1352]: _nss_mysql_passwd_read_db: SQL statement: select
Users.Username,Users.UID,NULL,Users.Name,Users.Shell,Users.Home,Users.GID
from Users where Users.Username='zozo' and Users.UID is not null and '1=1'
order by Users.UID
nss-mysql[10674]: Locked Mutex: 0x4e6b75f0
nss-mysql[1352]: Locked Mutex: 0x4e6b75f0
nss-mysql[10674]: _nss_mysql_passwd_read_db: mysql_query failed: Lost
connection to MySQL server during query
nss-mysql[10674]: UNLocked Mutex: 0x4e6b75f0
sshd[10674]: fatal: login_init_entry: Cannot find user "zozo"
nss-mysql[1352]: _nss_mysql_passwd_read_db: mysql_query failed: Lost
connection to MySQL server during query
nss-mysql[1352]: UNLocked Mutex: 0x4e6b75f0
Now, errr, call me mad, but that should *not* be happening. I've spent all
evening investigating how pthread_mutex_lock could possibly be locking the
same mutex twice, but just can't see it.
any suggestions? or am i chasing in the wrong place? ;)
~ Theo
- --
Theo Zourzouvillys
+ Operations Manager
+ Associated Networks Limited
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQE9aX8Z448CrwpTn6YRArZhAKCz7mm7pNabbDrYbsfMkeMGFLmLKQCaAoZK
lUe+PYmpODf/8Q94EcP0MdE=
=034g
-----END PGP SIGNATURE-----
- [Nss-mysql-users] Locking Issues?,
Theo Zourzouvillys <=