intel / zephyr.js

JavaScript* Runtime for Zephyr* OS
Other
180 stars 64 forks source link

ringbuf put errors when running I2CBMP280.js and HeartRateDemo.js on A101 #1582

Open qiaojingx opened 7 years ago

qiaojingx commented 7 years ago

Description

This is an regression issue and probably caused by #1542.ringbuf put errors prints when running HeartRateDemo.js and I2CBMP280.js on A101.

Test Code

HeartRateDemo.js; I2CBMP280.js

Steps to Reproduction

  1. make JS=samples/I2CBMP280.js
  2. make dfu

Actual Result

selection_029

Expected Result

No error.

Test Builds

Branch Commit Id Target Device Test Date Result
master a36b2c9 - cd3f44e Arduino101 Oct 11, 2017 Fail
master 4b77505 Arduino101 Oct 11, 2017 Pass

Additional Information

brianjjones commented 7 years ago

Looks like the setInterval isn't finishing before it gets called again. I'll look to make sure there isn't a problem with callbacks. It may also be that 10 is too low a timer number.

brianjjones commented 7 years ago

Looks like callbacks are fine, the demo timer is just going faster than the callbacks can be handled - hence the error message. #1614 will fix this.

qiaojingx commented 7 years ago

Verified with commit cac4c3a + #1614. Error in I2CBMP280.js has been fixed. Could you change interval time in HeartRateDemo.js, too?

grgustaf commented 7 years ago

This seems to indicate we have a performance regression because we used to do this work in 10ms apparently and now it takes 200ms? Rather than mask the problem (:D) let's look into why. @brianjjones, could you try testing this just before and after #1542 to see if that's what caused the problem.

grgustaf commented 7 years ago

@brianjjones ping on this one, just note I don't think we're done here.

jimmy-huang commented 6 years ago

@cuiyanx is this still reproducible?

cuiyanx commented 6 years ago

@jimmy-huang Yes, this issue can be reproduced on both cases. And /samples/Stepper.js case looks like this issue. Log:

Stepper Motor sample...

554:(ERROR) 1 ringbuf put errors (last rval=-122)

554:(ERROR) 15 ringbuf put errors (last rval=-122)

554:(ERROR) 47 ringbuf put errors (last rval=-122)

554:(ERROR) 110 ringbuf put errors (last rval=-122)