bugmonotone - Bugs: bug #28640, mtn opens wrong database file...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #28640: mtn opens wrong database file under zh_CN.GBK locale, cannot use the empty sqlite database

Submitter:  moo <moo>
Submitted:  Sun 17 Jan 2010 07:59:58 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Works for me
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
mtn version --full: 

monotone 0.45 (base revision: a19f8b2017c81c3c6c8b2bb3247f865f6ed4e5a9)
Running on          : Linux 2.6.25.20-co-0.8.0 #2 PREEMPT Sun Nov 8 12:12:14 UTC 2009 i686
C++ compiler        : GNU C++ version 4.3.4
C++ standard library: GNU libstdc++ version 20090804
Boost version       : 1_35
SQLite version      : 3.6.20 (compiled against 3.6.20)
Lua version         : Lua 5.1
PCRE version        : 7.9 2009-04-11 (compiled against 7.9)
Botan version       : 1.8.7 (compiled against 1.8.7)
Changes since base revision:
format_version "1"

new_manifest [a4583b2d0cae8cb6889b8701543aeb4efc7e1554]

old_revision [a19f8b2017c81c3c6c8b2bb3247f865f6ed4e5a9]

  Generated from data cached in the distribution;
  further changes may have been made.


Jump to the original submission

Mon 26 Apr 2010 03:34:45 PM UTC, comment #8: 

Since the reporter did not answer and it works for me since 0.46 I'm closing this ticket for now.

Thomas Keller <tommyd>
Group administrator
Wed 20 Jan 2010 08:15:58 AM UTC, comment #7: 

Sorry, I didn't want to piss you off ;)

I could reproduce the problem in 0.45, but it does not pop up for me in 0.46, probably as a side-effect on a runtime fix for another compiler (rev is 187802c6d4091a04567368b91314e4a25692f806).

Can you please check if 0.46 fixes the problem for you as well? Thanks for your time and patience!

Thomas Keller <tommyd>
Group administrator
Wed 20 Jan 2010 04:02:55 AM UTC, comment #6: 

forget about strace log-good, i've already comment where the differences are

$ echo "SELECT COUNT(*) FROM sqlite_master;" | sqlite3 test.mtn

the above is wrong. but this is not a sqlite3 issue because i found that it was the mtn that didn't create the right file
$ cd /tmp; strace -e open mtn db init -d test.mtn 2>&1
...
open("/tmp/test.mt ", O_RDWR|O_CREAT|O_LARGEFILE, 0644) = 3
open("/tmp/test.mt -journal", O_RDWR|O_CREAT|O_LARGEFILE, 0644) = 4
...
$ cd /tmp/a; strace -e open mtn db init -d test.mtn 2>&1
open("/tmp/a/test. ", O_RDWR|O_CREAT|O_LARGEFILE, 0644) = 3
open("/tmp/a/test. -journal", O_RDWR|O_CREAT|O_LARGEFILE, 0644) = 4
$ cd /tmp/a/a; strace -e open mtn db init -d test.mtn 2>&1
open("/tmp/a/a/\10\255C\10\200\362D\10\274\362D\10\6", O_RDWR|O_CREAT|O_LARGEFILE, 0644) = 3
open("/tmp/a/a/\10\255C\10\200\362D\10\274\362D\10\6-journal", O_RDWR|O_CREAT|O_LARGEFILE, 0644) = 4

$ LANG=C strace -e open mtn db init -d test.mtn 2>&1
open("/tmp/a/a/test.mtn", O_RDWR|O_CREAT|O_LARGEFILE, 0644) = 3
open("/tmp/a/a/test.mtn-journal", O_RDWR|O_CREAT|O_LARGEFILE, 0644) = 4

> Hrm... _MTN/options in your workspace where you try to pull to still points to /home/moo/.monotone/pidgin.mtn, right?

sure, i always compare with and without LANG=C

> Does the error persists if you pull outside of the workspace, while explicitely giving -d /home/moo/.monotone/pidgin.mtn as option to mtn pull?

$ cd /tmp
$ strace -e open mtn -d /home/moo/.monotone/pidgin.mtn pull
open("/tmp/\1", O_RDWR|O_CREAT|O_LARGEFILE, 0644) = 3
mtn: misuse: cannot use the empty sqlite database /home/moo/.monotone/pidgin.mtn
mtn: misuse: (monotone databases must be created with 'mtn db init')

having you ask the question and i reply the other day may take ages to finish the info collecting. i'm sure i have provide enough information on how to reproduce it and what happened except that i'm not sure it can be reproduced in your box. can u pls install zh_CN.GBK and try to reproduce it?

moo <moo>
Tue 19 Jan 2010 11:32:00 AM UTC, comment #5: 


> $ echo "SELECT COUNT(*) FROM sqlite_master;" | sqlite3 test.mtn
> 0


This is definitely false - mtn db init already puts the db scheme into the newly created database, so you should equally get "36" as output.

I expect that querying the schema via ".schema" within test.mtn leads to no output...?

> i've also attach the log-good file, it seems the bug system
> didn't accept the file when i was posting log-good with log-bad


The strace from the "good" call is still not attached here, if you want you can also send it to me via private mail, me at thomaskeller dot biz.

> the problem is that why pidgin ask sqlite3 to open \1, which is
> /home/moo/src/pidgin-dev/pidgin-trunk/\1, under LANG=zh_CN.GBK


Hrm... _MTN/options in your workspace where you try to pull to still points to /home/moo/.monotone/pidgin.mtn, right?

Does the error persists if you pull outside of the workspace, while explicitely giving -d /home/moo/.monotone/pidgin.mtn as option to mtn pull?

Thomas Keller <tommyd>
Group administrator
Tue 19 Jan 2010 08:10:28 AM UTC, comment #4: 

$ echo "SELECT COUNT(*) FROM sqlite_master;" | sqlite3 /home/moo/.monotone/pidgin.mtn
36
$ echo "SELECT COUNT(*) FROM sqlite_master;" | sqlite3 test.mtn
0

can u pls check the strace log i attach in the first post?
i've also attach the log-good file, it seems the bug system didn't accept the file when i was posting log-good with log-bad

diff the log, you'll see

stat64("/home/moo/src/pidgin-dev/pidgin-trunk/\1", 0xbffb13cc) = -1 ENOENT (No such file or directory)
open("/home/moo/src/pidgin-dev/pidgin-trunk/\1", O_RDWR|O_CREAT|O_LARGEFILE, 0644) = 3
...
access("/home/moo/src/pidgin-dev/pidgin-trunk/\1-journal", F_OK) = -1 ENOENT (No such file or director

the problem is that why pidgin ask sqlite3 to open \1, which is /home/moo/src/pidgin-dev/pidgin-trunk/\1, under LANG=zh_CN.GBK

moo <moo>
Mon 18 Jan 2010 10:56:54 AM UTC, comment #3: 

Hrm... for some reason sqlite wrongly reports an empty database.

Can you confirm that

echo "SELECT COUNT(*) FROM sqlite_master;" | sqlite3 path/to/pidgin.mtn

returns "0" in your default locale and a value > 0 in any other locale?

Could you also please test if the error is also present for any newly created database (ie. run directly after `mtn db init -d test.mtn`)?

Does

echo ".schema" | sqlite3 test.mtn

output anything?

Thanks for your time,
Thomas.

Thomas Keller <tommyd>
Group administrator
Mon 18 Jan 2010 03:50:18 AM UTC, comment #2: 

"LANG=C mtn pull" works, sorry that i didn't mention this case

(file #19509)

moo <moo>
Sun 17 Jan 2010 02:22:11 PM UTC, comment #1: 

Hi! Have you the faulty db under /home/moo/.monotone/pidgin.mtn handy and would you please upload it here?

Otherwise, does the error persist if you pull like this? `LANG=C mtn pull`

Can you also please try to run the command under --debug and add the output to this ticket as well?

Thanks!

Thomas Keller <tommyd>
Group administrator
Sun 17 Jan 2010 07:59:58 AM UTC, original submission:  

$ mtn pull
mtn: misuse: cannot use the empty sqlite database /home/moo/.monotone/pidgin.mtn
mtn: misuse: (monotone databases must be created with 'mtn db init')

i have a strace log attached

moo <moo>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #19509:  debug-log added by moo (3KiB - application/octet-stream)
file #19501:  log-bad added by moo (35KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by tommyd (Posted a comment)
  • -email is unavailable- added by moo (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-04-26 tommyd StatusNone Works for me
        Open/ClosedOpen Closed
    2010-01-18 moo Attached File- Added debug-log, #19509
    2010-01-17 moo Attached File- Added log-bad, #19501

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code