bzr shows incorrect time for lock acquire retry

Bug #591832 reported by Parth Malwankar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Low
Unassigned

Bug Description

Below, bzr says it will continue to try to acquire lock until 17:50 while local time is 22:20.
This is with 2.2b3 on Lucid.

[trunk]% date
Wed Jun 9 22:20:10 IST 2010
[trunk]% bzr push lp:~parthm/+junk/lock-test
Unable to obtain lock lp-69989648:///~parthm/%2Bjunk/lock-test/.bzr/branch/lock
held by <email address hidden> on host crowberry [process #26780]
locked 11 hours, 50 minutes ago
Will continue to try until 17:50:41, unless you press Ctrl-C.
See "bzr help break-lock" for more.
bzr: ERROR: Could not acquire lock "(remote lock)":
[trunk]% date
Wed Jun 9 22:20:46 IST 2010
[trunk]%

Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 591832] [NEW] bzr shows incorrect time for lock acquire retry

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Parth Malwankar wrote:
> Public bug reported:
>
> Below, bzr says it will continue to try to acquire lock until 17:50 while local time is 22:20.
> This is with 2.2b3 on Lucid.
>
> [trunk]% date
> Wed Jun 9 22:20:10 IST 2010
> [trunk]% bzr push lp:~parthm/+junk/lock-test
> Unable to obtain lock lp-69989648:///~parthm/%2Bjunk/lock-test/.bzr/branch/lock
> held by <email address hidden> on host crowberry [process #26780]
> locked 11 hours, 50 minutes ago
> Will continue to try until 17:50:41, unless you press Ctrl-C.
> See "bzr help break-lock" for more.
> bzr: ERROR: Could not acquire lock "(remote lock)":
> [trunk]% date
> Wed Jun 9 22:20:46 IST 2010
> [trunk]%
>
> ** Affects: bzr
> Importance: Undecided
> Status: New
>

Can you tell us what:

import time
t = time.time()
print 'localtime: ', time.strftime('%H:%M:%S', time.localtime(t))

Gives?

The code in question seems to be doing (summarized):

   timeout = _DEFAULT_TIMEOUT_SECONDS # 300
   deadline = time.time() + timeout
   if deadline_str is None:
     deadline_str = time.strftime('%H:%M:%S',
                                  time.localtime(deadline))

I don't see anything particularly wrong with that, but there may be
something funny in how we are handling your local time (or timezone, or
something).

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkwPy/4ACgkQJdeBCYSNAAMerACgmPVIkB54Av58I+WM1PSeimzn
hZEAn0+AsAoF5n8eWPWMYfm01iyWXQLk
=Pu8n
-----END PGP SIGNATURE-----

Revision history for this message
Parth Malwankar (parthm) wrote :

The test you mention shows the correct time.

[lock-path]% python
Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
>>> t = time.time()
>>> print 'localtime: ', time.strftime('%H:%M:%S', time.localtime(t))
localtime: 22:55:07
>>>

The behavior I see with bzr is that it immediately exists so there is no wait (or opportunity for ^C).

Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 591832] Re: bzr shows incorrect time for lock acquire retry

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Parth Malwankar wrote:
> The test you mention shows the correct time.
>
> [lock-path]% python
> Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56)
> [GCC 4.4.3] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import time
>>>> t = time.time()
>>>> print 'localtime: ', time.strftime('%H:%M:%S', time.localtime(t))
> localtime: 22:55:07
>
> The behavior I see with bzr is that it immediately exists so there is no
> wait (or opportunity for ^C).
>

It is probably reporting from the Launchpad side, not from the local
side. And I would bet your timezones are different.

I think the big thing is to suppress the 'will try until' part of the
message if the 'timeout' time is 0.

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkwP0WcACgkQJdeBCYSNAAPYXwCfazgY1VfRVNOg2KJ9gBKaSeMD
EVkAoIDOCEWHbw5qBrr7axdbtLH3mE3d
=ddxZ
-----END PGP SIGNATURE-----

Revision history for this message
Parth Malwankar (parthm) wrote :

I see this behavior while interacting with launchpad. bzr shows the correct time on my local bzr+ssh interaction.

Parth Malwankar (parthm)
Changed in bzr:
importance: Undecided → Low
status: New → Confirmed
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.