Bug 230713 - net/nss_ldap causes mountd to segfault
Summary: net/nss_ldap causes mountd to segfault
Status: Closed Feedback Timeout
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Walter Schwarzenfeld
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-17 20:07 UTC by Mike
Modified: 2019-08-13 20:11 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (des)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike 2018-08-17 20:07:11 UTC
Changes made on -r477119 cause base mountd to segfault on startup. -r477118 works perfectly
Comment 1 Dag-Erling Smørgrav freebsd_committer 2018-08-21 15:30:51 UTC
Can you describe your configuration?  Do you have a core dump?
Comment 2 Mark Johnston freebsd_committer 2018-08-21 16:15:20 UTC
The nsswitch.conf in particular would be useful.
Comment 3 Mark Johnston freebsd_committer 2018-08-21 16:20:28 UTC
It would also be nice to know which version of FreeBSD this is.
Comment 4 Mike 2018-08-21 18:17:20 UTC
Sorry forgot the obvious!

FBSD 11.2 Stable -r337849

/etc/nsswitch.conf

#additions for ldap
passwd: files ldap [NOTFOUND=return]
group: files ldap [NOTFOUND=return]
services: files ldap [NOTFOUND=return]
networks: ldap [NOTFOUND=return] files
protocols: ldap [NOTFOUND=return] files
rpc: ldap [NOTFOUND=return] files
ethers: ldap [NOTFOUND=return] files
netgroup: ldap [NOTFOUND=return] files

#group: compat
#group_compat: nis
hosts: files dns
#netgroup: compat
#networks: files
#passwd: compat
#passwd_compat: nis
shells: files
#services: compat
#services_compat: nis

I have a core dump but its too large to attatch, 5MB, The bt from gdb is;

#0  0x000000080120d6f7 in _nss_ldap_getnetgrent_r ()
   from /usr/local/lib/nss_ldap.so.1
(gdb) bt
#0  0x000000080120d6f7 in _nss_ldap_getnetgrent_r ()
   from /usr/local/lib/nss_ldap.so.1
#1  0x00000008012160ac in ?? () from /usr/local/lib/nss_ldap.so.1
#2  0x00007fffffffdcb8 in ?? ()
#3  0x0000000801215fa0 in ?? () from /usr/local/lib/nss_ldap.so.1
#4  0x0000000801031380 in ?? ()
#5  0x0000000000000000 in ?? ()

Configuration is pretty standard, with locally running openldap server and exports nfsv3+4 as well as samba. I have a hunch due to the error messages that Samba also failed but didnt not investigate further when I found out that it was related to nss_ldap. I reverted to the previous version and rebuilt as I needed to get the box back up again.
Comment 5 Dag-Erling Smørgrav freebsd_committer 2018-08-22 16:06:37 UTC
That is a very strange configuration.  There is no reason to want to override the default settings for the services, networks, protocols, rpc or ethers databases.  All you need is passwd, group and netgroup.  Also, [notfound=return] at the end of a line is a no-op.  You should simply use this:

  group: files ldap
  hosts: files dns
  netgroup: files ldap
  networks: files
  passwd: files ldap
  shells: files
  services: compat
  services_compat: nis
  protocols: files
  rpc: files
Comment 6 Dag-Erling Smørgrav freebsd_committer 2018-08-22 16:28:32 UTC
A further note: the commit in question added support for the netgroup database, so simply commenting out the netgroup line in /etc/nsswitch.conf, or switching it to “files” only, should resolve the issue with no loss of functionality.
Comment 7 Dag-Erling Smørgrav freebsd_committer 2018-08-30 13:40:37 UTC
Have you tried any of the suggestions above?
Comment 8 Walter Schwarzenfeld freebsd_triage 2019-08-13 20:11:44 UTC
Just a year no reply from reporter. I close with feedback timeout.