Samba4: LDB size limit and memory leak

Marcel Ritter Marcel.Ritter at rrze.uni-erlangen.de
Mon May 25 06:30:59 GMT 2009


Hi,

I'm running several samba 4 tests at the moment and I found two things,
that may need some attention:

1. LDB size seems to be limited to 4GB (both on i586 and x86_64). I tried
    to create a lot of new users using setup/newuser and somewhere in
between
    20000 and 40000 users, setup/newuser crashes:
  
ltdb: tdb(/var/lib/samba/private/users.ldb):
tdb_transaction_setup_recovery: transaction data over new region boundary
ltdb: tdb(/var/lib/samba/private/users.ldb):
tdb_transaction_prepare_commit: failed to setup recovery data
ltdb: tdb(/var/lib/samba/private/sam.ldb): tdb_transaction_cancel: no
transaction
commit called but no ldb transactions are active!Traceback (most recent
call last):
  File "/usr/share/samba/setup/newuser", line 60, in <module>
    samdb.newuser(username, opts.unixname, password)
  File "/usr/lib/python2.6/site-packages/samba/samdb.py", line 153, in
newuser
    self.transaction_commit()
_ldb.LdbError: (1, 'ldb transaction commit: Operations error (1)')

   The resulting filesize of users.ldb is exactly 4GB + 4096 bytes
(4294971392 bytes)

2. As mentioned above I used setup/newuser to create the samba4 users. To
    speed things up a little I tried to modify newuser to internally
loop over
    function "samdb.newuser(username, opts.unixname, password)".
    However the amount of memory needed increases dramatically when using
    this version (and finally the python process dies when out of memory).
    I also tried to loop over a "less demanding" function like
"samdb.domain_dn()"
    with the same effect on memory consumption.
    Looks like a memory leak to me.

Bye,
    Marcel

-- 
Dipl.-Inf. Marcel Ritter
----
Unix _IS_ user friendly... It's just selective about who its friends are.




More information about the samba-technical mailing list