On Mon, 2010-09-13 at 23:38 -0700, Don Armstrong wrote: > Can you try this with a more recent version of gnucash (at least > 2.2.9-6), and also with --debug on? (You should see output like > "unlink lock file: blah", etc.)
This has remained quite reproducible for me with 2.2.9-7~squeeze1. The
trick is to let a few backup/log files accumulate over a few days, then
save the account file.
I did so with --debug bug saw no output other than the usual message
about binreloc relocation support.
The last time I tried to debug this I used strace and got the following
output while saving the account file:
write(22, "\n</gnc:book>\n</gnc-v2>\n\n<!-- Loc"..., 102) = 102
close(22) = 0
munmap(0x7f0f4698d000, 4096) = 0
stat("/home/sam/Documents/Gnucash/gnucash.xac", {st_mode=S_IFREG|0644,
st_size=269995, ...}) = 0
chmod("/home/sam/Documents/Gnucash/gnucash.xac.tmp-In7J7h", 0100644) = 0
chown("/home/sam/Documents/Gnucash/gnucash.xac.tmp-In7J7h", 4294967295,
1000) = 0
unlink("/home/sam/Documents/Gnucash/gnucash.xac") = 0
link("/home/sam/Documents/Gnucash/gnucash.xac.tmp-In7J7h",
"/home/sam/Documents/Gnucash/gnucash.xac") = 0
unlink("/home/sam/Documents/Gnucash/gnucash.xac.tmp-In7J7h") = 0
stat("/home/sam/Documents/Gnucash/gnucash.xac.LCK", {st_mode=S_IFREG,
st_size=0, ...}) = 0
open("/home/sam/Documents/Gnucash",
O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 21
getdents(21, /* 35 entries */, 32768) = 1752
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3661, ...}) = 0
unlink("/home/sam/Documents/Gnucash/gnucash.xac.20091221232718.xac") = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3661, ...}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3661, ...}) = 0
unlink("/home/sam/Documents/Gnucash/gnucash.xac.20091221224556.log") = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3661, ...}) = 0
unlink("/home/sam/Documents/Gnucash/gnucash.xac.20091221230758.xac") = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3661, ...}) = 0
unlink("/home/sam/Documents/Gnucash/gnucash.xac") = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3661, ...}) = 0
unlink("/home/sam/Documents/Gnucash/gnucash.xac.20091221233939.log") = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3661, ...}) = 0
unlink("/home/sam/Documents/Gnucash/gnucash.xac.20091221233938.xac") = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3661, ...}) = 0
unlink("/home/sam/Documents/Gnucash/gnucash.xac.20091221232023.log") = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3661, ...}) = 0
unlink("/home/sam/Documents/Gnucash/gnucash.xac.20091220143217.log") = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3661, ...}) = 0
unlink("/home/sam/Documents/Gnucash/gnucash.xac.20091221224556.xac") = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3661, ...}) = 0
unlink("/home/sam/Documents/Gnucash/gnucash.xac.20091221232700.log") = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3661, ...}) = 0
unlink("/home/sam/Documents/Gnucash/gnucash.xac.20091221232837.xac") = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3661, ...}) = 0
unlink("/home/sam/Documents/Gnucash/gnucash.xac.20091221232022.xac") = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3661, ...}) = 0
unlink("/home/sam/Documents/Gnucash/gnucash.xac.20091221224518.log") = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3661, ...}) = 0
unlink("/home/sam/Documents/Gnucash/gnucash.xac.20091221232329.xac") = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3661, ...}) = 0
unlink("/home/sam/Documents/Gnucash/gnucash.xac.20091221232139.log") = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3661, ...}) = 0
unlink("/home/sam/Documents/Gnucash/gnucash.xac.20091220143755.log") = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3661, ...}) = 0
unlink("/home/sam/Documents/Gnucash/gnucash.xac.20091221232719.log") = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3661, ...}) = 0
unlink("/home/sam/Documents/Gnucash/gnucash.xac.20091221230758.log") = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3661, ...}) = 0
unlink("/home/sam/Documents/Gnucash/gnucash.xac.20091221233845.xac") = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3661, ...}) = 0
unlink("/home/sam/Documents/Gnucash/gnucash.xac.20091221231905.log") = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3661, ...}) = 0
unlink("/home/sam/Documents/Gnucash/gnucash.xac.20091221233846.log") = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3661, ...}) = 0
unlink("/home/sam/Documents/Gnucash/gnucash.xac.20091221232837.log") = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3661, ...}) = 0
unlink("/home/sam/Documents/Gnucash/gnucash.xac.20091221232138.xac") = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3661, ...}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3661, ...}) = 0
unlink("/home/sam/Documents/Gnucash/gnucash.xac.20091221232659.xac") = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3661, ...}) = 0
unlink("/home/sam/Documents/Gnucash/gnucash.xac.20091221231904.xac") = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3661, ...}) = 0
unlink("/home/sam/Documents/Gnucash/gnucash.xac.20091221232329.log") = 0
getdents(21, /* 0 entries */, 32768) = 0
close(21) = 0
As far as I can tell from that output, Gnucash is doing the right thing:
writing to temporary file, unlinking destination file, linking temporary
file to destination file (successfully!) and finally deleting the
temporary file. And yet, the result is that gnucash.xac is deleted.
> I've looked through the code in question, and unless something is
> going very weird, I don't see how it'd be unlinking like you're
> seeing. (Basically, strptime would have to return a non-zero result
> even though it didn't actually manage to match anything, and a few
> other things would have to fall into place.)
Next time I'll try ltrace to see what strptime returns.
--
Sam Morris <https://robots.org.uk/>
3412 EA18 1277 354B 991B C869 B219 7FDB 5EA0 1078
signature.asc
Description: This is a digitally signed message part

