Closed
Bug 689818
Opened 14 years ago
Closed 14 years ago
ABORT: wrong thread: 'PR_GetCurrentThread() == gSocketThread', file netwerk/protocol/http/nsHttpConnection.cpp, line 206
Categories
(Add-on SDK Graveyard :: General, defect, P2)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: decoder, Assigned: irakli)
Details
(Keywords: assertion, testcase)
Attachments
(3 files)
157.72 KB,
application/x-xpinstall
|
Details | |
3.13 KB,
text/plain
|
Details | |
1.38 KB,
patch
|
Details | Diff | Splinter Review |
We are currently working on a client/server model for fuzzing, which involves a jetpack addon in Firefox using a network connection to receive tests. While this works fine in optimized builds of Firefox, both nightly and aurora debug builds crash immediately after installation of the attached XPI with the mentioned assertion.
It would be very helpful to resolve this issue, as it blocks our testing on debug versions.
Comment 1•14 years ago
|
||
gSocketThread != PR_GetCurrentThread. How peculiar.
Comment 2•14 years ago
|
||
The output shows we hit the "###!!! ASSERTION: must not instantiate twice: '!gSocketTransportService', file /Users/jdm/src/mozilla-central/netwerk/base/src/nsSocketTransportService2.cpp, line 103" assertion. The backtrace for that is terrifyingly long.
Comment 3•14 years ago
|
||
The problem here is that net.js in the addon is using Components.Constructor to instantiate the socket transport service. The Constructor call only ever calls CreateInstance, which unconditionally calls the factory method instead of returning the service object. There's debugging code that warns when this occurs, but only with certain #defines enabled. Overall, a poor experience, but I'm not certain if there's a way to improve the situation on the Gecko side without fixing bug 494946. This is definitely problematic JS code that needs fixing in the addon, however.
Reporter | ||
Comment 4•14 years ago
|
||
Thanks Josh for your analysis, greatly appreciated.
This net.js file is part of the jetpack-io package which I'm not familiar with. Can we fix this in the jetpack-io JS code somehow?
Assignee | ||
Updated•14 years ago
|
Assignee: nobody → rFobic
Comment 5•14 years ago
|
||
Mossop, assuming comment 4 is correct can you get somebody to fix the Jetpack SDK code?
Do we have any breakpad crash IDs? I'd like to see if this is a common issue in the field apart from this specific extension.
Comment 6•14 years ago
|
||
Looks like Irakli is on this already
Component: Networking: HTTP → General
Product: Core → Add-on SDK
QA Contact: networking.http → general
Version: Trunk → unspecified
Severity: critical → normal
Priority: -- → P2
Assignee | ||
Comment 7•14 years ago
|
||
(In reply to Benjamin Smedberg [:bsmedberg] from comment #5)
> Mossop, assuming comment 4 is correct can you get somebody to fix the
> Jetpack SDK code?
>
> Do we have any breakpad crash IDs? I'd like to see if this is a common issue
> in the field apart from this specific extension.
If I understood :jdm correctly, problem is with my 'jetpack-io' library and not with with a jetpack code.
Comment 8•14 years ago
|
||
Is the jetpack-io library not part of the SDK?
Assignee | ||
Comment 9•14 years ago
|
||
(In reply to Josh Matthews [:jdm] from comment #3)
> The problem here is that net.js in the addon is using Components.Constructor
> to instantiate the socket transport service. The Constructor call only ever
> calls CreateInstance, which unconditionally calls the factory method instead
> of returning the service object. There's debugging code that warns when this
> occurs, but only with certain #defines enabled. Overall, a poor experience,
> but I'm not certain if there's a way to improve the situation on the Gecko
> side without fixing bug 494946. This is definitely problematic JS code that
> needs fixing in the addon, however.
If I understand it correctly problem is with following lines right ?
https://github.com/Gozala/jetpack-io/blob/master/net.js#L16-17
Would this be a right fix here ?
const { createTransport } = CC['@mozilla.org/network/socket-transport-service;1').
getService(Ci.nsISocketTransportService)
Thanks!
Assignee | ||
Comment 10•14 years ago
|
||
(In reply to Benjamin Smedberg [:bsmedberg] from comment #8)
> Is the jetpack-io library not part of the SDK?
It's not, it's a third party library https://github.com/Gozala/jetpack-io
Comment 11•14 years ago
|
||
Yes, I believe that .getService is the correct fix.
Reporter | ||
Comment 12•14 years ago
|
||
I patched the external jetpack-io package as advised (see patch from our internal repository) and I can confirm that this solves the assertion/crash problems.
Assignee | ||
Updated•14 years ago
|
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•