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 46 forks source link

[webml/MPS] Crash happened when attempting to do extra actions for the finished model #77

Closed Christywl closed 5 years ago

Christywl commented 6 years ago

Test Env: Chromium Version : nightly build 65.0.3324.0 (revision f9e1a31) OS : Mac OS X 10.13.4

Expected Result: No crash happens

Actual Result: Crash happened when attempting to do extra actions for the finished model

How to reproduce: 1.Download and install Chromium 2.Launch Chromium 3.Run test case on Chromium: https://brucedai.github.io/nt/test/index-local.html

Test Cases:

  1. raise error when attempting to add an operand into the finished model: https://github.com/intel/webml-polyfill/blob/master/test/unit-test/test-Model.js#L204
  2. raise error when attempting to reset the value for an operand of the finished model: https://github.com/intel/webml-polyfill/blob/master/test/unit-test/test-Model.js#L903
  3. raise error when attempting to reset the operation of the finished model:https://github.com/intel/webml-polyfill/blob/master/test/unit-test/test-Model.js#L3246 4.raise error when attempting to modify inputs/outputs of the finished model: https://github.com/intel/webml-polyfill/blob/master/test/unit-test/test-Model.js#L3347
sunlin-link commented 5 years ago

The pointer of ModelInfo is released after Model::finished() is invoked. So there is no available data to store new changes.

sunlin-link commented 5 years ago

@BruceDai Please help to verify the fix.

Christywl commented 5 years ago

Verified it with Chromium nightly build(50746ae), it can't reproduce, so close it.

Christywl commented 5 years ago

Reopen this issue since this issue occurs again on the Chromium nightly build 279911e 1fd54ed. Test URL: https://brucedai.github.io/nt/test/model.html?backend=mps

Received signal 11 SEGV_MAPERR 00000000000c
 [0x00010e16f2ec]
 [0x00010e16f1e1]
 [0x7fff51373f5a]
 [0x7ffee40ab9f8]
 [0x000111c5598f]
 [0x00010d2b7e18]
 [0x00010d2b733d]
 [0x00010d2b6a2b]
 [0x00010da900ae]
 [0x0028b69086a6]
 [0x0028b69086a6]
 [0x00010d9ff046]
 [0x0028b69086a6]
 [0x00010d9ff046]
[end of stack trace]
sunlin-link commented 5 years ago

regression by https://github.com/otcshare/chromium-src/pull/20

sunlin-link commented 5 years ago

@Christywl Fixed. Please verify

Christywl commented 5 years ago

Verified it with the chromium nightly build 3677b5f, this issue wasn't reproduced.

Christywl commented 5 years ago

sorry for the mistake(reopen).