Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
SOLVED : Libnss-mysql crashes with mariab mysql-connector-c
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
zark
n00b
n00b


Joined: 27 Mar 2004
Posts: 74
Location: Belgium

PostPosted: Fri Jul 27, 2018 1:27 pm    Post subject: SOLVED : Libnss-mysql crashes with mariab mysql-connector-c Reply with quote

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
View user's profile Send private message
WintermuteX
n00b
n00b


Joined: 29 Apr 2006
Posts: 48
Location: Germany

PostPosted: Fri Jul 27, 2018 7:33 pm    Post subject: Reply with quote

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
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 16671

PostPosted: Sat Jul 28, 2018 12:11 am    Post subject: Reply with quote

In what function(s) in libcrypto did the crash occur? What caused the crash: bad memory dereference, memory corruption, memory exhaustion, ...?
Back to top
View user's profile Send private message
zark
n00b
n00b


Joined: 27 Mar 2004
Posts: 74
Location: Belgium

PostPosted: Sat Jul 28, 2018 9:06 am    Post subject: Reply with quote

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
View user's profile Send private message
zark
n00b
n00b


Joined: 27 Mar 2004
Posts: 74
Location: Belgium

PostPosted: Sun Feb 17, 2019 1:25 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum