Bug 1233237 - [abrt] blueman: Functions.py:285:get_lockfile:OSError: [Errno 17] File exists: '/home/ssabchev/.cache'
Summary: [abrt] blueman: Functions.py:285:get_lockfile:OSError: [Errno 17] File exists...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: blueman
Version: 21
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: leigh scott
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:0997be9f398f003956085a1cd72...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-18 13:56 UTC by ssabchew
Modified: 2015-06-30 20:19 UTC (History)
3 users (show)

Fixed In Version: blueman-2.0-9.fc22
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-06-21 23:03:31 UTC


Attachments (Terms of Use)
File: backtrace (696 bytes, text/plain)
2015-06-18 13:56 UTC, ssabchew
no flags Details
File: environ (1.87 KB, text/plain)
2015-06-18 13:56 UTC, ssabchew
no flags Details

Description ssabchew 2015-06-18 13:56:09 UTC
Version-Release number of selected component:
blueman-2.0-6.fc21

Additional info:
reporter:       libreport-2.3.0
cmdline:        python /usr/bin/blueman-applet
executable:     /usr/bin/blueman-applet
kernel:         4.0.4-202.fc21.x86_64
runlevel:       N 5
type:           Python
uid:            1000

Truncated backtrace:
Functions.py:285:get_lockfile:OSError: [Errno 17] File exists: '/home/ssabchev/.cache'

Traceback (most recent call last):
  File "/usr/bin/blueman-applet", line 120, in <module>
    BluemanApplet()
  File "/usr/bin/blueman-applet", line 55, in __init__
    check_single_instance("blueman-applet")
  File "/usr/lib/python2.7/site-packages/blueman/Functions.py", line 311, in check_single_instance
    lockfile = get_lockfile(name)
  File "/usr/lib/python2.7/site-packages/blueman/Functions.py", line 285, in get_lockfile
    os.mkdir(cachedir)
OSError: [Errno 17] File exists: '/home/ssabchev/.cache'

Local variables in innermost frame:
cachedir: '/home/ssabchev/.cache'
name: u'blueman-applet'

Comment 1 ssabchew 2015-06-18 13:56:12 UTC
Created attachment 1040506 [details]
File: backtrace

Comment 2 ssabchew 2015-06-18 13:56:14 UTC
Created attachment 1040507 [details]
File: environ

Comment 3 Christopher Schramm 2015-06-19 05:54:52 UTC
Is this reproducible?

The relevant code is:

cachedir = GLib.get_user_cache_dir()
if not os.path.exists(cachedir):
    os.mkdir(cachedir)

Assuming that os.path.exists works as expected and that the directory really existed when os.mkdir got called, this means it got created between the execution of those two line...

Comment 4 ssabchew 2015-06-21 20:54:54 UTC
Yes.

Comment 5 ssabchew 2015-06-21 20:56:08 UTC
Also directory is there, and GLib.get_user_cache_dir show this:

In [38]: GLib.get_user_cache_dir()
Out[38]: '/home/ssabchev/.cache'

Comment 6 Michael Schwendt 2015-06-21 21:40:25 UTC
Just for clarification:

Is the "yes" in comment 4 the answer to the question from comment 3? If so, how to reproduce the problem?

[...]

Considering that $HOME/.cache is a global directory which may be created by other programs, it's subject to race conditions and would benefit from OSError (errno.EEXIST) exception handling.

Comment 7 ssabchew 2015-06-21 22:57:30 UTC
About clarification: The "yes" is the answer for the question in comment 3.

About .cache - it is a symlink to /tmp/${USERNAME}_cache, may be the problem is somewhere else...
 URL=https://bugzilla.redhat.com/show_bug.cgi?id=1228488
 URL=https://bugzilla.redhat.com/show_bug.cgi?id=1229147

Comment 8 ssabchew 2015-06-21 23:03:31 UTC
The bluetooth service was stopped, and mask, so after starting it - all is OK.

Comment 9 Christopher Schramm 2015-06-22 06:08:51 UTC
(In reply to Michael Schwendt (Fedora Packager Sponsors Group) from comment #6)
> Considering that $HOME/.cache is a global directory which may be created by
> other programs, it's subject to race conditions and would benefit from
> OSError (errno.EEXIST) exception handling.

Thanks, I added that upstream. :)

Comment 10 Fedora Update System 2015-06-22 09:26:01 UTC
blueman-2.0-9.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/blueman-2.0-9.fc22

Comment 11 Fedora Update System 2015-06-22 09:26:14 UTC
blueman-2.0-9.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/blueman-2.0-9.fc20

Comment 12 Fedora Update System 2015-06-22 09:27:07 UTC
blueman-2.0-9.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/blueman-2.0-9.fc21

Comment 13 Fedora Update System 2015-06-30 20:10:34 UTC
blueman-2.0-9.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 14 Fedora Update System 2015-06-30 20:19:47 UTC
blueman-2.0-9.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.