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

arm64 pc_irpc test failure #296

Closed
ikitayama opened this issue Dec 12, 2016 · 12 comments
Closed

arm64 pc_irpc test failure #296

ikitayama opened this issue Dec 12, 2016 · 12 comments
Labels

Comments

@ikitayama
Copy link
Contributor

On arm64, I don't seem to get the pc_irpc test passed.

$ ./test_driver -test pc_irpc -log -
Commencing test(s) ...
Sun Dec 11 23:03:40 CST 2016
Linux r2-a21 4.8.10-300.fc25.aarch64 #1 SMP Wed Nov 23 03:04:18 UTC 2016 aarch64 aarch64 aarch64 GNU/Linux
TESTDIR=/home/itaru.kitayama/builds/testsuite
[Tests with pc_irpc.dyn_g++_64_none_none]
-rwxr-xr-x 1 itaru.kitayama itaru.kitayama 111488 Dec 11 19:45 pc_irpc.dyn_g++_64_none_none*
	linux-vdso.so.1 (0x000003ff78760000)
	libdl.so.2 => /lib64/libdl.so.2 (0x000003ff78700000)
	libpthread.so.0 => /lib64/libpthread.so.0 (0x000003ff786c0000)
	libstdc++.so.6 => /lib64/libstdc++.so.6 (0x000003ff78510000)
	libm.so.6 => /lib64/libm.so.6 (0x000003ff78440000)
	libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x000003ff78410000)
	libc.so.6 => /lib64/libc.so.6 (0x000003ff78270000)
	/lib/ld-linux-aarch64.so.1 (0x000002aae0730000)

Running: allocation_mode=manual_allocate post_time=post_sequential post_to=post_to_proc rpc_sync=rpc_use_sync thread_start=rpc_start_stopped
@wrwilliams
Copy link
Member

Can you capture a log with DYNINST_DEBUG_PROCCONTROL=1 set in your environment and post it as a gist? (It'll probably be huge, but it'll help the assorted experts track things down.)

@ikitayama
Copy link
Contributor Author

ikitayama commented Dec 13, 2016

The ptrace system is failing for some reason (directly calling it in my test program at least retrieves the regset) https://gist.github.com/ikitayama/93bbf999851d8fe606b57e6c63482565

Note that I'm testing programs together with the modified ProcControlAPI on a v4.9 kernel.

@wrwilliams
Copy link
Member

Well, that's funny; why is ProcControl building without arch_aarch64 defined? That code clearly went through the old-style peekuser method of getting registers, which is not implemented in the kernel on ARM64. See the #ifdef at linux.C:2391 on master; as you tested manually, we should be using getregset or nothing.

@ikitayama
Copy link
Contributor Author

I think it is executing ptrace with GETREGSET properly, not sure as to why EFAULT is returned.

@ikitayama
Copy link
Contributor Author

FWIW, ptrace systemcall can't get regset with the 4.8.10-300.fc25.aarch64 kernel either.

@ikitayama
Copy link
Contributor Author

I take it back. The ptrace system call does not always succeed.

@wrwilliams
Copy link
Member

Fascinating. You see the log output that should only come from the PEEKUSER path, though?

Unified strace and debug logging would confirm what we did, as would a run under a debugger. And an upgrade from F21 is looking tricky, so I'm afraid I'm relying on you for reports from a current kernel for the moment.

@ikitayama
Copy link
Contributor Author

@wrwilliams executing this

strace -o /tmp/strace.log ./test_driver -test pc_irpc

doesn't record the ptrace invocation with its parameters.

@ikitayama
Copy link
Contributor Author

I've pushed another patch to my local repository. See PR #294.

@wrwilliams
Copy link
Member

Is this resolved now that #294 is merged in?

@ikitayama
Copy link
Contributor Author

In my test environment, yes.

$ ./test_driver -test pc_irpc -all
TEST                       COMP   OPT  ABI MODE     THREAD  LINK    PIC     RESULT
pc_irpc                    g++    none 64  create   SPST    dynamic nonPIC  PASSED
pc_irpc                    g++    none 64  create   MPST    dynamic nonPIC  PASSED
pc_irpc                    g++    none 64  create   SPMT    dynamic nonPIC  PASSED
pc_irpc                    g++    none 64  create   MPMT    dynamic nonPIC  PASSED
pc_irpc                    g++    none 64  attach   SPST    dynamic nonPIC  PASSED
pc_irpc                    g++    none 64  attach   MPST    dynamic nonPIC  PASSED
pc_irpc                    g++    none 64  attach   SPMT    dynamic nonPIC  PASSED
pc_irpc                    g++    none 64  attach   MPMT    dynamic nonPIC  PASSED
pc_irpc                    gcc    none 64  create   SPST    dynamic nonPIC  PASSED
pc_irpc                    gcc    none 64  create   MPST    dynamic nonPIC  PASSED
pc_irpc                    gcc    none 64  create   SPMT    dynamic nonPIC  PASSED
pc_irpc                    gcc    none 64  create   MPMT    dynamic nonPIC  PASSED
pc_irpc                    gcc    none 64  attach   SPST    dynamic nonPIC  PASSED
pc_irpc                    gcc    none 64  attach   MPST    dynamic nonPIC  PASSED
pc_irpc                    gcc    none 64  attach   SPMT    dynamic nonPIC  PASSED
pc_irpc                    gcc    none 64  attach   MPMT    dynamic nonPIC  PASSED
pc_irpc                    gcc    none 64  create   SPST    static  nonPIC  PASSED
pc_irpc                    gcc    none 64  create   MPST    static  nonPIC  PASSED
pc_irpc                    gcc    none 64  create   SPMT    static  nonPIC  PASSED
pc_irpc                    gcc    none 64  create   MPMT    static  nonPIC  PASSED
pc_irpc                    gcc    none 64  attach   SPST    static  nonPIC  PASSED
pc_irpc                    gcc    none 64  attach   MPST    static  nonPIC  PASSED
pc_irpc                    gcc    none 64  attach   SPMT    static  nonPIC  PASSED
pc_irpc                    gcc    none 64  attach   MPMT    static  nonPIC  PASSED

@wrwilliams
Copy link
Member

Excellent. Feel free to close things you report, by the way; we can always reopen them if we find there's more to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants