[Bug 1194] l3fwd-cat: calling unsafe functions from signal handler

bugzilla at dpdk.org bugzilla at dpdk.org
Mon Mar 20 18:08:20 CET 2023


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

            Bug ID: 1194
           Summary: l3fwd-cat: calling unsafe functions from signal
                    handler
           Product: DPDK
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: examples
          Assignee: dev at dpdk.org
          Reporter: stephen at networkplumber.org
  Target Milestone: ---

The handling of SIGINT and SIGTERM in the l2fwd-cat example is unsafe and
non-portable.  The signal handler could be called by any thread at any time.

The current method (copy/paste from testpmd?) is to call cat_exit() in the
signal handler. This may race with other threads and cause problems.

The better solution is to set a flag in signal handler and then do the shutdown
aft er the main loop exits.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mails.dpdk.org/archives/dev/attachments/20230320/615e8dfe/attachment-0001.htm>


More information about the dev mailing list