-
Bug
-
Resolution: Fixed
-
P3
-
8u40
-
b04
-
b15
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8062918 | 9 | Marcus Lagergren | P3 | Resolved | Fixed | b39 |
JDK-8085775 | emb-9 | Marcus Lagergren | P3 | Resolved | Fixed | team |
JDK-8065523 | 8u45 | Marcus Lagergren | P3 | Resolved | Fixed | b01 |
JDK-8070512 | emb-8u47 | Marcus Lagergren | P3 | Resolved | Fixed | team |
A new regression has been identified in 8u40 b04. When running some of the http tests of avatar.js with this build of the jdk, emitted socket becomes undefined. For example, applying this diagnostic patch to http.js, and running the test test-http-timeout.js, we get this output -
@@ -1725,9 +1725,11 @@
}
ClientRequest.prototype.onSocket = function(socket) {
+ print('ClientRequest.prototype.onSocket ' + socket + ' type ' + (typeof socket));
var req = this;
process.nextTick(function() {
+ print('ClientRequest.prototype.onSocket.nextTick ' + socket + ' type ' + (typeof socket));
var parser = parsers.alloc();
req.socket = socket;
req.connection = socket;
@@ -1755,6 +1757,7 @@
socket.onend = socketOnEnd;
socket.on('close', socketCloseListener);
parser.onIncoming = parserOnIncomingClient;
+ print('ClientRequest.prototype.onSocket.nextTick.emitting ' + socket + ' type ' + (typeof socket));
req.emit('socket', socket);
});
java -jar dist/avatar-js.jar test/simple/test-http-timeout.js
ClientRequest.prototype.onSocket [object Object] type object
ClientRequest.prototype.onSocket.nextTick [object Object] type object
ClientRequest.prototype.onSocket.nextTick.emitting [object Object] type object
Exception in thread "main" TypeError: Cannot read property "setTimeout" from undefined in jar:file:/home/akhil/ws/avatar-js/dist/avatar-js.jar!/lib/http.js at line number 1822
at <anonymous> (jar:file:/home/akhil/ws/avatar-js/dist/avatar-js.jar!/lib/http.js:1822)
at <anonymous> (jar:file:/home/akhil/ws/avatar-js/dist/avatar-js.jar!/lib/events.js:180)
at <anonymous> (jar:file:/home/akhil/ws/avatar-js/dist/avatar-js.jar!/lib/events.js:117)
at <anonymous> (jar:file:/home/akhil/ws/avatar-js/dist/avatar-js.jar!/lib/http.js:1761)
Note that 'socket' is not undefined when emitted at http.js:1761, but becomes undefined at line http.js:1822.
Perhaps the deep inheritance hierarchy is a factor? ClientRequest extends OutgoingMessage extends Stream extends EventEmitter.
@@ -1725,9 +1725,11 @@
}
ClientRequest.prototype.onSocket = function(socket) {
+ print('ClientRequest.prototype.onSocket ' + socket + ' type ' + (typeof socket));
var req = this;
process.nextTick(function() {
+ print('ClientRequest.prototype.onSocket.nextTick ' + socket + ' type ' + (typeof socket));
var parser = parsers.alloc();
req.socket = socket;
req.connection = socket;
@@ -1755,6 +1757,7 @@
socket.onend = socketOnEnd;
socket.on('close', socketCloseListener);
parser.onIncoming = parserOnIncomingClient;
+ print('ClientRequest.prototype.onSocket.nextTick.emitting ' + socket + ' type ' + (typeof socket));
req.emit('socket', socket);
});
java -jar dist/avatar-js.jar test/simple/test-http-timeout.js
ClientRequest.prototype.onSocket [object Object] type object
ClientRequest.prototype.onSocket.nextTick [object Object] type object
ClientRequest.prototype.onSocket.nextTick.emitting [object Object] type object
Exception in thread "main" TypeError: Cannot read property "setTimeout" from undefined in jar:file:/home/akhil/ws/avatar-js/dist/avatar-js.jar!/lib/http.js at line number 1822
at <anonymous> (jar:file:/home/akhil/ws/avatar-js/dist/avatar-js.jar!/lib/http.js:1822)
at <anonymous> (jar:file:/home/akhil/ws/avatar-js/dist/avatar-js.jar!/lib/events.js:180)
at <anonymous> (jar:file:/home/akhil/ws/avatar-js/dist/avatar-js.jar!/lib/events.js:117)
at <anonymous> (jar:file:/home/akhil/ws/avatar-js/dist/avatar-js.jar!/lib/http.js:1761)
Note that 'socket' is not undefined when emitted at http.js:1761, but becomes undefined at line http.js:1822.
Perhaps the deep inheritance hierarchy is a factor? ClientRequest extends OutgoingMessage extends Stream extends EventEmitter.
- backported by
-
JDK-8062918 emitted socket arg becomes null in avatar.js http tests
- Resolved
-
JDK-8065523 emitted socket arg becomes null in avatar.js http tests
- Resolved
-
JDK-8070512 emitted socket arg becomes null in avatar.js http tests
- Resolved
-
JDK-8085775 emitted socket arg becomes null in avatar.js http tests
- Resolved