Closed Bug 65909 Opened 24 years ago Closed 19 years ago

[BeOS] _MD_pr_poll() always return immediately

Categories

(NSPR :: NSPR, defect)

4.0.2
x86
BeOS
defect
Not set
major

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: toyoshim, Assigned: mozbugs-build)

Details

Attachments

(3 files)

BeOS version _MD_pr_poll() always return immediately.
So on using socket, mozilla use a lot of CPU power.

The cause of this problem is select() of BeOS.
On BeOS, only read_bits is implemented.
So if we set write_bits, select() always return
immediately with result value that mean socket can write.
Attached patch patchSplinter Review
Attached patch revised patchSplinter Review
Marking NEW to get somoone to look at it.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: patch, review
The first patch looked correct based upon the initial comments.  The second
patch appears to call select twice.  Once with the write_bits set to 0 and once
as it did before which would still cause it to return immediately after the
second select, correct?
Priority: -- → P2
Which patch is correct?  anyone care to review?
Status: NEW → ASSIGNED
I don't think I understand that patch totally, but I've corrected the comments which was using a bad english... 

I think that the second call is needed even thought we know it's returning right away, just unsure why it is...  I'm attaching a new patch.
Thanks, Chris and Yannick.

By first select(), we get read bits.
But only this, we never get write bits.
So sometimes browser fail to load files
for inability to write request.
Second select is the easist way to set write bits.
So second select might not need "&rd".

By this way, we can wait for read.
But if we want to only write, two select()s always
return immediately. Of source It's bad...

Does anyone have better idea?
Is this the Mission Impossible without BONE... ;)
I have asked howard@be.com to take a look at this bug id, hoping he will be
able to provide some input.
Target Milestone: --- → 4.2
Version: other → 4.0.2
Priority: P2 → P1
When the patch is ready, please reassign the bug
to larryh@netscape.com for checkin.
Ham: this patch appears to break networking when applied to the current tree. Is
this bug still valid?
Whoops, sorry I used Ham there :) Takashi: as I said this bug appears to break
networking (hangs on DNS lookups).

Is anyone still working on this bug?
Priority: P1 → P2
QA Contact: wtc → larryh
No more working on Bezilla
Assignee: koehler → nobody
Status: ASSIGNED → NEW
After further inspection and testing, I don't think calling select() twice fixes
anything.  When _MD_pr_poll properly checks for select() return values (bug
70808), calling select twice is bad as the second call destroys any errno set by
the first call which we check.   I don't see any way around the problem if
select() doesn't work for write bits as we have no other way of determining if
the bits are writeable.  I suppose we could wait the full timeout period instead
of returning immediately but that might cause delays when there are sockets
which have their read bits set.
Assigned the bug to Chris.
Assignee: nobody → seawood
Is this bug still an issue?
Yes, net_server uses almost 100% cpu when accessing pages..
Keywords: patch, review
Priority: P2 → P4
Target Milestone: 4.2 → Future
It looks like this could be marked INVALID, as it looks quite old, and since 
february of 2002, several versions of bezilla, stripzilla and phoenix have 
come out on beos, it looks like. So if this is marked INVALID, and someone is 
still seing it, this could be re-opened, etc.

www.bezilla.org
http://www.bebits.com/app/2715
Mass reassign to new default build assignee
Assignee: seawood → mozbugs-build
Priority: P4 → --
Marked the bug INVALID as comment 19 suggested.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → INVALID
Target Milestone: Future → 4.6
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: