Closed
Bug 228623
Opened 21 years ago
Closed 20 years ago
[patch] Bookmark update code causes periodic hangs in camino
Categories
(Camino Graveyard :: Bookmarks, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
Camino0.9
People
(Reporter: sfraser_bugs, Assigned: sbwoodside)
References
Details
Attachments
(2 files, 2 obsolete files)
|
16.72 KB,
text/plain
|
Details | |
|
2.61 KB,
patch
|
Details | Diff | Splinter Review |
I keep having Camino hang on me for periods of about 30 seconds. ThreadViewer
shows this stack:
mach_msg_trap
mach_msg
_lookup_all_secure
_lookup_all
gai_lookupd
getaddrinfo
__SCNetworkReachabilityGetFlags
SCNetworkReachabilityGetFlags
SCNetworkReachabilityByName
-[Bookmark hostIsReachable]
-[Bookmark checkForUpdate]
__NSFireTimer
(runloop stuff)
This is bad. I think Camino should use necko to do bookmark checking, which will
push stuff onto a separate thread, and avoid stalling the UI.
Perhaps this is what was responsible for Camino hanging on me every minute or
two for a few seconds while my internet connection was down this afternoon?
It's not something that ever happens when the connection is available.
Comment 2•21 years ago
|
||
damnit, we need to fix this. sbwoodside, didn't we test this before landing the
big bookmarks patch?
Assignee: haasd → pinkerton
Target Milestone: --- → Camino0.8
Updated•21 years ago
|
Status: NEW → ASSIGNED
| Assignee | ||
Comment 3•21 years ago
|
||
Yes, I did test this with a modem connection. When the connection was
disconnect, it did not try to connect or freeze or hang. I tested on 10.2.
What's the system? What's the type of network connection?
| Reporter | ||
Comment 4•21 years ago
|
||
Dual G4 on the end of a DSL line.
| Assignee | ||
Comment 5•21 years ago
|
||
i'll look at it.
What OS version?
Assignee: pinkerton → sbwoodside
Status: ASSIGNED → NEW
| Reporter | ||
Comment 6•21 years ago
|
||
10.3.2 I think.
| Assignee | ||
Comment 7•21 years ago
|
||
I'm unable to reproduce this. I'm running 10.2.8. Maybe it's a panther-only bug?
Here's what I did:
- load up router configuration page
- disconnect PPPoE
- surf pages on my localhost server for a while
- I didn't see any hangs or freezes
| Reporter | ||
Comment 8•21 years ago
|
||
This is the kind of bug where you can't expect to be able to reproduce every
networking issue that might affect it. It's enough to know that the problem
occurred to force you to seek alternative implementations. As I mentioned above,
I think necko should be used here, instead of alternative APIs.
| Assignee | ||
Comment 9•21 years ago
|
||
This code is mainly in doHTTPUpdateRequest in Bookmark.mm. It's implemented
using Core Foundation network library CFNetwork services. I think CFNetwork is
thread safe so a simpler workaround is probably to stick it on an NSThread and
use cocoa threads to avoid the hang.
I don't know if there is some gain in converting to necko. Necko has both
synchronous and async modes too, so it's the same amount of work to make this
work multithreaded either way I think.
Anyway another idea I had was to implemented a necko async wrapper in cocoa, so
that we could make async necko calls using the obj-c threads api.
| Assignee | ||
Comment 10•21 years ago
|
||
Can you still reproduce this hang? I've got a patch that makes HTTP update
checks async. But I have no way to verify if it fixes the problem since I can't
reproduce it .......
| Assignee | ||
Comment 11•21 years ago
|
||
Try this out. I'll need to clean it up if it works.
| Assignee | ||
Comment 12•21 years ago
|
||
whoops, use this one. disregard the previous. I left in some spurious diffs on
my project file by mistkae.
Attachment #138724 -
Attachment is obsolete: true
Updated•21 years ago
|
Attachment #138725 -
Flags: review?
Comment 13•21 years ago
|
||
Will work on it ASAP, tonight, tomorow night ...
Comment 14•21 years ago
|
||
Comment on attachment 138725 [details] [diff] [review]
real test patch
Giving R but needs to be cleaned up . Too much logging is done in the current
patch.
Attachment #138725 -
Flags: review? → review+
Updated•21 years ago
|
Attachment #138725 -
Flags: review?(josha)
Comment 15•21 years ago
|
||
Sbwoodside are you still working on Camino ? do you plan to update your patch ?
Comment 16•21 years ago
|
||
Ok I just had a randow crash while I was dragging a text clipping to a tab to
open a website. Camino just crashed, plof.
looking at the crash log, it directs me to the bookmark updating code since
there are some direct link in it.
2 org.mozilla.navigator 0x0008b100 -[BookmarkViewController
reloadDataForItem:reloadChildren:] + 0x8c (BookmarkViewController.mm:1198)
3 org.mozilla.navigator 0x0008ba3c -[BookmarkViewController
bookmarkChanged:] + 0x68 (BookmarkViewController.mm:1351)
4 <<00000000>> 0x909f793c 0 + 0x909f793c
5 <<00000000>> 0x901aa680 0 + 0x901aa680
6 <<00000000>> 0x901af090 0 + 0x901af090
7 org.mozilla.navigator 0x0007b064 -[BookmarkItem itemUpdatedNote] +
0xa4 (BookmarkItem.m:234)
8 org.mozilla.navigator 0x0006e5d0 -[Bookmark setNumberOfVisits:] +
0xa0 (Bookmark.mm:203)
9 org.mozilla.navigator 0x0006ebf0 -[Bookmark urlLoadCheck:] + 0x240
(Bookmark.mm:256)
| Reporter | ||
Comment 17•21 years ago
|
||
Yeah, I still see periodic hangs (when there are network issues), and see
reports by others on the mailing list. Simon?
Comment 18•21 years ago
|
||
Simon W could you update please?
Summary: Bookmark update code causes periodic hangs in camino → [patch] Bookmark update code causes periodic hangs in camino
Comment 19•21 years ago
|
||
Pushing back to 0.9, since auto-update will be disabled in 0.8 (and only
re-enableable through a hidden pref).
Target Milestone: Camino0.8 → Camino0.9
Comment 20•21 years ago
|
||
This patch pushes the "hostIsReachable" function onto a background
thread. If it can find the host, it calls on the main thread the
doHTTPUpdateCheck.
This patch will break Camino on 10.1, which I believe is OK at
this point. I think some calls to "RunLoopMessenger" rather than
performSelectorOnMainThread would bring back 10.1 compatability.
Based on the threadviewer results, hostIsReachable is the main
culprit for the intermittant hangs. I think (but don't know for
sure) the rest of the CFNetwork stuff is well behaved on the
main thread. If it turns out more CFNetwork stuff is problematic,
the original version of the big bookmark patch had mostly-working
background thread calls for the bookmark updating, so you might
want to look there.
It would be nice if a couple people would try this patch out,
turn on the bookmark checking, and see if the hangs go away.
Updated•21 years ago
|
Attachment #138725 -
Attachment is obsolete: true
Comment 21•20 years ago
|
||
broken bookmark detection code is getting ripped out, so marking this bug as wontfix
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → WONTFIX
Attachment #138725 -
Flags: review?(joshmoz)
You need to log in
before you can comment on or make changes to this bug.
Description
•