Avahi on NGW100

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm trying to get avahi-daemon up and running on the NGW100.

I have enabled avahi, ipv4ll and the mDNS daemon.

All compile with no problems, but when I run avahi-daemon it just segfaults, as shown below ...

Has anyone managed to get the daemon running ?
Have I missed something ?

Thanks for any help
Mark

... Update ...

I've now d/led the latest Atmel buildroot (2.2.0-rc4), and it still does the same ... i.e.

$ make atngw100_defconfig
$ make menuconfig
(select expat and mdns daemon)
$ make
(Note : the make failed when installing avahi-daemon, with a "missing .installed" dependency. I just did a "touch .installed" in the avahi build directory, which seemed to fix it)

Copy kernel and extract tarball to nfs server
Reboot the ngw100
At the sheel prompt, type:-

> avahi-daemon --help
Segmentation fault

The strace output looks the same , so any ideas guys ?

execve("/usr/sbin/avahi-daemon", ["avahi-daemon", "--help"], [/* 8 vars */]) = 0
mmap(NULL, 20, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aab0000
stat("/etc/ld.so.cache", {st_mode=S_IFREG|0644, st_size=1465, ...}) = 0
open("/etc/ld.so.cache", O_RDONLY)      = 4
mmap(NULL, 1465, PROT_READ, MAP_SHARED, 4, 0) = 0x2aab1000

close(4)                                = 0
open("/usr/lib/libavahi-common.so.3", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0755, st_size=31268, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aab2000
read(4, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\30\255\0\0\0\1\0\0"..., 4096) = 4096
mmap(NULL, 36864, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aab3000
mmap(0x2aab3000, 29124, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 4, 0) = 0x2aab3000
mmap(0x2aabb000, 1748, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4, 0x7) = 0x2aabb000
close(4)                                = 0
munmap(0x2aab2000, 4096)                = 0
open("/usr/lib/libavahi-core.so.5", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0755, st_size=130608, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aab2000
read(4, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\30\255\0\0\0\1\0\0"..., 4096) = 4096
mmap(NULL, 135168, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aabc000
mmap(0x2aabc000, 125568, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 4, 0) = 0x2aabc000
mmap(0x2aadb000, 6880, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4, 0x1e) = 0x2aadb000
close(4)                                = 0
munmap(0x2aab2000, 4096)                = 0
open("/usr/lib/libexpat.so.1", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0755, st_size=91140, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aab2000
read(4, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\30\255\0\0\0\1\0\0"..., 4096) = 4096
mmap(NULL, 98304, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aadd000
mmap(0x2aadd000, 84444, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 4, 0) = 0x2aadd000
mmap(0x2aaf2000, 8372, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4, 0x14) = 0x2aaf2000
close(4)                                = 0
munmap(0x2aab2000, 4096)                = 0
open("/lib/libdl.so.0", O_RDONLY)       = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=5460, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aab2000
read(4, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\30\255\0\0\0\1\0\0"..., 4096) = 4096
mmap(NULL, 12288, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaf5000
mmap(0x2aaf5000, 4504, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 4, 0) = 0x2aaf5000
mmap(0x2aaf7000, 744, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4, 0x1) = 0x2aaf7000
close(4)                                = 0
munmap(0x2aab2000, 4096)                = 0
open("/lib/libc.so.0", O_RDONLY)        = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=260136, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aab2000
read(4, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\30\255\0\0\0\1\0\0"..., 4096) = 4096

mmap(NULL, 282624, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaf8000
mmap(0x2aaf8000, 252380, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 4, 0) = 0x2aaf8000
mmap(0x2ab36000, 8800, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4, 0x3d) = 0x2ab36000
mmap(0x2ab39000, 15548, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2ab39000
close(4)                                = 0
munmap(0x2aab2000, 4096)                = 0
open("/lib/libpthread.so.0", O_RDONLY)  = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=55000, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aab2000
read(4, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\30\255\0\0\0\1\0\0"..., 4096) = 4096
mmap(NULL, 69632, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ab3d000
mmap(0x2ab3d000, 35444, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 4, 0) = 0x2ab3d000
mmap(0x2ab46000, 21280, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4, 0x8) = 0x2ab46000
mmap(0x2ab4c000, 5344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2ab4c000
close(4)                                = 0
munmap(0x2aab2000, 4096)                = 0
open("/lib/libc.so.0", O_RDONLY)        = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=260136, ...}) = 0
close(4)                                = 0
open("/usr/lib/libavahi-common.so.3", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0755, st_size=31268, ...}) = 0
close(4)                                = 0
open("/lib/libc.so.0", O_RDONLY)        = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=260136, ...}) = 0
close(4)                                = 0
open("/lib/libc.so.0", O_RDONLY)        = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=260136, ...}) = 0
close(4)                                = 0
open("/lib/libc.so.0", O_RDONLY)        = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=260136, ...}) = 0
close(4)                                = 0
open("/lib/libc.so.0", O_RDONLY)        = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=260136, ...}) = 0
close(4)                                = 0
munmap(0x2aab1000, 1465)                = 0
stat("/lib/ld-uClibc.so.0", {st_mode=S_IFREG|0755, st_size=15316, ...}) = 0
ioctl(0, TCGETS, {B115200 opost isig icanon echo ...}) = 0
ioctl(1, TCGETS, {B115200 opost isig icanon echo ...}) = 0
getpid()                                = 434
old_getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
setrlimit(RLIMIT_STACK, {rlim_cur=2040*1024, rlim_max=RLIM_INFINITY}) = 0
rt_sigaction(SIGRTMIN, {0x2ab45858, [], 0x4000000 /* SA_??? */}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x2ab457a4, [RTMIN], 0x4000000 /* SA_??? */}, NULL, 8) = 0
rt_sigaction(SIGRT_2, {0x2ab44f94, [], 0x4000000 /* SA_??? */}, NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [RTMIN], NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RT_1], NULL, 8) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
Process 434 detached
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just to update this thread ...

This turned out to be the fact that avahi needed to be configured slightly differently ... it required an extra LDFLAGS+="-lpthread".

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ah, it's probably the "program crashes before main() if pthread is sucked in through some other library" bug that was reported a couple of weeks back. It's been fixed in uClibc upstream, but the latest release, 0.9.29, is buggy. So if you don't want to use a snapshot, linking the main program with -lpthread, as you suggested, should do the trick.