Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exception when mounting archive #4245

Closed
TeddyDD opened this issue Jan 5, 2019 · 16 comments

Comments

Projects
None yet
9 participants
@TeddyDD
Copy link

commented Jan 5, 2019

Have you checked borgbackup docs, FAQ, and open Github issues?

Yes

Is this a BUG / ISSUE report or a QUESTION?

ISSUE

System information. For client/server mode post info for both machines.

Void 4.19.13_1 x86_64

Your borg version (borg -V).

borg 1.1.8

Operating system (distribution) and version.

  • Void Linux x86_64 glibc
  • python3-msgpack-0.6.0

Hardware / network configuration, and filesystems used.

ext4 on encrypted luks volume, external usb 3 HDD

How much data is handled by borg?

Repo is around 130 gb

Full borg commandline that lead to the problem (leave away excludes and passwords)

borg mount ./repo::anyarchive directory

Describe the problem you're observing.

Exception is thrown, archive is not mounted

Can you reproduce the problem? If so, describe how. If not, describe troubleshooting steps you took before opening the issue.

  • checked repo with borg check - no errors
  • checked filesystem (ext4) with fsck - no errors
  • checked disk with smartctl - it looks fine to me, I can post full log if required
  • tried to mount on second machine with similar configuration (Void Linux, same version of borg) - same result
  • tried to mount archive on Ubuntu 18.04 with borg 1.1.5 - works fine

Include any warning/errors/backtraces from the system logs

borg --debug mount ./merkury-kopia::luna-2018-12-06 ./repo                                 751ms  sob, 5 sty 2019, 21:08:38
using builtin fallback logging configuration
35 self tests completed in 0.13 seconds
Verified integrity of /mnt/merkury-kopia/index.27898
TAM-verified manifest
security: read previous location '/mnt/merkury-kopia'
security: read manifest timestamp '2018-12-06T18:28:44.634432'
security: determined newest manifest timestamp as 2018-12-06T18:28:44.634432
security: repository checks ok, allowing access
mount data cache capacity: 4 chunks
Mounting filesystem
Local Exception
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/borg/archiver.py", line 4436, in main
    exit_code = archiver.run(args)
  File "/usr/lib/python3.6/site-packages/borg/archiver.py", line 4368, in run
    return set_ec(func(args))
  File "/usr/lib/python3.6/site-packages/borg/archiver.py", line 1353, in do_mount
    return self._do_mount(args)
  File "/usr/lib/python3.6/site-packages/borg/archiver.py", line 152, in wrapper
    return method(self, args, repository=repository, **kwargs)
  File "/usr/lib/python3.6/site-packages/borg/archiver.py", line 1363, in _do_mount
    operations.mount(args.mountpoint, args.options, args.foreground)
  File "/usr/lib/python3.6/site-packages/borg/fuse.py", line 323, in mount
    self._create_filesystem()
  File "/usr/lib/python3.6/site-packages/borg/fuse.py", line 252, in _create_filesystem
    self.process_archive(self.args.location.archive)
  File "/usr/lib/python3.6/site-packages/borg/fuse.py", line 377, in process_archive
    consider_part_files=self.args.consider_part_files):
  File "/usr/lib/python3.6/site-packages/borg/fuse.py", line 160, in iter_archive_items
    item = unpacker.unpack(write_bytes)
TypeError: unpack() takes no arguments (1 given)

Platform: Linux luna 4.19.13_1 #1 SMP PREEMPT Sun Dec 30 08:54:53 UTC 2018 x86_64
Linux:   
Borg: 1.1.8  Python: CPython 3.6.8
PID: 19787  CWD: /mnt
sys.argv: ['/bin/borg', '--debug', 'mount', './merkury-kopia::luna-2018-12-06', './repo']
SSH_ORIGINAL_COMMAND: None

@ThomasWaldmann

This comment has been minimized.

Copy link
Member

commented Jan 5, 2019

what's your msgpack(-python) version?

@TeddyDD

This comment has been minimized.

Copy link
Author

commented Jan 5, 2019

it's 0.6.0

@ThomasWaldmann

This comment has been minimized.

Copy link
Member

commented Jan 5, 2019

That version is not supported for borg 1.1.x, see setup.py. Try 0.5.6?

Note: seems not to be an issue in master branch (no release there yet, will be borg 1.2.0 at some time in the future).

@ThomasWaldmann

This comment has been minimized.

Copy link
Member

commented Jan 5, 2019

See #3899 for more info.

@TeddyDD

This comment has been minimized.

Copy link
Author

commented Jan 5, 2019

Whoop, I should check that first. I'll build borg with msgpack 0.5.6 and report back

@ThomasWaldmann

This comment has been minimized.

Copy link
Member

commented Jan 5, 2019

Note: we can't fix this in 1.1-maint as we allow msgpack-python 0.4.x there which does not yet have the required .tell() method to replace the write_bytes parameter.

If we would require msgpack-python >= 0.5.0 (which has .tell()) we might break it for distributions not having that.

@TeddyDD

This comment has been minimized.

Copy link
Author

commented Jan 5, 2019

Works with msgpack 0.5.6, thank you. I report it to Void package maintainer.

@ThomasWaldmann

This comment has been minimized.

Copy link
Member

commented Jan 5, 2019

@eli-schwartz

This comment has been minimized.

Copy link
Contributor

commented Jan 11, 2019

Note: we can't fix this in 1.1-maint as we allow msgpack-python 0.4.x there which does not yet have the required .tell() method to replace the write_bytes parameter.

If we would require msgpack-python >= 0.5.0 (which has .tell()) we might break it for distributions not having that.

Right -- it's a shame python doesn't have useful features like try/except AttributeError, or if hasattr(unpacker, 'tell') and callable(unpacker.tell).

I totally see why it's entirely impossible to support modern code by design.

inserts withering sarcasm everywhere

@ThomasWaldmann

This comment has been minimized.

Copy link
Member

commented Jan 11, 2019

@eli-schwartz as you already know, this is not the only issue.

so if you want to invest a lot of work just to support arch being able to upgrade to the latest msgpack release instead of just keeping the working 0.5.6 for a while, feel free to backport all the stuff we have in master for that.

(considering stability of 1.1.x and the amount of changes / refactoring needed for that, i won't do that - see #3943 and other msgpack related recent master PRs)

@Ghabry

This comment has been minimized.

Copy link

commented Jan 28, 2019

After upgrading our Arch system I finally hit this error.
As a temporary workaround you can use a custom launch script in /usr/local/bin/borg and an old version of msgpack, e.g. installed in a virtualenv.
Could have some unexpected side-effects but by now this works for me.

setup venv:

virtualenv /usr/local/venv-borg
source /usr/local/venv-borg/bin/activate
pip install msgpack==0.5.6

Startup script (requires /usr/local/bin in PATH):

/usr/local/bin/borg
#!/bin/bash

export PYTHONPATH=/usr/local/venv-borg/lib/python3.7/site-packages:/usr/lib/python3.7/site-packages

exec "/usr/local/venv-borg/bin/python" "/usr/bin/borg" "$@"
@uKev

This comment has been minimized.

Copy link

commented Feb 3, 2019

I am affected by this problem, for the sake of completeness I would like to link the corresponding bug report of Arch Linux here:

https://bugs.archlinux.org/index.php?do=details&action=details.addvote&task_id=61346

If something always works well, it is easily taken for granted. That it is not, becomes clear as soon as there are problems. So I would like to take this opportunity to thank Thomas Waldmann for creating Borg and Eli Schwartz/Lukas Fleischer for making it available to all Arch Linux users. I appreciate your work.

I hope you can find a solution to this problem together, even if someone has to give in.

@dedean16

This comment has been minimized.

Copy link

commented Feb 9, 2019

@Ghabry thanks for sharing

@PowderedToastMan

This comment has been minimized.

Copy link

commented Feb 17, 2019

Not a solution, but I have a workaround for Archlinux. My PKGBUILD creates a virtualenv with all the dependencies of Borg bundled in. My contribution wasn't welcome on the Arch bug report for this issue so I'm sticking it here. Hope someone finds this useful.

@piegamesde

This comment has been minimized.

Copy link

commented May 6, 2019

I'm on Arch Linux too, here's my workaround for those who are interested: pip install --user msgpack==0.5.6

@JackDinn

This comment has been minimized.

Copy link

commented May 10, 2019

I'm on Arch Linux too, here's my workaround for those who are interested: pip install --user msgpack==0.5.6

god-send. I've been using Borg as my main Manjaro system backup for a year & half , first time i actually need to recover a borked system & Borg wont mount anything 😞 but this pip downgrade of msgpack is working on Manjaro (pheew). When will Borg be updated to fix this for Arch/Manjaro?

Thanks @piegamesde

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.