gnclock table remains after quitting gnucash and shutdown; Only clears manually with sqlite3

GWB gwb at 2realms.com
Wed Aug 19 22:22:13 EDT 2015


Thank you guys for the help.  So I tried all the above and what
finally worked was installing from the getdeb repository:

sudo apt-get purge gnucash
sudo apt-get install -t trusty-getdeb gnucash
sudo apt-get install -t trusty-getdeb gnucash-dbg

That brings the gnucash up to version 2.6.7:

gnucash --version
GnuCash 2.6.7
This copy was built from rev df6326f+ on 2015-07-08.

No problem, no errors now with sqlite3 gnucash file, and I have my
"Saved Report Configurations" back in the menu, which had disappeared
with gnucash 2.6.1.

With gnucash 2.6.1, installing python-gnucash did not solve the problem.

Is dbg gnu's version of dtrace?  If so, that's good to know.  With
2.6.1 the following errors occurred, but it did not create much of a
trackable stack.  Some this output came from the command line running
gnucash -debug:

gnucash
Found Finance::Quote version 1.18
java version "1.7.0_79"
OpenJDK Runtime Environment (IcedTea 2.5.6) (7u79-2.5.6-0ubuntu1.14.04.1)
OpenJDK 64-Bit Server VM (build 24.79-b02, mixed mode)
Backtrace:
In ice-9/boot-9.scm:
 157: 7 [catch #t #<catch-closure ed33c0> ...]
In unknown file:
   ?: 6 [apply-smob/1 #<catch-closure ed33c0>]
   ?: 5 [call-with-input-string "gnc:report-generate-restore-forms" ...]
In ice-9/boot-9.scm:
2320: 4 [save-module-excursion #<procedure 19af2a0 at ice-9/eval-string.scm:65:9
 ()>]
In ice-9/eval-string.scm:
  44: 3 [read-and-eval #<input: string 1ebe820> #:lang ...]
  37: 2 [lp gnc:report-generate-restore-forms]
In ice-9/eval.scm:
 393: 1 [eval #<memoized gnc:report-generate-restore-forms> ()]
In unknown file:
   ?: 0 [memoize-variable-access! # #]

ERROR: In procedure memoize-variable-access!:
ERROR: Unbound variable: gnc:report-generate-restore-forms
...
[Thread 0x7fff78901700 (LWP 7105) exited]
[Thread 0x7fff6e7fc700 (LWP 7133) exited]
[Thread 0x7fff6dffb700 (LWP 7134) exited]
[Thread 0x7fff6effd700 (LWP 7132) exited]
[Thread 0x7fff6f7fe700 (LWP 7131) exited]
[Thread 0x7fff677fe700 (LWP 7130) exited]
[Thread 0x7fff6ffff700 (LWP 7129) exited]
[Thread 0x7fff74cb4700 (LWP 7128) exited]
[Thread 0x7fff758e8700 (LWP 7110) exited]
[Thread 0x7fff760e9700 (LWP 7109) exited]
[Thread 0x7fff768ea700 (LWP 7108) exited]
[Thread 0x7fffcb537700 (LWP 7104) exited]
[Thread 0x7fffcad36700 (LWP 7101) exited]
[Thread 0x7fffcbd38700 (LWP 7099) exited]
[Thread 0x7fffde6f1700 (LWP 7095) exited]
[Thread 0x7ffff7fa8a40 (LWP 7091) exited]
[Inferior 1 (process 7091) exited with code 01]
...
(gdb) bt
No stack.
(gdb) bt full
No stack.
(gdb)
...

So I'm not sure what that means; probably I made in error in invoking
gdb, or gnucash wasn't crashing, it was just failing to remove the
gnclock table when it balked on loading the reports (unless scm refers
to another part of the program).

This is a new install (a reinstall) of Ubuntu 14, so it would be nice
if I could just use the standard repos, and not add too many PPA's.
But getdeb saved the day, thank you.

Gordon



On Wed, Aug 19, 2015 at 4:04 PM, Tommy Trussell
<tommy.trussell at gmail.com> wrote:
>
> On Wed, Aug 19, 2015 at 4:21 AM, John Ralls <jralls at ceridwen.us> wrote:
>>
>>
>> > On Aug 19, 2015, at 5:00 AM, GWB <gwb at 2realms.com> wrote:
>> >
>> > I have been using the sqlite3 backend for GnuCash for well over a year
>> > now and as of last week GnuCash has been reporting the "file locked"
>> > error on opening.  I was able to clear the lock by using sqldiff to
>> > compare a locked and unlocked file.  To unlock the file from the
>> > command line:
>> >
>> > % sqlite3 database-name.gnucash
>> > sqlite> DELETE FROM gnclock WHERE rowid=1;
>> > sqlite> .exit
>> >
>> > Then the file opens without the lock error, but after closing GnuCash,
>> > shutting down, and opening the file again, it locks and I have to
>> > repeat the process.
>
>
> ...
>
>>
>> No need to unlock by hand. As long as you’re certain that there isn’t
>> another instance of GnuCash connected to the database just select the “open
>> anyway” button on the file locked dialog box.
>>
>> However, if GnuCash isn’t clearing the lock by itself that means that it’s
>> crashing instead of shutting down. Try running it under gdb to catch the
>> crash and get a stack trace. More detailed instructions at
>> http://wiki.gnucash.org/wiki/Stack_Trace.
>
>
>
> The repositories for Ubuntu 14.04 LTS "Trusty" (and unfortunately all
> derivative distros such as Mint) contains GnuCash version 2.6.1, which has a
> package error that causes it to crash on close (before cleaning up the lock,
> apparently).
>
> A workaround is to install the python-gnucash package, which will fix that
> particular crash in GnuCash 2.6.1.
>
> A better workaround is to install a more recent version of GnuCash, such as
> from http://getdeb.net/
>
>
>>
>> -----
>> Please remember to CC this list on all your replies.
>> You can do this by using Reply-To-List or Reply-All.
>
>



More information about the gnucash-user mailing list