>>>>> On Mon, 30 Jul 2007 19:27:43 +0200, Kern Sibbald said: > > On Monday 30 July 2007 19:16, Martin Simmons wrote: > > >>>>> On Mon, 30 Jul 2007 16:48:09 +0200, Kern Sibbald said: > > > > > > On Sunday 29 July 2007 19:28, Ryan Novosielski wrote: > > > > Hi all, > > > > > > > > Ever since I added the TapeAlert/smartmonctl command to my tape drive, > > > > it appears as if I get a fairly regular crash of that bacula-sd. I know > > > > there is a case where Bacula and the utility can go for the tape drive > > > > at the same time and cause problems, but I don't think Bacula should go > > > > KABOOM when this happens. > > > > > > The traceback, unfortunately, doesn't demangle the C++ subroutine names > nor > > > provide source line numbers, but the best that I can tell is that the > > > heap > > > has been corrupted, Bacula detects is, then does a Kaboom (self inflicted > seg > > > fault). > > > > I think there is a bug in bnet_thread_server that causes the Kaboom. > > > > The dlist sockfds contains the fd_ptr objects, which are allocated with > > alloca. The problem is that the dlist destructor will deallocate them using > > free (i.e. sm_free). You can see this in the backtrace, where the argument > to > > sm_free is a pointer into the stack (0xffbff028). > > Oh, that is cute and clever of you to figure out. I'll *certainly* take a > look at it. > > I've never seen such a crash so it must only normally happen on shutdown. Do > you have any idea what is triggering the code that fails in this case?
Right, I can't see any normal way for the main loop of bnet_thread_server to exit in the SD. Something I've wondered occasionally though: is it guaranteed that the use of errno in code like this will give the error generated by select? if ((stat = select(maxfd + 1, &sockset, NULL, NULL, NULL)) < 0) { berrno be; /* capture errno */ if (errno == EINTR)... I.e. could the berrno constructor (poolmem, smartalloc etc) change errno? __Martin ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users