Hello!
I have issues with "restic", a backup program written in Golang. On MIPS it fails with "Access Violation", thus the patch to update to the most recent version has been stopped by me. Can someone give it a try on anther architecture please? Perhaps the issue is limited to MIPS and that particular device (AVM Fritzbox 7360 v2, lantiq).
openwrt:master
← Torxgewinde:master
opened 07:45PM - 01 Jun 22 UTC
Signed-off-by: Tom Stöveken tom@naaa.de
Tested lantiq/xrx200
Maintainer: u… nchanged, it was Markus Weippert <markus@gekmihesg.de>
Compile tested: SDK for OpenWrt 21.02.3
Run tested: xRX200 rev 1.2, AVM FRITZ!Box 7360 V2, OpenWrt 21.02.3, running --help)
Description:
Updated to version 0.13.1
Having a proxy triggers this issue. Unsetting the proxy environment variable for restic solves the problem.
Details are here:
openwrt:master
← Torxgewinde:master
opened 07:45PM - 01 Jun 22 UTC
Signed-off-by: Tom Stöveken tom@naaa.de
Tested lantiq/xrx200
Maintainer: u… nchanged, it was Markus Weippert <markus@gekmihesg.de>
Compile tested: SDK for OpenWrt 21.02.3
Run tested: xRX200 rev 1.2, AVM FRITZ!Box 7360 V2, OpenWrt 21.02.3, running --help)
Description:
Updated to version 0.13.1
opened 07:14PM - 02 Jun 22 UTC
closed 06:54AM - 06 Jun 22 UTC
Output of `restic version`
--------------------------
`restic 0.13.1 compiled … with go1.17.8 on linux/mips`
How did you run restic exactly?
-------------------------------
- Running restic on an embedded device (AVM Fritzbox 7360 v2, lantiq, MIPS)
- Backend is restic-rest-server on another machine
- the issue "Access Violation" is present with OpenWRTs current restic version 0.9.6, thus I also [compiled the most recent version](https://github.com/openwrt/packages/pull/18663) with the OpenWRT SDK
- running restic from laptop with the same REST server works, same command to initialize the repository succeeds from laptop
- The embedded device still has RAM free:
```
free -h
total used free shared buff/cache available
Mem: 121888 33932 26948 10820 61008 29764
Swap: 0 0 0
```
Commandline is (I edited the credentials, servername, CA name):
`DEBUG_LOG=/tmp/restic-debug.log restic --cacert /etc/config/XXXX.crt --repo rest:https://USERNAME:PASSWORD@SERVER.lan:6789/USERNAME init -v -v -v `
The terminal output is:
```
debug log file /tmp/restic-debug.log
debug enabled
enter password for new repository:
enter password again:
Fatal: create repository at rest:https://USERNAME:***@SERVER.lan:6789/USERNAME/ failed: Post "https://USERNAME:***@SERVER.lan:6789/USERNAME/?create=true": Access violation
```
The debug log is:
```
2022/06/02 18:44:05 restic/main.go:95 main.main 1 main []string{"restic", "--cacert", "/etc/config/XXXXXX.crt", "--repo", "rest:https://USERNAME:PASSWORD@SERVER.lan:6789/USERNAME", "init", "-v", "-v", "-v"}
2022/06/02 18:44:05 restic/main.go:96 main.main 1 restic 0.13.1 compiled with go1.17.8 on linux/mips
2022/06/02 18:44:15 restic/global.go:752 main.create 1 parsing location rest:https://USERNAME:PASSWORD@SERVER.lan:6789/USERNAME
2022/06/02 18:44:15 restic/global.go:652 main.parseConfig 1 opening rest repository at rest.Config{URL:(*url.URL)(0x2024b90), Connections:0x5}
2022/06/02 18:44:15 debug/round_tripper_debug.go:82 debug.loggingRoundTripper.RoundTrip 1 ------------ HTTP REQUEST -----------
HEAD /USERNAME/config HTTP/1.1
Host: SERVER.lan:6789
User-Agent: Go-http-client/1.1
Accept: application/vnd.x.restic.rest.v2
Authorization: Basic XXX_EDITED_BY_ME_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
2022/06/02 18:44:15 debug/round_tripper_debug.go:87 debug.loggingRoundTripper.RoundTrip 1 RoundTrip() returned error: Access violation
2022/06/02 18:44:15 debug/round_tripper_debug.go:82 debug.loggingRoundTripper.RoundTrip 1 ------------ HTTP REQUEST -----------
POST /USERNAME/?create=true HTTP/1.1
Host: SERVER.lan:6789
User-Agent: Go-http-client/1.1
Content-Length: 0
Authorization: Basic XXX_EDITED_BY_ME_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Content-Type: binary/octet-stream
Accept-Encoding: gzip
2022/06/02 18:44:15 debug/round_tripper_debug.go:87 debug.loggingRoundTripper.RoundTrip 1 RoundTrip() returned error: Access violation
```
To compile restic I used this Makefile for OpenWRT SDK
```
include $(TOPDIR)/rules.mk
PKG_NAME:=restic
PKG_VERSION:=0.13.1
PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/restic/restic/tar.gz/v${PKG_VERSION}?
PKG_HASH:=8430f80dc17b98fd78aca6f7d635bf12a486687677e15989a891ff4f6d8490a9
PKG_LICENSE:=BSD-2-Clause
PKG_LICENSE_FILES:=LICENSE
PKG_MAINTAINER:=Markus Weippert <markus@gekmihesg.de>
PKG_BUILD_DEPENDS:=golang/host
PKG_BUILD_PARALLEL:=1
PKG_USE_MIPS16:=0
GO_PKG:=github.com/restic/restic/
GO_PKG_BUILD_PKG:=github.com/restic/restic/cmd/restic/
GO_PKG_LDFLAGS_X:=main.version=$(PKG_VERSION)
GO_PKG_TAGS:=debug
include $(INCLUDE_DIR)/package.mk
include ../../lang/golang/golang-package.mk
define Package/restic
TITLE:=restic backup program
URL:=http://github.com/restic/restic
DEPENDS:=$(GO_ARCH_DEPENDS)
SECTION:=utils
CATEGORY:=Utilities
endef
define Package/restic/description
restic is a backup program that is fast, efficient and secure. It supports the
three major operating systems (Linux, macOS, Windows) and a few smaller ones
(FreeBSD, OpenBSD).
endef
$(eval $(call GoBinPackage,restic))
$(eval $(call BuildPackage,restic))
```
Simple commands like, `restic --help` work as expected.
What backend/server/service did you use to store the repository?
----------------------------------------------------------------
Restic-rest-server on another machine. Other devices backup without issues to that destination.
Expected behavior
-----------------
No error "Access Violation" even on not so common architecture like MIPS.
Actual behavior
---------------
restic fails and does not work.
Steps to reproduce the behavior
-------------------------------
The issue exists with the current version of OpenWRT 0.9.6 and still with 0.13.1.
Do you have any idea what may have caused this?
-----------------------------------------------
Maybe it is because OpenWRT strips the Go binaries?
Do you have an idea how to solve the issue?
-------------------------------------------
Not yet. Perhaps skipping to strip the binary helps? But I might run out of space since this an embedded device.
Did restic help you today? Did it make you happy in any way?
------------------------------------------------------------
Sure, I like it for backups and on other architectures on OpenWRT and Ubuntu it is working fine.
system
Closed
June 16, 2022, 7:11am
3
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.