Re: [sqlite] What does SQLITE_IOERR_VNODE mean?

2017-04-11 Thread Jens Alfke
Apple's darwin-dev mailing list, hosted at lists.apple.com 
, might be a good place to ask about this. 
(I'm subscribed to it, so I could forward a question if the OP doesn't want to 
go to the bother of subscribing.)

—Jens
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] What does SQLITE_IOERR_VNODE mean?

2017-04-11 Thread Simon Slavin

On 11 Apr 2017, at 4:06pm, Richard Hipp  wrote:

> SQLITE_IOERR_VNODE is an error code used by proprietary modifications
> to SQLite implemented by Apple for use on MacOS and iOS.  I am told
> "The code indicates that a file relevant to the call was invalidated
> by a dispatch vnode source event" but I do not understand what that
> means.

I’m not surprised.  That’s not a useful explanation for anyone who isn’t 
messing with the OS X Virtual File System.  I’m a Mac expert and I have only 
the vaguest clue.  I think Apple is trying to implement memory-mapped file 
handling for SQLite in a very direct and efficient manner, and a strange 
combination of circumstances is triggering an error.

We're used to inodes in file storage.  Apple uses vnodes as well as inodes.  
They’re for storing a file’s metadata, like the file’s name and the last time 
the file was accessed.  If you change metadata VFS might decide to overwrite 
the contents of the existing vnode, or it might write the new data to a new 
vnode, then switch the file’s pointer to the new one and dispose of the old one.

What I think you’re being told is that you’re referring to a file, VFS is 
remembering the reference by pointing to the vnode, but that the file now has a 
new vnode because it has new metadata.  I have no clue why that might happen.  
vnodes are meant to be for internal use only.  If you’re not intentionally 
messing with them, you shouldn’t be getting vnode errors.

The nearest I can find is Working With the File System from



and then



There is one common use for vnodes: memory-mapped files.  The vnode pager 
maintains the relationship between the memory copy of a page of a file and the 
disk copy of the same page of the file.  So perhaps that piece of code is 
intentionally messing with memory-mapped file access.  Again, there’s no good 
reason for you to be getting errors with vnodes unless you’re messing at kernel 
level.

ObDisc: I am not familiar with this stuff.  I don’t program Macs at kernel 
level and don’t understand how it all works.  I’m just remembering stuff I read 
somewhere, possibly now obsolete.

Simon.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] What does SQLITE_IOERR_VNODE mean?

2017-04-11 Thread Richard Hipp
On 4/11/17, Yf Shen  wrote:
> We have an application that connects to a small SQLite database in
> read-only mode and do some very simple SELECT queries.
>
> We recently upgraded Mac OS to 10.12, and the application started to
> sporadically fail with a general (useless) error code SQLITE_IOERR. We
> managed to get the extended error code SQLITE_IOERR_VNODE (6922), but could
> not find any documentation about it or find where it is used in the source
> code of SQLite except that we found where it was defined. Google knows
> nothing about this error either probably because it is brand new. Can
> someone shed some light?

SQLITE_IOERR_VNODE is an error code used by proprietary modifications
to SQLite implemented by Apple for use on MacOS and iOS.  I am told
"The code indicates that a file relevant to the call was invalidated
by a dispatch vnode source event" but I do not understand what that
means.

-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] What does SQLITE_IOERR_VNODE mean?

2017-04-11 Thread Yf Shen
We have an application that connects to a small SQLite database in
read-only mode and do some very simple SELECT queries.

We recently upgraded Mac OS to 10.12, and the application started to
sporadically fail with a general (useless) error code SQLITE_IOERR. We
managed to get the extended error code SQLITE_IOERR_VNODE (6922), but could
not find any documentation about it or find where it is used in the source
code of SQLite except that we found where it was defined. Google knows
nothing about this error either probably because it is brand new. Can
someone shed some light?

Thanks,
Yufei
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users