-
Notifications
You must be signed in to change notification settings - Fork 269
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
ndk-gdb/gdbserver hits SELinux error reading /proc/stat #570
Comments
(if this isn't in scope for r17 go ahead and punt to r18) |
The new libc.a is in r17, which should fix this issue. I should retest it. Do we know of any incompatibilities between the new libc.a and older platform kernels or SELinux policies? |
Not yet. I've tested as far back as ICS on a Galaxy Nexus. There isn't much older out there. Idk what the kernel version is though. |
I've tested libc.a, I should say. Not gdbserver. I think enh ran the bionic unit tests with a current libc.a on ICS and had surprisingly good results. The things you would expect to be broken (netd and whatnot), but otherwise good. He'd emailed out the results. |
the TL;DR was "system properties, tzdb, and netd code doesn't work until L, everything else is fine". (i classify system call wrappers for system calls your kernel doesn't have as "working", even though ENOSYS might be a disappointment.) |
I think this can wait until we have dependency tracking in checkbuild.py. gdbserver is currently built using a |
SGTM |
@rprichard: checkbuild.py has dependency tracking now |
I think rebuilding gdbserver with a newer libc.a would fix this. Maybe it's already fixed? |
Yeah, this issue looks fixed. I tested ndk-gdb on an API 16 device and an API 26 device, and ndk-gdb is using gdb 8 now. |
Split off from #447
gdbserver calls
sysconf(_SC_NPROCESSORS_ONLN)
to get the number of cores, and because gdbserver is statically linked against an old libc,sysconf
tries to get this information by reading/proc/stat
, which fails due to an SELinux setting (https://issuetracker.google.com/issues/37140047).AFAICT, the only effect is that
info os processes
information is wrong. gdbserver only reports whether each process is associated with core 0. It ignores other cores, because it thinks there aren't any.info os processes
shows this:BAD:
GOOD:
The fix for #272 might be sufficient to fix this. There was a patch for that issue a while ago, https://android-review.googlesource.com/c/platform/bionic/+/522595.
The text was updated successfully, but these errors were encountered: