[Toybox] realpath/tar status
Rob Landley
rob at landley.net
Fri Feb 3 22:42:06 PST 2023
On 2/3/23 17:29, enh via Toybox wrote:
> (sorry for the brevity, but i'm running out of day without having had
> any time to spend on this, so i'd rather say _something_ than wait
> until i have more...)
>
> feedback on realpath:
> """
> ./prebuilts/build-tools/path/linux-x86/realpath
> /mnt/sdc/android/kernel/out --relative-to /mnt/sdc/android/kernel
>
> For some reason it returns /out not out, which looks incorrect. Am I
> using it incorrectly?
> """
That is a bug, thanks. Reproduced...
> -*-
>
> as for the new tar, i updated the prebuilts yesterday and we've seen
> enough OOM kills since that i've had to revert it.
Grrr. I've got a couple of suspects for what I screwed up, but... Lemme see if I
can work the ASAN leak detector into my workflow at all here. (There's a lot of
commands that intentionally leak resources on the way out because the OS will
free them, but there's a category of commands that should NOT do that because
they process theoretically unbounded input and cannot be allowed to leak-per.)
> every case i saw
> was from https://cs.android.com/android/platform/superproject/+/master:system/update_engine/Android.bp;l=947?q=ue_unittest_disk_imgs
>
> so basically:
> ```
> tar -jxf sample_images/sample_images.tar.bz2 -C gen disk_ext2_1k.img
> disk_ext2_4k.img disk_ext2_4k_empty.img disk_ext2_unittest.img
> ```
>
> (direct link to the .tar.bz2:
> https://android.googlesource.com/platform/system/update_engine/+/refs/heads/master/sample_images/)
Wait, OOM on _extract_? Did I change the extract codepath? (That's sounding more
like I damaged dirtree in the non-breadth case...)
> the input is pretty small:
> ```
> ~/aosp-master-with-phones/system/update_engine$ ls -lh
> sample_images/sample_images.tar.bz2
> -rw-r----- 1 enh primarygroup 5.9K Nov 14 18:51
> sample_images/sample_images.tar.bz2
> ```
> and the outputs are only 4MiB too, so i'm not sure what's going on
> there... (and we haven't updated bzip2 since 1.0.8 in 2021, so --
> although, yes, all the build tool prebuilts are updated as one -- that
> didn't change, only toybox did.)
Thanks. On it. I'll try to get you fixes by monday.
Hmmm, I kind of need a "create/extract kernel tarball" sort of test, but it's
awkward to stick that into "make tests"...
Rob
More information about the Toybox
mailing list