[haiku-bugs] Re: [Haiku] #12404: Webpositive - possible memory leak with especific website

  • From: "pulkomandy" <trac@xxxxxxxxxxxx>
  • Date: Mon, 05 Oct 2015 07:50:36 -0000

#12404: Webpositive - possible memory leak with especific website
----------------------------------------+----------------------------
Reporter: un_spacyar | Owner: pulkomandy
Type: bug | Status: new
Priority: normal | Milestone: Unscheduled
Component: Applications/WebPositive | Version: R1/Development
Resolution: | Keywords:
Blocked By: | Blocking:
Has a Patch: 0 | Platform: All
----------------------------------------+----------------------------

Comment (by pulkomandy):

On a 32 bit system, a malloc bigger than 2GB will always be rejected
because that's the whole address space available to one app. You can
"reasonably" allocate about 1.7GB in one chunk, anything bigger will most
likely fail. In that case malloc will return NULL, and not steal all the
memory.

If your system has more than 2GB of memory, Web+ would fail after
allocating his 2GB, and then the rest of the RAM would still be available
to others. This should not lead to a complete system crash, unless the
app_server is also allocating lots ofthings (BBitmaps for example), in
that case the app_server could freeze or crash.

Looking at your syslog, I see a lot of errors from the USB drivers. Where
does this come from? Are you running Haiku from USB? I'm guessing a bit
but a possible scenario is:
* Haiku is low on memory and tries to use the swap
* The swap is on an USB volume, but there are problems in the USB drivers
making things very slow as there are lots of write failures
* Eventually the physical memory gets full as things are not flushed to
swap fast enough.

--
Ticket URL: <https://dev.haiku-os.org/ticket/12404#comment:2>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: