[fossil-users] SQLite pointer misuse in head?
I just updated my Fossil server from version [e061a675e6] 2014-09-26 21:02:03 to the tip of trunk, as of a few minutes ago. On restarting “fossil server”, I got these complaints: SQLITE_MISUSE: API call with NULL database connection pointer SQLITE_MISUSE: misuse at line 103842 of [83afe23e55] SQLITE_MISUSE: API call with NULL database connection pointer SQLITE_MISUSE: misuse at line 103842 of [83afe23e55] I reverted my tree, restarted, and the error doesn’t recur. ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] SQLite pointer misuse in head?
Did you remember to run fossil rebuild? On Thu, Oct 30, 2014 at 12:53:54PM -0600, Warren Young wrote: I just updated my Fossil server from version [e061a675e6] 2014-09-26 21:02:03 to the tip of trunk, as of a few minutes ago. On restarting “fossil server”, I got these complaints: SQLITE_MISUSE: API call with NULL database connection pointer SQLITE_MISUSE: misuse at line 103842 of [83afe23e55] SQLITE_MISUSE: API call with NULL database connection pointer SQLITE_MISUSE: misuse at line 103842 of [83afe23e55] I reverted my tree, restarted, and the error doesn’t recur. ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users -- James Turner ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] SQLite pointer misuse in head?
On Thu, Oct 30, 2014 at 2:53 PM, Warren Young war...@etr-usa.com wrote: I just updated my Fossil server from version [e061a675e6] 2014-09-26 21:02:03 to the tip of trunk, as of a few minutes ago. On restarting “fossil server”, I got these complaints: SQLITE_MISUSE: API call with NULL database connection pointer SQLITE_MISUSE: misuse at line 103842 of [83afe23e55] SQLITE_MISUSE: API call with NULL database connection pointer SQLITE_MISUSE: misuse at line 103842 of [83afe23e55] I reverted my tree, restarted, and the error doesn’t recur. It seems to be working fine for me. Do you have any other hints on how I might reproduce the problem? -- D. Richard Hipp d...@sqlite.org ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] SQLite pointer misuse in head?
I got same error msg on first web request, and then hit reload and it worked fine. -bch On 10/30/14, Richard Hipp d...@sqlite.org wrote: On Thu, Oct 30, 2014 at 2:53 PM, Warren Young war...@etr-usa.com wrote: I just updated my Fossil server from version [e061a675e6] 2014-09-26 21:02:03 to the tip of trunk, as of a few minutes ago. On restarting fossil server, I got these complaints: SQLITE_MISUSE: API call with NULL database connection pointer SQLITE_MISUSE: misuse at line 103842 of [83afe23e55] SQLITE_MISUSE: API call with NULL database connection pointer SQLITE_MISUSE: misuse at line 103842 of [83afe23e55] I reverted my tree, restarted, and the error doesn't recur. It seems to be working fine for me. Do you have any other hints on how I might reproduce the problem? -- D. Richard Hipp d...@sqlite.org ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] SQLite pointer misuse in head?
On Oct 30, 2014, at 12:57 PM, James Turner ja...@calminferno.net wrote: Did you remember to run fossil rebuild? Fossil doesn’t diagnose DB schema mismatches itself? Subversion does. Anyway, no, that didn’t help. ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] SQLite pointer misuse in head?
If you cannot tell me how to reproduce the problem, can you catch Fossil in a debugger when it emits the message and send me a stack trace? On Thu, Oct 30, 2014 at 5:21 PM, Warren Young war...@etr-usa.com wrote: On Oct 30, 2014, at 12:57 PM, James Turner ja...@calminferno.net wrote: Did you remember to run fossil rebuild? Fossil doesn’t diagnose DB schema mismatches itself? Subversion does. Anyway, no, that didn’t help. ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users -- D. Richard Hipp d...@sqlite.org ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] SQLite pointer misuse in head?
On Oct 30, 2014, at 12:58 PM, Richard Hipp d...@sqlite.org wrote: On Thu, Oct 30, 2014 at 2:53 PM, Warren Young war...@etr-usa.com wrote: SQLITE_MISUSE: API call with NULL database connection pointer It seems to be working fine for me. Do you have any other hints on how I might reproduce the problem? These are ancient, large trees. The oldest goes back 15 years, and has gone through four SCM transitions. (CVS - SVN - Git (only for svn2fossil) - Fossil) Here’s the command I’m running: fossil server -P 3691 /museum The museum is where I keep my fossils. Port 3691 is svnserve + 1. Here’s the backtrace you wanted: (gdb) break sqlite3.c:103842 Breakpoint 1 at 0x4dcc85: file ./src/sqlite3.c, line 103842. (gdb) run warning: no loadable sections found in added symbol-file system-supplied DSO at 0x2aaab000 SQLITE_MISUSE: API call with NULL database connection pointer Breakpoint 1, sqlite3LockAndPrepare (db=value optimized out, zSql=0x7a0620 INSERT INTO config(name,value,mtime) VALUES('server-code', lower(hex(randomblob(20))),now());, nBytes=-1, saveSqlFlag=1, pOld=0x0, ppStmt=value optimized out, pzTail=0x7fffe508) at ./src/sqlite3.c:103842 103842 return SQLITE_MISUSE_BKPT; (gdb) bt #0 sqlite3LockAndPrepare (db=value optimized out, zSql=0x7a0620 INSERT INTO config(name,value,mtime) VALUES('server-code', lower(hex(randomblob(20))),now());, nBytes=-1, saveSqlFlag=1, pOld=0x0, ppStmt=value optimized out, pzTail=0x7fffe508) at ./src/sqlite3.c:103842 #1 0x004dcec8 in sqlite3_prepare_v2 (db=0x350bf549e0, zSql=0x0, nBytes=0, ppStmt=0x7a0770, pzTail=value optimized out) at ./src/sqlite3.c:103922 #2 0x0041b819 in db_multi_exec (zSql=0x500e50 INSERT INTO config(name,value,mtime) VALUES('server-code', lower(hex(randomblob(20))),now());) at ./src/db.c:508 #3 0x0041c847 in db_setup_server_and_project_codes (optional=value optimized out) at ./src/db.c:1335 #4 0x0043d288 in cmd_webserver () at ./src/main.c:2206 #5 0x0043ec6a in main (argc=value optimized out, argv=0x5) at ./src/main.c:757 That is with “./configure --fossil-debug” because I thought that would fix the “value optimized out” problem. It didn’t. Here’s the tail end of running strace on that command: open(/proc/mounts, O_RDONLY) = 3 fstat(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2afc3b683000 read(3, rootfs / rootfs rw 0 0\n/dev/root..., 1024) = 1024 read(3, etc/auto.misc /misc autofs rw,fd..., 1024) = 179 read(3, , 1024) = 0 close(3)= 0 munmap(0x2afc3b683000, 4096)= 0 getrusage(RUSAGE_SELF, {ru_utime={0, 0}, ru_stime={0, 3999}, ...}) = 0 fcntl(2, F_GETFL) = 0x8002 (flags O_RDWR|O_LARGEFILE) stat(/museum, {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0 write(2, SQLITE_MISUSE: API call with NUL..., 62SQLITE_MISUSE: API call with NULL database connection pointer ) = 62 write(2, SQLITE_MISUSE: misuse at line 10..., 53SQLITE_MISUSE: misuse at line 103842 of [83afe23e55] ) = 53 write(2, SQLITE_MISUSE: API call with NUL..., 62SQLITE_MISUSE: API call with NULL database connection pointer ) = 62 write(2, SQLITE_MISUSE: misuse at line 10..., 53SQLITE_MISUSE: misuse at line 103842 of [83afe23e55] ) = 53 socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 3 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 bind(3, {sa_family=AF_INET, sin_port=htons(3691), sin_addr=inet_addr(0.0.0.0)}, 16) = 0 listen(3, 10) = 0 fstat(1, {st_mode=S_IFREG|0664, st_size=0, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2afc3b683000 write(1, Listening for HTTP requests on T..., 45) = 45 select(4, [3], NULL, NULL, {60, 0} unfinished … I chose to start with the open(“proc/mounts”) call only because it’s the first thing I saw that struck me as odd. I don’t know why Fossil or SQLite cares about my mount table. ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] SQLite pointer misuse in head?
On Oct 30, 2014, at 4:08 PM, Richard Hipp d...@sqlite.org wrote: Thank you. That was the hint I needed. The fix is now checked in. Confirmed. Thanks! So, how about that “fossil rebuild” tip? Is it really needed prophylactically on every Fossil trunk pull-and-rebuild, or will Fossil diagnose the condition for me? ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] SQLite pointer misuse in head?
On Thu, Oct 30, 2014 at 7:45 PM, Warren Young war...@etr-usa.com wrote: So, how about that “fossil rebuild” tip? Is it really needed prophylactically on every Fossil trunk pull-and-rebuild, or will Fossil diagnose the condition for me? It was a good idea to run rebuild in the early days (circa 2008) but lately, I think the subroutine at https://www.fossil-scm.org/fossil/artifact/eb8403b26667?ln=1134-1150 will take care of letting you know if a rebuild is needed. And, the schema has been stable for years now, so even without the db_verify_schema() call you could usually get away without running rebuild. -- D. Richard Hipp d...@sqlite.org ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users