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

Using "--memory" breaks fakemachine backend #509

Open
tboehler1 opened this issue Jun 20, 2024 · 3 comments · May be fixed by #510
Open

Using "--memory" breaks fakemachine backend #509

tboehler1 opened this issue Jun 20, 2024 · 3 comments · May be fixed by #510

Comments

@tboehler1
Copy link

Some time in the last 2 months I've been unable to use debos with the "--memory" flag. The fakemachine backend keeps running into OOM errors, hangs completely, and times out after a few minutes.

To reproduce:

$ cat repro.yaml
architecture: arm64

actions:
  - action: run
    command: "echo 'Hello World'"

Run this using debos --memory 8192 repro.yaml

Outputs:

@flxzt
Copy link

flxzt commented Jun 30, 2024

Did you try using 8192MB ? Without a unit I think it parses as only 8192 bytes (see here)

@tboehler1
Copy link
Author

That was indeed the problem and when specifying 8192MB it works. Sorry for the noise!

obbardc added a commit that referenced this issue Jul 1, 2024
Since the --memory and --scratchsize arguments are parsed with human-readable
suffixes into bytes (e.g 2048MB or 2GB), if a user does not put a suffix
the arguments are parsed as bytes which can cause issues later when a user
sets the memory to be 2048 assuming it will be parsed as MB.

Change the documentation to match reality and also add a warning if the user
has set either parameter less than the recommended default.

Closes: #509
Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
@obbardc
Copy link
Member

obbardc commented Jul 1, 2024

I created #510 to hopefully warn when a user forgets to add a suffix and not change existing behaviour. :-)

@obbardc obbardc reopened this Jul 1, 2024
obbardc added a commit that referenced this issue Jul 1, 2024
Since the --memory and --scratchsize arguments are parsed with human-readable
suffixes into bytes (e.g 2048MB or 2GB), if a user does not put a suffix
the arguments are parsed as bytes which can cause issues later when a user
sets the memory to be 2048 assuming it will be parsed as MB.

Change the documentation to match reality and also add a warning if the user
has set either parameter less than the recommended default.

Closes: #509
Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants