Re: [Samba] Re: Samba segs when serving files from a windows partition on OpenBSD-4.2
On Tue, 13 May 2008, Jeremy Allison wrote: On Tue, May 13, 2008 at 05:56:56PM +0100, Stephen Borrill wrote: As a data point, I'm getting crashes on NetBSD 3.1 and samba 3.0.28a on a FFSv2 partition. Removing the lib/replace/repdir_getdirentries.c gets it working (even without directory name cache size = 0). I'm not sure of the canonical way to remove it, the patch at https://bugzilla.samba.org/attachment.cgi?id=2905 does not work, nor does removing repdir.m4 entirely. I ended up editing source/Makefile and removing the .o files from LIBREPLACE_OBJ. We'll remove lib/replace/repdir_getdirentries.c for 3.0.29 and 3.2 final. Thanks. Great. Have you a canonical patch for 3.0.28a and I'll commit it to pkgsrc? -- Stephen -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] Re: Samba segs when serving files from a windows partition on OpenBSD-4.2
On Tue, Apr 29, Jeremy Allison wrote: On Mon, Apr 28, 2008 at 09:05:29PM +0100, Edd Barrett wrote: I am sure that the OpenBSD team will be interested in fixing these bugs if they still exist, as they take pride making good quality code. I can't speak for NetBSD or FreeBSD. As for the directory name cache size = 0 it does not work for me. On OpenBSD. I used this configuration: [global] workgroup = MYGROUP server string = Samba Server security = share log file = /var/log/smbd.%m directory name cache size = 0 [public] comment = Public Stuff path = /mnt/hot/sd0i public = yes writable = yes printable = no I tested this with samba-latest.tgz from your web-page. If I change the path to someplace else on a UFS slice, all is well. Did you remove the lib/replace/repdir_getdirentries.c code as well ? The aborts will still trigger even with directory name cache size = 0 if that code is in place. As a data point, I'm getting crashes on NetBSD 3.1 and samba 3.0.28a on a FFSv2 partition. Removing the lib/replace/repdir_getdirentries.c gets it working (even without directory name cache size = 0). I'm not sure of the canonical way to remove it, the patch at https://bugzilla.samba.org/attachment.cgi?id=2905 does not work, nor does removing repdir.m4 entirely. I ended up editing source/Makefile and removing the .o files from LIBREPLACE_OBJ. I note the changes in OpenBSD and NetBSD to fix the seekdir() problem, but they didn't seem to help me. -- Dr. Stephen Borrill -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Possible Samba Memory Leak
On Thu, 3 Nov 2005, Jeremy Allison wrote: Here is the last one just before the machine ran out of swap (this process had around 116MB allocated, IIRC). None of these numbers are that big (and if the numbers are in bytes surely they are negligable). The thing that is changing over time is the number of passdb internal SAM_ACCOUNT allocation entries. This machine is running security=user with passdb backend=tdbsam. Ok, looks like a passdb leak (I hate that interface :-). What version exactly are you running again ? Where did you get the source code ? I want to do a diff against the latest SAMBA_3_0 SVN to see if we've already fixed it and can give you the patch. Further to my previous reply, 3.0.20b seems to exhibit the same behaviour as 3.0.14. Thanks for following up on this, I've been busy with other things but this is still on my list to look at. Can you post me the smbcontrol pool detail output from 3.0.20b (as this is a much more modern code base than 3.0.14a) and tell me exactly what you're doing to reproduce the leak ? Hmm. smbcontrol pid pool-usage just returns 0 with 3.0.20b here, so that's not a lot of use. The clients are Windows 2000 machines running in a workgroup. The samba server is running security=user with passdb backend=tdbsam. There is no domain running. The clients are mapping a drive and then just using it throughout the day. They are run a DOS-based FoxPro database (AIUI) from the mapped drive. -- Stephen -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Possible Samba Memory Leak
On Mon, 31 Oct 2005, Jeremy Allison wrote: On Mon, Oct 31, 2005 at 05:12:52PM +, Stephen Borrill wrote: Here is the last one just before the machine ran out of swap (this process had around 116MB allocated, IIRC). None of these numbers are that big (and if the numbers are in bytes surely they are negligable). The thing that is changing over time is the number of passdb internal SAM_ACCOUNT allocation entries. This machine is running security=user with passdb backend=tdbsam. Ok, looks like a passdb leak (I hate that interface :-). What version exactly are you running again ? Where did you get the source code ? I want to do a diff against the latest SAMBA_3_0 SVN to see if we've already fixed it and can give you the patch. Further to my previous reply, 3.0.20b seems to exhibit the same behaviour as 3.0.14. -- Stephen -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Possible Samba Memory Leak
On Wed, 26 Oct 2005, Jeremy Allison wrote: We have a similar problem at one site using a Fox Pro database. The sizes of the smbd processes continually increases until the server runs out of swap (3.0.14). We've mitigated this a little by getting them to all log off overnight and also restarting samba at 8am, but by mid-afternoon the problem usually re-occurs. The processes get up to 200MB or so if left unchecked. We've been running with stat cache = no for a while which has made no difference. The DBF files being used by the database (it uses some nasty file locking to spoof up a multi-user db) are up to around 90MB in size. I cannot be certain, but I believe this problem has only recently started happening (perhaps with an upgrade from 3.0.10 to 3.0.14?). Is there anything I can tweak? As it's growing can you try doing smbcontrol pid pool-usage to get smbd to dump out it's talloc pools. Keep doing it, if one of them grows this may be a clue. First thing this morning: Mon Oct 31 09:30:01 GMT 2005 global talloc allocations in pid: 29272 name chunksbytes msg_pool_usage 1 159 connection_struct 1 1844 connection_struct 1 1844 passdb internal SAM_ACCOUNT allocation 19 484 passdb internal SAM_ACCOUNT allocation 19 500 connection_struct 1 1844 connection_struct 1 1844 connection_struct 1 1844 passdb internal SAM_ACCOUNT allocation 19 489 pdb_context internal allocation context 5 446 passdb internal SAM_ACCOUNT allocation 8 397 TOTAL 7611695 Here is the last one just before the machine ran out of swap (this process had around 116MB allocated, IIRC). None of these numbers are that big (and if the numbers are in bytes surely they are negligable). The thing that is changing over time is the number of passdb internal SAM_ACCOUNT allocation entries. This machine is running security=user with passdb backend=tdbsam. global talloc allocations in pid: 29272 name chunksbytes msg_pool_usage 1 159 connection_struct 1 1844 passdb internal SAM_ACCOUNT allocation 19 484 passdb internal SAM_ACCOUNT allocation 1 344 passdb internal SAM_ACCOUNT allocation 1 344 passdb internal SAM_ACCOUNT allocation 1 344 passdb internal SAM_ACCOUNT allocation 1 344 passdb internal SAM_ACCOUNT allocation 1 344 passdb internal SAM_ACCOUNT allocation 1 344 passdb internal SAM_ACCOUNT allocation 1 344 passdb internal SAM_ACCOUNT allocation 1 344 passdb internal SAM_ACCOUNT allocation 1 344 passdb internal SAM_ACCOUNT allocation 1 344 passdb internal SAM_ACCOUNT allocation 1 344 Printer Entry [0xbfbff344] 5 468 passdb internal SAM_ACCOUNT allocation 1 344 passdb internal SAM_ACCOUNT allocation 1 344 passdb internal SAM_ACCOUNT allocation 1 344 passdb internal SAM_ACCOUNT allocation 1 344 passdb internal SAM_ACCOUNT allocation 1 344 passdb internal SAM_ACCOUNT allocation 1 344 passdb internal SAM_ACCOUNT allocation 1 344 passdb internal SAM_ACCOUNT allocation 1 344 passdb internal SAM_ACCOUNT allocation 1 344 passdb internal SAM_ACCOUNT allocation 1 344 passdb internal SAM_ACCOUNT allocation 1 344 passdb internal SAM_ACCOUNT allocation 1 344 passdb internal SAM_ACCOUNT allocation 1 344 passdb internal SAM_ACCOUNT allocation 1 344 passdb internal SAM_ACCOUNT allocation 1 344 passdb internal SAM_ACCOUNT allocation 1 344 passdb internal SAM_ACCOUNT allocation 1 344 passdb internal SAM_ACCOUNT allocation 1 344 passdb internal SAM_ACCOUNT allocation 1 344 passdb internal SAM_ACCOUNT allocation 1 344 passdb internal SAM_ACCOUNT allocation 1 344 passdb internal SAM_ACCOUNT allocation 1 344 passdb internal SAM_ACCOUNT allocation 1 344 passdb internal SAM_ACCOUNT allocation 1 344 passdb internal SAM_ACCOUNT allocation 1 344 passdb internal SAM_ACCOUNT allocation 1 344 passdb internal SAM_ACCOUNT allocation 1 344 passdb internal SAM_ACCOUNT
Re: [Samba] Possible Samba Memory Leak
On Mon, 31 Oct 2005, Jeremy Allison wrote: On Mon, Oct 31, 2005 at 05:12:52PM +, Stephen Borrill wrote: Here is the last one just before the machine ran out of swap (this process had around 116MB allocated, IIRC). None of these numbers are that big (and if the numbers are in bytes surely they are negligable). The thing that is changing over time is the number of passdb internal SAM_ACCOUNT allocation entries. This machine is running security=user with passdb backend=tdbsam. Ok, looks like a passdb leak (I hate that interface :-). What version exactly are you running again? It was 3.0.14. I've just installed 3.0.20b. We aren't seeing this at any other customers' sites, but most are using security = domain against W2k or W2k3. The others are probably running as a PDC. Where did you get the source code ? I'm using NetBSD, but pkgsrc is lagging a bit. Both the releases have been based on pkgsrc, but manually upgraded to the latest version. The source is from ftp://ftp.samba.org/pub/samba/old-versions/ I want to do a diff against the latest SAMBA_3_0 SVN to see if we've already fixed it and can give you the patch. Great. Thanks for the help, And thanks for yours! -- Stephen -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Possible Samba Memory Leak
On Mon, 4 Jul 2005, Jeremy Allison wrote: On Wed, Jun 29, 2005 at 08:19:18AM -0400, Anthony Russello wrote: Hi Jeremy, The same issue occurs when running samba 3.0.14a fresh from samba.org. As you're doing this on an embedded system as I recall you might want to cut down on the stat cache (which can grow unlimited on normal systems). To turn it off set : stat cache = False To limit the size set : max stat cache size = XX (where XX is in 1k units). We have a similar problem at one site using a Fox Pro database. The sizes of the smbd processes continually increases until the server runs out of swap (3.0.14). We've mitigated this a little by getting them to all log off overnight and also restarting samba at 8am, but by mid-afternoon the problem usually re-occurs. The processes get up to 200MB or so if left unchecked. We've been running with stat cache = no for a while which has made no difference. The DBF files being used by the database (it uses some nasty file locking to spoof up a multi-user db) are up to around 90MB in size. I cannot be certain, but I believe this problem has only recently started happening (perhaps with an upgrade from 3.0.10 to 3.0.14?). Is there anything I can tweak? -- Stephen -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] Administrator-root mapping not working on 3.0.10 (3.0.7 fine)
We are using samba 3 on NetBSD with security=domain authenticating against Windows 2003. We have a username map of root = administrator. In all previous versions of samba tested (2.2.x and 3.0.x), this means when we log on as administrator, we have root access and see the root share. With 3.0.10, we are continually prompted for a password. Log from 3.0.7 below: [2005/01/06 14:25:58, 4] /usr/pkgsrc/net/samba/work/samba-3.0.7/source/lib/username.c:map_username(132) Scanning username map /usr/pkg/etc/samba/smbusers [2005/01/06 14:25:58, 3] /usr/pkgsrc/net/samba/work/samba-3.0.7/source/lib/username.c:map_username(173) Mapped user Administrator to root [2005/01/06 14:25:58, 3] /usr/pkgsrc/net/samba/work/samba-3.0.7/source/auth/auth.c:check_ntlm_password(219) check_ntlm_password: Checking password for unmapped user [EMAIL PROTECTED] with the new password interface [2005/01/06 14:25:58, 3] /usr/pkgsrc/net/samba/work/samba-3.0.7/source/auth/auth.c:check_ntlm_password(222) check_ntlm_password: mapped user is: [EMAIL PROTECTED] [2005/01/06 14:25:58, 3] /usr/pkgsrc/net/samba/work/samba-3.0.7/source/auth/auth.c:check_ntlm_password(268) check_ntlm_password: winbind authentication for user [Administrator] succeeded [2005/01/06 14:25:58, 2] /usr/pkgsrc/net/samba/work/samba-3.0.7/source/auth/auth.c:check_ntlm_password(305) check_ntlm_password: authentication for user [Administrator] - [root] - [root] succeeded Log from 3.0.10 below: [2005/01/06 14:30:27, 4] /usr/pkgsrc/net/samba/work/samba-3.0.10/source/lib/username.c:map_username(132) Scanning username map /usr/pkg/etc/samba/smbusers [2005/01/06 14:30:27, 3] /usr/pkgsrc/net/samba/work/samba-3.0.10/source/lib/username.c:map_username(173) Mapped user Administrator to root [2005/01/06 14:30:27, 3] /usr/pkgsrc/net/samba/work/samba-3.0.10/source/auth/auth.c:check_ntlm_password(219) check_ntlm_password: Checking password for unmapped user [EMAIL PROTECTED] with the new password interface [2005/01/06 14:30:27, 3] /usr/pkgsrc/net/samba/work/samba-3.0.10/source/auth/auth.c:check_ntlm_password(222) check_ntlm_password: mapped user is: [EMAIL PROTECTED] [2005/01/06 14:30:27, 4] /usr/pkgsrc/net/samba/work/samba-3.0.10/source/lib/username.c:map_username(132) Scanning username map /usr/pkg/etc/samba/smbusers [2005/01/06 14:30:27, 3] /usr/pkgsrc/net/samba/work/samba-3.0.10/source/auth/auth_util.c:make_server_info_info3(1127) User root does not exist, trying to add it [2005/01/06 14:30:27, 0] /usr/pkgsrc/net/samba/work/samba-3.0.10/source/auth/auth_util.c:make_server_info_info3(1134) make_server_info_info3: pdb_init_sam failed! [2005/01/06 14:30:27, 2] /usr/pkgsrc/net/samba/work/samba-3.0.10/source/auth/auth.c:check_ntlm_password(312) check_ntlm_password: Authentication for user [Administrator] - [root] FAILED with error NT_STATUS_NO_SUCH_USER [2005/01/06 14:30:27, 3] /usr/pkgsrc/net/samba/work/samba-3.0.10/source/smbd/process.c:timeout_processing(1336) timeout_processing: End of file from client (client has disconnected). [2005/01/06 14:30:27, 3] /usr/pkgsrc/net/samba/work/samba-3.0.10/source/smbd/connection.c:yield_connection(69) Yielding connection to [2005/01/06 14:30:27, 3] /usr/pkgsrc/net/samba/work/samba-3.0.10/source/smbd/connection.c:yield_connection(76) yield_connection: tdb_delete for name failed with error Record does not exist. Any help appreciated. -- Stephen -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Administrator-root mapping not working on 3.0.10 (3.0.7 fine)
On Thu, 6 Jan 2005, Gerald (Jerry) Carter wrote: Stephen Borrill wrote: | We are using samba 3 on NetBSD with security=domain | authenticating against Windows 2003. We have a username map | of root = administrator. In all previous versions of | samba tested (2.2.x and 3.0.x), this means when we log on | as administrator, we have root access and see the root | share. With 3.0.10, we are continually prompted for a | password. ~From the 3.0.8 release notes (WHATSNEW.txt): [snip] Change in Username Map - -- Previous Samba releases would only support reading the fully qualified username (e.g. DOMAIN\user) from the username map when performing a kerberos login from a client. However, when looking up a map entry for a user authenticated by NTLM[SSP], only the login name would be used for matches. This resulted in inconsistent behavior sometimes even on the same server. Samba 3.0.8 obeys the following rules when applying the username map functionality: ~ * When performing local authentication, the username map is ~applied to the login name before attempting to authenticate ~the connection. ~ * When relying upon a external domain controller for validating ~authentication requests, smbd will apply the username map ~to the fully qualified username (i.e. DOMAIN\user) only ~after the user has been successfully authenticated. I'd followed that discussion, but I guess I hadn't quite followed the ramifcations! A username map of root=DOMAIN\Administrator works fine. Thanks a lot, -- Stephen -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] samba 3.0.7 and w2k terminal service
On Mon, 25 Oct 2004, nick wrote: any one familyar with samba and w2k terminal services?? Yes, I've been using them together for some years (NT4 TSE before W2K). However, as you'll see from the mailing list archives this month, I've been having problems now I've moved to 3.0.7 from 2.2.8 as drives are failing to be mapped. There have been no replies to my questions though. -- Stephen -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
[Samba] Home drives not being mounted. Samba 3.0.7 vs W2k TS. More.
Further to my email the other day (to which I've not had any response): http://lists.samba.org/archive/samba/2004-October/094713.html As a recap, when users log onto a Terminal Server, they connect to their home areas on Samba 3.0.7 (security=domain) with the Terminal Server running as a PDC. When a number of users log on at around the same time, in many cases the drives are not being mapped and Samba is giving the error NT_STATUS_NO_LOGON_SERVERS. I was musing whether it is a Terminal Services specific issue. Namely, the MultipleUsersOnConnection option being missing in W2K ( http://support.microsoft.com/?kbid=818528 ) and so one smbd process being overloaded by simultaneous connections. The fix referred to in the KB article is not available from Microsoft for free. -- Stephen -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
[Samba] Home drives not being mounted. Samba 3.0.7 vs W2k TS
At a number of sites we are using Windows 2000 Server SP4 (APPSERVER) as a Terminal Server and a PDC. All user areas are stored on a NetBSD 1.6.2 server with Samba 3.0.7 using security = domain and a named password server. We've joined the domain from the Samba box (domain DOMAINNAME). In general everything works fine, but when a number of clients log on at around the same time (say 25 users at once), a fair proportion do not map their home drive. Doing a net use U: /home at a later time generally, but not always, maps it. It happens occasionally with 2.2.8, but we are getting feedback that 3.0.7 is much worse. An extract of a log at the time of failure: [2004/10/14 09:28:21, 5] /usr/pkgsrc/net/samba/work/samba-3.0.7/source/auth/auth.c:make_auth_context_subsystem(467) Making default auth method list for security=domain [2004/10/14 09:28:21, 5] /usr/pkgsrc/net/samba/work/samba-3.0.7/source/auth/auth.c:load_auth_module(384) load_auth_module: Attempting to find an auth method to match guest [2004/10/14 09:28:21, 5] /usr/pkgsrc/net/samba/work/samba-3.0.7/source/auth/auth.c:load_auth_module(409) load_auth_module: auth method guest has a valid init [2004/10/14 09:28:21, 5] /usr/pkgsrc/net/samba/work/samba-3.0.7/source/auth/auth.c:load_auth_module(384) load_auth_module: Attempting to find an auth method to match sam [2004/10/14 09:28:21, 5] /usr/pkgsrc/net/samba/work/samba-3.0.7/source/auth/auth.c:load_auth_module(409) load_auth_module: auth method sam has a valid init [2004/10/14 09:28:21, 5] /usr/pkgsrc/net/samba/work/samba-3.0.7/source/auth/auth.c:load_auth_module(384) load_auth_module: Attempting to find an auth method to match winbind:ntdomain [2004/10/14 09:28:21, 5] /usr/pkgsrc/net/samba/work/samba-3.0.7/source/auth/auth.c:load_auth_module(384) load_auth_module: Attempting to find an auth method to match ntdomain [2004/10/14 09:28:21, 5] /usr/pkgsrc/net/samba/work/samba-3.0.7/source/auth/auth.c:load_auth_module(409) load_auth_module: auth method ntdomain has a valid init [2004/10/14 09:28:21, 5] /usr/pkgsrc/net/samba/work/samba-3.0.7/source/auth/auth.c:load_auth_module(409) load_auth_module: auth method winbind has a valid init [2004/10/14 09:28:21, 5] /usr/pkgsrc/net/samba/work/samba-3.0.7/source/auth/auth.c:get_ntlm_challenge(95) auth_get_challenge: module guest did not want to specify a challenge [2004/10/14 09:28:21, 5] /usr/pkgsrc/net/samba/work/samba-3.0.7/source/auth/auth.c:get_ntlm_challenge(95) auth_get_challenge: module sam did not want to specify a challenge [2004/10/14 09:28:21, 5] /usr/pkgsrc/net/samba/work/samba-3.0.7/source/auth/auth.c:get_ntlm_challenge(95) auth_get_challenge: module winbind did not want to specify a challenge [2004/10/14 09:28:21, 5] /usr/pkgsrc/net/samba/work/samba-3.0.7/source/auth/auth.c:get_ntlm_challenge(135) auth_context challenge created by random [2004/10/14 09:28:21, 5] /usr/pkgsrc/net/samba/work/samba-3.0.7/source/auth/auth.c:get_ntlm_challenge(136) challenge is: [2004/10/14 09:28:21, 5] /usr/pkgsrc/net/samba/work/samba-3.0.7/source/lib/util.c:dump_data(1835) [000] 69 C6 F2 30 FD DD 53 29 i..0..S) [2004/10/14 09:28:21, 5] /usr/pkgsrc/net/samba/work/samba-3.0.7/source/auth/auth_util.c:make_user_info_for_reply(403) make_user_info_for_reply: User passwords not in encrypted format. [2004/10/14 09:28:21, 4] /usr/pkgsrc/net/samba/work/samba-3.0.7/source/lib/username.c:map_username(132) Scanning username map /usr/pkg/etc/samba/smbusers [2004/10/14 09:28:21, 10] /usr/pkgsrc/net/samba/work/samba-3.0.7/source/lib/username.c:user_in_list(529) user_in_list: checking user 00bblues in list [2004/10/14 09:28:21, 10] /usr/pkgsrc/net/samba/work/samba-3.0.7/source/lib/username.c:user_in_list(533) user_in_list: checking user |00bblues| against |administrator| [2004/10/14 09:28:21, 5] /usr/pkgsrc/net/samba/work/samba-3.0.7/source/auth/auth_util.c:make_user_info_map(225) make_user_info_map: Mapping user []\[00bblues] from workstation [nc91] [2004/10/14 09:28:21, 10] /usr/pkgsrc/net/samba/work/samba-3.0.7/source/lib/gencache.c:gencache_get(264) Returning valid cache entry: key = TDOMCACHE/TIMESTAMP, value = 0, timeout = Thu Oct 14 09:37:47 2004 [2004/10/14 09:28:21, 10] /usr/pkgsrc/net/samba/work/samba-3.0.7/source/lib/gencache.c:gencache_set(127) Adding cache entry with key = TDOMCACHE/TIMESTAMP; value = 0 and timeout = Thu Oct 14 09:38:21 2004 (600 seconds ahead) [2004/10/14 09:28:21, 4] /usr/pkgsrc/net/samba/work/samba-3.0.7/source/passdb/secrets.c:secrets_fetch_trust_account_password(290) Using cleartext machine password [2004/10/14 09:28:21, 8] /usr/pkgsrc/net/samba/work/samba-3.0.7/source/libsmb/namequery.c:get_sorted_dc_list(1416) get_sorted_dc_list: attempting lookup using [lmhosts wins host bcast] [2004/10/14 09:28:21, 10] /usr/pkgsrc/net/samba/work/samba-3.0.7/source/libsmb/namequery.c:internal_resolve_name(1010) internal_resolve_name: looking up APPSERVER#20