-
Notifications
You must be signed in to change notification settings - Fork 183
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
ENOSPC on linux #202
Comments
So question : paulmillr/chokidar#294 (comment) |
Also give |
Just retried with 2.0.5. Alas same result; no UI appears. This time I noticed that when installing npm WARNs about chokidar. I don't know if this is relevant. Terminal transcripts follow. <<<<< deleted long npm module listing here as proved not to relevant >>>> Now in project directory Observation: While my current directory in this instance is ~/workspace/myproject , it seems strange that alm is looking at a sibling directory ~/workspace/TypeScript/ in the trace below where it says 'Error: watch'. Strikes me as odd that it would do that. `
Error: watch /home/xxx/workspace/TypeScript/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir ENOSPC Now in empty directory
Again no UI appears; just stares me back. :-( |
That one is actually expected. You need to open the dashboard URL However why the |
Yeah, sorry, I just realised that. My expectation was that some UI would happen just like when you launch Atom editor from the command line. Mia culpa for not reading the docs; but then again one cannot assume people will read the docs so at least a clear message in the terminal output on start up might be a good idea. (Yes, it did say DASHBOARD: http://etc, but you know.) At least I can get sort of going with it now. |
Good on you. While I feel like a goose, I don't really think I'm a goose. Thinking about the psychology of it though, probably had I run it the empty directory scenario first up and didn't see all the stack trace messages, I would have opened up the browser straight away. Still like you allude to, the ENOSPC issue in the first case needs understanding as to why. |
Editing the issue to track that better. This is external stuff but googling around the following shows up:
Just as an estimate how many files are in that project folder? 🌹 |
There were less than a dozen of mine but maybe it was looking into I will do some further tests/research. Might take a day or so as have On 19/09/16 14:05, Basarat Ali Syed wrote:
|
Got a better handle on the problem now.
These scripts are: alm-torture-test-pass.sh:
and alm-torture-test-fail.sh: (Notice the workspace direcory name now has parens around the abbreviated month name)
Running alm-torture-test-pass.sh as the name suggests is no problem. In a workspace subdirectory, it clones a large repo off GitHub, makes 8 copies of the repo, then creates and changes into an empty directory, and then in the empty directory runs alm. All without any issues.
Now running alm-torture-test-fail.sh as the name suggests is a problem (at least on my machine). Again, in a workspace subdirectory, it clones the same large repo off GitHub,
Further Conclusion So now some questions, like
btw. I organise my workspaces by years with 12 subdirs being each month in respective year. A symlink in my home directory called current-workspace always points to the latest month. Then because I like my workspace directory listings to appear nicely ordered, I call name individual monthly workspaces like workspace-2016-03(mar) because then I don't have to think what name of month is month 03. I think I have spent too much time on this now but will be pleased if this information is useful to you. Cheers Maybe see you on Twitter, thebabellion |
I've also added docs : https://basarat.gitbooks.io/alm/content/contributing/file-listing.html to help you and others.
Sounds very weird. FWIW our external API access to the watcher is super simple :
|
I was thinking of bowing out of this issue for the moment but feel it is Certainly it would be great if "chokidar fixes it or someone [else] If you keep this issue open for a while I'll try to get back to it in a On 20/09/16 08:14, Basarat Ali Syed wrote:
|
btw. Were you able to replicate my test scripts with opening alm in the
empty directory with all those copies of DefinitelyTyped as siblings, or
did you just take my terminal output as "proof"? Admittedly the tests
were a bit tedious so I understand if you couldn't afford the time to do so.
|
Haven't tried it 😁 |
I've had the opportunity to dig deep into this issue having forked both alm and chokidar. Also read up on the Node FS watch API. I feel that these issues will never go away with the current watch architecture as the low-level watch API is intrinsically flakey. Even with Eclipse IDE which I have configured to use native file system hooks, I find that sometimes my workspace does not get refreshed when it is supposed to. Having spent over 5 years of my career writing file system drivers from encryption to security applications I think I can speak with qualified experience. Notice that your profile says you live in Melbourne. Long time ago I was lead engineer for an anti-virus/PC security company in Melbourne. These days I'm back in Adelaide .. an easy phone call away if ever you wish to discuss. Talking is probably a more effective means of communicating than typing too many words. Anyway you are welcome to the offer if you wish. Contact via DM on Twitter, thebabellion. |
Agree 100%. That's why offloaded to chokidar as it is good enough for most projects 🌹 |
Unfortunately though I will not be able to use alm editor. I put some
console.log messages into alm file watch callbacks. Sometimes they are
called when files change sometimes (mostly) no. Reboot (LinuxMint) and
I'll see those hooks being called again for a while. Copy some files
around, do a git clone in a sibling directory (to where alm was
launched) and then flop again, no more callbacks. Just dead in the water.
|
About the ENOSPC error on Linux, I've tried the following code and fixed the error
More info at: typicode/json-server#361 |
Thanks for this. I already had placed |fs.inotify.max_user_watches=524288| at the end of the file AND restarting the box |/etc/sysctl.conf| but do not recall ever issuing the command |sudo sysctl -p |
Just saw some emails from issues in paulmillr/chokidar which say "Any news on this? Also a default-off option is welcome. I see there's and "Problems with parentheses will be solved by #535 A different fix will still be needed for other sorts of glob characters I do remember mentioning the parentheses thing as well .. so I it |
Closing as external and can't think of a fix short of reinventing chokidar which is not on the roadmap at the moment. |
Whilst mostly a Babel user, I got interested in TypeScript a few weeks ago and started following @basarat on Twitter. Seeing his tweet about Alm last night prompted me to check out Alm. In subsequent communication, @thebabelion I mentioned to @basarat, that all did not go well and he requested I log issue here. Here is relevant terminal output (my own path names anonymized).
In both cases no UI appeared.
Terminal session in my TypeScript project directory
`
xxx@xxx-VirtualBox ~/xxx/myproject $ cat /etc/*-release
DISTRIB_ID=LinuxMint
DISTRIB_RELEASE=18
DISTRIB_CODENAME=sarah
DISTRIB_DESCRIPTION="Linux Mint 18 Sarah"
NAME="Linux Mint"
VERSION="18 (Sarah)"
ID=linuxmint
ID_LIKE=ubuntu
PRETTY_NAME="Linux Mint 18"
VERSION_ID="18"
HOME_URL="http://www.linuxmint.com/"
SUPPORT_URL="http://forums.linuxmint.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/linuxmint/"
UBUNTU_CODENAME=xenial
cat: /etc/upstream-release: Is a directory
xxx@xxx-VirtualBox ~/xxx/myproject $ node --version
v6.6.0
xxx@xxx-VirtualBox ~/xxx/myproject $ npm --version
3.10.7
xxx@xxx-VirtualBox ~/xxx/myproject $ alm
Version: 2.0.3
DASHBOARD: http://localhost:4444
TSCONFIG: All Good! /home/xxx/xxx/myproject/tsconfig.json
[TSC] Started Initial Error Analysis: /home/xxx/xxx/myproject/tsconfig.json
[LINT] No tslint configuration found.
[TSC] Error Analysis Duration: 1s
[TSC] FileCount: 3 Errors: 2
[TSC] Incremental Error Analysis /home/xxx/xxx//myproject/tsconfig.json
[TSC] Error Analysis Duration: 1s
[TSC] FileCount: 3 Errors: 2
events.js:160
throw er; // Unhandled 'error' event
^
Error: watch /home/xxx/xxx/tests/baselines/reference/project/sourceRootAbsolutePathSubfolderNoOutdir/amd/ref ENOSPC
at exports._errnoException (util.js:1036:11)
at FSWatcher.start (fs.js:1429:19)
at Object.fs.watch (fs.js:1456:11)
at createFsWatchInstance (/home/xxx/lib/node_modules/alm/node_modules/chokidar/lib/nodefs-handler.js:37:15)
at setFsWatchListener (/home/xxx/lib/node_modules/alm/node_modules/chokidar/lib/nodefs-handler.js:80:15)
at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/xxx/lib/node_modules/alm/node_modules/chokidar/lib/nodefs-handler.js:228:14)
at FSWatcher.NodeFsHandler._handleDir (/home/xxx/lib/node_modules/alm/node_modules/chokidar/lib/nodefs-handler.js:407:19)
at FSWatcher. (/home/xxx/lib/node_modules/alm/node_modules/chokidar/lib/nodefs-handler.js:455:19)
at FSWatcher. (/home/xxx/lib/node_modules/alm/node_modules/chokidar/lib/nodefs-handler.js:460:16)
at FSReqWrap.oncomplete (fs.js:123:15)
fileListingWorker worker restarting. Don't know why it stopped with code: 1
`
Terminal session in an empty directory
`
xxx@xxx-VirtualBox ~ $ mkdir tmp
xxx@xxx-VirtualBox ~ $ cd tmp
xxx@xxx-VirtualBox ~/tmp $ alm
Version: 2.0.3
DASHBOARD: http://localhost:4445
[TSCONFIG]: No active project
`
Trusting this information is helpful.
Justin Johansson
Twitter: @thebabelion
GitHub: @johanssj
The text was updated successfully, but these errors were encountered: