mirror of https://github.com/OISF/suricata
unix-manager: prioritize the shutdown check
Make sure Suricata is in the running state before you attempt to execute commands on the Unix sockets. UnixMain is being called in an infinite loop where TmThreadsCheckFlag(th_v, THV_KILL) is checked for the deinit phase. However, it may take some time between the start of Suricata's deinitialization and the receipt of THV_KILL flag in the Unix thread. In between this time period, the Unix manager can still perform select() operation on the Unix socket while the socket being already deinitialized. Likely with a longer time span between the initial shutdown command and actual closing of Unix sockets resulted in an error of invalid file descriptors. Ticket: #6272pull/9714/head
parent
a9851430e2
commit
292fda88b4
Loading…
Reference in New Issue