Mellanox / libxlio

Other
41 stars 19 forks source link

issue: 4039462 XLIO crashes on thread_local stats #216

Closed AlexanderGrissik closed 1 month ago

AlexanderGrissik commented 2 months ago

Description

Fixing XLIO crash with thread_local stats object

What

The thread_local objects are deallocated once the thread is finished. Depending on the configuration sockets can use a pointer to a thread_local stats object. If that thread is finished but the socket is still alive, XLIO will try to access deallocated stats object and hit seg fault.

Why ?

Crash fix

How ?

To make things straight forward we always ask if stats object exists. This should also be the most efficient. No more thread_local or global dummy object.

Change type

What kind of change does this PR introduce?

Check list