Closed Bug 42283 Opened 25 years ago Closed 25 years ago

JAR protocol crashing

Categories

(Core :: Networking, defect, P3)

x86
Linux
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: security-bugs, Assigned: ruslan)

References

()

Details

(Keywords: crash, Whiteboard: [nsbeta2+] ETA 7/21)

As of this morning, June 12, Seamonkey crashes with a segfault when attempting to load a JAR URL such as the one above. The call to BaseChannel->GetLocalFile() at http://lxr.mozilla.org/seamonkey/source/netwerk/protocol/jar/src/nsJARChannel.cpp#451 is returning rv==NS_OK but the jarCacheFile parameter remains null. The code then tries to do a NS_NewLocalFileChannel on a null filespec and seg-faults. I also noticed, and I'm not sure this is a problem, but the call to GetJAREntry() at http://lxr.mozilla.org/seamonkey/source/netwerk/protocol/jar/src/nsJARChannel.cpp#426 is returning "/readme.txt" including the forward slash...is this correct?
Marking nsbeta2 as signed scripts depend on the jar protocol.
Keywords: nsbeta2
Target Milestone: --- → M17
Putting on [nsbeta2+] radar for beta2 fix.
Whiteboard: [nsbeta2+]
Adding crash keyword
Keywords: crash
fixed
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Actually, I forgot that the use of the disk cache by the jar protocol kicks off more thread-safety assertions than you can shake a stick at: nsCacheManager nsNetModuleMgr nsNetModuleRegEntry nsCookieHTTPNotify nsHTTPHandler I think nsHttpChannel::AsyncRead can't be called from the file transport thread! I filed bug 42791 on this.
re-opening this one. This is working on WinNT only. Linux just sits there and the busy bar spins. On the mac it is crashing.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
I showed this problem to ruslan, who said he'd look at it. Reassigning to him.
Assignee: warren → ruslan
Status: REOPENED → NEW
ruslan, have you made any progress on this? It only happens on Unix (not NT), and only when the JAR channel is trying to retrieve a jar file from the network (case 3 in nsJARChannel::EnsureJARFileAvailable). That's why we were seeing it with some URLs and not others (loading jar:file: URLs works fine).
I'm working on it. I can reproduce it now very easily with file download case on Linux. I still don't understand what's going on.
Did somebody change something??? I just pulled the new build and problem is completely gone.
Status: NEW → ASSIGNED
ruslan, whoops, sorry for the confusion. The crash I described in the original description here is fixed; I did this last night. AFAIK, it's still spinning forever on Linux without loading; the problem I discussed with you in person. Is the URL loading successfully for you now? Try deleting the mozilla/dist/bin/ components/jarCache directory and see if the problem returns.
I did as you said. Still works for me. I even have all the notication callbacks firing correctly/etc. On Linux. On NT it also works.
Marking WorksForMe...tever to verify.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago25 years ago
Resolution: --- → WORKSFORME
Reopening because I'm still seeing this problem on Linux. Tomorrow I will get someone else to verify that the problem still exists, but AFAIK, it does.
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
It works for me on relisoft.com. Am I not doing something correctly?
Loading this URL consistently fails for me on Linux as of 7/14 build. czhang and jtaylor are seeing the same behavior on Linux. I'm not sure what you're doing differently.
Tried loading the URL "jar:http://www.relisoft.com/source.zip!/readme.txt", on linux, in vain. And as Tever mentioned, the busy bar spins for ever.
Ok. I was finally able to catch it hanging and I was able to see that OnStop was sitting in the queue before ondataavailable. That cause the listener to be zeroed out. Keep looking ....
ruslan: I have put a guesstimate ETA of 7/21 feel free to correct it.
Whiteboard: [nsbeta2+] → [nsbeta2+] ETA 7/21
Fix on hand. Awaiting review.
Done.
Status: REOPENED → RESOLVED
Closed: 25 years ago25 years ago
Resolution: --- → FIXED
verified: Linux rh6.0 2000072804
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.