<div dir="ltr"><div><div><div>> which will try to read /etc/passwd and /etc/group which don't exist on<br>
android.<br><br></div><div>And then fall back to just use the numeric ids? Which are stored in the filesystem? Inodes I think?<br></div><div>Isn't reading uids/guids from inodes be independent from bionic/musl etc.?<br></div><div>On second thought, if this data is stored and read from the filesystem, couldn't a filesystem corruption cause these values?<br></div><div><br>> Does it reliably happen on those files, or is it a race condition?<br><br></div><div>If there is such a file, it's read everytime like this.<br></div></div><div>I don't think it's a new issue either, I just usually don't log this.<br>Could have been the same with busybox.<br><br></div><div>I've looked a bit more through the reports.<br><span class="gmail-im">4294967295 is most common but there is also: </span><span>3912069456 or </span><span>3800903683 or </span><span>3780276225 or </span><span>3851690820 etc. but with those I can see that the user used some root tools to mount extra partitions (e.g. apps2sd -> /data/sdext2), so I would write those ones off as unrelated.<br><br></span></div><div><span>4294967295 accounts for 80% of the reports and 99% are from devices on Android 6.0.1, 93% of those are Samsung and mostly SM-N930F or SM-G900F.<br></span></div><div><span>While I'm the first to chalk an issue up to a Samsung specific bug, this could also just be coincidence due to Samsungs device popularity...</span></div><div><span></span></div><span><br>> </span><span>Send it to me if you find it. Bionic doesn't have a conventional
makefile you can use to build it outside the AOSP hairball.<br><br></span></div><span>Will do if I find one, first need to see about resizing my VM though if I want to download AOSP :)<br></span><div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-05-14 20:21 GMT+02:00 Rob Landley <span dir="ltr"><<a href="mailto:rob@landley.net" target="_blank">rob@landley.net</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 05/13/2017 12:00 PM, darken wrote:<br>
>> are you building with bionic? glibc won't know what android does with<br>
><br>
> I'm building against musl libc.<br>
<br>
</span>which will try to read /etc/passwd and /etc/group which don't exist on<br>
android.<br>
<span class=""><br>
> I couldn't get toybox with bionic<br>
> (though the last time i tried was a few month ago).<br>
<br>
</span>I'm poking at the NDK, in theory that should build against bionic. In<br>
practice, it's a work in progress:<br>
<br>
<a href="http://lists.landley.net/pipermail/toybox-landley.net/2017-May/008976.html" rel="noreferrer" target="_blank">http://lists.landley.net/<wbr>pipermail/toybox-landley.net/<wbr>2017-May/008976.html</a><br>
<span class=""><br>
>> glibc won't know what android does with uid/gid for apps.<br>
><br>
> Doesn't bionic/3rd party only make a difference when trying to resolve<br>
> the ids to names?<br>
><br>
>> (also, 4294967295 is -1.)<br>
><br>
> Hm, -1 is not a valid guid though right? They all have to be positive<br>
> ranging from 0 to X?<br>
<br>
</span>They should, yes. (The two magic values to the kernel are 0 and 65534.<br>
The second means "nobody" and there's actually some effort to make<br>
multiple processes belonging to nobody not able to access each _other_.<br>
See <a href="https://lwn.net/Articles/695478/" rel="noreferrer" target="_blank">https://lwn.net/Articles/<wbr>695478/</a> )<br>
<span class=""><br>
>> i couldn't find any files on a Pixel XL where the built-in toybox<br>
> reported unusual uids or gids.<br>
><br>
> It's not very common, a few files, among a few devices out of thousands.<br>
> I never saw this in person either, just the occasional reports.<br>
<br>
</span>Does it reliably happen on those files, or is it a race condition?<br>
<span class=""><br>
>> as usual, not using Android's libc on an Android device is likely to<br>
> lead to confusing results.<br>
><br>
> I'll look into setting up a bionic toolchain again.<br>
> You don't happen to have an edition of "Crosscompiling toybox with<br>
> bionic for dummies" at hand :)?<br>
<br>
</span>Send it to me if you find it. Bionic doesn't have a conventional<br>
makefile you can use to build it outside the AOSP hairball.<br>
<span class="HOEnZb"><font color="#888888"><br>
Rob<br>
</font></span></blockquote></div><br></div>