question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AssertionError crashes in PoolArena

See original GitHub issue

Hello!

My team at AWS has a service that uses Netty 4.1. Ever since we upgraded from 4.1.48 to 4.1.52, we’ve been seeing occasional process (once every week or two) crashes due to AssertionErrors.

Here’s the Netty portion of the stack trace:

  java.lang.AssertionError
  | at io.netty.buffer.PoolArena.tcacheAllocateSmall(PoolArena.java:165)
  | at io.netty.buffer.PoolArena.allocate(PoolArena.java:136)
  | at io.netty.buffer.PoolArena.allocate(PoolArena.java:128)
  | at io.netty.buffer.PooledByteBufAllocator.newDirectBuffer(PooledByteBufAllocator.java:378)
  | at io.netty.buffer.AbstractByteBufAllocator.directBuffer(AbstractByteBufAllocator.java:187)
  | at io.netty.buffer.AbstractByteBufAllocator.directBuffer(AbstractByteBufAllocator.java:178)
  | at io.netty.buffer.AbstractByteBufAllocator.buffer(AbstractByteBufAllocator.java:115)

We suspect that this is a bug introduced with this commit, it’s the only significant commit between 4.1.48 and 4.1.52 with relevant scope.

This is the failing assertion: https://github.com/netty/netty/blob/4.1/buffer/src/main/java/io/netty/buffer/PoolArena.java#L163

So the failure is either that the found subpage is marked for deletion, or the subpage’s size is not as expected by sizeclasses. I’m leaning more towards the second possibility, since I think this code makes sure that the first subpage cannot be marked for deletion; but I may be missing something.

Expected behavior

N/A

Actual behavior

N/A

Steps to reproduce

Unfortunately, we have not been able to find a repro; or any other indicators (metrics and logs) that predict the crash.

Minimal yet complete reproducer code (or URL to code)

N/A

Netty version

4.1.52

JVM version (e.g. java -version)

openjdk version “11.0.13” 2021-10-19 LTS OpenJDK Runtime Environment (build 11.0.13+8-LTS) OpenJDK 64-Bit Server VM (build 11.0.13+8-LTS, mixed mode)

OS version (e.g. uname -a)

5.4.156-94.273.amzn2int.x86_64

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:14 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
pqrstuvwxcommented, Apr 27, 2022

Thank you, we managed to get 4.1.73 imported and deployed on our end, so far it looks promising, no reoccurrence. I’ll update this thread once we’ve pushed the change to production, if we’ve still not seen any more of this issue then I think it can be closed out as having been fixed by 4.1.7x

0reactions
trustincommented, Nov 19, 2022

Sounds like it’s safe to close now that it’s not reproducible anymore since the upgrade, correct?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pip list crashes with an AssertionError - python - Stack Overflow
The problem, as I understand it, is that pip as provided by Ubuntu is old, and also cannot update itself (since it's managed...
Read more >
"Supported FPS ranges cannot be null." crash #HALIssue ...
This crash happens in production on the devices we don't own. ... AssertionError: Supported FPS ranges cannot be null. at android.hardware.camera2.legacy.
Read more >
Use Crash Detection on iPhone or Apple Watch to call for help ...
Crash Detection is designed to detect severe car crashes—such as front-impact, side-impact, and rear-end collisions, and rollovers—involving ...
Read more >
5 Troubleshoot System Crashes
Information and guidance about some specific procedures for troubleshooting system crashes. A crash, or fatal error, causes a process to terminate ...
Read more >
NRS: CHAPTER 484E - CRASHES AND REPORTS OF ...
050 Immediate notice to police officer of crash involving unattended vehicle or other property. [Effective through December 31, 2022.] NRS 484E.050 Immediate ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found