[Samba] Smbd hanging

Matt Lung matt.lung at midwest-tool.com
Mon Apr 3 10:48:04 GMT 2006


Niranjan,

I had another crash on 03/31/2006.  I submitted a bug request per Jeremy 
Allisons' request of a few days ago.  It is bug # 3636.  As of yet I 
don't think it's been looked at.  Hopefully someone can help with this 
problem.  I know there have been more posts about this lately so maybe 
it will not get ignored this time around.  Keep sending updates and 
keeping us up to date.  I'll do the same. 

Matt

mallapadi niranjan wrote:
> Hi all
>
> The following is the backtrace when the samba hanged .
> samba version 3.0.21c there were about 168 process and samba was unable to
> take
> any new connection
> ###############################################################
> (gdb) attach 2955
> Attaching to process 2955
> Reading symbols from /usr/local/samba3c3/sbin/smbd...done.
> Using host libthread_db library "/lib/tls/libthread_db.so.1".
> Loaded symbols for /usr/local/samba3c3/sbin/smbd
> Reading symbols from /usr/lib/libldap-2.2.so.7...done.
> Loaded symbols for /usr/lib/libldap-2.2.so.7
> Reading symbols from /usr/lib/liblber-2.2.so.7...done.
> Loaded symbols for /usr/lib/liblber-2.2.so.7
> Reading symbols from /usr/lib/libgssapi_krb5.so.2...done.
> Loaded symbols for /usr/lib/libgssapi_krb5.so.2
> Reading symbols from /usr/lib/libkrb5.so.3...done.
> Loaded symbols for /usr/lib/libkrb5.so.3
> Reading symbols from /usr/lib/libk5crypto.so.3...done.
> Loaded symbols for /usr/lib/libk5crypto.so.3
> Reading symbols from /lib/libcom_err.so.2...done.
> Loaded symbols for /lib/libcom_err.so.2
> Reading symbols from /lib/libresolv.so.2...done.
> Loaded symbols for /lib/libresolv.so.2
> Reading symbols from /usr/lib/libcups.so.2...done.
> Loaded symbols for /usr/lib/libcups.so.2
> Reading symbols from /lib/libssl.so.4...done.
> Loaded symbols for /lib/libssl.so.4
> Reading symbols from /lib/libcrypto.so.4...done.
> Loaded symbols for /lib/libcrypto.so.4
> Reading symbols from /lib/libnsl.so.1...done.
> Loaded symbols for /lib/libnsl.so.1
> Reading symbols from /lib/libcrypt.so.1...done.
> Loaded symbols for /lib/libcrypt.so.1
> Reading symbols from /lib/libpam.so.0...done.
> Loaded symbols for /lib/libpam.so.0
> Reading symbols from /lib/libattr.so.1...done.
> Loaded symbols for /lib/libattr.so.1
> Reading symbols from /lib/libacl.so.1...done.
> Loaded symbols for /lib/libacl.so.1
> Reading symbols from /lib/libdl.so.2...done.
> Loaded symbols for /lib/libdl.so.2
> Reading symbols from /lib/tls/librt.so.1...done.
> Loaded symbols for /lib/tls/librt.so.1
> Reading symbols from /usr/lib/libpopt.so.0...done.
> Loaded symbols for /usr/lib/libpopt.so.0
> Reading symbols from /lib/tls/libc.so.6...done.
> Loaded symbols for /lib/tls/libc.so.6
> Reading symbols from /usr/lib/libsasl2.so.2...done.
> Loaded symbols for /usr/lib/libsasl2.so.2
> Reading symbols from /usr/lib/libz.so.1...done.
> Loaded symbols for /usr/lib/libz.so.1
> Reading symbols from /lib/ld-linux.so.2...done.
> Loaded symbols for /lib/ld-linux.so.2
> Reading symbols from /lib/tls/libpthread.so.0...done.
> [Thread debugging using libthread_db enabled]
> [New Thread -1208101184 (LWP 2955)]
> Loaded symbols for /lib/tls/libpthread.so.0
> Reading symbols from /usr/lib/gconv/UTF-16.so...done.
> Loaded symbols for /usr/lib/gconv/UTF-16.so
> Reading symbols from /usr/lib/gconv/IBM850.so...done.
> Loaded symbols for /usr/lib/gconv/IBM850.so
> Reading symbols from /lib/libnss_files.so.2...done.
> Loaded symbols for /lib/libnss_files.so.2
> Reading symbols from /lib/libnss_ldap.so.2...done.
> Loaded symbols for /lib/libnss_ldap.so.2
> 0x001117a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
> (gdb) bt
> #0  0x001117a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
> #1  0x0025950d in ___newselect_nocancel () from /lib/tls/libc.so.6
> #2  0x00d91b0d in sys_select (maxfd=23, readfds=0xbfec4040, writefds=0x0,
> errorfds=0x0, tval=0x0)
>     at lib/select.c:93
> #3  0x00e3184c in open_sockets_smbd (is_daemon=1, interactive=0,
> smb_ports=0x0)
>     at smbd/server.c:350
> #4  0x00e32bdd in main (argc=2, argv=0xbfec5414) at smbd/server.c:916
> (gdb) quit
> ################################################################
>
> some times if the processes get killed, but it does not release any memory,
> occupying all the
> memory that i have
>
> our server hardware information
> IBM X226 series Xeon Processor 3Ghz
> with 1 Gb RAM and 2 GB swap
> we have 72 gb hard-disk with software RAID 1 on it
>
> 2q) when the physical RAM is occupied, then why it doesn't take any swap
> space when the swap
> space is free,
>
>
> On 3/29/06, Matt Lung <matt.lung at midwest-tool.com> wrote:
>   
>>
>> Martin Zielinski wrote:
>>     
>>> Bruno Gomes Pessanha wrote:
>>>       
>>>> I'm having the same problem... but with a 520 print queues samba
>>>> server and
>>>> 20.000 AD users.
>>>> I'm getting desperate! I did a lot of tuning changes..... but nothing
>>>> helps!
>>>>
>>>> Bruno
>>>>
>>>>         
>>> [...]
>>>
>>> If i remember correctly, the original description of the problem has
>>> been, that the number of smbd proccess is growing until this breaks
>>> the whole system (correct me, if I'm  wrong).
>>>       
>> Actually it does not break the whole system.  Only Samba is broken.  All
>> other services continue running on the server and work fine, but samba
>> just hangs and connections that were already made stop working, and all
>> new connections are denied.  Please review bug #3636 that I submitted
>> yesterday.
>>
>> If more information is needed I'll provide it, but for now I'm waiting
>> for it to crash again to get an strace on one of the processes and more
>> debug at level 10.
>>
>> Thanks
>> Matt Lung
>>     
>>> In your case the reason might be that clients leave *one* spoolss-pipe
>>> open, after they have opened (and closed) a connection to a printer.
>>> The deadtime parameter is not working, because of this one open
>>> connection.
>>> BTW, this is diffrent to connections with admin rights.
>>>
>>> To fix this, I add the following lines to smbd/conn.c:
>>> ---- start code
>>>     for (conn=Connections;conn;conn=next) {
>>>         next=conn->next;
>>>         /* close dirptrs on connections that are idle */
>>>         if ((t-conn->lastused) > DPTR_IDLE_TIMEOUT)
>>>             dptr_idlecnum(conn);
>>> +    /* force the closure, even if one spoolss is open */
>>> +        if (conn->num_files_open == 1 && (t-conn->lastused)>=deadtime)
>>>       
>> {
>>     
>>> +            for (plist = get_first_internal_pipe(); plist;
>>> +                            plist = get_next_internal_pipe(plist)) {
>>> +                if (plist->name && !strcmp (plist->name, "spoolss")) {
>>> +                    DEBUG(2,("Client holds one spoolss connection.
>>> Deadtime reached. Closing last pipe\n"));
>>> +                    pipe_close_conn (conn);
>>> +                    break;
>>> +                }
>>> +            }
>>> +        }
>>> +
>>>         if (conn->num_files_open > 0 ||
>>>             (t-conn->lastused)<deadtime)
>>>             allidle = False;
>>>     }
>>> ---- end code
>>>
>>> If the description meets your existing problem, this might help.
>>> (There was an earlier discussion with Gerald Carter about this topic -
>>> this might be his code or merged with mine - I don't remember excactly)
>>>
>>> Bye,
>>> Martin
>>>
>>>       
>>>> --
>>>> ---
>>>> Bruno Gomes Pessanha
>>>> LPI Brasil
>>>>         
>>>       
>> --
>> Matt Lung
>>
>> Midwest Tool & Die, Corp.
>>
>>
>> --
>> To unsubscribe from this list go to the following URL and read the
>> instructions:  https://lists.samba.org/mailman/listinfo/samba
>>
>>     

-- 
Matt Lung

Midwest Tool & Die, Corp.




More information about the samba mailing list