Android Apps On Recent Kernels

At the end of 2019 a rework to the Linux kernel's pipe code saw some of its logic reworked to only wake up readers if needed and avoid a possible thundering herd problem.

But it turns out some Android libraries abused the functionality and this has led to broken Android applications when moving to recent kernels. While the user-space software is in the wrong, the kernel is sticking to its policy of not breaking user-space and as such Linus Torvalds has changed the code's behavior for Linux 5.14 and to be back-ported to prior stable kernels. Rather than only waking up readers if needed, the change merged into the Linux kernel on Friday will make pipe writes always wake up readers. Due to some Android libraries like Realm misusing the EPOLL interface, the pipe change at the end of 2019 ended up breaking some Android apps. 

This has broken "numerous Android applications" since Linux 5.5, but given the long period of times between kernel versions shipped by Android, it only has become a problem recently with Android transitioning to Linux 5.10 LTS. Realm's behavior has since been addressed but will take some period of time before all applications leveraging the library (and any other problematic libraries out there) are updated and re-built, thus for now broken Android applications are still out there. 

While user-space was misusing an interface and that led to "all applications using this library stopped working", the Linux kernel carries a policy that if applications break from new kernel behavior/changes, it's a regression. Thus on Friday Linus Torvalds authored and merged this change to always make writes wake-up readers even if extraneous in order to better jive with the old behavior. 

See this commit for those interested in all the technical details on the issue and resolution.


Android is a mobile operating system based on a modified version of the Linux kernel and other open source software, designed primarily for touchscreen mobile devices such as smartphones and tablets.