[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#204735: Bug#204736: more information on temporary fix



I cannot argue with this.  You are certainly more knowledgeable about this than I !  I am just reporting a bug that has occurred on my system and how I am working around it.  It does seem rather strange that no other similar bugs were reported which tends to make one think this problem is unique to my system.

Many packages have been upgraded since I reported this bug that were also dependent on libc6-2.3.2.  I think I will try to upgrade samba back to the current version in Debian/Sid and see if the problem recurs. I will report back my findings good or bad.

Thanks for responding.

On Sun, 2003-08-17 at 00:34, Steve Langasek wrote:
On Sat, Aug 16, 2003 at 11:22:21PM -0400, Freels, James D. wrote:

> I am assuming that samba will get a new upstream version soon, and get
> built against libc6-2.3.2 and get around this problem.

> I recommend removing the bug report for libc6 and keeping the bug report
> for samba until it works with libc6-2.3.2.

Unless one of the glibc maintainers can show that samba was using
private glibc interfaces that it shouldn't have been, or that the
current Samba binaries are misbuilt due to toolchain issues, I disagree.
Samba hasn't changed here, glibc has -- it's the responsibility of the
libc6 maintainers to ensure that binaries compiled against earlier
versions of the library continue to work (unless they intend to start
shipping libc7 instead).

On my own systems, Samba doesn't seem to show this instability.  I
gather from the backtrace that this is a crash on startup, as that's the
only place that code is called.  There are two possible causes for the
backtrace in question.  One is an actual segfault; the other is an
SMB_ASSERT(), to make sure the provided pid number is positive.  The
code that provides the pid value in question is as follows:

pid_t pidfile_pid(const char *name)
{
        int fd;
        char pidstr[20];
        unsigned ret;
        pstring pidFile;

        slprintf(pidFile, sizeof(pidFile)-1, "%s/%s.pid", lp_piddir(), name);

        fd = sys_open(pidFile, O_NONBLOCK | O_RDONLY, 0644);
        if (fd == -1) {
                return 0;
        }

        ZERO_ARRAY(pidstr);

        if (read(fd, pidstr, sizeof(pidstr)-1) <= 0) {
                goto noproc;
        }

        ret = atoi(pidstr);

        ...
}

The 'ret' is then passed to the following function:

BOOL process_exists(pid_t pid)
{
        /* Doing kill with a non-positive pid causes messages to be
         * sent to places we don't want. */
        SMB_ASSERT(pid > 0);
        return(kill(pid,0) == 0 || errno != ESRCH);
}

If there's something here that should cause a crash, I don't see it.
-- 
James D. Freels, Ph.D.
jdfreels@comcast.net
freelsjd@ornl.gov

Reply to: