View previous topic :: View next topic |
Author |
Message |
zark n00b


Joined: 27 Mar 2004 Posts: 74 Location: Belgium
|
Posted: Fri Jul 27, 2018 1:27 pm Post subject: SOLVED : Libnss-mysql crashes with mariab mysql-connector-c |
|
|
Upgrading MariaDB from 10.1.31-r1 to 10.1.34 was a complete disaster.
emerge pulled in mysql-connector-c to replace the now defunct "client-libs" useflag.
all services using mysql segfaulted in libcrypto.so . including libnss . very messy. (took me a while to figure out the culprit, spent hours fiddling with openssl)
(on my system i have libnss, postfix, dovecot, proftpd, that use the mysql connector)
What i did so far that seems "logical" :
removed mysql-connector-c
emerge mariadb-connector-c with "mysqlcompat" useflag.
after emerge, i'm getting a symlink blockage about /usr/include/mysql already existing.
I checked and files in there belong to the mariadb 10.1.34 package.
Nevertheless, i recompile "postfix" , that now works !
i recompile libnss , but it fails in configure .... doesn't find the mysql include dir
So i abandonned and downgraded back to MariaDB 10.1.31 ...
Last edited by zark on Sun Feb 17, 2019 1:28 pm; edited 1 time in total |
|
Back to top |
|
 |
WintermuteX n00b

Joined: 29 Apr 2006 Posts: 48 Location: Germany
|
Posted: Fri Jul 27, 2018 7:33 pm Post subject: |
|
|
I have to agree, the mariadb package is somewhat broken right now. I realized the problem when zoneminder stopped working (segfaulting in the zms cgi module). Another guy had the same issue with zoneminder so this is most likely not an isolated or exotic case ... |
|
Back to top |
|
 |
Hu Moderator

Joined: 06 Mar 2007 Posts: 16671
|
Posted: Sat Jul 28, 2018 12:11 am Post subject: |
|
|
In what function(s) in libcrypto did the crash occur? What caused the crash: bad memory dereference, memory corruption, memory exhaustion, ...? |
|
Back to top |
|
 |
zark n00b


Joined: 27 Mar 2004 Posts: 74 Location: Belgium
|
Posted: Sat Jul 28, 2018 9:06 am Post subject: |
|
|
Code: | [kernel] [421.411356] sshd[16964]: segfault at 0 ip b763dcbc sp bfed7c28 error 6 in libcrypto.so.1.0.0[b757c000+1df000] |
Lucky i took a quick photo
this is a crash due to libNSS accessing the connector, if i disabled "mysql" in nsswitch.conf i could finally ssh back in the box. |
|
Back to top |
|
 |
zark n00b


Joined: 27 Mar 2004 Posts: 74 Location: Belgium
|
Posted: Sun Feb 17, 2019 1:25 pm Post subject: |
|
|
posting here for sake of completion.
After still experimenting breakage with libnss-mysql, i've run an strace on a lookup.
Code: | strace -e read=all -e write=all -x -o trace.out id <username> |
and it appeared libnss-mysql was reading "/root/.mylogin.cnf"
Code: | stat64("/usr/etc/my.cnf", 0xbf804d1c) = -1 ENOENT (No such file or directory)
stat64("/root/.my.cnf", 0xbf804d1c) = -1 ENOENT (No such file or directory)
stat64("/root/.mylogin.cnf", {st_mode=S_IFREG|0600, st_size=136, ...}) = 0
openat(AT_FDCWD, "/root/.mylogin.cnf", O_RDONLY|O_LARGEFILE) = 3 |
and somehow crashed when doing so. (i don't remember doing a mylogin, it might be using the older password crypt).
Removing the file made libnss-mysql work as expected with mysql-connector-c on mariadb, instead of mariadb with client-libs. |
|
Back to top |
|
 |
|