[haiku-bugs] Re: [Haiku] #12286: Menus seem to be leaking ports

  • From: "ttcoder" <trac@xxxxxxxxxxxx>
  • Date: Thu, 06 Aug 2015 08:22:18 -0000

#12286: Menus seem to be leaking ports
----------------------------------+----------------------------
Reporter: ttcoder | Owner: axeld
Type: bug | Status: new
Priority: high | Milestone: R1/beta1
Component: Kits/Interface Kit | Version: R1/Development
Resolution: | Keywords:
Blocked By: | Blocking:
Has a Patch: 0 | Platform: All
----------------------------------+----------------------------

Comment (by ttcoder):

Well playing with `listports` is fairly interesting: it seems the faulty
ports are ''not'' listed. Maybe there is actually no port "leak" as such,
and the kernel is just getting confused, i.e. there is a variable which
cashes for efficiency reasons the "size" (length, whatever) of the port
list, and that variable gets out of sync with the actual list contents in
some circumstances, leading into an "artificial" exhaustion in the end?

To wit:

{{{
~/Desktop> sysinfo -ports
3415 ports free (used/max 681 / 4096)
~/Desktop> listport | wc
426 1514 20563
}}}

I don't feel like counting how many lines there in are the listports
output, but we can say confidently that 426 lines are NOT going to list
681 ports :-)
(and indeed a cursory exmination of the output shows nothing out of the
ordinary: the app_server has a short listing of ports, Terminal's listing
of ports is short and does NOT change much or at all ..etc)

Especially since the listport output does not change (!) even after the
ports has been incremented by 5 (in this test I have Qupzilla launched,
hence the bigger figures):

{{{
~/Desktop> listport | wc
396 1407 19175
~/Desktop> sysinfo -ports
2641 ports free (used/max 1455 / 4096)
~/Desktop> listport | wc
396 1407 19175
~/Desktop> sysinfo -ports
2636 ports free (used/max 1460 / 4096)
}}}

Or maybe it's the other way around and it's `listport` which is broken ?

....

By the way, first saw that when installing a nightly (fresh install) of
49480 in place of a 49172, which could run Qupzilla for a full afternoon
without problem, never ran out of ports. Pretty wide range still..

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

Other related posts: