samba panic - openbsd 3.8 - BSD

This is a discussion on samba panic - openbsd 3.8 - BSD ; Forgive me if I'm asking in the wrong place. (I have faith in the server-fu of this newsgroup.) New OBSD 3.8 server, samba-3.0.13p0.tgz package installed. Clients are Windows XP, mostly sharing files in a public directory. All has been well ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: samba panic - openbsd 3.8

  1. samba panic - openbsd 3.8

    Forgive me if I'm asking in the wrong place. (I have faith in the server-fu
    of this newsgroup.)

    New OBSD 3.8 server, samba-3.0.13p0.tgz package installed. Clients are
    Windows XP, mostly sharing files in a public directory. All has been well
    until today, when users reported weirdness - I found a number of locked
    files with a stale PID. Delving further into the logs, I found that all the
    smbd.(user) logs were fine - except one, which contained many malloc failure
    reports, and finally the following:

    >>

    [2005/12/13 12:29:12, 0]
    /usr/obj/i386/samba-3.0.13p0/samba-3.0.13/source/lib/util.c:Realloc(971)
    Memory allocation error: failed to expand to 4136 bytes
    [2005/12/13 12:29:20, 0]
    /usr/obj/i386/samba-3.0.13p0/samba-3.0.13/source/lib/substitute.c:alloc_sub_basic(525)
    alloc_sub_specified: Out of memory!
    [2005/12/13 12:29:20, 0]
    /usr/obj/i386/samba-3.0.13p0/samba-3.0.13/source/lib/util.c:smb_xmalloc_array(2224)
    smb_xmalloc_array failed to allocate 1 * 1 bytes
    [2005/12/13 12:29:20, 0]
    /usr/obj/i386/samba-3.0.13p0/samba-3.0.13/source/lib/substitute.c:alloc_sub_basic(525)
    alloc_sub_specified: Out of memory!
    [2005/12/13 12:29:20, 0]
    /usr/obj/i386/samba-3.0.13p0/samba-3.0.13/source/lib/util.c:smb_panic2(1495)
    PANIC: smb_xmalloc_array: malloc fail.
    .........
    [2005/12/15 12:12:27, 0]
    /usr/obj/i386/samba-3.0.13p0/samba-3.0.13/source/lib/fault.c:fault_report(37)
    INTERNAL ERROR: Signal 11 in pid 5054 (3.0.13)
    Please read the appendix Bugs of the Samba HOWTO collection
    [2005/12/15 12:12:27, 0]
    /usr/obj/i386/samba-3.0.13p0/samba-3.0.13/source/lib/fault.c:fault_report(39)
    ================================================== =============
    [2005/12/15 12:12:27, 0]
    /usr/obj/i386/samba-3.0.13p0/samba-3.0.13/source/lib/util.c:smb_panic2(1495)
    PANIC: internal error
    <<

    Seems one of the users' Samba connections panicked, died, and left the files
    locked.

    The server has 512M of memory (extensively tested with memtest86 before
    deployment) and plenty of swap space. (Running top suggests the server has
    plenty of resources, and is barely breaking into a sweat.) I've tried
    googling, and searching the samba.org documentation, to no avail. Any clues
    as to how to address this error - and avoid it in future - would be
    gratefully received.

    Oh - and I wound up having to restart the server to clear the errors. Is the
    following a legal way of restarting Samba?
    kill -HUP `cat /var/run/smbd.pid`

    TIA,

    Steve
    http://www.fivetrees.com



  2. Re: samba panic - openbsd 3.8

    Steve at fivetrees wrote:
    > Forgive me if I'm asking in the wrong place. (I have faith in the server-fu
    > of this newsgroup.)
    >
    > New OBSD 3.8 server, samba-3.0.13p0.tgz package installed. Clients are
    > Windows XP, mostly sharing files in a public directory. All has been well
    > until today, when users reported weirdness - I found a number of locked
    > files with a stale PID. Delving further into the logs, I found that all the
    > smbd.(user) logs were fine - except one, which contained many malloc failure
    > reports, and finally the following:
    >
    >>>

    > [2005/12/13 12:29:12, 0]
    > /usr/obj/i386/samba-3.0.13p0/samba-3.0.13/source/lib/util.c:Realloc(971)
    > Memory allocation error: failed to expand to 4136 bytes
    > [2005/12/13 12:29:20, 0]
    > /usr/obj/i386/samba-3.0.13p0/samba-3.0.13/source/lib/substitute.c:alloc_sub_basic(525)
    > alloc_sub_specified: Out of memory!
    > [2005/12/13 12:29:20, 0]
    > /usr/obj/i386/samba-3.0.13p0/samba-3.0.13/source/lib/util.c:smb_xmalloc_array(2224)
    > smb_xmalloc_array failed to allocate 1 * 1 bytes
    > [2005/12/13 12:29:20, 0]
    > /usr/obj/i386/samba-3.0.13p0/samba-3.0.13/source/lib/substitute.c:alloc_sub_basic(525)
    > alloc_sub_specified: Out of memory!
    > [2005/12/13 12:29:20, 0]
    > /usr/obj/i386/samba-3.0.13p0/samba-3.0.13/source/lib/util.c:smb_panic2(1495)
    > PANIC: smb_xmalloc_array: malloc fail.
    > ........
    > [2005/12/15 12:12:27, 0]
    > /usr/obj/i386/samba-3.0.13p0/samba-3.0.13/source/lib/fault.c:fault_report(37)
    > INTERNAL ERROR: Signal 11 in pid 5054 (3.0.13)
    > Please read the appendix Bugs of the Samba HOWTO collection
    > [2005/12/15 12:12:27, 0]
    > /usr/obj/i386/samba-3.0.13p0/samba-3.0.13/source/lib/fault.c:fault_report(39)
    > ================================================== =============
    > [2005/12/15 12:12:27, 0]
    > /usr/obj/i386/samba-3.0.13p0/samba-3.0.13/source/lib/util.c:smb_panic2(1495)
    > PANIC: internal error
    > <<
    >
    > Seems one of the users' Samba connections panicked, died, and left the files
    > locked.
    >
    > The server has 512M of memory (extensively tested with memtest86 before
    > deployment) and plenty of swap space. (Running top suggests the server has
    > plenty of resources, and is barely breaking into a sweat.) I've tried
    > googling, and searching the samba.org documentation, to no avail. Any clues
    > as to how to address this error - and avoid it in future - would be
    > gratefully received.


    Might be some rare condition, that occured just then. Anyway, the 'out
    of memory' usually *means* out of memory.

    It might be worth checking if smb_xmalloc_* tries to allocate shared
    memory somewhere - it's possible to run out of shared memory, which just
    might give you the errors you are seeing without being out of physical
    memory. (If this is indeed the problem, have a look at sysctl...)

    > Oh - and I wound up having to restart the server to clear the errors. Is the
    > following a legal way of restarting Samba?
    > kill -HUP `cat /var/run/smbd.pid`


    I'm fairly certain it is.

    Joachim

  3. Re: samba panic - openbsd 3.8

    wrote in message
    news:43a1860a$0$17595$dbd45001@news.wanadoo.nl...
    >
    > Might be some rare condition, that occured just then. Anyway, the 'out
    > of memory' usually *means* out of memory.
    >
    > It might be worth checking if smb_xmalloc_* tries to allocate shared
    > memory somewhere - it's possible to run out of shared memory, which just
    > might give you the errors you are seeing without being out of physical
    > memory. (If this is indeed the problem, have a look at sysctl...)


    Ok, will do - thanks.

    Re "rare": it happened again today. I've determined that the trigger is a
    single Windows XP machine which is known to be the flakiest machine in the
    company. As a workaround, I've asked them to avoid that machine - but I
    remain very surprised that a client, flaky or not, can take down the Samba
    server.

    >> Oh - and I wound up having to restart the server to clear the errors. Is
    >> the
    >> following a legal way of restarting Samba?
    >> kill -HUP `cat /var/run/smbd.pid`

    >
    > I'm fairly certain it is.


    Turns out it isn't . Or at least, it doesn't have the desired effect (of
    clearing the stale locks). I've so far failed to find the proper way of
    doing this under OBSD - I'm sure I must be missing something obvious. I'll
    keep looking.

    Steve
    http://www.fivetrees.com



  4. Re: samba panic - openbsd 3.8

    Steve at fivetrees wrote:
    > wrote in message
    > news:43a1860a$0$17595$dbd45001@news.wanadoo.nl...
    >>
    >> Might be some rare condition, that occured just then. Anyway, the 'out
    >> of memory' usually *means* out of memory.
    >>
    >> It might be worth checking if smb_xmalloc_* tries to allocate shared
    >> memory somewhere - it's possible to run out of shared memory, which just
    >> might give you the errors you are seeing without being out of physical
    >> memory. (If this is indeed the problem, have a look at sysctl...)

    >
    > Ok, will do - thanks.
    >
    > Re "rare": it happened again today. I've determined that the trigger is a
    > single Windows XP machine which is known to be the flakiest machine in the
    > company. As a workaround, I've asked them to avoid that machine - but I
    > remain very surprised that a client, flaky or not, can take down the Samba
    > server.


    Well, it *shouldn't*. But SAMBA is not without problems.

    If you can get a packet trace, you might want to send it to the
    maintainers.

    >>> Oh - and I wound up having to restart the server to clear the errors. Is
    >>> the
    >>> following a legal way of restarting Samba?
    >>> kill -HUP `cat /var/run/smbd.pid`

    >>
    >> I'm fairly certain it is.

    >
    > Turns out it isn't . Or at least, it doesn't have the desired effect (of
    > clearing the stale locks). I've so far failed to find the proper way of
    > doing this under OBSD - I'm sure I must be missing something obvious. I'll
    > keep looking.


    Lockfiles can just be 'rm -f'-ed (and in fact, quite a few start/stop
    scripts do just that). If you are sure that the server in question is no
    longer running, at least.

    Joachim

+ Reply to Thread