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

PR#1 #2

Closed
wants to merge 26 commits into from
Closed

PR#1 #2

wants to merge 26 commits into from

Conversation

uvera
Copy link

@uvera uvera commented Oct 14, 2019

No description provided.

Bongkyu Kim and others added 26 commits October 6, 2019 12:54
generate subdir for /sys and /sys/devices, handle restorecon in parallel.

This reduces coldboot time on our target about 300ms.

Change-Id: I9c3d0e97aacff0ca127880d936dfd5fcc2aee125
Requires external/libselinux change as well

[Adrian DC] Preserve the log while permissive

Change-Id: I3f2887930e15d09014c2594141ba4acbbc8d6d9d
Change-Id: I19f149fac693420cf1f630b51293bbd3650a1b59
Allow optional vendor-specific initializations
within init.  This can be used for runtime
initialization setup that init rc scripts do
not support.

Change-Id: I7623a0d59b18f9ec8e3623958e2f7ccd72b877bf
Change-Id: Ie1ca5018c465f6b2c15cbc00bdf3bb866d98ddef
Update the recovery image only if the option is enabled
under Developer options

This reverts commit 231e0a9.

Change-Id: I928f7ee8bb3eaf5581bb8225661d253ecca0c4ef

Change CM recovery install script filename [2/2]

This is part 2/2 to maintain backwards compatibility with CWM's
verify_root_and_recovery() function. CWM checks if install-recovery.sh
exists and has an executable flag set, then offers to disable the script
for the user. CM now controls this with the persist.sys.recovery_update
property which is configurable via settings, so we don't need to
double-check this.

This changes the name of the recovery install script to
install-cm-recovery.sh.

Change-Id: I275dd358b46c626dfcb8fe02c583a308d5a89c56

init: Move install-recovery.sh back to the standard location

L moved the location of install-recovery.sh from /system/etc/ to
/system/bin. Since CWM recovery isn't looking for this location
anyway, let's return the file to this standard location. This allows
all other code in L to function properly.

Maintain the change to the init to allow flash_recovery to be disabled
in settings.

Change-Id: I8a85db8addeb75a2fd60d809c5ed4edc619ef7ed
This is more sensible than the previous behaviour of grepping stdin,
and matches newer GNU grep behaviour.

PR:		216307
Submitted by:	Kyle Evans <kevans91 at ksu.edu>
Reviewed by:	cem, emaste, ngie
Relnotes:	Yes
Differential Revision:	https://reviews.freebsd.org/

Change-Id: I9dc42c4105c35c42c6b195c880c70f4398852886
* Convert bytes to strings so that we don't print NULL bytes
* Make sure get_number_of_pages() returns int

Test: Run with py2 and py3 and verify same output
Change-Id: I4b29e57c3570efc53bddc4d95739f1b4330b7495
This change includes below commits:

    Camera bringup changes system-core
    Change-Id: I1cf98641eca9096bd27645e07ea802646ea1fb96

    system/core: Fix for HAL compilation issues while integrating HAL 1.0
    Change-Id: Iead9c1ade279b64c5cbdf4d2de1a8b695939c52a

    Camera: Add enum to specify the frame type
    Added enum to specify the frame type of either fd/data buffer
    CRs-fixed: 654901
    Change-Id: I1c0b1a2c6a1425cdb6650cdfc20ca65835a1b81f

Change-Id: I654a40661e6e101da2a06986abeceb20639cccd9
(cherry picked from commit 6fa1ed9)
* Fixes camera for Samsung Exynos devices:

08-30 18:07:03.585  2729  2729 I ExynosCameraFrameFactory: INFO(startThread[1608]):pipeId=0
08-30 18:07:03.585  2729  2729 F libutils.threads: thread name not provided to Thread::run
08-30 18:07:03.586  2729  2729 F libc    : Fatal signal 6 (SIGABRT), code -6 in tid 2729 (cameraserver)
08-30 18:07:03.587  2548  2548 W         : debuggerd: handling request: pid=2729 uid=1047 gid=1005 tid=2729
08-30 18:07:03.656  6489  6489 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
08-30 18:07:03.656  6489  6489 F DEBUG   : Build fingerprint: 'samsung/aosp_gts210ltexx/gts210ltexx:7.0/NYC/chris08292135:userdebug/test-keys'
08-30 18:07:03.656  6489  6489 F DEBUG   : Revision: '0'
08-30 18:07:03.657  6489  6489 F DEBUG   : ABI: 'arm'
08-30 18:07:03.657  6489  6489 F DEBUG   : pid: 2729, tid: 2729, name: cameraserver  >>> /system/bin/cameraserver <<<
08-30 18:07:03.658  6489  6489 F DEBUG   : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
08-30 18:07:03.673  6489  6489 F DEBUG   : Abort message: 'thread name not provided to Thread::run'
08-30 18:07:03.673  6489  6489 F DEBUG   :     r0 00000000  r1 00000aa9  r2 00000006  r3 00000008
08-30 18:07:03.674  6489  6489 F DEBUG   :     r4 b5a2c58c  r5 00000006  r6 b5a2c534  r7 0000010c
08-30 18:07:03.674  6489  6489 F DEBUG   :     r8 b28b5380  r9 00000000  sl 00000000  fp b2a92800
08-30 18:07:03.674  6489  6489 F DEBUG   :     ip 00000016  sp be90b350  lr b4f7e537  pc b4f80d94  cpsr 200f0010
08-30 18:07:03.694  6489  6489 F DEBUG   :
08-30 18:07:03.694  6489  6489 F DEBUG   : backtrace:
08-30 18:07:03.694  6489  6489 F DEBUG   :     #00 pc 00049d94  /system/lib/libc.so (tgkill+12)
08-30 18:07:03.694  6489  6489 F DEBUG   :     #1 pc 00047533  /system/lib/libc.so (pthread_kill+34)
08-30 18:07:03.694  6489  6489 F DEBUG   :     #2 pc 0001d885  /system/lib/libc.so (raise+10)
08-30 18:07:03.694  6489  6489 F DEBUG   :     aosp-mirror#3 pc 000193d1  /system/lib/libc.so (__libc_android_abort+34)
08-30 18:07:03.694  6489  6489 F DEBUG   :     aosp-mirror#4 pc 00017014  /system/lib/libc.so (abort+4)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#5 pc 0000bfd5  /system/lib/libcutils.so (__android_log_assert+112)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#6 pc 0000e265  /system/lib/libutils.so (_ZN7android6Thread3runEPKcij+212)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#7 pc 00045903  /system/lib/libexynoscamera.so (_ZN7android16ExynosCameraPipe11startThreadEv+74)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#8 pc 0007b1c3  /system/lib/libexynoscamera.so (_ZN7android24ExynosCameraFrameFactory11startThreadEj+70)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#9 pc 0007bcef  /system/lib/libexynoscamera.so (_ZN7android24ExynosCameraFrameFactory19startInitialThreadsEv+70)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#10 pc 0006231d  /system/lib/libexynoscamera.so (_ZN7android12ExynosCamera22m_startPreviewInternalEv+1140)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#11 pc 0006b897  /system/lib/libexynoscamera.so (_ZN7android12ExynosCamera12startPreviewEv+1666)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#12 pc 000037b1  /system/lib/hw/camera.universal5433.so
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#13 pc 0006094f  /system/lib/libcameraservice.so (_ZN7android12CameraClient16startPreviewModeEv+102)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#14 pc 00060825  /system/lib/libcameraservice.so (_ZN7android12CameraClient15startCameraModeENS0_11camera_modeE+68)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#15 pc 000282f9  /system/lib/libcamera_client.so (_ZN7android8hardware8BnCamera10onTransactEjRKNS_6ParcelEPS2_j+724)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#16 pc 000359b3  /system/lib/libbinder.so (_ZN7android7BBinder8transactEjRKNS_6ParcelEPS1_j+70)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#17 pc 0003d159  /system/lib/libbinder.so (_ZN7android14IPCThreadState14executeCommandEi+684)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#18 pc 0003cdb7  /system/lib/libbinder.so (_ZN7android14IPCThreadState20getAndExecuteCommandEv+114)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#19 pc 0003d2bb  /system/lib/libbinder.so (_ZN7android14IPCThreadState14joinThreadPoolEb+46)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#20 pc 00000b4d  /system/bin/cameraserver
08-30 18:07:03.696  6489  6489 F DEBUG   :     aosp-mirror#21 pc 00016c2d  /system/lib/libc.so (__libc_init+48)
08-30 18:07:03.696  6489  6489 F DEBUG   :     aosp-mirror#22 pc 00000a18  /system/bin/cameraserver

Change-Id: Ib6234260a5fc5798eea580e0ac594313650de933
(cherry picked from commit cd7f3b1)
ported from CM7

Change-Id: I279d78679f7d779d6cd6bbc6c834d94706937ae8
Change-Id: I0419f4551a6dfd77c7d4833050b36da28113ed9b
HVDCP_3 is a high voltage DCP charger where the charger's voltage
can be changed by issuing pulses on the D+/D- lines. Add support to
recognize it and treat it as an AC power source.

Change-Id: Ib719529904e8b7a676bbdc5f5953f0f9da6df3fa
Booting up the device without usb, the kernel sets the usb power supply
type as UNKNOWN. The type of usb power supply changes at run-time as
various chargers are plugged in/out. However, healthd initilizes the
charger list only at bootup. Change it such that it checks for charger
type changes with every battery or usb uevent.

While at it, the kernel may have a power supply type which is not known
to healthd. This is perfectly fine. Update healthd to not print a
warning.

Change-Id: I2ec9f9a420ca61814d43c316b418ce94de3691bc
its perfectly fine to use default value also in those cases
instead of not adding anything at all and breaking
fast vs. slow charging calc in framework

Change-Id: I098660592dcb1c877ad15ed2b5c3b40cc2d414e6

Former-commit-id: e9654ad9dcf129171c78237023f5238d96382fc4
This can have a major impact on performance.

We don't want this, even on userdebug/eng builds.

Use the new property "ro.console.enable" to
enable the console service explicitly.

Change-Id: I93e7c65e92261443d1c9c70cfef9aa2ed5ff328a
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
Signed-off-by: mydongistiny <jaysonedson@gmail.com>
Signed-off-by: Stallix <team.evolutionx.rom@gmail.com>
* Many people use this for more than just debugging. Let's allow
  it to work in non-debuggable situations too.

Change-Id: Ifb0d0e636c225ff8830154a49a182a034332056b
Signed-off-by: mydongistiny <jaysonedson@gmail.com>
Signed-off-by: Stallix <team.evolutionx.rom@gmail.com>
Only thread group leaders should be registered with lmkd. Add a check to
ignore any non-leader TIDs and generate an error if such condition is
detected. Run the same check before killing a process to detect cases of
non-leader TIDs being used to kill a process. This might happen if PIDs
overflow and previously registered PID gets reused for a non-leader
thread in the following scenario:

1. pid X is a thread group leader and is registered with lmkd
2. pid X dies without lmkd knowing it and pid gets recycled
3. process Y creates a thread with tid X
4. lmkd kills pid X which results in process Y being killed

Bug: 136408020
Test: lmkd_unit_test
Change-Id: I46c5a0b273f2b72cefc20ec59b80b4393f2a1a37
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Signed-off-by: mydongistiny <jaysonedson@gmail.com>
Signed-off-by: Stallix <team.evolutionx.rom@gmail.com>
…n size

Files like /proc/zoneinfo or /proc/<pid>/status can be larger than 4KB
page size. Change reread_file routine to resize read buffer whenever
it is not big enough to read the entire file. Start with 1-page buffer
and double its size until it's big enough to read the entire file.
Read /proc/zoneinfo during initialization to initialize the buffer
to a big enough size and avoid re-allocations when under memory pressure.

Bug: 137010962
Test: lmkd_unit_test
Change-Id: If9a5b0d27c2f4de9063f0fd0f36f908ece87dcce
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Signed-off-by: mydongistiny <jaysonedson@gmail.com>
Signed-off-by: Stallix <team.evolutionx.rom@gmail.com>
/proc/zoneinfo contains per-node data and each node contains per-zone
section for each zone. Current parser does not recognize this hierarchy
and useful per-zone information like zone watermarks cannot be retrieved.
Change the parser to parse zoneinfo into a hierarchical structure. New
parser also handles up to 2 nodes and can be easily extended to handle
more if needed by changing MAX_NR_NODES.

Bug: 132642304
Test: lmkd_unit_test
Change-Id: I9306289ea6d30d78a261c5d5c29f4f6ea167807d
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Signed-off-by: mydongistiny <jaysonedson@gmail.com>
Signed-off-by: Stallix <team.evolutionx.rom@gmail.com>
After a memory event happens event handler can assess current memory
condition and decide if and when lmkd should re-check memory metrics in
order to respond to changing memory conditions. Change the event handler
interface to allow control over polling period and ability to start/extend
polling session.

Bug: 132642304
Test: lmkd_unit_test
Change-Id: Ia74011e943140b6cffbf452ff8e1744b7336eacf
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Signed-off-by: mydongistiny <jaysonedson@gmail.com>
Signed-off-by: Stallix <team.evolutionx.rom@gmail.com>
…shing

Add new kill strategy which makes kill decisions based on which zone
watermark is breached, how much free swap space is still available and
what percentage of the file-backed page cache has been refaulted. This mode
is designed to be used only with PSI signals. It kills unconditionally when
a critical pressure event is received, therefore PSI stall for that event
should be set to a value representing a truly non-responding system
(currently set to 700ms out of 1sec spent in complete stall). New event
handler also controls polling interval based on current memory conditions.

Bug: 132642304
Test: lmkd_unit_test, ACT memory pressure tests
Change-Id: Ia213ef2bb06b245d651ebf2d813e944b4ae7565f
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Signed-off-by: mydongistiny <jaysonedson@gmail.com>
Signed-off-by: Stallix <team.evolutionx.rom@gmail.com>
Parsing /proc/zoneinfo is expensive and zone watermarks normally do no
change often. Instead of checking free memory per each zone we aggregate
zone watermarks and compare them with MemFree from meminfo as an
approximation of memory being under a given watermark.
zoneinfo parsing is rate limited to once per minute to detect a possible
change of the memory margins from userspace.

Bug: 132642304
Test: lmkd_unit_test, ACT memory pressure tests
Change-Id: If4a8154c004e24324e6de44359de416766139df6
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Signed-off-by: mydongistiny <jaysonedson@gmail.com>
Signed-off-by: Stallix <team.evolutionx.rom@gmail.com>
…ties

Enable new kill strategy when PSI mode is used in combination with
ro.lmk.use_minfree_levels=false. Adjust ro.lmk.swap_free_low_percentage,
introduce ro.lmk.psi_partial_stall_ms and ro.lmk.psi_complete_stall_ms
system properties to support two levels of PSI events measuring partial
and complete stalls. Add ro.lmk.use_new_strategy system property to switch
to the old strategy if necessary.

Bug: 132642304
Test: lmkd_unit_test, ACT memory pressure tests
Change-Id: I6f1b65e19dbe9b58c862e5e4255270c82f0afb9a
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Signed-off-by: mydongistiny <jaysonedson@gmail.com>
Signed-off-by: Stallix <team.evolutionx.rom@gmail.com>
Page cache thrashing affects device performance and by killing a process
we try to stop it. However if the thrashing application is the one which
user is interacting with then lmkd should not kill it even though it might
affect device performance.

Bug: 141286980
Test: SequentialRWTest CTS test
Change-Id: If86c0e7e8ad9adf1816659562151ca083eaa65c4
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Signed-off-by: Stallix <team.evolutionx.rom@gmail.com>
@uvera uvera closed this Oct 14, 2019
ZVNexus pushed a commit to ZVNexus/android_system_core-lineage that referenced this pull request Nov 17, 2019
Work around for the following crash:
02-08 05:34:20.968  root   990   990 F DEBUG   :     #00 pc 000000000001447c  /system/lib64/libhwbinder.so (android::hardware::IPCThreadState::joinThreadPool(bool)+28)
02-08 05:34:20.968  root   990   990 F DEBUG   :     TeamWin#1 pc 000000000001c174  /system/lib64/libhwbinder.so (android::hardware::PoolThread::threadLoop()+24)
02-08 05:34:20.968  root   990   990 F DEBUG   :     LineageOS#2 pc 000000000000f934  /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+280)
02-08 05:34:20.968  root   990   990 F DEBUG   :     aosp-mirror#3 pc 00000000000821e0  /system/lib64/libc.so (__pthread_start(void*)+36)
02-08 05:34:20.968  root   990   990 F DEBUG   :     aosp-mirror#4 pc 0000000000023178  /system/lib64/libc.so (__start_thread+68)

Bug: 117470462
Change-Id: I1e8f28a7d0f3041d9be8138a3dc9ed9c74419f91
lineageos-gerrit pushed a commit that referenced this pull request Nov 25, 2019
* Fixes camera for Samsung Exynos devices:

08-30 18:07:03.585  2729  2729 I ExynosCameraFrameFactory: INFO(startThread[1608]):pipeId=0
08-30 18:07:03.585  2729  2729 F libutils.threads: thread name not provided to Thread::run
08-30 18:07:03.586  2729  2729 F libc    : Fatal signal 6 (SIGABRT), code -6 in tid 2729 (cameraserver)
08-30 18:07:03.587  2548  2548 W         : debuggerd: handling request: pid=2729 uid=1047 gid=1005 tid=2729
08-30 18:07:03.656  6489  6489 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
08-30 18:07:03.656  6489  6489 F DEBUG   : Build fingerprint: 'samsung/aosp_gts210ltexx/gts210ltexx:7.0/NYC/chris08292135:userdebug/test-keys'
08-30 18:07:03.656  6489  6489 F DEBUG   : Revision: '0'
08-30 18:07:03.657  6489  6489 F DEBUG   : ABI: 'arm'
08-30 18:07:03.657  6489  6489 F DEBUG   : pid: 2729, tid: 2729, name: cameraserver  >>> /system/bin/cameraserver <<<
08-30 18:07:03.658  6489  6489 F DEBUG   : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
08-30 18:07:03.673  6489  6489 F DEBUG   : Abort message: 'thread name not provided to Thread::run'
08-30 18:07:03.673  6489  6489 F DEBUG   :     r0 00000000  r1 00000aa9  r2 00000006  r3 00000008
08-30 18:07:03.674  6489  6489 F DEBUG   :     r4 b5a2c58c  r5 00000006  r6 b5a2c534  r7 0000010c
08-30 18:07:03.674  6489  6489 F DEBUG   :     r8 b28b5380  r9 00000000  sl 00000000  fp b2a92800
08-30 18:07:03.674  6489  6489 F DEBUG   :     ip 00000016  sp be90b350  lr b4f7e537  pc b4f80d94  cpsr 200f0010
08-30 18:07:03.694  6489  6489 F DEBUG   :
08-30 18:07:03.694  6489  6489 F DEBUG   : backtrace:
08-30 18:07:03.694  6489  6489 F DEBUG   :     #00 pc 00049d94  /system/lib/libc.so (tgkill+12)
08-30 18:07:03.694  6489  6489 F DEBUG   :     #1 pc 00047533  /system/lib/libc.so (pthread_kill+34)
08-30 18:07:03.694  6489  6489 F DEBUG   :     #2 pc 0001d885  /system/lib/libc.so (raise+10)
08-30 18:07:03.694  6489  6489 F DEBUG   :     aosp-mirror#3 pc 000193d1  /system/lib/libc.so (__libc_android_abort+34)
08-30 18:07:03.694  6489  6489 F DEBUG   :     aosp-mirror#4 pc 00017014  /system/lib/libc.so (abort+4)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#5 pc 0000bfd5  /system/lib/libcutils.so (__android_log_assert+112)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#6 pc 0000e265  /system/lib/libutils.so (_ZN7android6Thread3runEPKcij+212)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#7 pc 00045903  /system/lib/libexynoscamera.so (_ZN7android16ExynosCameraPipe11startThreadEv+74)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#8 pc 0007b1c3  /system/lib/libexynoscamera.so (_ZN7android24ExynosCameraFrameFactory11startThreadEj+70)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#9 pc 0007bcef  /system/lib/libexynoscamera.so (_ZN7android24ExynosCameraFrameFactory19startInitialThreadsEv+70)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#10 pc 0006231d  /system/lib/libexynoscamera.so (_ZN7android12ExynosCamera22m_startPreviewInternalEv+1140)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#11 pc 0006b897  /system/lib/libexynoscamera.so (_ZN7android12ExynosCamera12startPreviewEv+1666)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#12 pc 000037b1  /system/lib/hw/camera.universal5433.so
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#13 pc 0006094f  /system/lib/libcameraservice.so (_ZN7android12CameraClient16startPreviewModeEv+102)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#14 pc 00060825  /system/lib/libcameraservice.so (_ZN7android12CameraClient15startCameraModeENS0_11camera_modeE+68)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#15 pc 000282f9  /system/lib/libcamera_client.so (_ZN7android8hardware8BnCamera10onTransactEjRKNS_6ParcelEPS2_j+724)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#16 pc 000359b3  /system/lib/libbinder.so (_ZN7android7BBinder8transactEjRKNS_6ParcelEPS1_j+70)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#17 pc 0003d159  /system/lib/libbinder.so (_ZN7android14IPCThreadState14executeCommandEi+684)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#18 pc 0003cdb7  /system/lib/libbinder.so (_ZN7android14IPCThreadState20getAndExecuteCommandEv+114)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#19 pc 0003d2bb  /system/lib/libbinder.so (_ZN7android14IPCThreadState14joinThreadPoolEb+46)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#20 pc 00000b4d  /system/bin/cameraserver
08-30 18:07:03.696  6489  6489 F DEBUG   :     aosp-mirror#21 pc 00016c2d  /system/lib/libc.so (__libc_init+48)
08-30 18:07:03.696  6489  6489 F DEBUG   :     aosp-mirror#22 pc 00000a18  /system/bin/cameraserver

Change-Id: Ib6234260a5fc5798eea580e0ac594313650de933
(cherry picked from commit cd7f3b1)
lineageos-gerrit pushed a commit that referenced this pull request Dec 14, 2019
* Fixes camera for Samsung Exynos devices:

08-30 18:07:03.585  2729  2729 I ExynosCameraFrameFactory: INFO(startThread[1608]):pipeId=0
08-30 18:07:03.585  2729  2729 F libutils.threads: thread name not provided to Thread::run
08-30 18:07:03.586  2729  2729 F libc    : Fatal signal 6 (SIGABRT), code -6 in tid 2729 (cameraserver)
08-30 18:07:03.587  2548  2548 W         : debuggerd: handling request: pid=2729 uid=1047 gid=1005 tid=2729
08-30 18:07:03.656  6489  6489 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
08-30 18:07:03.656  6489  6489 F DEBUG   : Build fingerprint: 'samsung/aosp_gts210ltexx/gts210ltexx:7.0/NYC/chris08292135:userdebug/test-keys'
08-30 18:07:03.656  6489  6489 F DEBUG   : Revision: '0'
08-30 18:07:03.657  6489  6489 F DEBUG   : ABI: 'arm'
08-30 18:07:03.657  6489  6489 F DEBUG   : pid: 2729, tid: 2729, name: cameraserver  >>> /system/bin/cameraserver <<<
08-30 18:07:03.658  6489  6489 F DEBUG   : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
08-30 18:07:03.673  6489  6489 F DEBUG   : Abort message: 'thread name not provided to Thread::run'
08-30 18:07:03.673  6489  6489 F DEBUG   :     r0 00000000  r1 00000aa9  r2 00000006  r3 00000008
08-30 18:07:03.674  6489  6489 F DEBUG   :     r4 b5a2c58c  r5 00000006  r6 b5a2c534  r7 0000010c
08-30 18:07:03.674  6489  6489 F DEBUG   :     r8 b28b5380  r9 00000000  sl 00000000  fp b2a92800
08-30 18:07:03.674  6489  6489 F DEBUG   :     ip 00000016  sp be90b350  lr b4f7e537  pc b4f80d94  cpsr 200f0010
08-30 18:07:03.694  6489  6489 F DEBUG   :
08-30 18:07:03.694  6489  6489 F DEBUG   : backtrace:
08-30 18:07:03.694  6489  6489 F DEBUG   :     #00 pc 00049d94  /system/lib/libc.so (tgkill+12)
08-30 18:07:03.694  6489  6489 F DEBUG   :     #1 pc 00047533  /system/lib/libc.so (pthread_kill+34)
08-30 18:07:03.694  6489  6489 F DEBUG   :     #2 pc 0001d885  /system/lib/libc.so (raise+10)
08-30 18:07:03.694  6489  6489 F DEBUG   :     aosp-mirror#3 pc 000193d1  /system/lib/libc.so (__libc_android_abort+34)
08-30 18:07:03.694  6489  6489 F DEBUG   :     aosp-mirror#4 pc 00017014  /system/lib/libc.so (abort+4)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#5 pc 0000bfd5  /system/lib/libcutils.so (__android_log_assert+112)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#6 pc 0000e265  /system/lib/libutils.so (_ZN7android6Thread3runEPKcij+212)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#7 pc 00045903  /system/lib/libexynoscamera.so (_ZN7android16ExynosCameraPipe11startThreadEv+74)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#8 pc 0007b1c3  /system/lib/libexynoscamera.so (_ZN7android24ExynosCameraFrameFactory11startThreadEj+70)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#9 pc 0007bcef  /system/lib/libexynoscamera.so (_ZN7android24ExynosCameraFrameFactory19startInitialThreadsEv+70)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#10 pc 0006231d  /system/lib/libexynoscamera.so (_ZN7android12ExynosCamera22m_startPreviewInternalEv+1140)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#11 pc 0006b897  /system/lib/libexynoscamera.so (_ZN7android12ExynosCamera12startPreviewEv+1666)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#12 pc 000037b1  /system/lib/hw/camera.universal5433.so
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#13 pc 0006094f  /system/lib/libcameraservice.so (_ZN7android12CameraClient16startPreviewModeEv+102)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#14 pc 00060825  /system/lib/libcameraservice.so (_ZN7android12CameraClient15startCameraModeENS0_11camera_modeE+68)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#15 pc 000282f9  /system/lib/libcamera_client.so (_ZN7android8hardware8BnCamera10onTransactEjRKNS_6ParcelEPS2_j+724)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#16 pc 000359b3  /system/lib/libbinder.so (_ZN7android7BBinder8transactEjRKNS_6ParcelEPS1_j+70)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#17 pc 0003d159  /system/lib/libbinder.so (_ZN7android14IPCThreadState14executeCommandEi+684)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#18 pc 0003cdb7  /system/lib/libbinder.so (_ZN7android14IPCThreadState20getAndExecuteCommandEv+114)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#19 pc 0003d2bb  /system/lib/libbinder.so (_ZN7android14IPCThreadState14joinThreadPoolEb+46)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#20 pc 00000b4d  /system/bin/cameraserver
08-30 18:07:03.696  6489  6489 F DEBUG   :     aosp-mirror#21 pc 00016c2d  /system/lib/libc.so (__libc_init+48)
08-30 18:07:03.696  6489  6489 F DEBUG   :     aosp-mirror#22 pc 00000a18  /system/bin/cameraserver

Change-Id: Ib6234260a5fc5798eea580e0ac594313650de933
(cherry picked from commit cd7f3b1)
lineageos-gerrit pushed a commit that referenced this pull request Dec 23, 2019
* Fixes camera for Samsung Exynos devices:

08-30 18:07:03.585  2729  2729 I ExynosCameraFrameFactory: INFO(startThread[1608]):pipeId=0
08-30 18:07:03.585  2729  2729 F libutils.threads: thread name not provided to Thread::run
08-30 18:07:03.586  2729  2729 F libc    : Fatal signal 6 (SIGABRT), code -6 in tid 2729 (cameraserver)
08-30 18:07:03.587  2548  2548 W         : debuggerd: handling request: pid=2729 uid=1047 gid=1005 tid=2729
08-30 18:07:03.656  6489  6489 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
08-30 18:07:03.656  6489  6489 F DEBUG   : Build fingerprint: 'samsung/aosp_gts210ltexx/gts210ltexx:7.0/NYC/chris08292135:userdebug/test-keys'
08-30 18:07:03.656  6489  6489 F DEBUG   : Revision: '0'
08-30 18:07:03.657  6489  6489 F DEBUG   : ABI: 'arm'
08-30 18:07:03.657  6489  6489 F DEBUG   : pid: 2729, tid: 2729, name: cameraserver  >>> /system/bin/cameraserver <<<
08-30 18:07:03.658  6489  6489 F DEBUG   : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
08-30 18:07:03.673  6489  6489 F DEBUG   : Abort message: 'thread name not provided to Thread::run'
08-30 18:07:03.673  6489  6489 F DEBUG   :     r0 00000000  r1 00000aa9  r2 00000006  r3 00000008
08-30 18:07:03.674  6489  6489 F DEBUG   :     r4 b5a2c58c  r5 00000006  r6 b5a2c534  r7 0000010c
08-30 18:07:03.674  6489  6489 F DEBUG   :     r8 b28b5380  r9 00000000  sl 00000000  fp b2a92800
08-30 18:07:03.674  6489  6489 F DEBUG   :     ip 00000016  sp be90b350  lr b4f7e537  pc b4f80d94  cpsr 200f0010
08-30 18:07:03.694  6489  6489 F DEBUG   :
08-30 18:07:03.694  6489  6489 F DEBUG   : backtrace:
08-30 18:07:03.694  6489  6489 F DEBUG   :     #00 pc 00049d94  /system/lib/libc.so (tgkill+12)
08-30 18:07:03.694  6489  6489 F DEBUG   :     #1 pc 00047533  /system/lib/libc.so (pthread_kill+34)
08-30 18:07:03.694  6489  6489 F DEBUG   :     #2 pc 0001d885  /system/lib/libc.so (raise+10)
08-30 18:07:03.694  6489  6489 F DEBUG   :     aosp-mirror#3 pc 000193d1  /system/lib/libc.so (__libc_android_abort+34)
08-30 18:07:03.694  6489  6489 F DEBUG   :     aosp-mirror#4 pc 00017014  /system/lib/libc.so (abort+4)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#5 pc 0000bfd5  /system/lib/libcutils.so (__android_log_assert+112)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#6 pc 0000e265  /system/lib/libutils.so (_ZN7android6Thread3runEPKcij+212)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#7 pc 00045903  /system/lib/libexynoscamera.so (_ZN7android16ExynosCameraPipe11startThreadEv+74)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#8 pc 0007b1c3  /system/lib/libexynoscamera.so (_ZN7android24ExynosCameraFrameFactory11startThreadEj+70)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#9 pc 0007bcef  /system/lib/libexynoscamera.so (_ZN7android24ExynosCameraFrameFactory19startInitialThreadsEv+70)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#10 pc 0006231d  /system/lib/libexynoscamera.so (_ZN7android12ExynosCamera22m_startPreviewInternalEv+1140)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#11 pc 0006b897  /system/lib/libexynoscamera.so (_ZN7android12ExynosCamera12startPreviewEv+1666)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#12 pc 000037b1  /system/lib/hw/camera.universal5433.so
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#13 pc 0006094f  /system/lib/libcameraservice.so (_ZN7android12CameraClient16startPreviewModeEv+102)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#14 pc 00060825  /system/lib/libcameraservice.so (_ZN7android12CameraClient15startCameraModeENS0_11camera_modeE+68)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#15 pc 000282f9  /system/lib/libcamera_client.so (_ZN7android8hardware8BnCamera10onTransactEjRKNS_6ParcelEPS2_j+724)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#16 pc 000359b3  /system/lib/libbinder.so (_ZN7android7BBinder8transactEjRKNS_6ParcelEPS1_j+70)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#17 pc 0003d159  /system/lib/libbinder.so (_ZN7android14IPCThreadState14executeCommandEi+684)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#18 pc 0003cdb7  /system/lib/libbinder.so (_ZN7android14IPCThreadState20getAndExecuteCommandEv+114)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#19 pc 0003d2bb  /system/lib/libbinder.so (_ZN7android14IPCThreadState14joinThreadPoolEb+46)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#20 pc 00000b4d  /system/bin/cameraserver
08-30 18:07:03.696  6489  6489 F DEBUG   :     aosp-mirror#21 pc 00016c2d  /system/lib/libc.so (__libc_init+48)
08-30 18:07:03.696  6489  6489 F DEBUG   :     aosp-mirror#22 pc 00000a18  /system/bin/cameraserver

Change-Id: Ib6234260a5fc5798eea580e0ac594313650de933
(cherry picked from commit cd7f3b1)
NoSpamDan pushed a commit to NoSpamDan/android_system_core-1 that referenced this pull request Feb 9, 2020
* Fixes camera for Samsung Exynos devices:

08-30 18:07:03.585  2729  2729 I ExynosCameraFrameFactory: INFO(startThread[1608]):pipeId=0
08-30 18:07:03.585  2729  2729 F libutils.threads: thread name not provided to Thread::run
08-30 18:07:03.586  2729  2729 F libc    : Fatal signal 6 (SIGABRT), code -6 in tid 2729 (cameraserver)
08-30 18:07:03.587  2548  2548 W         : debuggerd: handling request: pid=2729 uid=1047 gid=1005 tid=2729
08-30 18:07:03.656  6489  6489 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
08-30 18:07:03.656  6489  6489 F DEBUG   : Build fingerprint: 'samsung/aosp_gts210ltexx/gts210ltexx:7.0/NYC/chris08292135:userdebug/test-keys'
08-30 18:07:03.656  6489  6489 F DEBUG   : Revision: '0'
08-30 18:07:03.657  6489  6489 F DEBUG   : ABI: 'arm'
08-30 18:07:03.657  6489  6489 F DEBUG   : pid: 2729, tid: 2729, name: cameraserver  >>> /system/bin/cameraserver <<<
08-30 18:07:03.658  6489  6489 F DEBUG   : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
08-30 18:07:03.673  6489  6489 F DEBUG   : Abort message: 'thread name not provided to Thread::run'
08-30 18:07:03.673  6489  6489 F DEBUG   :     r0 00000000  r1 00000aa9  r2 00000006  r3 00000008
08-30 18:07:03.674  6489  6489 F DEBUG   :     r4 b5a2c58c  r5 00000006  r6 b5a2c534  r7 0000010c
08-30 18:07:03.674  6489  6489 F DEBUG   :     r8 b28b5380  r9 00000000  sl 00000000  fp b2a92800
08-30 18:07:03.674  6489  6489 F DEBUG   :     ip 00000016  sp be90b350  lr b4f7e537  pc b4f80d94  cpsr 200f0010
08-30 18:07:03.694  6489  6489 F DEBUG   :
08-30 18:07:03.694  6489  6489 F DEBUG   : backtrace:
08-30 18:07:03.694  6489  6489 F DEBUG   :     #00 pc 00049d94  /system/lib/libc.so (tgkill+12)
08-30 18:07:03.694  6489  6489 F DEBUG   :     LineageOS#1 pc 00047533  /system/lib/libc.so (pthread_kill+34)
08-30 18:07:03.694  6489  6489 F DEBUG   :     LineageOS#2 pc 0001d885  /system/lib/libc.so (raise+10)
08-30 18:07:03.694  6489  6489 F DEBUG   :     aosp-mirror#3 pc 000193d1  /system/lib/libc.so (__libc_android_abort+34)
08-30 18:07:03.694  6489  6489 F DEBUG   :     aosp-mirror#4 pc 00017014  /system/lib/libc.so (abort+4)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#5 pc 0000bfd5  /system/lib/libcutils.so (__android_log_assert+112)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#6 pc 0000e265  /system/lib/libutils.so (_ZN7android6Thread3runEPKcij+212)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#7 pc 00045903  /system/lib/libexynoscamera.so (_ZN7android16ExynosCameraPipe11startThreadEv+74)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#8 pc 0007b1c3  /system/lib/libexynoscamera.so (_ZN7android24ExynosCameraFrameFactory11startThreadEj+70)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#9 pc 0007bcef  /system/lib/libexynoscamera.so (_ZN7android24ExynosCameraFrameFactory19startInitialThreadsEv+70)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#10 pc 0006231d  /system/lib/libexynoscamera.so (_ZN7android12ExynosCamera22m_startPreviewInternalEv+1140)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#11 pc 0006b897  /system/lib/libexynoscamera.so (_ZN7android12ExynosCamera12startPreviewEv+1666)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#12 pc 000037b1  /system/lib/hw/camera.universal5433.so
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#13 pc 0006094f  /system/lib/libcameraservice.so (_ZN7android12CameraClient16startPreviewModeEv+102)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#14 pc 00060825  /system/lib/libcameraservice.so (_ZN7android12CameraClient15startCameraModeENS0_11camera_modeE+68)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#15 pc 000282f9  /system/lib/libcamera_client.so (_ZN7android8hardware8BnCamera10onTransactEjRKNS_6ParcelEPS2_j+724)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#16 pc 000359b3  /system/lib/libbinder.so (_ZN7android7BBinder8transactEjRKNS_6ParcelEPS1_j+70)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#17 pc 0003d159  /system/lib/libbinder.so (_ZN7android14IPCThreadState14executeCommandEi+684)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#18 pc 0003cdb7  /system/lib/libbinder.so (_ZN7android14IPCThreadState20getAndExecuteCommandEv+114)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#19 pc 0003d2bb  /system/lib/libbinder.so (_ZN7android14IPCThreadState14joinThreadPoolEb+46)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#20 pc 00000b4d  /system/bin/cameraserver
08-30 18:07:03.696  6489  6489 F DEBUG   :     aosp-mirror#21 pc 00016c2d  /system/lib/libc.so (__libc_init+48)
08-30 18:07:03.696  6489  6489 F DEBUG   :     aosp-mirror#22 pc 00000a18  /system/bin/cameraserver

Change-Id: Ib6234260a5fc5798eea580e0ac594313650de933
(cherry picked from commit cd7f3b1)
Dhruvgera pushed a commit to cygnus-rom/system_core that referenced this pull request Feb 15, 2020
* Fixes camera for Samsung Exynos devices:

08-30 18:07:03.585  2729  2729 I ExynosCameraFrameFactory: INFO(startThread[1608]):pipeId=0
08-30 18:07:03.585  2729  2729 F libutils.threads: thread name not provided to Thread::run
08-30 18:07:03.586  2729  2729 F libc    : Fatal signal 6 (SIGABRT), code -6 in tid 2729 (cameraserver)
08-30 18:07:03.587  2548  2548 W         : debuggerd: handling request: pid=2729 uid=1047 gid=1005 tid=2729
08-30 18:07:03.656  6489  6489 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
08-30 18:07:03.656  6489  6489 F DEBUG   : Build fingerprint: 'samsung/aosp_gts210ltexx/gts210ltexx:7.0/NYC/chris08292135:userdebug/test-keys'
08-30 18:07:03.656  6489  6489 F DEBUG   : Revision: '0'
08-30 18:07:03.657  6489  6489 F DEBUG   : ABI: 'arm'
08-30 18:07:03.657  6489  6489 F DEBUG   : pid: 2729, tid: 2729, name: cameraserver  >>> /system/bin/cameraserver <<<
08-30 18:07:03.658  6489  6489 F DEBUG   : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
08-30 18:07:03.673  6489  6489 F DEBUG   : Abort message: 'thread name not provided to Thread::run'
08-30 18:07:03.673  6489  6489 F DEBUG   :     r0 00000000  r1 00000aa9  r2 00000006  r3 00000008
08-30 18:07:03.674  6489  6489 F DEBUG   :     r4 b5a2c58c  r5 00000006  r6 b5a2c534  r7 0000010c
08-30 18:07:03.674  6489  6489 F DEBUG   :     r8 b28b5380  r9 00000000  sl 00000000  fp b2a92800
08-30 18:07:03.674  6489  6489 F DEBUG   :     ip 00000016  sp be90b350  lr b4f7e537  pc b4f80d94  cpsr 200f0010
08-30 18:07:03.694  6489  6489 F DEBUG   :
08-30 18:07:03.694  6489  6489 F DEBUG   : backtrace:
08-30 18:07:03.694  6489  6489 F DEBUG   :     #00 pc 00049d94  /system/lib/libc.so (tgkill+12)
08-30 18:07:03.694  6489  6489 F DEBUG   :     LineageOS#1 pc 00047533  /system/lib/libc.so (pthread_kill+34)
08-30 18:07:03.694  6489  6489 F DEBUG   :     LineageOS#2 pc 0001d885  /system/lib/libc.so (raise+10)
08-30 18:07:03.694  6489  6489 F DEBUG   :     aosp-mirror#3 pc 000193d1  /system/lib/libc.so (__libc_android_abort+34)
08-30 18:07:03.694  6489  6489 F DEBUG   :     aosp-mirror#4 pc 00017014  /system/lib/libc.so (abort+4)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#5 pc 0000bfd5  /system/lib/libcutils.so (__android_log_assert+112)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#6 pc 0000e265  /system/lib/libutils.so (_ZN7android6Thread3runEPKcij+212)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#7 pc 00045903  /system/lib/libexynoscamera.so (_ZN7android16ExynosCameraPipe11startThreadEv+74)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#8 pc 0007b1c3  /system/lib/libexynoscamera.so (_ZN7android24ExynosCameraFrameFactory11startThreadEj+70)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#9 pc 0007bcef  /system/lib/libexynoscamera.so (_ZN7android24ExynosCameraFrameFactory19startInitialThreadsEv+70)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#10 pc 0006231d  /system/lib/libexynoscamera.so (_ZN7android12ExynosCamera22m_startPreviewInternalEv+1140)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#11 pc 0006b897  /system/lib/libexynoscamera.so (_ZN7android12ExynosCamera12startPreviewEv+1666)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#12 pc 000037b1  /system/lib/hw/camera.universal5433.so
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#13 pc 0006094f  /system/lib/libcameraservice.so (_ZN7android12CameraClient16startPreviewModeEv+102)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#14 pc 00060825  /system/lib/libcameraservice.so (_ZN7android12CameraClient15startCameraModeENS0_11camera_modeE+68)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#15 pc 000282f9  /system/lib/libcamera_client.so (_ZN7android8hardware8BnCamera10onTransactEjRKNS_6ParcelEPS2_j+724)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#16 pc 000359b3  /system/lib/libbinder.so (_ZN7android7BBinder8transactEjRKNS_6ParcelEPS1_j+70)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#17 pc 0003d159  /system/lib/libbinder.so (_ZN7android14IPCThreadState14executeCommandEi+684)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#18 pc 0003cdb7  /system/lib/libbinder.so (_ZN7android14IPCThreadState20getAndExecuteCommandEv+114)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#19 pc 0003d2bb  /system/lib/libbinder.so (_ZN7android14IPCThreadState14joinThreadPoolEb+46)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#20 pc 00000b4d  /system/bin/cameraserver
08-30 18:07:03.696  6489  6489 F DEBUG   :     aosp-mirror#21 pc 00016c2d  /system/lib/libc.so (__libc_init+48)
08-30 18:07:03.696  6489  6489 F DEBUG   :     aosp-mirror#22 pc 00000a18  /system/bin/cameraserver

Change-Id: Ib6234260a5fc5798eea580e0ac594313650de933

Former-commit-id: bd1c35877a5dbb8a615653e8b3828ae22e34f5b1
Former-commit-id: ad70b1837ec8de6fec8e907e1949182713cbc65e
herobuxx referenced this pull request in ConquerOS/system_core Apr 28, 2020
* Fixes camera for Samsung Exynos devices:

08-30 18:07:03.585  2729  2729 I ExynosCameraFrameFactory: INFO(startThread[1608]):pipeId=0
08-30 18:07:03.585  2729  2729 F libutils.threads: thread name not provided to Thread::run
08-30 18:07:03.586  2729  2729 F libc    : Fatal signal 6 (SIGABRT), code -6 in tid 2729 (cameraserver)
08-30 18:07:03.587  2548  2548 W         : debuggerd: handling request: pid=2729 uid=1047 gid=1005 tid=2729
08-30 18:07:03.656  6489  6489 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
08-30 18:07:03.656  6489  6489 F DEBUG   : Build fingerprint: 'samsung/aosp_gts210ltexx/gts210ltexx:7.0/NYC/chris08292135:userdebug/test-keys'
08-30 18:07:03.656  6489  6489 F DEBUG   : Revision: '0'
08-30 18:07:03.657  6489  6489 F DEBUG   : ABI: 'arm'
08-30 18:07:03.657  6489  6489 F DEBUG   : pid: 2729, tid: 2729, name: cameraserver  >>> /system/bin/cameraserver <<<
08-30 18:07:03.658  6489  6489 F DEBUG   : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
08-30 18:07:03.673  6489  6489 F DEBUG   : Abort message: 'thread name not provided to Thread::run'
08-30 18:07:03.673  6489  6489 F DEBUG   :     r0 00000000  r1 00000aa9  r2 00000006  r3 00000008
08-30 18:07:03.674  6489  6489 F DEBUG   :     r4 b5a2c58c  r5 00000006  r6 b5a2c534  r7 0000010c
08-30 18:07:03.674  6489  6489 F DEBUG   :     r8 b28b5380  r9 00000000  sl 00000000  fp b2a92800
08-30 18:07:03.674  6489  6489 F DEBUG   :     ip 00000016  sp be90b350  lr b4f7e537  pc b4f80d94  cpsr 200f0010
08-30 18:07:03.694  6489  6489 F DEBUG   :
08-30 18:07:03.694  6489  6489 F DEBUG   : backtrace:
08-30 18:07:03.694  6489  6489 F DEBUG   :     #00 pc 00049d94  /system/lib/libc.so (tgkill+12)
08-30 18:07:03.694  6489  6489 F DEBUG   :     #1 pc 00047533  /system/lib/libc.so (pthread_kill+34)
08-30 18:07:03.694  6489  6489 F DEBUG   :     #2 pc 0001d885  /system/lib/libc.so (raise+10)
08-30 18:07:03.694  6489  6489 F DEBUG   :     #03 pc 000193d1  /system/lib/libc.so (__libc_android_abort+34)
08-30 18:07:03.694  6489  6489 F DEBUG   :     #04 pc 00017014  /system/lib/libc.so (abort+4)
08-30 18:07:03.695  6489  6489 F DEBUG   :     #05 pc 0000bfd5  /system/lib/libcutils.so (__android_log_assert+112)
08-30 18:07:03.695  6489  6489 F DEBUG   :     #06 pc 0000e265  /system/lib/libutils.so (_ZN7android6Thread3runEPKcij+212)
08-30 18:07:03.695  6489  6489 F DEBUG   :     #07 pc 00045903  /system/lib/libexynoscamera.so (_ZN7android16ExynosCameraPipe11startThreadEv+74)
08-30 18:07:03.695  6489  6489 F DEBUG   :     #08 pc 0007b1c3  /system/lib/libexynoscamera.so (_ZN7android24ExynosCameraFrameFactory11startThreadEj+70)
08-30 18:07:03.695  6489  6489 F DEBUG   :     #09 pc 0007bcef  /system/lib/libexynoscamera.so (_ZN7android24ExynosCameraFrameFactory19startInitialThreadsEv+70)
08-30 18:07:03.695  6489  6489 F DEBUG   :     #10 pc 0006231d  /system/lib/libexynoscamera.so (_ZN7android12ExynosCamera22m_startPreviewInternalEv+1140)
08-30 18:07:03.695  6489  6489 F DEBUG   :     #11 pc 0006b897  /system/lib/libexynoscamera.so (_ZN7android12ExynosCamera12startPreviewEv+1666)
08-30 18:07:03.695  6489  6489 F DEBUG   :     #12 pc 000037b1  /system/lib/hw/camera.universal5433.so
08-30 18:07:03.695  6489  6489 F DEBUG   :     #13 pc 0006094f  /system/lib/libcameraservice.so (_ZN7android12CameraClient16startPreviewModeEv+102)
08-30 18:07:03.695  6489  6489 F DEBUG   :     #14 pc 00060825  /system/lib/libcameraservice.so (_ZN7android12CameraClient15startCameraModeENS0_11camera_modeE+68)
08-30 18:07:03.695  6489  6489 F DEBUG   :     #15 pc 000282f9  /system/lib/libcamera_client.so (_ZN7android8hardware8BnCamera10onTransactEjRKNS_6ParcelEPS2_j+724)
08-30 18:07:03.695  6489  6489 F DEBUG   :     #16 pc 000359b3  /system/lib/libbinder.so (_ZN7android7BBinder8transactEjRKNS_6ParcelEPS1_j+70)
08-30 18:07:03.695  6489  6489 F DEBUG   :     #17 pc 0003d159  /system/lib/libbinder.so (_ZN7android14IPCThreadState14executeCommandEi+684)
08-30 18:07:03.695  6489  6489 F DEBUG   :     #18 pc 0003cdb7  /system/lib/libbinder.so (_ZN7android14IPCThreadState20getAndExecuteCommandEv+114)
08-30 18:07:03.695  6489  6489 F DEBUG   :     #19 pc 0003d2bb  /system/lib/libbinder.so (_ZN7android14IPCThreadState14joinThreadPoolEb+46)
08-30 18:07:03.695  6489  6489 F DEBUG   :     #20 pc 00000b4d  /system/bin/cameraserver
08-30 18:07:03.696  6489  6489 F DEBUG   :     #21 pc 00016c2d  /system/lib/libc.so (__libc_init+48)
08-30 18:07:03.696  6489  6489 F DEBUG   :     #22 pc 00000a18  /system/bin/cameraserver

Change-Id: Ib6234260a5fc5798eea580e0ac594313650de933

Former-commit-id: bd1c35877a5dbb8a615653e8b3828ae22e34f5b1
Former-commit-id: ad70b1837ec8de6fec8e907e1949182713cbc65e

Signed-off-by: HeroBuxx <herobuxx@gmail.com>
mvaisakh pushed a commit to cygnus-next/system_core that referenced this pull request Aug 19, 2020
* Fixes camera for Samsung Exynos devices:

08-30 18:07:03.585  2729  2729 I ExynosCameraFrameFactory: INFO(startThread[1608]):pipeId=0
08-30 18:07:03.585  2729  2729 F libutils.threads: thread name not provided to Thread::run
08-30 18:07:03.586  2729  2729 F libc    : Fatal signal 6 (SIGABRT), code -6 in tid 2729 (cameraserver)
08-30 18:07:03.587  2548  2548 W         : debuggerd: handling request: pid=2729 uid=1047 gid=1005 tid=2729
08-30 18:07:03.656  6489  6489 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
08-30 18:07:03.656  6489  6489 F DEBUG   : Build fingerprint: 'samsung/aosp_gts210ltexx/gts210ltexx:7.0/NYC/chris08292135:userdebug/test-keys'
08-30 18:07:03.656  6489  6489 F DEBUG   : Revision: '0'
08-30 18:07:03.657  6489  6489 F DEBUG   : ABI: 'arm'
08-30 18:07:03.657  6489  6489 F DEBUG   : pid: 2729, tid: 2729, name: cameraserver  >>> /system/bin/cameraserver <<<
08-30 18:07:03.658  6489  6489 F DEBUG   : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
08-30 18:07:03.673  6489  6489 F DEBUG   : Abort message: 'thread name not provided to Thread::run'
08-30 18:07:03.673  6489  6489 F DEBUG   :     r0 00000000  r1 00000aa9  r2 00000006  r3 00000008
08-30 18:07:03.674  6489  6489 F DEBUG   :     r4 b5a2c58c  r5 00000006  r6 b5a2c534  r7 0000010c
08-30 18:07:03.674  6489  6489 F DEBUG   :     r8 b28b5380  r9 00000000  sl 00000000  fp b2a92800
08-30 18:07:03.674  6489  6489 F DEBUG   :     ip 00000016  sp be90b350  lr b4f7e537  pc b4f80d94  cpsr 200f0010
08-30 18:07:03.694  6489  6489 F DEBUG   :
08-30 18:07:03.694  6489  6489 F DEBUG   : backtrace:
08-30 18:07:03.694  6489  6489 F DEBUG   :     #00 pc 00049d94  /system/lib/libc.so (tgkill+12)
08-30 18:07:03.694  6489  6489 F DEBUG   :     LineageOS#1 pc 00047533  /system/lib/libc.so (pthread_kill+34)
08-30 18:07:03.694  6489  6489 F DEBUG   :     LineageOS#2 pc 0001d885  /system/lib/libc.so (raise+10)
08-30 18:07:03.694  6489  6489 F DEBUG   :     aosp-mirror#3 pc 000193d1  /system/lib/libc.so (__libc_android_abort+34)
08-30 18:07:03.694  6489  6489 F DEBUG   :     aosp-mirror#4 pc 00017014  /system/lib/libc.so (abort+4)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#5 pc 0000bfd5  /system/lib/libcutils.so (__android_log_assert+112)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#6 pc 0000e265  /system/lib/libutils.so (_ZN7android6Thread3runEPKcij+212)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#7 pc 00045903  /system/lib/libexynoscamera.so (_ZN7android16ExynosCameraPipe11startThreadEv+74)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#8 pc 0007b1c3  /system/lib/libexynoscamera.so (_ZN7android24ExynosCameraFrameFactory11startThreadEj+70)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#9 pc 0007bcef  /system/lib/libexynoscamera.so (_ZN7android24ExynosCameraFrameFactory19startInitialThreadsEv+70)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#10 pc 0006231d  /system/lib/libexynoscamera.so (_ZN7android12ExynosCamera22m_startPreviewInternalEv+1140)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#11 pc 0006b897  /system/lib/libexynoscamera.so (_ZN7android12ExynosCamera12startPreviewEv+1666)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#12 pc 000037b1  /system/lib/hw/camera.universal5433.so
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#13 pc 0006094f  /system/lib/libcameraservice.so (_ZN7android12CameraClient16startPreviewModeEv+102)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#14 pc 00060825  /system/lib/libcameraservice.so (_ZN7android12CameraClient15startCameraModeENS0_11camera_modeE+68)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#15 pc 000282f9  /system/lib/libcamera_client.so (_ZN7android8hardware8BnCamera10onTransactEjRKNS_6ParcelEPS2_j+724)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#16 pc 000359b3  /system/lib/libbinder.so (_ZN7android7BBinder8transactEjRKNS_6ParcelEPS1_j+70)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#17 pc 0003d159  /system/lib/libbinder.so (_ZN7android14IPCThreadState14executeCommandEi+684)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#18 pc 0003cdb7  /system/lib/libbinder.so (_ZN7android14IPCThreadState20getAndExecuteCommandEv+114)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#19 pc 0003d2bb  /system/lib/libbinder.so (_ZN7android14IPCThreadState14joinThreadPoolEb+46)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#20 pc 00000b4d  /system/bin/cameraserver
08-30 18:07:03.696  6489  6489 F DEBUG   :     aosp-mirror#21 pc 00016c2d  /system/lib/libc.so (__libc_init+48)
08-30 18:07:03.696  6489  6489 F DEBUG   :     aosp-mirror#22 pc 00000a18  /system/bin/cameraserver

Change-Id: Ib6234260a5fc5798eea580e0ac594313650de933

Former-commit-id: bd1c35877a5dbb8a615653e8b3828ae22e34f5b1
Former-commit-id: ad70b1837ec8de6fec8e907e1949182713cbc65e
Signed-off-by: Dhruv <dhruvgera61@gmail.com>
Claymore1297 pushed a commit to Claymore1297/android_system_core that referenced this pull request Dec 25, 2021
…h legacy blobs

09-14 01: 13:36.048   528   528 D RefBase : RefBase: Explicit destruction, weak count = 0 (in 0xe5afad00)
09-14 01: 13:36.114   528   528 D RefBase : #00 pc 0000b1bd  /system/lib/libutils.so (android::RefBase::~RefBase()+104)
09-14 01: 13:36.114   528   528 D RefBase : LineageOS#1 pc 0009b15b  /vendor/lib/hw/camera.msm8994.so (qcamera::CKPIItem::~CKPIItem()+22)
09-14 01: 13:36.114   528   528 D RefBase : LineageOS#2 pc 0009b195  /vendor/lib/hw/camera.msm8994.so (qcamera::frame_quality::~frame_quality()+24)
09-14 01: 13:36.114   528   528 D RefBase : aosp-mirror#3 pc 000abed9  /vendor/lib/hw/camera.msm8994.so (qcamera::Hal8994_EXT::~Hal8994_EXT()+112)
09-14 01: 13:36.114   528   528 D RefBase : aosp-mirror#4 pc 000abff1  /vendor/lib/hw/camera.msm8994.so (qcamera::Hal8994_EXT::~Hal8994_EXT()+4)
09-14 01: 13:36.114   528   528 D RefBase : aosp-mirror#5 pc 0006751f  /vendor/lib/hw/camera.msm8994.so (qcamera::QCamera2HardwareInterface::~QCamera2HardwareInterface()+174)
09-14 01: 13:36.114   528   528 D RefBase : aosp-mirror#6 pc 00067585  /vendor/lib/hw/camera.msm8994.so (qcamera::QCamera2HardwareInterface::~QCamera2HardwareInterface()+4)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#7 pc 0005be5d  /vendor/lib/hw/camera.msm8994.so (qcamera::QCamera2HardwareInterface::close_camera_device(hw_device_t*)+148)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#8 pc 00015627  /vendor/lib/camera.device@1.0-impl-hima.so (android::hardware::camera::device::V1_0::implementation::CameraDevice::close()+54)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#9 pc 00026819  /system/lib/android.hardware.camera.device@1.0.so (android::hardware::camera::device::V1_0::BsCameraDevice::close()+76)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#10 pc 000ed439  /system/lib/libcameraservice.so (android::CameraHardwareInterface::release()+32)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#11 pc 000b53f1  /system/lib/libcameraservice.so (android::CameraClient::disconnect()+164)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#12 pc 0002eda7  /system/lib/libcamera_client.so (android::hardware::BnCamera::onTransact(unsigned int, android::Parcel const&, android::Parcel*, unsigned int)+106)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#13 pc 00032ee5  /system/lib/libbinder.so (android::BBinder::transact(unsigned int, android::Parcel const&, android::Parcel*, unsigned int)+72)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#14 pc 0003afe9  /system/lib/libbinder.so (android::IPCThreadState::executeCommand(int)+768)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#15 pc 0003ac2b  /system/lib/libbinder.so (android::IPCThreadState::getAndExecuteCommand()+98)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#16 pc 0003b1bf  /system/lib/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+38)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#17 pc 000010ab  /system/bin/cameraserver (main+102)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#18 pc 000598f9  /apex/com.android.runtime/lib/bionic/libc.so (__libc_init+68)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#19 pc 0000102f  /system/bin/cameraserver (_start_main+38)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#20 pc 0000446e  <anonymous:ecdf3000>
Change-Id: I586a51d77968aec93d27c17aa92d0b3a55fb4878

Change-Id: Icd2bf08f14759e833e59c393f0f1771dd61128c3
eyosen pushed a commit to eyosen/system_core that referenced this pull request Dec 26, 2021
…h legacy blobs

09-14 01: 13:36.048   528   528 D RefBase : RefBase: Explicit destruction, weak count = 0 (in 0xe5afad00)
09-14 01: 13:36.114   528   528 D RefBase : #00 pc 0000b1bd  /system/lib/libutils.so (android::RefBase::~RefBase()+104)
09-14 01: 13:36.114   528   528 D RefBase : LineageOS#1 pc 0009b15b  /vendor/lib/hw/camera.msm8994.so (qcamera::CKPIItem::~CKPIItem()+22)
09-14 01: 13:36.114   528   528 D RefBase : LineageOS#2 pc 0009b195  /vendor/lib/hw/camera.msm8994.so (qcamera::frame_quality::~frame_quality()+24)
09-14 01: 13:36.114   528   528 D RefBase : aosp-mirror#3 pc 000abed9  /vendor/lib/hw/camera.msm8994.so (qcamera::Hal8994_EXT::~Hal8994_EXT()+112)
09-14 01: 13:36.114   528   528 D RefBase : aosp-mirror#4 pc 000abff1  /vendor/lib/hw/camera.msm8994.so (qcamera::Hal8994_EXT::~Hal8994_EXT()+4)
09-14 01: 13:36.114   528   528 D RefBase : aosp-mirror#5 pc 0006751f  /vendor/lib/hw/camera.msm8994.so (qcamera::QCamera2HardwareInterface::~QCamera2HardwareInterface()+174)
09-14 01: 13:36.114   528   528 D RefBase : aosp-mirror#6 pc 00067585  /vendor/lib/hw/camera.msm8994.so (qcamera::QCamera2HardwareInterface::~QCamera2HardwareInterface()+4)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#7 pc 0005be5d  /vendor/lib/hw/camera.msm8994.so (qcamera::QCamera2HardwareInterface::close_camera_device(hw_device_t*)+148)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#8 pc 00015627  /vendor/lib/camera.device@1.0-impl-hima.so (android::hardware::camera::device::V1_0::implementation::CameraDevice::close()+54)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#9 pc 00026819  /system/lib/android.hardware.camera.device@1.0.so (android::hardware::camera::device::V1_0::BsCameraDevice::close()+76)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#10 pc 000ed439  /system/lib/libcameraservice.so (android::CameraHardwareInterface::release()+32)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#11 pc 000b53f1  /system/lib/libcameraservice.so (android::CameraClient::disconnect()+164)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#12 pc 0002eda7  /system/lib/libcamera_client.so (android::hardware::BnCamera::onTransact(unsigned int, android::Parcel const&, android::Parcel*, unsigned int)+106)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#13 pc 00032ee5  /system/lib/libbinder.so (android::BBinder::transact(unsigned int, android::Parcel const&, android::Parcel*, unsigned int)+72)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#14 pc 0003afe9  /system/lib/libbinder.so (android::IPCThreadState::executeCommand(int)+768)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#15 pc 0003ac2b  /system/lib/libbinder.so (android::IPCThreadState::getAndExecuteCommand()+98)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#16 pc 0003b1bf  /system/lib/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+38)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#17 pc 000010ab  /system/bin/cameraserver (main+102)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#18 pc 000598f9  /apex/com.android.runtime/lib/bionic/libc.so (__libc_init+68)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#19 pc 0000102f  /system/bin/cameraserver (_start_main+38)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#20 pc 0000446e  <anonymous:ecdf3000>
Change-Id: I586a51d77968aec93d27c17aa92d0b3a55fb4878

Change-Id: Icd2bf08f14759e833e59c393f0f1771dd61128c3
Gerrit-AICP pushed a commit to AICP/system_core that referenced this pull request Jan 9, 2023
…h legacy blobs

09-14 01: 13:36.048   528   528 D RefBase : RefBase: Explicit destruction, weak count = 0 (in 0xe5afad00)
09-14 01: 13:36.114   528   528 D RefBase : #00 pc 0000b1bd  /system/lib/libutils.so (android::RefBase::~RefBase()+104)
09-14 01: 13:36.114   528   528 D RefBase : LineageOS#1 pc 0009b15b  /vendor/lib/hw/camera.msm8994.so (qcamera::CKPIItem::~CKPIItem()+22)
09-14 01: 13:36.114   528   528 D RefBase : LineageOS#2 pc 0009b195  /vendor/lib/hw/camera.msm8994.so (qcamera::frame_quality::~frame_quality()+24)
09-14 01: 13:36.114   528   528 D RefBase : aosp-mirror#3 pc 000abed9  /vendor/lib/hw/camera.msm8994.so (qcamera::Hal8994_EXT::~Hal8994_EXT()+112)
09-14 01: 13:36.114   528   528 D RefBase : aosp-mirror#4 pc 000abff1  /vendor/lib/hw/camera.msm8994.so (qcamera::Hal8994_EXT::~Hal8994_EXT()+4)
09-14 01: 13:36.114   528   528 D RefBase : aosp-mirror#5 pc 0006751f  /vendor/lib/hw/camera.msm8994.so (qcamera::QCamera2HardwareInterface::~QCamera2HardwareInterface()+174)
09-14 01: 13:36.114   528   528 D RefBase : aosp-mirror#6 pc 00067585  /vendor/lib/hw/camera.msm8994.so (qcamera::QCamera2HardwareInterface::~QCamera2HardwareInterface()+4)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#7 pc 0005be5d  /vendor/lib/hw/camera.msm8994.so (qcamera::QCamera2HardwareInterface::close_camera_device(hw_device_t*)+148)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#8 pc 00015627  /vendor/lib/camera.device@1.0-impl-hima.so (android::hardware::camera::device::V1_0::implementation::CameraDevice::close()+54)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#9 pc 00026819  /system/lib/android.hardware.camera.device@1.0.so (android::hardware::camera::device::V1_0::BsCameraDevice::close()+76)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#10 pc 000ed439  /system/lib/libcameraservice.so (android::CameraHardwareInterface::release()+32)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#11 pc 000b53f1  /system/lib/libcameraservice.so (android::CameraClient::disconnect()+164)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#12 pc 0002eda7  /system/lib/libcamera_client.so (android::hardware::BnCamera::onTransact(unsigned int, android::Parcel const&, android::Parcel*, unsigned int)+106)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#13 pc 00032ee5  /system/lib/libbinder.so (android::BBinder::transact(unsigned int, android::Parcel const&, android::Parcel*, unsigned int)+72)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#14 pc 0003afe9  /system/lib/libbinder.so (android::IPCThreadState::executeCommand(int)+768)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#15 pc 0003ac2b  /system/lib/libbinder.so (android::IPCThreadState::getAndExecuteCommand()+98)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#16 pc 0003b1bf  /system/lib/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+38)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#17 pc 000010ab  /system/bin/cameraserver (main+102)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#18 pc 000598f9  /apex/com.android.runtime/lib/bionic/libc.so (__libc_init+68)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#19 pc 0000102f  /system/bin/cameraserver (_start_main+38)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#20 pc 0000446e  <anonymous:ecdf3000>
Change-Id: I586a51d77968aec93d27c17aa92d0b3a55fb4878

Change-Id: Icd2bf08f14759e833e59c393f0f1771dd61128c3
Gerrit-AICP pushed a commit to AICP/system_core that referenced this pull request Jan 9, 2023
…h legacy blobs

09-14 01: 13:36.048   528   528 D RefBase : RefBase: Explicit destruction, weak count = 0 (in 0xe5afad00)
09-14 01: 13:36.114   528   528 D RefBase : #00 pc 0000b1bd  /system/lib/libutils.so (android::RefBase::~RefBase()+104)
09-14 01: 13:36.114   528   528 D RefBase : LineageOS#1 pc 0009b15b  /vendor/lib/hw/camera.msm8994.so (qcamera::CKPIItem::~CKPIItem()+22)
09-14 01: 13:36.114   528   528 D RefBase : LineageOS#2 pc 0009b195  /vendor/lib/hw/camera.msm8994.so (qcamera::frame_quality::~frame_quality()+24)
09-14 01: 13:36.114   528   528 D RefBase : aosp-mirror#3 pc 000abed9  /vendor/lib/hw/camera.msm8994.so (qcamera::Hal8994_EXT::~Hal8994_EXT()+112)
09-14 01: 13:36.114   528   528 D RefBase : aosp-mirror#4 pc 000abff1  /vendor/lib/hw/camera.msm8994.so (qcamera::Hal8994_EXT::~Hal8994_EXT()+4)
09-14 01: 13:36.114   528   528 D RefBase : aosp-mirror#5 pc 0006751f  /vendor/lib/hw/camera.msm8994.so (qcamera::QCamera2HardwareInterface::~QCamera2HardwareInterface()+174)
09-14 01: 13:36.114   528   528 D RefBase : aosp-mirror#6 pc 00067585  /vendor/lib/hw/camera.msm8994.so (qcamera::QCamera2HardwareInterface::~QCamera2HardwareInterface()+4)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#7 pc 0005be5d  /vendor/lib/hw/camera.msm8994.so (qcamera::QCamera2HardwareInterface::close_camera_device(hw_device_t*)+148)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#8 pc 00015627  /vendor/lib/camera.device@1.0-impl-hima.so (android::hardware::camera::device::V1_0::implementation::CameraDevice::close()+54)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#9 pc 00026819  /system/lib/android.hardware.camera.device@1.0.so (android::hardware::camera::device::V1_0::BsCameraDevice::close()+76)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#10 pc 000ed439  /system/lib/libcameraservice.so (android::CameraHardwareInterface::release()+32)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#11 pc 000b53f1  /system/lib/libcameraservice.so (android::CameraClient::disconnect()+164)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#12 pc 0002eda7  /system/lib/libcamera_client.so (android::hardware::BnCamera::onTransact(unsigned int, android::Parcel const&, android::Parcel*, unsigned int)+106)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#13 pc 00032ee5  /system/lib/libbinder.so (android::BBinder::transact(unsigned int, android::Parcel const&, android::Parcel*, unsigned int)+72)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#14 pc 0003afe9  /system/lib/libbinder.so (android::IPCThreadState::executeCommand(int)+768)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#15 pc 0003ac2b  /system/lib/libbinder.so (android::IPCThreadState::getAndExecuteCommand()+98)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#16 pc 0003b1bf  /system/lib/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+38)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#17 pc 000010ab  /system/bin/cameraserver (main+102)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#18 pc 000598f9  /apex/com.android.runtime/lib/bionic/libc.so (__libc_init+68)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#19 pc 0000102f  /system/bin/cameraserver (_start_main+38)
09-14 01: 13:36.115   528   528 D RefBase : aosp-mirror#20 pc 0000446e  <anonymous:ecdf3000>
Change-Id: I586a51d77968aec93d27c17aa92d0b3a55fb4878

Change-Id: Icd2bf08f14759e833e59c393f0f1771dd61128c3
abun880007 pushed a commit to 420rom/android_system_core that referenced this pull request Feb 3, 2023
fastbootd: Allow using kernel commits to pass SafetyNet
abun880007 pushed a commit to 420rom/android_system_core that referenced this pull request Feb 3, 2023
* Fixes camera for Samsung Exynos devices:

08-30 18:07:03.585  2729  2729 I ExynosCameraFrameFactory: INFO(startThread[1608]):pipeId=0
08-30 18:07:03.585  2729  2729 F libutils.threads: thread name not provided to Thread::run
08-30 18:07:03.586  2729  2729 F libc    : Fatal signal 6 (SIGABRT), code -6 in tid 2729 (cameraserver)
08-30 18:07:03.587  2548  2548 W         : debuggerd: handling request: pid=2729 uid=1047 gid=1005 tid=2729
08-30 18:07:03.656  6489  6489 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
08-30 18:07:03.656  6489  6489 F DEBUG   : Build fingerprint: 'samsung/aosp_gts210ltexx/gts210ltexx:7.0/NYC/chris08292135:userdebug/test-keys'
08-30 18:07:03.656  6489  6489 F DEBUG   : Revision: '0'
08-30 18:07:03.657  6489  6489 F DEBUG   : ABI: 'arm'
08-30 18:07:03.657  6489  6489 F DEBUG   : pid: 2729, tid: 2729, name: cameraserver  >>> /system/bin/cameraserver <<<
08-30 18:07:03.658  6489  6489 F DEBUG   : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
08-30 18:07:03.673  6489  6489 F DEBUG   : Abort message: 'thread name not provided to Thread::run'
08-30 18:07:03.673  6489  6489 F DEBUG   :     r0 00000000  r1 00000aa9  r2 00000006  r3 00000008
08-30 18:07:03.674  6489  6489 F DEBUG   :     r4 b5a2c58c  r5 00000006  r6 b5a2c534  r7 0000010c
08-30 18:07:03.674  6489  6489 F DEBUG   :     r8 b28b5380  r9 00000000  sl 00000000  fp b2a92800
08-30 18:07:03.674  6489  6489 F DEBUG   :     ip 00000016  sp be90b350  lr b4f7e537  pc b4f80d94  cpsr 200f0010
08-30 18:07:03.694  6489  6489 F DEBUG   :
08-30 18:07:03.694  6489  6489 F DEBUG   : backtrace:
08-30 18:07:03.694  6489  6489 F DEBUG   :     #00 pc 00049d94  /system/lib/libc.so (tgkill+12)
08-30 18:07:03.694  6489  6489 F DEBUG   :     LineageOS#1 pc 00047533  /system/lib/libc.so (pthread_kill+34)
08-30 18:07:03.694  6489  6489 F DEBUG   :     LineageOS#2 pc 0001d885  /system/lib/libc.so (raise+10)
08-30 18:07:03.694  6489  6489 F DEBUG   :     aosp-mirror#3 pc 000193d1  /system/lib/libc.so (__libc_android_abort+34)
08-30 18:07:03.694  6489  6489 F DEBUG   :     aosp-mirror#4 pc 00017014  /system/lib/libc.so (abort+4)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#5 pc 0000bfd5  /system/lib/libcutils.so (__android_log_assert+112)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#6 pc 0000e265  /system/lib/libutils.so (_ZN7android6Thread3runEPKcij+212)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#7 pc 00045903  /system/lib/libexynoscamera.so (_ZN7android16ExynosCameraPipe11startThreadEv+74)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#8 pc 0007b1c3  /system/lib/libexynoscamera.so (_ZN7android24ExynosCameraFrameFactory11startThreadEj+70)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#9 pc 0007bcef  /system/lib/libexynoscamera.so (_ZN7android24ExynosCameraFrameFactory19startInitialThreadsEv+70)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#10 pc 0006231d  /system/lib/libexynoscamera.so (_ZN7android12ExynosCamera22m_startPreviewInternalEv+1140)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#11 pc 0006b897  /system/lib/libexynoscamera.so (_ZN7android12ExynosCamera12startPreviewEv+1666)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#12 pc 000037b1  /system/lib/hw/camera.universal5433.so
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#13 pc 0006094f  /system/lib/libcameraservice.so (_ZN7android12CameraClient16startPreviewModeEv+102)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#14 pc 00060825  /system/lib/libcameraservice.so (_ZN7android12CameraClient15startCameraModeENS0_11camera_modeE+68)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#15 pc 000282f9  /system/lib/libcamera_client.so (_ZN7android8hardware8BnCamera10onTransactEjRKNS_6ParcelEPS2_j+724)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#16 pc 000359b3  /system/lib/libbinder.so (_ZN7android7BBinder8transactEjRKNS_6ParcelEPS1_j+70)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#17 pc 0003d159  /system/lib/libbinder.so (_ZN7android14IPCThreadState14executeCommandEi+684)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#18 pc 0003cdb7  /system/lib/libbinder.so (_ZN7android14IPCThreadState20getAndExecuteCommandEv+114)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#19 pc 0003d2bb  /system/lib/libbinder.so (_ZN7android14IPCThreadState14joinThreadPoolEb+46)
08-30 18:07:03.695  6489  6489 F DEBUG   :     aosp-mirror#20 pc 00000b4d  /system/bin/cameraserver
08-30 18:07:03.696  6489  6489 F DEBUG   :     aosp-mirror#21 pc 00016c2d  /system/lib/libc.so (__libc_init+48)
08-30 18:07:03.696  6489  6489 F DEBUG   :     aosp-mirror#22 pc 00000a18  /system/bin/cameraserver

Change-Id: Ib6234260a5fc5798eea580e0ac594313650de933
Signed-off-by: SagarMakhar <sagarmakhar@gmail.com>
SirRGB pushed a commit to droid-legacy/android_system_core that referenced this pull request Apr 21, 2023
Due to https://r.android.com/1310496, sparse_file_write() splits all
blocks larger than 64 MiB.  However, the code that splits file-backed
blocks copies the pointer to the filename without duplicating the
underlying memory, causing a double free in backed_block_destroy()
later.  Fix this by using strdup().  Also, as long as that is being
fixed, also check for failure.

Test: SANITIZE_HOST=address mmm external/e2fsprogs
      mkdir mnt
      mkfs.ext4 img 1G
      sudo mount img mnt
      sudo cp /dev/urandom mnt/file
      sudo umount mnt
      ext2simg img simg

Before this fix it gave:

    ==2216498==ERROR: AddressSanitizer: attempting double-free on 0x602000000090 in thread T0:
        #0 0x55a52454c9a2 in free out/stage2/runtimes/runtimes-x86_64-unknown-linux-gnu-bins/out/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:52:3
        LineageOS#1 0x7ffa247c82ee in backed_block_destroy(backed_block*) system/core/libsparse/backed_block.cpp:106:5
        LineageOS#2 0x7ffa247c82ee in backed_block_list_destroy(backed_block_list*) system/core/libsparse/backed_block.cpp:124:7
        aosp-mirror#3 0x7ffa247cd055 in sparse_file_destroy system/core/libsparse/sparse.cpp:49:3
        aosp-mirror#4 0x55a524587b75 in main external/e2fsprogs/contrib/android/ext2simg.c:239:2

Google: 2506666
Change-Id: I4607ef5adcf6512645342beaf91aff6033414e54
SirRGB pushed a commit to droid-legacy/android_system_core that referenced this pull request Apr 21, 2023
Due to https://r.android.com/1310496, sparse_file_write() splits all
blocks larger than 64 MiB.  However, the code that splits file-backed
blocks copies the pointer to the filename without duplicating the
underlying memory, causing a double free in backed_block_destroy()
later.  Fix this by using strdup().  Also, as long as that is being
fixed, also check for failure.

Test: SANITIZE_HOST=address mmm external/e2fsprogs
      mkdir mnt
      mkfs.ext4 img 1G
      sudo mount img mnt
      sudo cp /dev/urandom mnt/file
      sudo umount mnt
      ext2simg img simg

Before this fix it gave:

    ==2216498==ERROR: AddressSanitizer: attempting double-free on 0x602000000090 in thread T0:
        #0 0x55a52454c9a2 in free out/stage2/runtimes/runtimes-x86_64-unknown-linux-gnu-bins/out/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:52:3
        LineageOS#1 0x7ffa247c82ee in backed_block_destroy(backed_block*) system/core/libsparse/backed_block.cpp:106:5
        LineageOS#2 0x7ffa247c82ee in backed_block_list_destroy(backed_block_list*) system/core/libsparse/backed_block.cpp:124:7
        aosp-mirror#3 0x7ffa247cd055 in sparse_file_destroy system/core/libsparse/sparse.cpp:49:3
        aosp-mirror#4 0x55a524587b75 in main external/e2fsprogs/contrib/android/ext2simg.c:239:2

Google: 2506666
Change-Id: I4607ef5adcf6512645342beaf91aff6033414e54
ivan-j-l4b referenced this pull request in SoftingAE-VCPI/VCPI.android.platform.system.core Apr 28, 2023
ivan-j-l4b referenced this pull request in SoftingAE-VCPI/VCPI.android.platform.system.core May 30, 2023
SirRGB pushed a commit to droid-legacy/android_system_core that referenced this pull request Aug 1, 2023
Due to https://r.android.com/1310496, sparse_file_write() splits all
blocks larger than 64 MiB.  However, the code that splits file-backed
blocks copies the pointer to the filename without duplicating the
underlying memory, causing a double free in backed_block_destroy()
later.  Fix this by using strdup().  Also, as long as that is being
fixed, also check for failure.

Test: SANITIZE_HOST=address mmm external/e2fsprogs
      mkdir mnt
      mkfs.ext4 img 1G
      sudo mount img mnt
      sudo cp /dev/urandom mnt/file
      sudo umount mnt
      ext2simg img simg

Before this fix it gave:

    ==2216498==ERROR: AddressSanitizer: attempting double-free on 0x602000000090 in thread T0:
        #0 0x55a52454c9a2 in free out/stage2/runtimes/runtimes-x86_64-unknown-linux-gnu-bins/out/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:52:3
        LineageOS#1 0x7ffa247c82ee in backed_block_destroy(backed_block*) system/core/libsparse/backed_block.cpp:106:5
        LineageOS#2 0x7ffa247c82ee in backed_block_list_destroy(backed_block_list*) system/core/libsparse/backed_block.cpp:124:7
        aosp-mirror#3 0x7ffa247cd055 in sparse_file_destroy system/core/libsparse/sparse.cpp:49:3
        aosp-mirror#4 0x55a524587b75 in main external/e2fsprogs/contrib/android/ext2simg.c:239:2

Google: 2506666
Change-Id: I4607ef5adcf6512645342beaf91aff6033414e54
Ghosuto pushed a commit to Ghostalioth/system_core that referenced this pull request Aug 20, 2023
Due to https://r.android.com/1310496, sparse_file_write() splits all
blocks larger than 64 MiB.  However, the code that splits file-backed
blocks copies the pointer to the filename without duplicating the
underlying memory, causing a double free in backed_block_destroy()
later.  Fix this by using strdup().  Also, as long as that is being
fixed, also check for failure.

Test: SANITIZE_HOST=address mmm external/e2fsprogs
      mkdir mnt
      mkfs.ext4 img 1G
      sudo mount img mnt
      sudo cp /dev/urandom mnt/file
      sudo umount mnt
      ext2simg img simg

Before this fix it gave:

    ==2216498==ERROR: AddressSanitizer: attempting double-free on 0x602000000090 in thread T0:
        #0 0x55a52454c9a2 in free out/stage2/runtimes/runtimes-x86_64-unknown-linux-gnu-bins/out/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:52:3
        LineageOS#1 0x7ffa247c82ee in backed_block_destroy(backed_block*) system/core/libsparse/backed_block.cpp:106:5
        LineageOS#2 0x7ffa247c82ee in backed_block_list_destroy(backed_block_list*) system/core/libsparse/backed_block.cpp:124:7
        aosp-mirror#3 0x7ffa247cd055 in sparse_file_destroy system/core/libsparse/sparse.cpp:49:3
        aosp-mirror#4 0x55a524587b75 in main external/e2fsprogs/contrib/android/ext2simg.c:239:2

Google: 2506666
Change-Id: I4607ef5adcf6512645342beaf91aff6033414e54
minaripenguin pushed a commit to RisingTechOSS/android_system_core that referenced this pull request Aug 29, 2023
Due to https://r.android.com/1310496, sparse_file_write() splits all
blocks larger than 64 MiB.  However, the code that splits file-backed
blocks copies the pointer to the filename without duplicating the
underlying memory, causing a double free in backed_block_destroy()
later.  Fix this by using strdup().  Also, as long as that is being
fixed, also check for failure.

Test: SANITIZE_HOST=address mmm external/e2fsprogs
      mkdir mnt
      mkfs.ext4 img 1G
      sudo mount img mnt
      sudo cp /dev/urandom mnt/file
      sudo umount mnt
      ext2simg img simg

Before this fix it gave:

    ==2216498==ERROR: AddressSanitizer: attempting double-free on 0x602000000090 in thread T0:
        #0 0x55a52454c9a2 in free out/stage2/runtimes/runtimes-x86_64-unknown-linux-gnu-bins/out/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:52:3
        LineageOS#1 0x7ffa247c82ee in backed_block_destroy(backed_block*) system/core/libsparse/backed_block.cpp:106:5
        LineageOS#2 0x7ffa247c82ee in backed_block_list_destroy(backed_block_list*) system/core/libsparse/backed_block.cpp:124:7
        aosp-mirror#3 0x7ffa247cd055 in sparse_file_destroy system/core/libsparse/sparse.cpp:49:3
        aosp-mirror#4 0x55a524587b75 in main external/e2fsprogs/contrib/android/ext2simg.c:239:2

Google: 2506666
Change-Id: I4607ef5adcf6512645342beaf91aff6033414e54
CxDxVER pushed a commit to CatalystOSS/system_core that referenced this pull request Aug 29, 2023
Due to https://r.android.com/1310496, sparse_file_write() splits all
blocks larger than 64 MiB.  However, the code that splits file-backed
blocks copies the pointer to the filename without duplicating the
underlying memory, causing a double free in backed_block_destroy()
later.  Fix this by using strdup().  Also, as long as that is being
fixed, also check for failure.

Test: SANITIZE_HOST=address mmm external/e2fsprogs
      mkdir mnt
      mkfs.ext4 img 1G
      sudo mount img mnt
      sudo cp /dev/urandom mnt/file
      sudo umount mnt
      ext2simg img simg

Before this fix it gave:

    ==2216498==ERROR: AddressSanitizer: attempting double-free on 0x602000000090 in thread T0:
        #0 0x55a52454c9a2 in free out/stage2/runtimes/runtimes-x86_64-unknown-linux-gnu-bins/out/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:52:3
        LineageOS#1 0x7ffa247c82ee in backed_block_destroy(backed_block*) system/core/libsparse/backed_block.cpp:106:5
        LineageOS#2 0x7ffa247c82ee in backed_block_list_destroy(backed_block_list*) system/core/libsparse/backed_block.cpp:124:7
        aosp-mirror#3 0x7ffa247cd055 in sparse_file_destroy system/core/libsparse/sparse.cpp:49:3
        aosp-mirror#4 0x55a524587b75 in main external/e2fsprogs/contrib/android/ext2simg.c:239:2

Google: 2506666
Change-Id: I4607ef5adcf6512645342beaf91aff6033414e54
Signed-off-by: CxDxVER <mikaelsons.xx0@gmail.com>
Tomoms pushed a commit to Tomoms/android_system_core that referenced this pull request Dec 18, 2023
Due to https://r.android.com/1310496, sparse_file_write() splits all
blocks larger than 64 MiB.  However, the code that splits file-backed
blocks copies the pointer to the filename without duplicating the
underlying memory, causing a double free in backed_block_destroy()
later.  Fix this by using strdup().  Also, as long as that is being
fixed, also check for failure.

Test: SANITIZE_HOST=address mmm external/e2fsprogs
      mkdir mnt
      mkfs.ext4 img 1G
      sudo mount img mnt
      sudo cp /dev/urandom mnt/file
      sudo umount mnt
      ext2simg img simg

Before this fix it gave:

    ==2216498==ERROR: AddressSanitizer: attempting double-free on 0x602000000090 in thread T0:
        #0 0x55a52454c9a2 in free out/stage2/runtimes/runtimes-x86_64-unknown-linux-gnu-bins/out/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:52:3
        LineageOS#1 0x7ffa247c82ee in backed_block_destroy(backed_block*) system/core/libsparse/backed_block.cpp:106:5
        LineageOS#2 0x7ffa247c82ee in backed_block_list_destroy(backed_block_list*) system/core/libsparse/backed_block.cpp:124:7
        aosp-mirror#3 0x7ffa247cd055 in sparse_file_destroy system/core/libsparse/sparse.cpp:49:3
        aosp-mirror#4 0x55a524587b75 in main external/e2fsprogs/contrib/android/ext2simg.c:239:2

Change-Id: I4607ef5adcf6512645342beaf91aff6033414e54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.