-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Add warning about FS incompatibility to the log #1188
Comments
As a workaround we can resolve this issue by not loading Stats module if it's disabled in config (statistics_interval: 0) |
no still cannot start ,the same problem |
This isn't implemented yet, I'm just proposing one solution (for us to think about), so in next versions users can overcome similar problems. |
@szolin it would be better to fix this properly instead of disabling the whole module |
i run |
Hmm, maybe the stats DB was corrupted? What happens if you restart the service? |
bolt.Open returns this error and it's not easy to determine what could have caused this. Almost all system methods can return this type of error. |
"invalid argument"? This is weird, they don't provide any details? |
with the code here,i can use it ,but reboot will lost all the database
|
So this is a bug of boltdb then. @rufengsuixing could you please archive & attach one of these databases? We'd like to check what exactly is wrong with them. |
I think it's not necessary, because it's most likey this FS isn't supported (tested by bbolt devs):
|
@szolin hmm, can we maybe handle this type of issues automatically? |
Unless we know the exact line of code where this error is returned in bbolt source code - we can't do anything about it except stop loading the whole Stats module and continue. |
Is there any link to the test or boltdb issue? |
@rufengsuixing I improved logging in bbolt a little bit - it will point us to the line of code where the error is returned.
|
root@newifi-d1-home:~# /tmp/AdGuardHome -c /etc/AdGuardHome.yaml -w /root -v 2019/12/03 16:08:06 4843#1 [debug] Current working directory is /root |
Aha, so it's mmap()... I'm gonna ask you to update the testing binary once again: Also, please execute this system command: And this command: |
root@newifi-d1-home:~# /tmp/AdGuardHome -c /etc/AdGuardHome.yaml -w /root -v 2019/12/03 16:49:23 9944#1 [debug] Current working directory is /root |
32k size and 4k page size are OK |
moby/moby#32680 |
root@newifi-d1-home:~# stat /root/data/stats.db |
Well, it will probably print 4k, the same as we printed from Go code (I just wanted to be sure). Now I think the only thing we can do is to disable Stats module and file a new issue where we should either stop using bbolt or patch it so it won't use mmap(). |
maybe move the db into /tmp is a better choose,or let users to choose |
Now you can set the database path using The problem is that every user who installs AGH on overlayfs will face the same issue. |
someone found the filesystem which not support is behind overlay,for me is jffs2,other filesystem which support mmap is ok |
Here's what we're going to do:
|
Prerequisites
Issue Details
0.99.2
Router manual config
newifi d1 with mipsel mt7621
openwrt 18.06
Expected Behavior
start the software
Actual Behavior
root@newifi-d1-home:/usr/bin/AdGuardHome/data# /usr/bin/AdGuardHome/AdGuardHome
-v
2019/11/20 16:16:32 1118#1 [info] AdGuard Home, version v0.99.2, channel release
2019/11/20 16:16:32 1118#1 [debug] Current working directory is /usr/bin/AdGuardHome
2019/11/20 16:16:33 1118#36 [debug] github.com/AdguardTeam/AdGuardHome/home.(*clientsContainer).AddHost(): '127.0.0.1' -> 'localhost' [1]
2019/11/20 16:16:33 1118#36 [debug] github.com/AdguardTeam/AdGuardHome/home.(*clientsContainer).AddHost(): '::1' -> 'localhost' [2]
2019/11/20 16:16:33 1118#36 [debug] github.com/AdguardTeam/AdGuardHome/home.(*clientsContainer).AddHost(): 'ff02::1' -> 'ip6-allnodes' [3]
2019/11/20 16:16:33 1118#36 [debug] github.com/AdguardTeam/AdGuardHome/home.(*clientsContainer).AddHost(): 'ff02::2' -> 'ip6-allrouters' [4]
2019/11/20 16:16:33 1118#36 [debug] Added 4 client aliases from /etc/hosts
2019/11/20 16:16:33 1118#36 [debug] github.com/AdguardTeam/AdGuardHome/home.(*clientsContainer).addFromSystemARP(): executing arp [arp -a]
2019/11/20 16:16:33 1118#36 [debug] command arp has failed: exec: "arp": executable file not found in $PATH code:-1
2019/11/20 16:16:33 1118#36 [debug] Added 0 client aliases from DHCP
2019/11/20 16:16:33 1118#1 [debug] github.com/AdguardTeam/AdGuardHome/home.upgradeConfig(): got schema version 5
2019/11/20 16:16:33 1118#1 [debug] Reading config file: /usr/bin/AdGuardHome/AdGuardHome.yaml
2019/11/20 16:16:33 1118#1 [debug] Writing YAML file: /usr/bin/AdGuardHome/AdGuardHome.yaml
2019/11/20 16:16:33 1118#1 [debug] github.com/AdguardTeam/AdGuardHome/stats.(*statsCtx).dbOpen(): db.Open...
2019/11/20 16:16:33 1118#1 [error] Stats: open DB: /usr/bin/AdGuardHome/data/stats.db: invalid argument
2019/11/20 16:16:33 1118#1 [fatal] Couldn't initialize statistics module
Screenshots
Additional Information
https://github.com/etcd-io/bbolt
The text was updated successfully, but these errors were encountered: