We have reports from a large print server that rpcd_spoolss logs messages like [2023/02/14 07:40:42, 0] ../../source3/rpc_server/spoolss/srv_spoolss_util.c:58(winreg_printer_binding_handle) winreg_printer_binding_handle: Could not connect to winreg pipe: NT_STATUS_NETWORK_BUSY together with samba-dcerpcd in state "D". Highly likely this is due heavy fork() activity from spoolss accessing exclusive winreg services. We need several steps: First, make the listen queue for named pipes configurable and by default much higher than 5. Second, implement a retry loop after the async connect in np_sock_connect_send fails with EAGAIN or alternatively implement a scheme where we somehow connect to the pipe in a blocking fashion. Possibly via a socketpair with one half sent to samba-dcerpcd via the messaging_send() infrastructure, which has a blocking fallback.
Created attachment 17785 [details] Patch This is a proposal for a quick workaround. The real fix must involve some async yet deterministic handling of the connect. Possibly by sending one end of a socketpair via messages_dgm.c, which already has a blocking fallback.
Comment on attachment 17785 [details] Patch Looks good to me as a "quick-fix" for 4.18.0 and below. Happy to help review a more sophisticated fix later.
https://gitlab.com/samba-team/samba/-/merge_requests/2960
This bug was referenced in samba master: 86e95b57d6848482dc73c624c2e8d2bdb79c1d21 f23eb1b3b728d7a13add8c6614d9992aad2c3653 0ab7b84ccbd383bb2f696ce258438d4af57fe6f0 a1780ed8d1b46e4760319b27a4978e7ce7a1df80
Created attachment 17794 [details] git-am fix for 4.18.next Cherry-picked from master.
Created attachment 17795 [details] git-am fix for 4.17.next Cherry-picked and back-ported from master.
Pushed to autobuild-v4-{18,17}-test.
This bug was referenced in samba v4-17-test: 529e76a51dfde8218362ce478e852f53553332d7 32a6eb37fbdc3aa31beb27c81908d20ae9e1e3fd 743d7600fba554306356a8254f0ca041308fa332 bfbb854d7462e486775d087efda63906869218ed
This bug was referenced in samba v4-18-test: 04e0412a659b2542bc9c6d4a22bc443d8445b0ef 06483b02e9db952a17b0590a3ec8d0fe2d132b3e 501ae551da9c49047a2f67e9fec8732aa32309b1 2030aa02ce0be576ca2180adf7cd30efce329825
Closing out bug report. Thanks!
This bug was referenced in samba v4-18-stable (Release samba-4.18.0): 04e0412a659b2542bc9c6d4a22bc443d8445b0ef 06483b02e9db952a17b0590a3ec8d0fe2d132b3e 501ae551da9c49047a2f67e9fec8732aa32309b1 2030aa02ce0be576ca2180adf7cd30efce329825
This bug was referenced in samba v4-17-stable (Release samba-4.17.6): 529e76a51dfde8218362ce478e852f53553332d7 32a6eb37fbdc3aa31beb27c81908d20ae9e1e3fd 743d7600fba554306356a8254f0ca041308fa332 bfbb854d7462e486775d087efda63906869218ed