patch for bug #9806
sam at liddicott.com
Fri Apr 19 04:37:48 MDT 2013
Ha ha; I just realised that the patch I sent was based on alpha-17.
I attached a patch against 4.0.5 to the bug report.
On Thu, Apr 18, 2013 at 6:12 PM, Sam Liddicott <sam at liddicott.com> wrote:
> Attached is a patch I'm working on for bug #9806
> It is not final, but serves as a talking point - it does not address the
> root cause yet, but rather restarts task services that crash.
> I now understand Jelmer's point on IRC that restarting a crashed service
> was not a goal; for the distribution of structs and config data available
> in service.c, service_task.c and process_standard.c meant that there was no
> neat way to detect a crashed service and properly restart it from a point
> that should be aware that service tasks were processes.
> Really only process_standard.c could care about this and I was able to get
> it to detect crashed processes and attempt to restart, but even though I
> called the new_task callback the old information was left
> in /var/lib/samba/private/smbd.tmp/msg/names.tdb - or so I imagine,
> certainly processes attempted to connect to the old pipe.
> perhaps task_terminate should have been called but the proper information
> to do that is not available in process_standard.c
> Service_task.c routines do have the information but can't really be
> informed about a processes demise or provided with the right information to
> restart it. I could add to service.c some function to restart a server
> service; but in the end I settled for a simpler model where
> process_standard.c would spawn a child whose only purpose was to re-spawn
> the service process which would operate using the pid of it's monitoring
> parent. This meant that the pipes used for communication would retain the
> same name which I think is an advantage.
> I acknowledge that the real issue should be addressed, but feel that
> avoiding user curses gets a high priority and this addresses that.
> I do acknowledge that the winbind task when run in the standard process
> model DOES fork children to deal with each connection, but yet it also will
> crash in the manner outlined in the bugreport when port 88 is blackholed.
More information about the samba-technical