Closed Bug 1607278 Opened 6 years ago Closed 6 years ago

RLBox - wasm sandboxed libraries built with incorrect flags

Categories

(Firefox Build System :: General, defect, P3)

x86_64
Linux
defect

Tracking

(firefox74 fixed)

RESOLVED FIXED
mozilla74
Tracking Status
firefox74 --- fixed

People

(Reporter: shravanrn, Assigned: froydnj)

References

()

Details

Attachments

(1 file)

When investigating a different bug, I noticed that the wasm sandboxed library (graphite) compiled in tree is being compiled with incorrect flags. Per the prototype available here, the wasm libraries need to be compiled with flags the specify the memory and guard page size. However, when investigating the binaries produced in the nightly Firefox 73.0a1 (2020-01-03) (64-bit), it looks like the produced binary was compiled without these flags.

We would need to fix this as these flags are particularly important for performance, and in certain scenarios are part of the assumptions made by RLBox.

@Nathan - Any chance you have some time to look at this as you are more familiar with the build system? Feel free to re-assign this to me or anyone else as appropriate.

Flags: needinfo?(nfroyd)

Sure, that seems pretty straightforward to fix.

Flags: needinfo?(nfroyd)

...and pull lucetc options out into a separate variable for readability.

Just a heads up, this bug is responsible for some of the crashes in 1606977(wikipedia crash).

I submitted the crash we were looking at last night, here it is: https://crash-stats.mozilla.org/report/index/cc55f6cb-4832-41fb-9c8f-9196a0200107

(In reply to Deian Stefan from comment #5)

I submitted the crash we were looking at last night, here it is: https://crash-stats.mozilla.org/report/index/cc55f6cb-4832-41fb-9c8f-9196a0200107

That crash says it's due to SIGILL; is lucetc generating instructions that aren't supported on your CPU?

Pushed by nfroyd@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/58f20c97d78f specify memory and guard page sizes for lucetc; r=firefox-build-system-reviewers,chmanchester

(In reply to Nathan Froyd [:froydnj] from comment #6)

(In reply to Deian Stefan from comment #5)

I submitted the crash we were looking at last night, here it is: https://crash-stats.mozilla.org/report/index/cc55f6cb-4832-41fb-9c8f-9196a0200107

That crash says it's due to SIGILL; is lucetc generating instructions that aren't supported on your CPU?

The crash is due to a failed bounds check (which compiles to ud2). I think this is the right behavior, but we probably want to investigate why this is happening in this mode at some point (maybe we make assumptions about not using this compilation method).

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla74

but we probably want to investigate why this is happening in this mode at some point (maybe we make assumptions about not using this compilation method).

We do indeed assume a heap of 4GB, so the crash is completely expected.

That crash says it's due to SIGILL;

The crash is due to a failed bounds check (which compiles to ud2). I think this is the right behavior

Yup!

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: