mbuf leak found - (was mbuf leak in kernel)

Ben Woolley tautolog at gmail.com
Wed Aug 8 18:58:55 PDT 2007


On 8/8/07, Matthew Dillon <dillon at apollo.backplane.com> wrote:
>     I found the mbuf leak.  It was introduced in a commit I made in April
>     which allowed control and address data to be thrown away on insufficient
>     socket buffer space.  The wrong error code was being returned and
>     preventing the mbuf from being freed.
>
>     The mbuf leak occurs most often when a large amount of information is
>     sent to syslog, such as by a mail or web server subsystem.

Hi Matthew,

By chance, would this have caused programs sending massive amounts to
syslog to block in state "objcache" on a sendmsg() call, and then
eventually hang the system with no panic? Aren't mbufs backed by
objcache?

I ran into this about a couple months ago, a little while after I
updated to HEAD (right after a Preview was slipped), and I have been
meaning to take a look at it again.

I had php logging to syslog, and, only when I used a particular php
script (which wasn't even the most verbose logger), it would hang the
php processes in objcache, and when I ktrace()d the processes, they
would all hang in, I think, sendmsg(). It would start when I went to a
particular area of the web app (every single time), and once it
started, all subsequent syslog messages would hang until, after a few
minutes, the system would hang with no panic. It was strange because
it only ever happened on that one series of syslog messages.

I will try updating to see if it still happens, and if it still
happens, I will try once more to get a core for you. I had a little
trouble getting the core because it would just hang, and it took me a
while to figure out how to force a panic, and I couldn't do it from X
(it grabbed the keys), so I just haven't had a chance induce the panic
yet. I had spent half the day trying to figure out what was wrong, and
needed to move onto something else once I figured out that I could
just disable logging to syslog, and it started working again.

I'll try to check it out again tomorrow.

Cheers,

Ben Woolley





More information about the Bugs mailing list