[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: SSD's and many edits of a single file



On 04/09/18 20:58, Gene Heskett wrote:
On Monday 09 April 2018 21:25:34 David Christensen wrote:

On 04/09/18 07:30, Gene Heskett wrote:
On Monday 09 April 2018 09:51:37 Greg Wooledge wrote:
On Mon, Apr 09, 2018 at 09:46:07AM -0400, rhkramer@gmail.com

wrote:
To your original problem, have you tried going to a command line
and throwing in a couple =sync=s?  I would try that, maybe after
saving in your editor, and again maybe after open and / or saving
in the cnc program.

As others have explained, the OS (Linux) keeps a cache of file
contents that have been written by applications, but not yet
committed to permanent storage.  If you "save" from within the text
editor, then the saved contents should be immediately visible to
other processes reading the file, regardless of whether it has been
synced to disk. They'll simply get the cached version.

Which is not happening after several hours and a hundred or more
edits. Which is why its so intermittent.

On 04/09/18 02:53, Gene Heskett wrote:
Lots of people seem to like gedit, but its saves are the cause of
important configuration files being written back to disk with the
line order totally trashed, as if you had thrown it on the floor in
512 byte pieces, then picked it back up and reassembled it in random
order. Then try to recover a 1400 LOC configuration file...

Thats happened using gedit enough, on several different machines ...

One editor failing would also make me suspect the editor.


But two failing editors would make me suspect some common factor, such
as a shared library and/or the kernel.

I'd buy that if the failures were similar.  They are not.

They both seem to involve getting blocks from an app to memory and blocks from memory to disk (and/or disk to memory). They could be variations on a theme.


Can you reproduce the bugs on a machine with straight-up Debian (e.g. no linuxcnc)?


As a safety net, I would suggest a versioning file system (e.g. similar to the versioning feature of VMS). STFW is pretty thin, but copyfs might be worth a try:

https://packages.debian.org/search?keywords=copyfs&searchon=names&suite=all&section=all


David


Reply to: