DPDK patches and discussions
 help / color / mirror / Atom feed
* [Bug 1081] DPDK libraries (rib, lpm, ...) can't safely be used by shared libraries in application that are unloaded
@ 2022-09-13 23:42 bugzilla
  0 siblings, 0 replies; only message in thread
From: bugzilla @ 2022-09-13 23:42 UTC (permalink / raw)
  To: dev

https://bugs.dpdk.org/show_bug.cgi?id=1081

            Bug ID: 1081
           Summary: DPDK libraries (rib, lpm, ...) can't safely be used by
                    shared libraries in application that are unloaded
           Product: DPDK
           Version: 22.03
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: major
          Priority: Normal
         Component: core
          Assignee: dev@dpdk.org
          Reporter: stephen@networkplumber.org
  Target Milestone: ---

Our application has base program and plugins.
The plugins are loaded at run time with dlopen() and can be updated by doing
dlclose() to replace the library with a new version.

Libraries that are only used by these plugins will crash when reloaded.
The sequences is:
  1. Program is started
  2. Plugin is loaded with dlopen()
  3.  dlopen will auto load the dependent shared library (for example rte_rib)
  4. Later plugin is unloaded by calling cleanup code and then dlclose()
  5.  dlcose() will unload the dependent no longer used shared library

  6. Reloading with dlopen causes crash because the tailq list has entry for
already freed memory from the previous instance.

The problem is that some DPDK libraries use EAL_REGISTER_TAILQ as a constructor
bu have no destructor. This problem applies to all libraries using
EAL_REGISTER_TAILQ.

The best fix is to add destructor/unregister logic to the eal tailq.
Workaround is to load the dependent library during DPDK startup in main
program.

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-09-13 23:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-13 23:42 [Bug 1081] DPDK libraries (rib, lpm, ...) can't safely be used by shared libraries in application that are unloaded bugzilla

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).