xeno icon indicating copy to clipboard operation
xeno copied to clipboard

Xeno hangs

Open roshammar opened this issue 10 years ago • 5 comments

I have used xeno successfully for several weeks, but suddenly, today, I noticed that xeno stopped syncing the file I was editing. If I run "xeno list" it just hangs. No error output.

I am on OS X and have xeno installed with homebrew. $ brew info xeno xeno: stable 1.0.5 http://xeno.io /usr/local/Cellar/xeno/1.0.5 (4 files, 60K) * Built from source From: /Library/Caches/Homebrew/Formula/xeno.rb

I will be happy to provide any additional information that you might need to troubleshoot this.

roshammar avatar Feb 17 '15 08:02 roshammar

Update: After a long time, perhaps 30 minutes, I was able to run xeno list without it hanging. It now appears that it is syncing again, but xeno list insists that it is unsynced.

roshammar avatar Feb 17 '15 09:02 roshammar

I'm seeing this as well after a computer restart. I tried running xeno daemon but it just hangs. Initially I see "sh" in my iTerm tab, then it blinks between "sh" and "sleep" and then eventually hangs on "sleep":

screen shot 2015-12-15 at 11 56 24 am

jaydiablo avatar Dec 15 '15 18:12 jaydiablo

My mac restarted itself for a security update, and after restart, xeno would hang again.

To fix it I had to remove ~/.xeno and ~/.xeno.lock, uninstall through homebrew, then reinstall with homebrew.

Removing ~/.xeno took a bit of time as I had 6 - 8 projects in there, some of which may have contained quite a few files.

jaydiablo avatar Feb 01 '16 18:02 jaydiablo

Sorry to chime in so late here (seriously, I feel like an ass).

If it's hanging, it almost always has to do with the ~/xeno.lock directory hanging around. I'm working on a rewrite at the moment (part of the reason I've been neglecting the issues/PRs) which'll use proper POSIX fcntl locking (and similar on Windows), something you just can't do from a shell script. That'll work much better because it'll allow the daemon to die and automatically release the lock, something that doesn't happen at the moment and leaves the lock sitting around.

Hope to have something available to try in the next month or so, but can't make any promises. Unfortunately there's not really a stopgap I can suggest except manually stopping the daemon using xeno daemon --stop before shutting down. It's supposed to catch SIGTERM, but it doesn't always seem to...

xenoscopic avatar Feb 01 '16 18:02 xenoscopic

Don't feel like an ass, life happens :)

I believe the first time this happened to me I did try removing the lock, but I was trying a lot of different things, so don't recall in what order I may have tried that. This time I didn't try removing the lock until after uninstalling xeno and the ~./xeno dir, mainly because I remember that uninstalling/reinstalling + removing the lock and the local directory made it work for me again.

Does it seem reasonable that after a OS restart that just removing the ~/.xeno.lock file would prevent the hanging? If so, I'll definitely try that next time.

I typically don't restart my OS, but this particular update installed itself and forced a restart when the mac was idle, so no chance really for me to get the xeno daemon --stop command in there.

Looking forward to the rewrite, as the polling is less than ideal, but with a 5 second poll it certainly makes remote editing a lot more manageable than other solutions I've tried over the years, so thanks for that! :)

jaydiablo avatar Feb 01 '16 21:02 jaydiablo