Database is locked?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Database is locked?

Johan Vromans
Hi,

When starting GRAMPS I always get these messages:

    Opened successfully!
    Database is locked, cannot open it!
      Info: Locked by [hidden email]

Everything works okay, so I just ignore the message.
But why?

-- Johan

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: Database is locked?

Espen Berg-2
2009/1/26 Johan Vromans <[hidden email]>:

> Hi,
>
> When starting GRAMPS I always get these messages:
>
>    Opened successfully!
>    Database is locked, cannot open it!
>      Info: Locked by [hidden email]
>
> Everything works okay, so I just ignore the message.
> But why?
>
> -- Johan


Hi Johan
If the database is locked and you don't have any GRAMPS sessions
running, you probably didn't close/quit GRAMPS properly.  Perhaps
GRAMPS crached or the process was killed.

You can just break the lock (as you probably did), open it and continue working.


Espen

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: Database is locked?

Johan Vromans
Espen Berg <[hidden email]> writes:

> > When starting GRAMPS I always get these messages:
> >
> >    Opened successfully!
> >    Database is locked, cannot open it!
> >      Info: Locked by [hidden email]

> If the database is locked ... You can just break the lock (as you
> probably did)

It is not. I do not need to break any locks. Anything functions
normal. It's just that I *always* get this message, even when GRAMPS
has been shutdown properly.

-- Johan

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: Database is locked?

Benny Malengier


2009/1/26 Johan Vromans <[hidden email]>
Espen Berg <[hidden email]> writes:

> > When starting GRAMPS I always get these messages:
> >
> >    Opened successfully!
> >    Database is locked, cannot open it!
> >      Info: Locked by [hidden email]

> If the database is locked ... You can just break the lock (as you
> probably did)

It is not. I do not need to break any locks. Anything functions
normal. It's just that I *always* get this message, even when GRAMPS
has been shutdown properly.

Strange.
Do the following in the command line:

gramps -l

Now write down the directory where your database that gives problems is stored.
Go to that directory, is there a file named 'lock' ? There should be.
Normally GRAMPS detects that. Just remove the file to solve it, although it would be nice to know why GRAMPS does not automatically remove it and/or asks you if ok...
look into it.

If that is not it, then do a grep search in your home dir to find the file:
grep -r [hidden email]' *
 
Benny


-- Johan

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: Database is locked?

Johan Vromans
Benny Malengier <[hidden email]> writes:

> Strange.

It'll get stranger...

> Do the following in the command line:
>
> gramps -l

  gramps/grampsdb/48d249bb , with name  Vromans

> Go to that directory, is there a file named 'lock' ? There should
> be.

No, there isn't.

I ran a gramps session with strace, and these are the lines involving
the lock:

  stat64("gramps/grampsdb/48d249bb/lock", 0xbfa5fdc8) = -1 ENOENT (No such file or directory)
  stat64("gramps/grampsdb/48d249bb/lock", 0xbfa60708) = -1 ENOENT (No such file or directory)
  open("gramps/grampsdb/48d249bb/lock", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 13
  stat64("gramps/grampsdb/48d249bb/lock", {st_mode=S_IFREG|0644, st_size=35, ...}) = 0
  stat64("gramps/grampsdb/48d249bb/lock", {st_mode=S_IFREG|0644, st_size=35, ...}) = 0
  stat64("gramps/grampsdb/48d249bb/lock", {st_mode=S_IFREG|0644, st_size=35, ...}) = 0
  stat64("gramps/grampsdb/48d249bb/lock", {st_mode=S_IFREG|0644, st_size=35, ...}) = 0
  open("gramps/grampsdb/48d249bb/lock", O_RDONLY|O_LARGEFILE) = 38
  unlink("gramps/grampsdb/48d249bb/lock") = 0

As you can see, the lock is initially NOT present, then it is created,
checked and successfully unlinked at the end...

>From another window I've verified that the lock is there during the
session, and that it is indeed removed when the session completes.

-- Johan

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users