-
Notifications
You must be signed in to change notification settings - Fork 56
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
some CMD line options are not recognized #144
Comments
Maybe the order of parameters is important? There's some fixes in #136 which may help your problem. |
That may fix the timely issue of applying parameters but in my case some of them cause an exception during startup. The timestamp option was working correctly for me though. I also tried different orders in my command line to no avail.
Am 18. April 2020 13:38:39 MESZ schrieb Kai Krakow <notifications@github.com>:
…Maybe the order of parameters is important? There's some fixes in #136
which may help your problem.
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#144 (comment)
|
Did you try the patches? Actually it may fix your problem because some cmdline options may access partially uninitialized objects in bees without this patch. Usually that's only a problem on early shutdown, i.e. because of errors. A full stacktrace would help. Try |
BTW: There may be a problem with 0.6.2, it has a bug somewhere with cmdline parameters. Could you try 0.6.1, or preferably master which should become 0.7 at some time when @Zygo no longer fears the tag ;-). Actually, I think the 0.6.2 tag shouldn't have been made anyway, it seems to miss one or two important patches around the cmdline parser. See-also: #132 |
These are the outputs I get when using
|
I also checked out master, compiled and tried to make it run. Unfortunately it is throwing an exception even when I'm just trying to show
|
Your data is safe at any point (except for kernel bugs): bees always uses the kernel to deduplicate extents, this is transaction safe, concurrent writes won't damage any data, bees never writes into your files (it only uses existing extents which it will create on demand). And yes, master is missing my "--help" fix thus the crash. The "invalid argument" exception actually doesn't refer to cmdline arguments (tho it may result from reading a cmdline option but I don't think that's the problem here). You may want to delete Maybe post the contents of |
Crashes near thread termination are usually some kind of libc dependency bug. A number of users have reported that, starting roughly around the last Debian release. The fix seems to be to track down everything the C compiler touches during a rebuild, and reinstall/upgrade it. The stack traces usually point deep into the libc stdio code which bees can do nothing about (I'm guessing this is the case here, but no stack trace was provided). I suspect the exception in stoul is because |
@Zygo but for the "--help" case this looks a lot like what I fixed with #136...
It starts all those threads before writing the help report to the terminal, then exits with an error (as it should, it's in the switch/case). The observed exception probably happens somewhere inside those threads. My patch avoids starting those threads early. It doesn't fix the actual exception, tho, which could still happen in the non-help-case. About the other reported crash from #144 (comment): |
beescrawl.dat is read from a In this case it's a bit different, we crash while trying to join a thread that we just cancelled (so we're running On the other hand, this is all distracting us from the reported bug, which is something about beesd giving bees a bogus parameter. Specifically:
beesd is failing to include the numeric argument for --scan-mode, causing an integer parse exception. |
OK, technically what we did in master is make sure the threads have all exited before calling the thread destructors. In C++, invoking a destructor on an unjoined thread is not permitted, and if the C++ runtime detects that, it will call If we don't cancel the thread, or make other arrangements for it to exit, then bees would just hang in thread join. That's categorically worse than crashing--with a crash, at least the parent process knows something went wrong, but with a hang, everything looks OK from the outside but no dedupe gets done. bees crashes won't harm any data, as bees is designed to tolerate system crashes. This is a necessity when developing something that literally lives in btrfs. bees was originally not designed to terminate at all so there are a few startling deficiencies remaining in the code that handles termination, and they are all low-priority fixes. There is a |
I finally got around to run the script with the -x option. Find the output attached. |
You may want to use long options with syntax But you probably found a bug in the beesd wrapper script... As far as I understand it, it will throw away all "unsupported" arguments... Its parser doesn't handle arguments with option parameters at all: If it doesn't match exactly what If you're using systemd, try the following:
This should work around the bug. I omitted @Zygo This script is already complicated enough, such an additional logic would only bloat it even more. Wouldn't it be better to get that back into the C++ code? I have been working on such a feature some time ago and would continue working on it. @nefelim4ag Or maybe it would be better to reverse the logic and only check parameters not starting with a dash against the config file, and pass everything else over to bees as-is? Also, one could argue if the final cmdline should go with |
After setting up bees I wanted to reduce the log level as well as try out different scan modes. Having it set up as a systemd service I tried and just added
--verbose 6
and--scan-mode 2
to the unit file. The service wouldn't start anymore so I tried the same by callingbeesd
directly which also didn't work. All I got was an exception about invalid parameters in some call tostd::stoul
.After fiddling around with it I finally made it work using the
OPTIONS
field in the configuration file. This is a bit puzzling as I initially had--strip-paths --no-timestamps
seemingly working when added to the unit file. So flags without parameters seem to work.I compiled bees 0.6.2 downloaded from the release section myself without further changes and am running it on
Linux helios4 4.19.104-mvebu #20.02.1 SMP Mon Feb 17 03:22:46 CET 2020 armv7l GNU/Linux
a SBC running armbian.The text was updated successfully, but these errors were encountered: