https://bugzilla.redhat.com/show_bug.cgi?id=1770072
Bug ID: 1770072 Summary: [abrt] ibus-typing-booster: makedirs(): os.py:221:makedirs:FileExistsError: [Errno 17] File exists: '/home/glassy/.local/share/ibus-typing-booster/data' Product: Fedora Version: 31 Hardware: x86_64 Status: NEW Whiteboard: abrt_hash:2670921efebf7bcad72573b1e26a7af7ab099357;VAR IANT_ID=workstation; Component: ibus-typing-booster Assignee: mfabian@redhat.com Reporter: ropermantena@protonmail.com QA Contact: extras-qa@fedoraproject.org CC: anish.developer@gmail.com, i18n-bugs@lists.fedoraproject.org, mfabian@redhat.com Target Milestone: --- Classification: Fedora
Version-Release number of selected component: ibus-typing-booster-2.7.0-1.fc31
Additional info: reporter: libreport-2.10.1 cgroup: 0::/user.slice/user-1000.slice/user@1000.service/gnome-shell-wayland.service cmdline: /usr/bin/python3 /usr/share/ibus-typing-booster/engine/main.py --xml crash_function: makedirs exception_type: FileExistsError executable: /usr/share/ibus-typing-booster/engine/main.py interpreter: python3-3.7.5-1.fc31.x86_64 kernel: 5.3.8-300.fc31.x86_64 runlevel: N 5 type: Python3 uid: 1000
Truncated backtrace: os.py:221:makedirs:FileExistsError: [Errno 17] File exists: '/home/glassy/.local/share/ibus-typing-booster/data'
Traceback (most recent call last): File "/usr/share/ibus-typing-booster/engine/main.py", line 34, in <module> import factory File "/usr/share/ibus-typing-booster/engine/factory.py", line 32, in <module> import hunspell_table File "/usr/share/ibus-typing-booster/engine/hunspell_table.py", line 45, in <module> import itb_emoji File "/usr/share/ibus-typing-booster/engine/itb_emoji.py", line 78, in <module> USER_DATADIR = itb_util.xdg_save_data_path('ibus-typing-booster/data') File "/usr/share/ibus-typing-booster/engine/itb_util.py", line 3487, in xdg_save_data_path return xdg.BaseDirectory.save_data_path(*resource) File "/usr/lib/python3.7/site-packages/xdg/BaseDirectory.py", line 70, in save_data_path os.makedirs(path) File "/usr/lib64/python3.7/os.py", line 221, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/glassy/.local/share/ibus-typing-booster/data'
Local variables in innermost frame: name: '/home/glassy/.local/share/ibus-typing-booster/data' mode: 511 exist_ok: False head: '/home/glassy/.local/share/ibus-typing-booster' tail: 'data' cdir: '.'
https://bugzilla.redhat.com/show_bug.cgi?id=1770072
ropermantena@protonmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- URL| |https://retrace.fedoraproje | |ct.org/faf/reports/bthash/3 | |f8002174415d333abeaac5d6eb8 | |60ed2763550c
https://bugzilla.redhat.com/show_bug.cgi?id=1770072
--- Comment #1 from ropermantena@protonmail.com --- Created attachment 1633843 --> https://bugzilla.redhat.com/attachment.cgi?id=1633843&action=edit File: backtrace
https://bugzilla.redhat.com/show_bug.cgi?id=1770072
--- Comment #2 from ropermantena@protonmail.com --- Created attachment 1633844 --> https://bugzilla.redhat.com/attachment.cgi?id=1633844&action=edit File: cpuinfo
https://bugzilla.redhat.com/show_bug.cgi?id=1770072
--- Comment #3 from ropermantena@protonmail.com --- Created attachment 1633845 --> https://bugzilla.redhat.com/attachment.cgi?id=1633845&action=edit File: environ
https://bugzilla.redhat.com/show_bug.cgi?id=1770072
--- Comment #4 from ropermantena@protonmail.com --- Created attachment 1633846 --> https://bugzilla.redhat.com/attachment.cgi?id=1633846&action=edit File: mountinfo
https://bugzilla.redhat.com/show_bug.cgi?id=1770072
--- Comment #5 from ropermantena@protonmail.com --- Created attachment 1633847 --> https://bugzilla.redhat.com/attachment.cgi?id=1633847&action=edit File: namespaces
https://bugzilla.redhat.com/show_bug.cgi?id=1770072
--- Comment #6 from ropermantena@protonmail.com --- Created attachment 1633848 --> https://bugzilla.redhat.com/attachment.cgi?id=1633848&action=edit File: open_fds
https://bugzilla.redhat.com/show_bug.cgi?id=1770072
--- Comment #7 from Mike FABIAN mfabian@redhat.com --- https://bugs.python.org/issue1675
https://bugzilla.redhat.com/show_bug.cgi?id=1770072
--- Comment #8 from Mike FABIAN mfabian@redhat.com --- https://stackoverflow.com/questions/1586648/race-condition-creating-folder-i...
https://bugzilla.redhat.com/show_bug.cgi?id=1770072
Mike FABIAN mfabian@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |satyendrax@gmail.com
--- Comment #9 from Mike FABIAN mfabian@redhat.com --- *** Bug 1713963 has been marked as a duplicate of this bug. ***
https://bugzilla.redhat.com/show_bug.cgi?id=1770072
Mike FABIAN mfabian@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |1419004855@qq.com
--- Comment #10 from Mike FABIAN mfabian@redhat.com --- *** Bug 1764520 has been marked as a duplicate of this bug. ***
https://bugzilla.redhat.com/show_bug.cgi?id=1770072
Mike FABIAN mfabian@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |live@gocareera.ru
--- Comment #11 from Mike FABIAN mfabian@redhat.com --- *** Bug 1768016 has been marked as a duplicate of this bug. ***
https://bugzilla.redhat.com/show_bug.cgi?id=1770072
--- Comment #12 from Mike FABIAN mfabian@redhat.com --- I think this will fix it:
$ git show commit 5f0a46a5dbf4f99fb1eae2fd80831f60616007e9 (HEAD -> release-2.7.3) Author: Mike FABIAN mfabian@redhat.com Date: Tue Nov 12 17:47:37 2019 +0900
Fix race condition in itb_util.xdg_save_data_path()
Resolves: rhbz#1770072 (https://bugzilla.redhat.com/show_bug.cgi?id=1770072) Resolves: rhbz#1713963 (https://bugzilla.redhat.com/show_bug.cgi?id=1713963) Resolves: rhbz#1764520 (https://bugzilla.redhat.com/show_bug.cgi?id=1764520) Resolves: rhbz#1768016 (https://bugzilla.redhat.com/show_bug.cgi?id=1768016)
[abrt] ibus-typing-booster: makedirs(): os.py:221:makedirs:FileExistsError: [Errno 17] Fil e exists: '/home/uncle/.local/share/ibus-typing-booster/data'
diff --git a/engine/itb_util.py b/engine/itb_util.py index 0494a08..c53fc9b 100644 --- a/engine/itb_util.py +++ b/engine/itb_util.py @@ -3500,17 +3500,23 @@ def xdg_save_data_path(*resource): Compatibility function for systems which do not have pyxdg. (For example openSUSE Leap 42.1) ''' - if IMPORT_XDG_BASEDIRECTORY_SUCCESSFUL: - return xdg.BaseDirectory.save_data_path(*resource) + # if IMPORT_XDG_BASEDIRECTORY_SUCCESSFUL: + # return xdg.BaseDirectory.save_data_path(*resource) + # + # xdg.BaseDirectory.save_data_path(*resource) unfortunately + # can fail because it calls os.makedirs() without the exist_ok=True + # option, and then os.makedirs() can fail in a race condition + # (see: https://bugs.python.org/issue1675) + # # Replicate implementation of xdg.BaseDirectory.save_data_path - # here: + # here (and add the exist_ok=True parameter to os.makedirs()): xdg_data_home = os.environ.get('XDG_DATA_HOME') or os.path.join( os.path.expanduser('~'), '.local', 'share') resource = os.path.join(*resource) assert not resource.startswith('/') path = os.path.join(xdg_data_home, resource) if not os.path.isdir(path): - os.makedirs(path) + os.makedirs(path, exist_ok=True) return path
class KeyvalsToKeycodes: lines 1-45/45 (END)
https://bugzilla.redhat.com/show_bug.cgi?id=1770072
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |MODIFIED
--- Comment #13 from Fedora Update System updates@fedoraproject.org --- FEDORA-2019-6398f828eb has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-6398f828eb
https://bugzilla.redhat.com/show_bug.cgi?id=1770072
--- Comment #14 from Fedora Update System updates@fedoraproject.org --- FEDORA-2019-8eb6c00da1 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-8eb6c00da1
https://bugzilla.redhat.com/show_bug.cgi?id=1770072
--- Comment #15 from Fedora Update System updates@fedoraproject.org --- FEDORA-2019-41b9e70195 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2019-41b9e70195
https://bugzilla.redhat.com/show_bug.cgi?id=1770072
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|MODIFIED |ON_QA
--- Comment #16 from Fedora Update System updates@fedoraproject.org --- ibus-typing-booster-2.7.3-1.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-6398f828eb
https://bugzilla.redhat.com/show_bug.cgi?id=1770072
--- Comment #17 from Fedora Update System updates@fedoraproject.org --- ibus-typing-booster-2.7.3-1.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-41b9e70195
https://bugzilla.redhat.com/show_bug.cgi?id=1770072
--- Comment #18 from Fedora Update System updates@fedoraproject.org --- ibus-typing-booster-2.7.3-1.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-8eb6c00da1
https://bugzilla.redhat.com/show_bug.cgi?id=1770072
yanqiyu01@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |yanqiyu01@gmail.com
--- Comment #19 from yanqiyu01@gmail.com --- *** Bug 1777669 has been marked as a duplicate of this bug. ***
https://bugzilla.redhat.com/show_bug.cgi?id=1770072
Mike FABIAN mfabian@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sean@seanbethard.com
--- Comment #20 from Mike FABIAN mfabian@redhat.com --- *** Bug 1778985 has been marked as a duplicate of this bug. ***
https://bugzilla.redhat.com/show_bug.cgi?id=1770072
Mike FABIAN mfabian@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |manojthoranala@gmail.com
--- Comment #21 from Mike FABIAN mfabian@redhat.com --- *** Bug 1778433 has been marked as a duplicate of this bug. ***
https://bugzilla.redhat.com/show_bug.cgi?id=1770072
Mike FABIAN mfabian@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |justin.smestad@gmail.com
--- Comment #22 from Mike FABIAN mfabian@redhat.com --- *** Bug 1779424 has been marked as a duplicate of this bug. ***
https://bugzilla.redhat.com/show_bug.cgi?id=1770072
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|ON_QA |CLOSED Fixed In Version| |ibus-typing-booster-2.7.3-1 | |.fc30 Resolution|--- |ERRATA Last Closed| |2019-12-05 01:10:34
--- Comment #23 from Fedora Update System updates@fedoraproject.org --- ibus-typing-booster-2.7.3-1.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.
https://bugzilla.redhat.com/show_bug.cgi?id=1770072
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed In Version|ibus-typing-booster-2.7.3-1 |ibus-typing-booster-2.7.3-1 |.fc30 |.fc30 | |ibus-typing-booster-2.7.3-1 | |.fc31
--- Comment #24 from Fedora Update System updates@fedoraproject.org --- ibus-typing-booster-2.7.3-1.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.
https://bugzilla.redhat.com/show_bug.cgi?id=1770072
Mike FABIAN mfabian@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |ricky.tigg@gmail.com
--- Comment #25 from Mike FABIAN mfabian@redhat.com --- *** Bug 1780080 has been marked as a duplicate of this bug. ***
https://bugzilla.redhat.com/show_bug.cgi?id=1770072
Mike FABIAN mfabian@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |me@meepeek.com
--- Comment #26 from Mike FABIAN mfabian@redhat.com --- *** Bug 1780957 has been marked as a duplicate of this bug. ***
https://bugzilla.redhat.com/show_bug.cgi?id=1770072
Mike FABIAN mfabian@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |hcgalvanit@gmail.com
--- Comment #27 from Mike FABIAN mfabian@redhat.com --- *** Bug 1789064 has been marked as a duplicate of this bug. ***
https://bugzilla.redhat.com/show_bug.cgi?id=1770072
Mike FABIAN mfabian@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |p.kibbey@live.com
--- Comment #28 from Mike FABIAN mfabian@redhat.com --- *** Bug 1772726 has been marked as a duplicate of this bug. ***
https://bugzilla.redhat.com/show_bug.cgi?id=1770072
Mike FABIAN mfabian@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |preston.kibbey@outlook.com
--- Comment #29 from Mike FABIAN mfabian@redhat.com --- *** Bug 1773746 has been marked as a duplicate of this bug. ***
https://bugzilla.redhat.com/show_bug.cgi?id=1770072
Mike FABIAN mfabian@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |m.jayk@pm.me
--- Comment #30 from Mike FABIAN mfabian@redhat.com --- *** Bug 1814064 has been marked as a duplicate of this bug. ***
i18n-bugs@lists.fedoraproject.org