TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

I found a bug in SQLite

584 pointsby otoolepover 2 years ago

16 comments

adiusover 2 years ago
Just a few days ago I found a serious security issue in SQLite: <a href="https:&#x2F;&#x2F;sqlite.org&#x2F;forum&#x2F;forumpost&#x2F;07beac8056151b2f" rel="nofollow">https:&#x2F;&#x2F;sqlite.org&#x2F;forum&#x2F;forumpost&#x2F;07beac8056151b2f</a><p>It was also promptly fixed, but it makes me feel like the millions of tests sound better than they are in reality …
评论 #33953025 未加载
评论 #33950680 未加载
评论 #33950160 未加载
评论 #33950669 未加载
评论 #33949798 未加载
评论 #33949436 未加载
评论 #33951583 未加载
评论 #33950608 未加载
评论 #33957351 未加载
评论 #33957920 未加载
评论 #33952507 未加载
评论 #33961248 未加载
评论 #33953601 未加载
评论 #33951416 未加载
评论 #33950234 未加载
评论 #33949930 未加载
评论 #33952108 未加载
lifeisstillgoodover 2 years ago
I understand the comment about &quot;intellectual honesty&quot; about those pesky transient bugs.<p>It&#x27;s really hard to know where a hard to reproduce bug is on the cost benefit spectrum - and that is the crux - not knowing enough about the bug to determine it&#x27;s negative weight means you are essentially guessing both sides of the equation.<p>It&#x27;s probably not the best idea, it waiting till users find it at east gives a good idea of the prior
评论 #33947537 未加载
ChuckMcMover 2 years ago
The lesson here is never ignore your own &quot;Huh, that&#x27;s weird.&quot; experience when using software. :-)
评论 #33949372 未加载
评论 #33947010 未加载
评论 #33950902 未加载
评论 #33947438 未加载
评论 #33952335 未加载
评论 #33948534 未加载
评论 #33947550 未加载
评论 #33949560 未加载
mort96over 2 years ago
I&#x27;d be interested to read some discussion on why this wasn&#x27;t caught earlier. When you have some thing with supports read + write and supports access from multiple threads&#x2F;processes, I&#x27;d expect &quot;read as fast as possible from one thread, write as fast as possible from another&quot; to be one of the most obvious tests to write.
评论 #33946224 未加载
评论 #33948605 未加载
评论 #34016680 未加载
MrWifflesover 2 years ago
Props to the author, this was well written. Clear and concise, it was easy to follow. Not like my ratings and ravings! ;-)
评论 #33955157 未加载
neyaover 2 years ago
The top comment is...sad yet funny:<p><pre><code> Euphorbium December 11, 2022 at 2:31 pm I think I hit the same bug in django, and it took them 5 years to fix it. Django tagline is “webframework for perfectionists with deadlines”. I was fired because of this bug.</code></pre>
habiburover 2 years ago
Even though SQLite bugs are rare, those can be found occasionally.<p>I remember a bug finder took the sqlite documentation off their website. Collected all their keywords, made up millions of jumbled up queries of random combination between keywords and then ran those overnight to find 10 bugs where the engine crashed. And yes those were also reported and fixed quickly.
评论 #33946299 未加载
评论 #33948683 未加载
评论 #33946325 未加载
jacquesmover 2 years ago
No such thing as software without bugs, but given the incredibly widespread use that SQLite sees the quality as evidenced by the fact that finding a bug is news by itself is extremely high. Something to strive for.
评论 #33952124 未加载
fastaguy88over 2 years ago
I have seen similar error messages of the &quot;database is corrupted ...&quot; type with MariaDB when I simply typed in my SQL incorrectly.
orfover 2 years ago
Lots of people saying that SQLite is super high quality and finding a bug is so rare. It’s not. I found one on a simple query utilising WHERE EXISTS [1]. Reporting it to a weird forum was also a horrible experience.<p>It’s high quality software, don’t get me wrong, but the infamous 100% test coverage doesn’t make it somehow immune to issues, or imply that the issues you do find are of a certain level of complexity. Nothing is back and white like that.<p>1. <a href="https:&#x2F;&#x2F;sqlite.org&#x2F;forum&#x2F;forumpost&#x2F;452888d3b1?t=c&amp;unf" rel="nofollow">https:&#x2F;&#x2F;sqlite.org&#x2F;forum&#x2F;forumpost&#x2F;452888d3b1?t=c&amp;unf</a>
评论 #33946649 未加载
评论 #33946675 未加载
评论 #33946960 未加载
评论 #33946716 未加载
评论 #33946754 未加载
评论 #33947779 未加载
评论 #33950666 未加载
einpoklumover 2 years ago
&gt; I found a bug in SQLite<p>Well, good thing it wasn&#x27;t a bug in the C compiler you were building sqlite with... even those can come up occasionally.
techn00over 2 years ago
It&#x27;s impressive to find a bug in something like sqlite, which is famous for its larger than the codebase test suite
评论 #33946231 未加载
评论 #33947625 未加载
nodesocketover 2 years ago
My first time coming across rqlite. Looks awesome. I just finished writing a poor man’s centralized store of SQLite writing the DB file to Minio (s3 compliant) storage but of course has race conditions all over the place. Gonna take a look at replacing with rqlite.
de6u99erover 2 years ago
Did you have to get baptized first to be allowed reporting a bug?
评论 #33952627 未加载
jeroen79over 2 years ago
still just submit a bugreport instead of making a fuss of it.
评论 #33946316 未加载
评论 #33946609 未加载
评论 #33947054 未加载
评论 #33947049 未加载
password4321over 2 years ago
Long long ago I lost my SMS database on my first Android phone to corruption.<p>The worst part was if the app encountered an error opening the database, it just deleted it and started over -- no chance of repair to rescue any of the data. I don&#x27;t think this is done this way anymore.<p>After that I have installed SMS Backup+ first thing on every new phone.
评论 #33946964 未加载