bacula-director crashes when nsswitch uses wins for hosts

Bug #590894 reported by Tomasz
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bacula
New
Undecided
Unassigned
bacula (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

When invoking "status client" for a client Bacula crashes and logs:

Bacula interrupted by signal 11: Segmentation violation

Possible cause is using wins for host name resolution. In Ubuntu 8.04 LTS there were no problems, after upgrade to 10.04 LTS it stopped working.

Revision history for this message
Tomasz (nowak2000) wrote :
Revision history for this message
Tomasz (nowak2000) wrote :
Revision history for this message
Tomasz (nowak2000) wrote :

manual workaround:
1. ping foo
PING foo (192.168.1.23) 56(84) bytes of data.
64 bytes from foo (192.168.1.23): icmp_seq=1 ttl=128 time=0.263 ms

2. add in /etc/hosts
192.168.1.23 foo

Now bacula works for this client as expected.

Tomasz (nowak2000)
description: updated
Revision history for this message
Mathias Gug (mathiaz) wrote :

Could you outline which bacula process crashes? Could you outline specific steps to reproduce your issue?

Changed in bacula (Ubuntu):
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
Tomasz (nowak2000) wrote :

As the subject says - this bug is about bacula-dir (one of other components crashes also, but I don't remember which one).

Steps:
1. Enable wins hosts resolution, see attached nsswitch.
2. Install on a Windows machine a file daemon, version 2.x.
2. Prepare a job where Client=HOSTNAME-FD, where HOSTNAME-FD is the above mentioned machine - to be resolved with wins.
3. Run the job.

Revision history for this message
Tomasz (nowak2000) wrote :
Revision history for this message
Tomasz (nowak2000) wrote :

Debugging shows problem in bacula-5.0.1/src/lib/bnet.c, function
dlist *bnet_host2ipaddrs(const char *host, int family, const char **errstr)

There are some ifdefs depending on HAVE_IPV6 that may cause this trouble!

Revision history for this message
Chuck Short (zulcss) wrote :

I have submitted this bug upstream as:

http://bugs.bacula.org/view.php?id=1629

chuck

Changed in bacula (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Kern Sibbald (kern) wrote : Re: [Bug 590894] Re: bacula-director crashes when nsswitch uses wins for hosts

On Wednesday 25 August 2010 10:01:27 Chuck Short wrote:
> I have submitted this bug upstream as:
>
> http://bugs.bacula.org/view.php?id=1629
>
> chuck
>
> ** Bug watch added: bugs.bacula.org/ #1629
> http://bugs.bacula.org/view.php?id=1629
>
> ** Changed in: bacula (Ubuntu)
> Status: Incomplete => Confirmed

Thanks -- I have responded to bug report. Bottom line: we need a stack trace
to determine where the problem is occurring, or some step by step
instructions on how to reproduce it (I don't use WINS or even know how to
turn it on).

Kern

Revision history for this message
Tomasz (nowak2000) wrote :

There is an attachment - see on the right side of the page "Bug attachments" -> "debug messages and running under gdb"
Thanks

Revision history for this message
Kern Sibbald (kern) wrote : Re: [Bug 590894] Re: bacula-director crashes when nsswitch uses wins for hosts

> There is an attachment - see on the right side of the page "Bug
> attachments" -> "debug messages and running under gdb"

It is just as I suspected: Bacula has called gethostbyname, which then seg
faults when in the wins code. Unless Bacula is passing bad arguments to
gethostbyname, which is highly unlikely, it is not a Bacula bug.

It seems to me that someone has reported this some time ago, so I suspect
it may not be a "Ubuntu" version bug.

Unless someone can show me that Bacula is doing something wrong, I'm
assuming at this point that it as an "upstream" OS or library bug.

Kern

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.