Bug 1215 - Hotplug sigbus handler is using signal unsafe calls
Summary: Hotplug sigbus handler is using signal unsafe calls
Status: UNCONFIRMED
Alias: None
Product: DPDK
Classification: Unclassified
Component: core (show other bugs)
Version: unspecified
Hardware: All All
: Normal minor
Target Milestone: ---
Assignee: dev
URL:
Depends on:
Blocks:
 
Reported: 2023-04-13 04:34 CEST by Stephen Hemminger
Modified: 2023-04-13 04:34 CEST (History)
0 users



Attachments

Description Stephen Hemminger 2023-04-13 04:34:36 CEST
The sigbus_handler() in lib/eal/linux/eal_dev.c is using many direct library calls and DPDK API's that are not safe to be used in a signal handler.
Unsafe routines include RTE_LOG() uses sprintf and syslog. etc..

It is also possible that failure_handle_lock could deadlock if called during a change of state by other thread.
The safer way would be to use signalfd() and a monitoring thread.

Handling signals in Linux and BSD is hard.

Note You need to log in before you can comment on or make changes to this bug.