-
Notifications
You must be signed in to change notification settings - Fork 3k
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
AArch64 Fix getFrameRegs assertion during indirect fixup #7912
AArch64 Fix getFrameRegs assertion during indirect fixup #7912
Conversation
On AA4ch64 plaforms when calling getFrameRegs() and an indirect fixup is found, the RIP needs to be present at the correct offset. It was not, because the destructor was compiled with a tail-call. It needs to have a standard stack frame. By disabling the tail-call via the compiler flag on all destructors in g_destructors[], we can ensure that all destructors for AArch64 are walked correctly. This bug occurred sometimes in OSS Mediawiki after a few minutes. We tried to create a simplified unit test but were unsuccessful. This patch introduces no new unit test failures for either DebugOpt or Release build types on AArch64 platforms and doesn't affect x64 or PPC64 destructors.
@mxw Hi Max, can you lease review this PR. |
You just use
And have AARCH64_WALKABLE_FRAME (); expand to something like: I am not a fan of the optimize attribute in this case :). |
I think I chatted with @dave-estes offline who seems to like the memory barrier approach. You can continue ifdeffing that macro to do nothing on x86-64. |
@jim-saxman updated the pull request - view changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple of nits.
hphp/runtime/base/array-data-defs.h
Outdated
return g_array_funcs.release[kind()](this); | ||
g_array_funcs.release[kind()](this); | ||
AARCH64_WALKABLE_FRAME(); | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just delete this return; this function returns void
.
hphp/runtime/base/mixed-array.cpp
Outdated
@@ -468,7 +468,6 @@ ArrayData* MixedArray::MakeDictFromAPC(const APCArray* apc) { | |||
|
|||
//============================================================================= | |||
// Destruction | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put this back?
This patch addresses @mxw's code review comments.
@jim-saxman updated the pull request - view changes |
@jim-saxman - I ran a full MOP on this change. These two tests now pass with these option sets hphp/test/slow/async/simple_meth.php passes all option sets. A bunch of failures have reappeared with this option set I think I saw them last between fixes for relocation. |
@mxw has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Hi @swalk-cavium, Thanks for running tests on this patch. I re-ran all unit tests in all configurations and observed the following: For PGO with and without repoAuth: hphp/test/slow/async/simple_meth.php php/test/zend/good/ext/spl/tests/iterator_002.php I performed these tests on both CentOS with GCC 6.2.1 and Ubuntu with GCC 5.4. |
Hi @jim-saxman, I'm wondering if one of my machines needs a firmware upgrade. |
Hi @swalk-cavium @jim-saxman - just did a build and test cycle and am seeing these errors: HipHop VM 3.20.0-dev (rel)
System under test is a 96-core Packet Type 2A server, with Cavium ThunderX, using Ubuntu 16.04. Rather than noting a new issue, since the set*-dtor failures seem to be related, I'll just report here. |
Hi Ed,
We have yet to have an all green run on the regression tests.
Our Jenkins runs 6 different option sets.
Which options did you use below?
The uspoof ones depend on which version of the internationalization
library is used. This one always fails our CI testing. It has something
to do with libicui18n.so
The ext_posix.php test assumes that there is a 'wheel' group. Try
sudo groupadd wheel
I was not able to get 1794.php or 1795.php to fail.
I think these are related to the PR in the subject.
ir_inlining/1.php, setg-dtor.php and sets-dtor.php
Theobroma Systems makes their CI available here. One option
set, multiple OSs.
http://hhvm-arm64.theobroma-systems.com/
Steve Walk
…________________________________
From: Edward Vielmetti <notifications@github.com>
Sent: Tuesday, July 25, 2017 6:46 PM
To: facebook/hhvm
Cc: Walk, Steve; Mention
Subject: Re: [facebook/hhvm] AArch64 Fix getFrameRegs assertion during indirect fixup (#7912)
Hi @swalk-cavium<https://github.com/swalk-cavium> @jim-saxman<https://github.com/jim-saxman> - just did a build and test cycle and am seeing these errors:
HipHop VM 3.20.0-dev (rel)
Compiler: heads/master-0-g26a2f8c2795726e89dd636c16b2e1e6316dee7df
Repo schema: c9ccdb2b68ae4d61f3c1c0232b4b2426ff39c26e
gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4)
test/slow/ext_icu/uspoof.php
test/slow/ext_image/1794.php
test/slow/ext_posix/ext_posix.php
test/slow/ext_spl_file/1795.php
test/slow/ir_inlining/1.php
test/quick/setg-dtor.php
test/quick/sets-dtor.php
System under test is a 96-core Packet Type 2A server, with Cavium ThunderX, using Ubuntu 16.04. Rather than noting a new issue, since the set*-dtor failures seem to be related, I'll just report here.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#7912 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AV_bZDSP3ewBlKj3mkRyFpX2V5u_MfhUks5sRn5pgaJpZM4OU9Jc>.
|
Steve - I did a fresh build, with the following results. test/quick succeeds with only two failures (the dtor failures). I have not yet tested this patch which should address those. ext_posix succeeded after I added the wheel group. uspoof failures are described in #3925 as a result of Facebook testing against a system with ICU 49 instead of the current ICU 55 (or so). I was not able to get 1794.php or 1795.php to fail again in a second test. |
After applying this patch all of test/quick passes ("SHIP IT"). All of test/slow passes except test/slow/ext_icu/uspoof.php which is described by #3925. Looking good! |
@mxw has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
On AA4ch64 plaforms when calling getFrameRegs() and an indirect
fixup is found, the RIP needs to be present at the correct
offset. It was not, because the destructor was compiled with a
tail-call. It needs to have a standard stack frame.
By disabling the tail-call via the compiler flag on all destructors
in g_destructors[], we can ensure that all destructors for AArch64
are walked correctly.
This bug occurred sometimes in OSS Mediawiki after a few minutes.
We tried to create a simplified unit test but were unsuccessful.
This patch introduces no new unit test failures for either DebugOpt
or Release build types on AArch64 platforms and doesn't affect x64
or PPC64 destructors.