intel / webml-polyfill

Deprecated, the Web Neural Network Polyfill project has been moved to https://github.com/webmachinelearning/webnn-polyfill
Apache License 2.0
161 stars 42 forks source link

[MPS] The browser crashed when the input is 4D tensor and the concatenation axis is 3 #536

Closed Christywl closed 5 years ago

Christywl commented 5 years ago

Test Env: Chromium Version: nightly build 70.0.3503.0 (a5a8547) Platform: Mac OS 10.13.6

Expected Result: No crash

Actual Result:

[8960:775:0130/100151.412558:ERROR:native_view_host_mac.mm(177)] Not implemented reached in virtual void views::NativeViewHostMac::ShowWidget(int, int, int, int, int, int)
[8960:775:0130/100151.412632:ERROR:native_view_host_mac.mm(177)] Not implemented reached in virtual void views::NativeViewHostMac::ShowWidget(int, int, int, int, int, int)
2019-01-30 10:01:51.840 Chromium Helper[8965:230439] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil'
*** First throw call stack:
(
    0   CoreFoundation                      0x00007fff53b6123b __exceptionPreprocess + 171
    1   libobjc.A.dylib                     0x00007fff7adf2c76 objc_exception_throw + 48
    2   CoreFoundation                      0x00007fff53ba24c4 _CFThrowFormattedException + 202
    3   CoreFoundation                      0x00007fff53a7f730 -[__NSArrayM insertObject:atIndex:] + 1264
    4   Chromium Framework                  0x00000001081e42e3 _ZN2ml20CompileConcatenationERNSt3__13mapIjP14MPSNNImageNodeNS0_4lessIjEENS0_9allocatorINS0_4pairIKjS3_EEEEEERNS0_6vectorINS_12OperationMacENS6_ISE_EEEERKSE_RKNS1_IjNS_9ValueInfoES5_NS6_INS7_IS8_SK_EEEEEERKNS0_10unique_ptrIA_aNS0_14default_deleteISR_EEEERKNSD_INS_10OperandMacENS6_ISX_EEEE + 627
    5   Chromium Framework                  0x00000001081dde22 _ZN2ml18CompilationImplMac19CompileModelWithMPSEN4base12OnceCallbackIFviEEE + 2178
    6   Chromium Framework                  0x00000001081dd2fc _ZN2ml18CompilationImplMac6FinishEiN4base12OnceCallbackIFviEEE + 140
    7   Chromium Framework                  0x00000001081eebaf _ZN2ml5mojom23CompilationStubDispatch19AcceptWithResponderEPNS0_11CompilationEPN4mojo7MessageENSt3__110unique_ptrINS4_25MessageReceiverWithStatusENS7_14default_deleteIS9_EEEE + 255
    8   Chromium Framework                  0x00000001081eb476 _ZN2ml5mojom15CompilationStubIN4mojo19RawPtrImplRefTraitsINS0_11CompilationEEEE19AcceptWithResponderEPNS2_7MessageENSt3__110unique_ptrINS2_25MessageReceiverWithStatusENS9_14default_deleteISB_EEEE + 38
    9   Chromium Framework                  0x0000000109a901e8 _ZN4mojo23InterfaceEndpointClient22HandleValidatedMessageEPNS_7MessageE + 456
    10  Chromium Framework                  0x0000000109a94891 _ZN4mojo8internal15MultiplexRouter22ProcessIncomingMessageEPNS1_14MessageWrapperENS1_18ClientCallBehaviorEPN4base19SequencedTaskRunnerE + 705
    11  Chromium Framework                  0x0000000109a940c4 _ZN4mojo8internal15MultiplexRouter6AcceptEPNS_7MessageE + 196
    12  Chromium Framework                  0x0000000109a8e2f1 _ZN4mojo9Connector17ReadSingleMessageEPj + 305
    13  Chromium Framework                  0x0000000109a8e9a1 _ZN4mojo9Connector24ReadAllAvailableMessagesEv + 97
    14  Chromium Framework                  0x00000001099cec08 _ZN4mojo13SimpleWatcher13OnHandleReadyEijRKNS_18HandleSignalsStateE + 248
    15  Chromium Framework                  0x00000001093f6682 _ZN4base5debug13TaskAnnotator7RunTaskEPKcPNS_11PendingTaskE + 242
    16  Chromium Framework                  0x000000010946ee0a _ZN4base8internal11TaskTracker13RunOrSkipTaskENS0_4TaskEPNS0_8SequenceEb + 906
    17  Chromium Framework                  0x00000001094af6d3 _ZN4base8internal16TaskTrackerPosix13RunOrSkipTaskENS0_4TaskEPNS0_8SequenceEb + 83
    18  Chromium Framework                  0x000000010946e69a _ZN4base8internal11TaskTracker17RunAndPopNextTaskE13scoped_refptrINS0_8SequenceEEPNS0_27CanScheduleSequenceObserverE + 282
    19  Chromium Framework                  0x0000000109467c2f _ZN4base8internal15SchedulerWorker9RunWorkerEv + 383
    20  Chromium Framework                  0x0000000109467a64 _ZN4base8internal15SchedulerWorker15RunSharedWorkerEv + 20
    21  Chromium Framework                  0x00000001094afb97 _ZN4base12_GLOBAL__N_110ThreadFuncEPv + 87
    22  libsystem_pthread.dylib             0x00007fff7bd24661 _pthread_body + 340
    23  libsystem_pthread.dylib             0x00007fff7bd2450d _pthread_body + 0
    24  libsystem_pthread.dylib             0x00007fff7bd23bf9 thread_start + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Received signal 6
 [0x0001094a6e3c]
 [0x0001094a6d31]
 [0x7fff7bd1af5a]
 [0x000000020008]
 [0x7fff7bab81ae]
 [0x7fff799b2f8f]
 [0x7fff799b312b]
 [0x7fff7adf4ea3]
 [0x7fff799ce7c9]
 [0x7fff799ce26f]
 [0x7fff7adf2da5]
 [0x7fff53ba24c4]
 [0x7fff53a7f730]
 [0x0001081e42e3]
 [0x0001081dde22]
 [0x0001081dd2fc]
 [0x0001081eebaf]
 [0x0001081eb476]
 [0x000109a901e8]
 [0x000109a94891]
 [0x000109a940c4]
 [0x000109a8e2f1]
 [0x000109a8e9a1]
 [0x0001099cec08]
 [0x0001093f6682]
 [0x00010946ee0a]
 [0x0001094af6d3]
 [0x00010946e69a]
 [0x000109467c2f]
 [0x000109467a64]
 [0x0001094afb97]
 [0x7fff7bd24661]
 [0x7fff7bd2450d]
 [0x7fff7bd23bf9]
[end of stack trace]
[8974:775:0130/100152.309432:ERROR:gles2_cmd_decoder.cc(18059)] [.BrowserCompositor-0x7f9de10c6e00]GL ERROR :GL_INVALID_OPERATION : glCreateAndConsumeTextureCHROMIUM: invalid mailbox name

How to Reproduce:

  1. Launch chromium and enable WebML flag
  2. Visit https://brucedai.github.io/webnnt/test/issue_concatenation_3.html?prefer=sustained

The test failed due to #268 before https://github.com/otcshare/chromium-src/commit/97562f64bceb8b2a5ef3e9a2783b00bfee648226. This crash issue happened from https://github.com/otcshare/chromium-src/commit/6540a81b6d2df7ae1184df3023dbd6067679bd5f. Some tests failed due to #318 in the nightly testing recently, so I didn't catch it early.

Christywl commented 5 years ago

This issue was fixed on the build 9642fde.