[MacPorts] #64403: [samba4] set_maxfiles: setrlimit for RLIMIT_NOFILE for 16424 files failed with error Invalid argument
MacPorts
noreply at macports.org
Mon Jan 10 03:57:29 UTC 2022
#64403: [samba4] set_maxfiles: setrlimit for RLIMIT_NOFILE for 16424 files failed
with error Invalid argument
-------------------------+--------------------
Reporter: BjarneDMat | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords:
Port: samba4 |
-------------------------+--------------------
Description changed by BjarneDMat:
Old description:
> {{{
> #=> system_profiler SPHardwareDataType SPSoftwareDataType
> Hardware:
> Model Name: Mac mini
> Model Identifier: Macmini2,1
> Processor Name: Intel Core 2 Duo
> Software:
> System Version: Mac OS X 10.6.8 (10K549)
> Kernel Version: Darwin 10.8.0
> }}}
> So, I've got samba4 to compile & install
>
> Now, when I'm trying to run it I get :
> {{{
> #=> smbd --foreground --configfile=/opt/local/etc/samba4/smb.conf
> --interactive
> smbd version 4.15.3 started.
> Copyright Andrew Tridgell and the Samba Team 1992-2021
> INFO: Profiling support unavailable in this build.
> daemon_status: daemon 'smbd' : Starting process ...
> tdbsam_open: Converting version 0.0 database to version 4.0.
> tdbsam_convert_backup: updated
> /opt/local/var/lib/samba/private/secrets.tdb file.
> set_maxfiles: setrlimit for RLIMIT_NOFILE for 16424 files failed with
> error Invalid argument
>
> Terminated
> }}}
> When I search the source for this, I get :
> {{{
> #=> grep -Rn RLIMIT_NOFILE *
> python/samba/netcmd/user.py:2674: maxfd =
> resource.getrlimit(resource.RLIMIT_NOFILE)[1]
> script/autobuild.py:1408: maxfd =
> resource.getrlimit(resource.RLIMIT_NOFILE)[1]
> source3/lib/util.c:1279:#if (defined(HAVE_GETRLIMIT) &&
> defined(RLIMIT_NOFILE))
> source3/lib/util.c:1283: if(getrlimit(RLIMIT_NOFILE, &rlp)) {
> source3/lib/util.c:1284: DEBUG(0,("set_maxfiles: getrlimit
> (1) for RLIMIT_NOFILE failed with error %s\n",
> source3/lib/util.c:1311: if(setrlimit(RLIMIT_NOFILE,
> &rlp)) {
> source3/lib/util.c:1312: DEBUG(3,("set_maxfiles:
> setrlimit for RLIMIT_NOFILE for %d max files failed with error %s\n",
> source3/lib/util.c:1325: if(setrlimit(RLIMIT_NOFILE, &rlp)) {
> source3/lib/util.c:1326: DEBUG(0,("set_maxfiles: setrlimit
> for RLIMIT_NOFILE for %d files failed with error %s\n",
> source3/lib/util.c:1332: if(getrlimit(RLIMIT_NOFILE, &rlp)) {
> source3/lib/util.c:1333: DEBUG(0,("set_maxfiles: getrlimit
> (2) for RLIMIT_NOFILE failed with error %s\n",
> source3/lib/util.c:1348:#else /* !defined(HAVE_GETRLIMIT) ||
> !defined(RLIMIT_NOFILE) */
> source3/param/loadparm.c:301:#if (defined(HAVE_GETRLIMIT) &&
> defined(RLIMIT_NOFILE))
> source3/param/loadparm.c:307: if (getrlimit(RLIMIT_NOFILE, &rl)
> == 0)
> source4/heimdal/lib/roken/getdtablesize.c:71:#if defined(HAVE_GETRLIMIT)
> && defined(RLIMIT_NOFILE)
> source4/heimdal/lib/roken/getdtablesize.c:73: if
> (getrlimit(RLIMIT_NOFILE, &res) == 0)
> }}}
> So, it looks as if it's {{{source3/lib/util.c:1284}}} that's the issue
>
> Any ideas as to how I can fix this ?!?
New description:
{{{
#=> system_profiler SPHardwareDataType SPSoftwareDataType
Hardware:
Model Name: Mac mini
Model Identifier: Macmini2,1
Processor Name: Intel Core 2 Duo
Software:
System Version: Mac OS X 10.6.8 (10K549)
Kernel Version: Darwin 10.8.0
}}}
So, I've got samba4 to compile & install
Now, when I'm trying to run it I get :
{{{
#=> smbd --foreground --configfile=/opt/local/etc/samba4/smb.conf
--interactive
smbd version 4.15.3 started.
Copyright Andrew Tridgell and the Samba Team 1992-2021
INFO: Profiling support unavailable in this build.
daemon_status: daemon 'smbd' : Starting process ...
tdbsam_open: Converting version 0.0 database to version 4.0.
tdbsam_convert_backup: updated
/opt/local/var/lib/samba/private/secrets.tdb file.
set_maxfiles: setrlimit for RLIMIT_NOFILE for 16424 files failed with
error Invalid argument
Terminated
}}}
When I search the source for this, I get :
{{{
#=> grep -Rn RLIMIT_NOFILE *
python/samba/netcmd/user.py:2674: maxfd =
resource.getrlimit(resource.RLIMIT_NOFILE)[1]
script/autobuild.py:1408: maxfd =
resource.getrlimit(resource.RLIMIT_NOFILE)[1]
source3/lib/util.c:1279:#if (defined(HAVE_GETRLIMIT) &&
defined(RLIMIT_NOFILE))
source3/lib/util.c:1283: if(getrlimit(RLIMIT_NOFILE, &rlp)) {
source3/lib/util.c:1284: DEBUG(0,("set_maxfiles: getrlimit
(1) for RLIMIT_NOFILE failed with error %s\n",
source3/lib/util.c:1311: if(setrlimit(RLIMIT_NOFILE, &rlp))
{
source3/lib/util.c:1312: DEBUG(3,("set_maxfiles:
setrlimit for RLIMIT_NOFILE for %d max files failed with error %s\n",
source3/lib/util.c:1325: if(setrlimit(RLIMIT_NOFILE, &rlp)) {
source3/lib/util.c:1326: DEBUG(0,("set_maxfiles: setrlimit
for RLIMIT_NOFILE for %d files failed with error %s\n",
source3/lib/util.c:1332: if(getrlimit(RLIMIT_NOFILE, &rlp)) {
source3/lib/util.c:1333: DEBUG(0,("set_maxfiles: getrlimit
(2) for RLIMIT_NOFILE failed with error %s\n",
source3/lib/util.c:1348:#else /* !defined(HAVE_GETRLIMIT) ||
!defined(RLIMIT_NOFILE) */
source3/param/loadparm.c:301:#if (defined(HAVE_GETRLIMIT) &&
defined(RLIMIT_NOFILE))
source3/param/loadparm.c:307: if (getrlimit(RLIMIT_NOFILE, &rl)
== 0)
source4/heimdal/lib/roken/getdtablesize.c:71:#if defined(HAVE_GETRLIMIT)
&& defined(RLIMIT_NOFILE)
source4/heimdal/lib/roken/getdtablesize.c:73: if
(getrlimit(RLIMIT_NOFILE, &res) == 0)
}}}
So, it looks as if it's {{{source3/lib/util.c:1326}}} that's the issue
Any ideas as to how I can fix this ?!?
--
--
Ticket URL: <https://trac.macports.org/ticket/64403#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list