[BeOS] workaround of port capacity bug

RESOLVED FIXED

Status

()

Core
XUL
RESOLVED FIXED
18 years ago
18 years ago

People

(Reporter: Makoto Hamanaka, Assigned: Yannick Koehler)

Tracking

Trunk
x86
BeOS
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

18 years ago
There seems to be a BeOS bug which allows BeOS 'port' (BeOS's native message queue) 
to have more messages than its capacity. And under such situation, BeOS 'port' seems 
to behave wrongly. And I think this bug lead Mozilla(BeOS version) to be unstable.
I illustrated the bug at this URL: 
http://www8.cds.ne.jp/~hama/bezilla/port_capacity.html

I created a patch to avoid this bug. I modified xpcom/threads/plevent.c to increase 
initial event port capacity, and modified nsToolkit::CallMethodAsync() to not throw 
messages to the event port when message count exceed the capacity of the port.
(Reporter)

Comment 1

18 years ago
Created attachment 21237 [details] [diff] [review]
patch to xpcom/threads/plevent.c widget/src/beos/nsToolkit.cpp
(Assignee)

Comment 2

18 years ago
hm, we'll need both xpcom/widget reviewers on that, I'll try the patch first 
thought and let know my results.
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Keywords: patch, review

Comment 3

18 years ago
  This was a recognized problem until 11 Sep 2000, when dougt checked in a patch 
that reduced the number of native notifications for these things. I'm looking at 
it now, though, and I think there might be a problem. It looks like (on Linux) 
during app launch, the native pipe typically queues up 80+ notifications, even 
though the notification callback is executing repeatedly.
  It shouldn't do that. I understand why it is, and the extra notifications can't 
be trivially removed. Somewhere around here I have a patch I was working on that 
I think addressed this problem. I wouldn't dare check it in without lots of 
review, though: this is deeply scary stuff.
  In the meantime, it makes sense to bump the max size of the port allocation if 
that doesn't hurt you.

Comment 4

18 years ago
(Addendum to my comment above) see comments and a patch dated today in bug 50104.

Comment 5

18 years ago
The patch has been checked in.  
Status: ASSIGNED → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → FIXED
(Reporter)

Comment 6

18 years ago
Because the event port is not only used as native notification but also
used to call method, it is very easy to stack up many messages on the port.
Only scrolling some view by mouse will lead to exceed the port capacity.

You need to log in before you can comment on or make changes to this bug.