status file deleted, byobu-config crashes

Bug #1286249 reported by Jan Klepek on 2014-02-28
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
byobu
High
Dustin Kirkland 
Fedora
Fix Released
Undecided
byobu (Ubuntu)
High
Dustin Kirkland 
Trusty
High
Dustin Kirkland 

Bug Description

When ~/.byobu/status is removed then byobu-config crashes during save of changed notifications.

Attached patch which tests if file exist, if not, it reads default status file.
For write, it tests if file exists, if not, then it uses "a+" mode which creates new file.

This patch was included already in fedora

Description of problem:
1 try to remove time in byobu-config
2 choose <Apply>
3 push the Enter button

Version-Release number of selected component:
byobu-5.69-2.fc20

Additional info:
reporter: libreport-2.1.12
cmdline: python /usr/libexec/byobu/include/config.py
executable: /usr/libexec/byobu/include/config.py
kernel: 3.11.10-301.fc20.x86_64
runlevel: N 5
type: Python
uid: 0

Truncated backtrace:
config.py:215:writestatus:IOError: [Errno 2] 没有那个文件或目录: '/root/.byobu/status'

Traceback (most recent call last):
  File "/usr/libexec/byobu/include/config.py", line 385, in <module>
    main()
  File "/usr/libexec/byobu/include/config.py", line 374, in main
    tag = togglestatus(snackScreen, size)
  File "/usr/libexec/byobu/include/config.py", line 248, in togglestatus
    writestatus(itemlist)
  File "/usr/libexec/byobu/include/config.py", line 215, in writestatus
    f = open(path, "r")
IOError: [Errno 2] 没有那个文件或目录: '/root/.byobu/status'

Local variables in innermost frame:
i: [0, 'wifi_quality']
path: '/root/.byobu/status'
status: {'ec2_cost': 0, 'battery': 0, 'cpu_count': 1, 'services': 0, 'session': 0, 'entropy': 0, 'logo': 1, 'disk': 0, 'uptime': 1, 'cpu_freq': 1, 'disk_io': 0, 'arch': 0, 'hostname': 0, 'custom': 0, 'swap': 0, 'memory': 1, 'apport': 0, 'mail': 0, 'wifi_quality': 0, 'distro': 0, 'load_average': 1, 'raid': 1, 'users': 0, 'updates_available': 1, 'reboot_required': 1, 'date': 0, 'ip_address': 0, 'network': 0, 'processes': 0, 'time_utc': 0, 'cpu_temp': 0, 'fan_speed': 0, 'rcs_cost': 0, 'time': 1, 'release': 1, 'whoami': 0}
key: 'tmux_left'
items: [[0, 'apport'], [0, 'arch'], [0, 'battery'], [1, 'cpu_count'], [1, 'cpu_freq'], [0, 'cpu_temp'], [0, 'custom'], [0, 'date'], [0, 'disk'], [0, 'disk_io'], [0, 'distro'], [0, 'ec2_cost'], [0, 'entropy'], [0, 'fan_speed'], [0, 'hostname'], [0, 'ip_address'], [1, 'load_average'], [1, 'logo'], [0, 'mail'], [1, 'memory'], [0, 'network'], [0, 'processes'], [1, 'raid'], [0, 'rcs_cost'], [1, 'reboot_required'], [1, 'release'], [0, 'services'], [0, 'session'], [0, 'swap'], [1, 'time'], [0, 'time_utc'], [1, 'updates_available'], [1, 'uptime'], [0, 'users'], [0, 'whoami'], [0, 'wifi_quality']]

Created attachment 868819
File: backtrace

Created attachment 868820
File: environ

still see this crash in byobu-5.73-3.fc20

unable to reproduce, it works correctly on my desktop, can you please translate IOError: [Errno 2] 没有那个文件或目录: '/root/.byobu/status' or set your OS language to English?

sure, 没有那个文件或目录:No such file or directory.

can you please copy whole /root/.byobu directory to /root/byobu_backup, remove /root/.byobu and once done please try to reproduce your issue. Please let me know the result.

reported to upstream, patch provided, will be fixed in fedora/epel

Jan Klepek (jan-klepek-gmail) wrote :

correct patch (i have previously used fedora-specific paths)

byobu-5.73-4.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/byobu-5.73-4.fc19

byobu-5.73-4.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/byobu-5.73-4.el5

byobu-5.73-4.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/byobu-5.73-4.el6

byobu-5.73-4.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/byobu-5.73-4.fc20

Changed in byobu:
status: New → In Progress
importance: Undecided → High
assignee: nobody → Dustin Kirkland  (kirkland)
Dustin Kirkland  (kirkland) wrote :

bzr commit -m '* usr/lib/byobu/include/config.py: LP: #1286249
  - fall back to using the distro status file, fixes
    crash in config if status file disappears' --fixes 'lp:1286249'
Committing to: /home/local/media/source/byobu/byobu/
modified debian/changelog
modified usr/lib/byobu/include/config.py
Committed revision 2292.

Changed in byobu (Ubuntu):
importance: Undecided → High
status: New → In Progress
assignee: nobody → Dustin Kirkland  (kirkland)
Changed in byobu:
status: In Progress → Fix Committed
Changed in byobu (Ubuntu Trusty):
status: In Progress → Fix Committed

The attachment "byobu-5.73-config_except.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch

Thanks for the quick fix

byobu-5.73-4.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.

byobu-5.73-4.el5 has been pushed to the Fedora EPEL 5 stable repository. If problems still persist, please make note of it in this bug report.

Changed in byobu:
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :
Download full text (3.5 KiB)

This bug was fixed in the package byobu - 5.74-0ubuntu1

---------------
byobu (5.74-0ubuntu1) trusty; urgency=low

  [ Dustin Kirkland ]
  * usr/lib/byobu/include/ec2instancespricing.py: LP: #1286367
    - merged in updated instance pricing script from
      https://github.com/erans/ec2instancespricing
  * usr/share/byobu/profiles/tmux: LP: #1273685
    - remove double sourcing of local .tmux.conf
  * usr/lib/byobu/battery: LP: #1270451
    - add support for yet another batter type (Android)
    - thanks to Felix Krull for the initial patch
  * usr/share/byobu/profiles/tmux: LP: #1270551
    - enable ctrl-left and ctrl-right to move among words

  [ Chris Johnston ]
  * usr/share/man/man1/byobu-layout.1: LP: #1288738
    - fix manpage typo

  [ Mike Miller ]
  * usr/lib/byobu/logo: LP: #1278006
    - fix RHEL detection for logo

  [ Daniel Hahler ]
  * usr/bin/byobu-keybindings: LP: #1258093
    - fix toggling of f-keys
  * usr/share/byobu/profiles/tmux: LP: #1258534
    - ensure that we respect BYOBU_NO_TITLE in tmux

  [ Ryo ONODERA ]
  * configure.ac, etc/profile.d/Z97-byobu.sh => etc/profile.d/Z97-
    byobu.sh.in, usr/bin/byobu-config => usr/bin/byobu-config.in,
    usr/bin/byobu-ctrl-a => usr/bin/byobu-ctrl-a.in, usr/bin/byobu-
    disable-prompt => usr/bin/byobu-disable-prompt.in, usr/bin/byobu-
    disable => usr/bin/byobu-disable.in, usr/bin/byobu-enable-prompt =>
    usr/bin/byobu-enable-prompt.in, usr/bin/byobu-enable =>
    usr/bin/byobu-enable.in, usr/bin/byobu-export => usr/bin/byobu-
    export.in, usr/bin/byobu-janitor => usr/bin/byobu-janitor.in,
    usr/bin/byobu-launcher-install => usr/bin/byobu-launcher-install.in,
    usr/bin/byobu-launcher-uninstall => usr/bin/byobu-launcher-
    uninstall.in, usr/bin/byobu-launcher => usr/bin/byobu-launcher.in,
    usr/bin/byobu-launch => usr/bin/byobu-launch.in, usr/bin/byobu-
    layout => usr/bin/byobu-layout.in, usr/bin/byobu-prompt =>
    usr/bin/byobu-prompt.in, usr/bin/byobu-quiet => usr/bin/byobu-
    quiet.in, usr/bin/byobu-reconnect-sockets => usr/bin/byobu-
    reconnect-sockets.in, usr/bin/byobu-select-backend => usr/bin/byobu-
    select-backend.in, usr/bin/byobu-select-profile => usr/bin/byobu-
    select-profile.in, usr/bin/byobu-select-session => usr/bin/byobu-
    select-session.in, usr/bin/byobu-shell => usr/bin/byobu-shell.in,
    usr/bin/byobu-silent => usr/bin/byobu-silent.in, usr/bin/byobu-
    status-detail => usr/bin/byobu-status-detail.in, usr/bin/byobu-
    status => usr/bin/byobu-status.in, usr/bin/byobu-ugraph =>
    usr/bin/byobu-ugraph.in, usr/bin/byobu-ulevel => usr/bin/byobu-
    ulevel.in, usr/bin/byobu => usr/bin/byobu.in,
    usr/lib/byobu/include/config.py =>
    usr/lib/byobu/include/config.py.in, usr/lib/byobu/include/dirs =>
    usr/lib/byobu/include/dirs.in, usr/lib/byobu/include/toggle-utf8 =>
    usr/lib/byobu/include/toggle-utf8.in, usr/share/byobu/tests/byobu-
    time-notifications => usr/share/byobu/tests/byobu-time-
    notifications.in:
    - use @prefix@ rather than hardcoding /usr, makes code
      more portable and easier to build with ./config --prefix

  [ Arminius Silvanus ]
  * usr/share/byobu/profiles/bashrc: LP: #1280550
    - te...

Read more...

Changed in byobu (Ubuntu Trusty):
status: Fix Committed → Fix Released

byobu-5.73-4.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.

byobu-5.73-4.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report.

Changed in fedora:
importance: Unknown → Undecided
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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