
We can add trace_printk statements to see that the sk_acceptq_added function will not increment correctly with enough processes concurrently trying to increment the SYN ack backlog: ( ) - 7) tinypro-7807 => -53 - 1691. This can also be observed via ftrace and adding trace_printk: cd /sys/kernel/debug/tracing/ echo > trace echo function_graph > current_tracer echo 1 > options/funcgraph-abstime echo tcp_check_req > set_ftrace_filter echo inet_csk_accept > set_ftrace_filter echo inet_csk_reqsk_queue_hash_add > set_ftrace_filter echo inet_csk_reqsk_queue_prune > set_ftrace_filter echo tcp_check_req > set_ftrace_filter echo 1 > tracing_on Run socket stats and check the RecvQ column - with enough concurrent requests, this number may stop draining. This is a reproduction of a sample configuration file as it can also be found in the tinyproxy distribution. */ /*#define realloc rpl_realloc*/Ĭopy tinyproxy and nf to LineageOS device, and running it /system/bin/tinyproxy -c nfĪttempt to simultaneous curl commands via tinyproxy: for i in $(seq 1 400) do curl -x localhost:8888 -L -connect-timeout 30 -o /dev/null -sS & done */ /*#define malloc rpl_malloc*/ /* Define to rpl_realloc if the replacement function should be used. Race condition for LineageOS kernels for TCP listens, since the TCP SYNĬross-compiling Tinyproxy ( ) for Android, the SYN Recv queue can be corrupted otherwise: # Use 1.10.0 version with prefork options git clone -b 1.10.0 bash -x autogen.sh -host=aarch64-linux-gnuĮdit config.h and comment out: /* Define to rpl_malloc if the replacement function should be used. To protect the SYN request queue, and adding atomic counters for the SYN queue. Relocating the SYN table to a separate hash table, adding a spin lock
#TINYPROXY CONFIG MANUAL#
For decriptions of all parameters, see the nf(5) manual page. That attempts to remove the use of locks on the socket table by GitHub nf - tinyproxy daemon configuration file This example nf file contains example settings with explanations in comments.

#TINYPROXY CONFIG PATCH#
This commit, which exists across most LineageOS kernels, belongs to the patch set ( )

Listeners, which were meant part of Linux 4.4 upgrades. Revert across all 3.x LineageOS kernels that do not have the entirety of TCP changes for lockless Other strange behavior occur with the SYN data structures in general will get corrupted. With enough concurrent requests on a port listening on a device, a race condition can be introduced and the SYN ACK backlog will not drain, eventually maxing out or TCP listens will stop working.
