Documentation Source Text

Check-in [bc266720f3]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add a fragment for the posix close bug in the howtocorrupt.html document.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: bc266720f37b644aa0dd4ec3afdc95a65a93db89
User & Date: drh 2012-01-27 16:06:44
Context
2012-01-28
15:23
Update the INSERT statement syntax diagram to show the support for multiple rows in the VALUES clause of an INSERT. check-in: 55bd8303d7 user: drh tags: trunk
2012-01-27
16:06
Add a fragment for the posix close bug in the howtocorrupt.html document. check-in: bc266720f3 user: drh tags: trunk
2012-01-16
13:55
Add the source-id and sha1 sum of sqlite3.c for 3.7.10. check-in: 7243ea8540 user: dan tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to pages/howtocorrupt.in.

81
82
83
84
85
86
87

88
89
90
91
92
93
94
documentation says it will.  But some filesystems contain bugs in their
locking logic such that the locks do not always behave as advertised.
This is especially true of network filesystems and NFS in particular.
If SQLite is used on a filesystem where the locking primitives contain
bugs, and if two or more threads or processes try to access the same
database at the same time, then database corruption might result.</p>


<h3>2.2 Posix advisory locks canceled by a separate thread doing close()</h3>

<p>The default locking mechanism used by SQLite on unix platforms is
POSIX advisory locking.  Unfortunately, POSIX advisory locking has design
quirks that make it prone to misuse and failure.  In particular, any
thread in the same process with a file descriptor that is holding a POSIX
advisory lock can override that lock using a different file descriptor.







>







81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
documentation says it will.  But some filesystems contain bugs in their
locking logic such that the locks do not always behave as advertised.
This is especially true of network filesystems and NFS in particular.
If SQLite is used on a filesystem where the locking primitives contain
bugs, and if two or more threads or processes try to access the same
database at the same time, then database corruption might result.</p>

<tcl>hd_fragment posix_close_bug</tcl>
<h3>2.2 Posix advisory locks canceled by a separate thread doing close()</h3>

<p>The default locking mechanism used by SQLite on unix platforms is
POSIX advisory locking.  Unfortunately, POSIX advisory locking has design
quirks that make it prone to misuse and failure.  In particular, any
thread in the same process with a file descriptor that is holding a POSIX
advisory lock can override that lock using a different file descriptor.