grpc-dart icon indicating copy to clipboard operation
grpc-dart copied to clipboard

Unhandled exception

Open a14n opened this issue 6 years ago • 2 comments

With grpc-1.0.3 I faced a crash with the following stack. This crash occurs during a load test.

Unhandled exception:
NoSuchMethodError: The method 'remove' was called on null.
Receiver: null
Tried calling: remove(":status")
#0      Object.noSuchMethod (dart:core-patch/object_patch.dart:50:5)
#1      ServerHandler_.sendTrailers (package:grpc/src/server/handler.dart:283:23)
#2      ServerHandler_._sendError (package:grpc/src/server/handler.dart:347:5)
#3      ServerHandler_._onResponse (package:grpc/src/server/handler.dart:236:7)
#4      _RootZone.runUnaryGuarded (dart:async/zone.dart:1314:10)
#5      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
#6      _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
#7      _SyncStreamController._sendData (dart:async/stream_controller.dart:764:19)
#8      _StreamController._add (dart:async/stream_controller.dart:640:7)
#9      new Stream.fromFuture.<anonymous closure> (dart:async/stream.dart:114:18)
#10     _RootZone.runUnary (dart:async/zone.dart:1379:54)
#11     _FutureListener.handleValue (dart:async/future_impl.dart:126:18)
#12     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45)
#13     Future._propagateToListeners (dart:async/future_impl.dart:668:32)
#14     Future._complete (dart:async/future_impl.dart:473:7)
#15     Future._chainForeignFuture.<anonymous closure> (dart:async/future_impl.dart:423:16)
#16     _RootZone.runUnary (dart:async/zone.dart:1379:54)
#17     _FutureListener.handleValue (dart:async/future_impl.dart:126:18)
#18     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45)
#19     Future._propagateToListeners (dart:async/future_impl.dart:668:32)
#20     Future._complete (dart:async/future_impl.dart:473:7)
#21     Stream.fold.<anonymous closure> (dart:async/stream.dart:724:18)
#22     _RootZone.runGuarded (dart:async/zone.dart:1302:10)
#23     _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:389:13)
#24     _RootZone.run (dart:async/zone.dart:1374:54)
#25     _FutureListener.handleWhenComplete (dart:async/future_impl.dart:150:18)
#26     Future._propagateToListeners.handleWhenCompleteCallback (dart:async/future_impl.dart:609:39)
#27     Future._propagateToListeners (dart:async/future_impl.dart:665:37)
#28     Future._addListener.<anonymous closure> (dart:async/future_impl.dart:348:9)
#29     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#30     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#31     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:115:13)
#32     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:5)

The stack points out https://github.com/grpc/grpc-dart/blob/c65afe9ec02d90e9334ae86c080f3546919e6bcd/lib/src/server/handler.dart#L283

a14n avatar Jun 19 '19 12:06 a14n

This is definitely a bug.

Is this something you can reproduce consistently? If so, can you make a small repro? It would be very helpful for digging into this.

sigurdm avatar Jun 20 '19 10:06 sigurdm

Unfortunately I don't know what has been done. I only found this stack in logs after seeing the process done.

a14n avatar Jun 20 '19 12:06 a14n