Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ran into a weird error: EAGAIN #27

Open
jadonk opened this issue Apr 25, 2018 · 3 comments
Open

Ran into a weird error: EAGAIN #27

jadonk opened this issue Apr 25, 2018 · 3 comments

Comments

@jadonk
Copy link
Member

jadonk commented Apr 25, 2018

From @GuySawyer on June 27, 2014 12:18

Everything was working fine, until out of the blue I started getting this error which crashed my app:

fs.js:476
  var r = binding.read(fd, buffer, offset, length, position);
                  ^
Error: EAGAIN, resource temporarily unavailable
    at Object.fs.readSync (fs.js:476:19)
    at Object.fs.readFileSync (fs.js:310:28)
    at Object.exports.readAIN (/usr/local/lib/node_modules/bonescript/hw_capemgr.js:214:30)
    at Object.f.analogRead (/usr/local/lib/node_modules/bonescript/index.js:229:15)
    at null.<anonymous> (/home/debian/node_modules/thing-client/beagle1.js:647:18)
    at wrapper [as _onTimeout] (timers.js:252:14)
    at Timer.listOnTimeout [as ontimeout] (timers.js:110:15)

Any idea how I can get through this?

Regards
Guy

Copied from original issue: jadonk#89

@jadonk
Copy link
Member Author

jadonk commented Apr 25, 2018

From @GuySawyer on August 1, 2014 10:11

Is anyone maintaining this library?

@jadonk
Copy link
Member Author

jadonk commented Apr 25, 2018

From @damonmaria on September 5, 2014 20:20

Hi Guy. I've run into exactly the same error while trying to async readAnalog on the BeagleBone Black. The more analog pins I read from the more often this error happens.

If you look into EAGAIN it's an error that is basically saying "try again". So you can safely ignore it and try your analogRead again. Unfortunately you end up with a whole lot of log messages about the error tho.

If you look at https://github.com/isaacs/node-graceful-fs they retry 10 times if they readFile returns EAGAIN.

@jadonk Possible solutions to this is to:

  • use the fs-graceful npm
  • implement a retry with a limit inside readAIN if readFile(Sync) throws EAGAIN

Which path would you prefer?

@jadonk
Copy link
Member Author

jadonk commented Apr 25, 2018

From @adityapatadia on September 15, 2014 7:42

Try https://github.com/theoctal/octalbonescript It is fork of bonescript with a lot of improvements. We have crushed many bugs and have changes a lot of things under the hood to make it more stable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant