Linux debugging (objdump/strace/strings)

Directory 1. Linux debugging (objdump/strace/strings) 1.1. Check the system glibc version number 1.2. View dependencies in so/bin 1.3. Reasons for debugging bin errors 1.4. View the string in so/bin 1. Linux debugging (objdump/strace/strings) 1.1. Check the system glibc version number 1. The first type # ldd –version ldd (Ubuntu GLIBC 2.27-3ubuntu1) 2.27 Copyright (C) 2018 […]

Android Performance Optimization Series – 01 Teach you step by step how to use systrace

1. Overview Performance optimization is an important knowledge in Android and an important basis for measuring the level of an Android engineer. Many people may know simple performance optimization. For example, many people must know the following methods to optimize UI rendering: Use “Settings –> Developer Options –> Debugging GPU overdrawing” to distinguish whether there […]

Practical analysis of dump and strace commands causing watchdog problems caused by keystore deadlock

1. Problem description Recently, a system stuck problem occurred. It is speculated that a watchdog appears in system_server. Looking at the watchdog file, it is PackageManager stuck in the KeyStore.clearUid() interface: —– pid 1091 at 2023-10-26 09:40:10 —– Cmd line: system_server ABI: ‘arm64’ “PackageManager” sysTid=1352 #00 pc 000000000006e1c4 /system/lib64/libc.so (__ioctl + 4) #01 pc 00000000000290d0 […]

Android performance analysis tool strace (3) strace process strace waits for notification from the target process

1. The strace process waits for notification from the target process After calling ptrace to track the system call of the target process, the strace process calls pid_t wait4 (pid_t pid, int *status, int options, struct rusage *rusage) to wait for the target process to notify itself when the system call is made. The wait4() […]

Android performance analysis tool strace (2)strace process ptrace tracks target process system calls

strace tracks system calls through ptrace. ptrace allows one process to track and control the execution of another process. The process being traced is called tracer, and the traced process is called tracee. ptrace is defined as long ptrace (enum __ptrace_request request, pid_t pid, void *addr, void *data). The parameter request is the request type, […]

Linux permission maintenance – Strace monitoring & Alias alias & Cron timing task

Linux Permission Maintenance-Strace Monitoring & amp;Alias Alias & amp;Cron Timing Task 1 Introduction 2. Hiding techniques 2.1. Time forgery 2.1.1. Modification time 2.2. Hidden files 2.3. chattr command 2.3.1. Command Reference 2.3.2. Attribute addition 2.3.3. Attribute cancellation 2.4. History commands 2.4.1. Hidden commands 2.5. Clear login log 2.5.1. Clear login success log 2.5.2. Clear login […]

Normal user starts supervisor and reports HTTP error (strace)

The company’s development has normal user www permissions for the production environment, and the bastion machine is used to log in to the machine in the production environment. By default, the supervisor is started by the root user, and developers do not have permission to directly modify the configuration and operate the processes managed by […]

strace filters specific path access, displays fd path, displays thread or process name, and secondary filtering based on output content

1. Basic usage scenarios of strace command strace is a very commonly used command to track the running status of user-mode processes. By default, a command is started and all system calls and signals received during its execution are tracked. The names, arguments, and return values of all system calls are output to standard error, […]