Package: jabber
Version: 1.4.3-3.3
Severity: important

The jabber daemon fails to start on the Linksys NSLU2 (arm). The
following investigation was prompted by a user that sent a message to
the nslu2-linux mailing list [1].

$ sudo apt-get install jabber
Reading package lists... Done
Building dependency tree... Done
The following extra packages will be installed:
 jabber-common libexpat1 libpth20
The following NEW packages will be installed:
 jabber jabber-common libexpat1 libpth20
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 299kB of archives.
After unpacking 907kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://debian.lcs.mit.edu etch/main jabber-common 0.4 [3848B]
Get:2 http://debian.lcs.mit.edu etch/main libexpat1 1.95.8-3.4 [57.1kB]
Get:3 http://debian.lcs.mit.edu etch/main libpth20 2.0.7-6 [76.3kB]
Get:4 http://debian.lcs.mit.edu etch/main jabber 1.4.3-3.3 [162kB]
Fetched 299kB in 2s (108kB/s)
Selecting previously deselected package jabber-common.
(Reading database ... 16255 files and directories currently installed.)
Unpacking jabber-common (from .../jabber-common_0.4_all.deb) ...
Selecting previously deselected package libexpat1.
Unpacking libexpat1 (from .../libexpat1_1.95.8-3.4_arm.deb) ...
Selecting previously deselected package libpth20.
Unpacking libpth20 (from .../libpth20_2.0.7-6_arm.deb) ...
Selecting previously deselected package jabber.
Unpacking jabber (from .../jabber_1.4.3-3.3_arm.deb) ...
Setting up jabber-common (0.4) ...

Setting up libexpat1 (1.95.8-3.4) ...

Setting up libpth20 (2.0.7-6) ...

Setting up jabber (1.4.3-3.3) ...
Starting jabberd: <Failed>invoke-rc.d: initscript jabber, action
"start" failed.dpkg: error processing jabber (--configure):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
jabber
E: Sub-process /usr/bin/dpkg returned an error code (1)


I added set-x to /etc/init.d/jabber to see where the init.d script was
failing, and found that the daemon (jabberd) was not starting
properly.

$ sudo invoke-rc.d jabber start
+ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+ DAEMON=/usr/sbin/jabberd
+ NAME=jabberd
+ DESC=jabberd
+ CONF=/etc/jabber/jabber.xml
+ PID=/var/run/jabber/jabber.pid
+ CMDLINE=
+ . /etc/jabber/functions
+ test -f /usr/sbin/jabberd -a -f /etc/jabber/jabber.xml
+ test -x /etc/jabber/jabber.cfg
+ . /etc/jabber/jabber.cfg
++ export JABBER_HOSTNAME JABBER_SPOOL
+ '[' x '!=' x ']'
+ '[' x '!=' x ']'
+ '[' x '!=' x ']'
+ set -e
+ case "$1" in
+ check_pid
+ '[' -f /var/run/jabber/jabber.pid ']'
+ '[' -r /var/run/jabber/jabber.pid ']'
+++ cat /var/run/jabber/jabber.pid
++ ps -p2247 -o cmd h
+ '[' '/usr/sbin/jabberd ' = '' ']'
+ rm -f /var/run/jabber/jabber.pid
+ echo -n 'Starting jabberd: '
Starting jabberd: + cd /usr/lib/jabber/
+ start-stop-daemon -b -c jabber:adm --start --quiet --pidfile
/var/run/jabber/jabber.pid --exec /usr/sbin/jabberd
+ sleep 2
+ pidof /usr/sbin/jabberd
+ echo -n '<Failed>'
<Failed>+ exit 1
invoke-rc.d: initscript jabber, action "start" failed.


Here is an strace of trying to manually start the daemon (I'm not sure
I can use strace useful in this way, but see the end of this bug
report for more information). I realized afterwards that, at this
stage, I forgot to manually remove the pid file, but I have left this
strace here because I noticed that jabberd attempts to access
/var/run/nscd/socket, but I did not have nscd installed on the test
machine. I'm not sure if jabber requires nscd, but installing it
didn't help. If nscd isn't important, then ignore this strace and look
at the next one.

# strace start-stop-daemon -b -c jabber:adm --start --pidfile
/var/run/jabber/jabber.pid --exec /usr/sbin/jabberd
execve("/sbin/start-stop-daemon", ["start-stop-daemon", "-b", "-c",
"jabber:adm", "--start", "--pidfile", "/var/run/jabber/jabber.pid",
"--exec", "/usr/sbin/jabberd"], [/* 18 vars */]) = 0
uname({sys="Linux", node="LKG7102D7", ...}) = 0
brk(0)                                  = 0x15000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x40015000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=8545, ...}) = 0
mmap2(NULL, 8545, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40016000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\1\1a\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0HO\1\0004"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1091040, ...}) = 0
mmap2(NULL, 1128068, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE,
3, 0) = 0x4001e000
mprotect(0x40125000, 50820, PROT_NONE)  = 0
mmap2(0x4012c000, 12288, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x106) = 0x4012c000
mmap2(0x4012f000, 9860, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4012f000
close(3)                                = 0
mprotect(0x4012c000, 8192, PROT_READ)   = 0
mprotect(0x4001c000, 4096, PROT_READ)   = 0
munmap(0x40016000, 8545)                = 0
brk(0)                                  = 0x15000
brk(0x36000)                            = 0x36000
stat64("/usr/sbin/jabberd", {st_mode=S_IFREG|0755, st_size=155132, ...}) = 0
socket(PF_FILE, SOCK_STREAM, 0)         = 3
fcntl64(3, F_GETFL)                     = 0x2 (flags O_RDWR)
fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
connect(3, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 112) = -1
ENOENT (No such file or directory)
close(3)                                = 0
socket(PF_FILE, SOCK_STREAM, 0)         = 3
fcntl64(3, F_GETFL)                     = 0x2 (flags O_RDWR)
fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
connect(3, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 112) = -1
ENOENT (No such file or directory)
close(3)                                = 0
open("/etc/nsswitch.conf", O_RDONLY)    = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=475, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x40016000
read(3, "# /etc/nsswitch.conf\n#\n# Example"..., 4096) = 475
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x40016000, 4096)                = 0
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=8545, ...}) = 0
mmap2(NULL, 8545, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40016000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libnss_compat.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1a\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\f\20\0\000"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=26268, ...}) = 0
mmap2(NULL, 57952, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x40132000
mprotect(0x40138000, 33376, PROT_NONE)  = 0
mmap2(0x4013f000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x5) = 0x4013f000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libnsl.so.1", O_RDONLY)      = 3
read(3, "\177ELF\1\1\1a\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\3703\0\000"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=68460, ...}) = 0
mmap2(NULL, 108188, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x40141000
mprotect(0x40151000, 42652, PROT_NONE)  = 0
mmap2(0x40158000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xf) = 0x40158000
mmap2(0x4015a000, 5788, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4015a000
close(3)                                = 0
mprotect(0x40158000, 4096, PROT_READ)   = 0
mprotect(0x4013f000, 4096, PROT_READ)   = 0
munmap(0x40016000, 8545)                = 0
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=8545, ...}) = 0
mmap2(NULL, 8545, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40016000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libnss_nis.so.2", O_RDONLY)  = 3
read(3, "\177ELF\1\1\1a\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\244\33\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=34320, ...}) = 0
mmap2(NULL, 66140, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x4015c000
mprotect(0x40164000, 33372, PROT_NONE)  = 0
mmap2(0x4016b000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7) = 0x4016b000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libnss_files.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1a\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\320\32\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=38364, ...}) = 0
mmap2(NULL, 70332, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x4016d000
mprotect(0x40176000, 33468, PROT_NONE)  = 0
mmap2(0x4017d000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x8) = 0x4017d000
close(3)                                = 0
mprotect(0x4017d000, 4096, PROT_READ)   = 0
mprotect(0x4016b000, 4096, PROT_READ)   = 0
munmap(0x40016000, 8545)                = 0
open("/etc/group", O_RDONLY)            = 3
fcntl64(3, F_GETFD)                     = 0
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
_llseek(3, 0, [0], SEEK_CUR)            = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=553, ...}) = 0
mmap2(NULL, 553, PROT_READ, MAP_SHARED, 3, 0) = 0x40016000
_llseek(3, 553, [553], SEEK_SET)        = 0
munmap(0x40016000, 553)                 = 0
close(3)                                = 0
socket(PF_FILE, SOCK_STREAM, 0)         = 3
fcntl64(3, F_GETFL)                     = 0x2 (flags O_RDWR)
fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
connect(3, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 112) = -1
ENOENT (No such file or directory)
close(3)                                = 0
socket(PF_FILE, SOCK_STREAM, 0)         = 3
fcntl64(3, F_GETFL)                     = 0x2 (flags O_RDWR)
fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
connect(3, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 112) = -1
ENOENT (No such file or directory)
close(3)                                = 0
open("/etc/passwd", O_RDONLY)           = 3
fcntl64(3, F_GETFD)                     = 0
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
_llseek(3, 0, [0], SEEK_CUR)            = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=1055, ...}) = 0
mmap2(NULL, 1055, PROT_READ, MAP_SHARED, 3, 0) = 0x40016000
_llseek(3, 1055, [1055], SEEK_SET)      = 0
munmap(0x40016000, 1055)                = 0
close(3)                                = 0
access("/var/run/jabber", F_OK)         = 0
open("/var/run/jabber/jabber.pid", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0600, st_size=4, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x40016000
read(3, "2288", 4096)                   = 4
read(3, "", 4096)                       = 0
readlink("/proc/2288/exe", 0xbed82870, 256) = -1 ENOENT (No such file
or directory)
close(3)                                = 0
munmap(0x40016000, 4096)                = 0
fork()                                  = 2439
--- SIGCHLD (Child exited) @ 0 (0) ---
io_submit(0, 0, 0x8 <unfinished ... exit status 0>
Process 2438 detached

$ dpkg -l nscd
No packages found matching nscd.

$ sudo apt-get install nscd
Reading package lists... Done
Building dependency tree... Done
The following NEW packages will be installed:
 nscd
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 141kB of archives.
After unpacking 311kB of additional disk space will be used.
Get:1 http://debian.lcs.mit.edu etch/main nscd 2.3.6.ds1-13 [141kB]
Fetched 141kB in 2s (66.6kB/s)
Selecting previously deselected package nscd.
(Reading database ... 16310 files and directories currently installed.)
Unpacking nscd (from .../nscd_2.3.6.ds1-13_arm.deb) ...
Setting up jabber (1.4.3-3.3) ...
+ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+ DAEMON=/usr/sbin/jabberd
+ NAME=jabberd
+ DESC=jabberd
+ CONF=/etc/jabber/jabber.xml
+ PID=/var/run/jabber/jabber.pid
+ CMDLINE=
+ . /etc/jabber/functions
+ test -f /usr/sbin/jabberd -a -f /etc/jabber/jabber.xml
+ test -x /etc/jabber/jabber.cfg
+ . /etc/jabber/jabber.cfg
++ export JABBER_HOSTNAME JABBER_SPOOL
+ '[' x '!=' x ']'
+ '[' x '!=' x ']'
+ '[' x '!=' x ']'
+ set -e
+ case "$1" in
+ check_pid
+ '[' -f /var/run/jabber/jabber.pid ']'
+ '[' -r /var/run/jabber/jabber.pid ']'
+++ cat /var/run/jabber/jabber.pid
++ ps -p2288 -o cmd h
+ '[' '/usr/sbin/jabberd ' = '' ']'
+ rm -f /var/run/jabber/jabber.pid
+ echo -n 'Starting jabberd: '
Starting jabberd: + cd /usr/lib/jabber/
+ start-stop-daemon -b -c jabber:adm --start --quiet --pidfile
/var/run/jabber/jabber.pid --exec /usr/sbin/jabberd
+ sleep 2
+ pidof /usr/sbin/jabberd
+ echo -n '<Failed>'
<Failed>+ exit 1
invoke-rc.d: initscript jabber, action "start" failed.
dpkg: error processing jabber (--configure):
 subprocess post-installation script returned error exit status 1
Setting up nscd (2.3.6.ds1-13) ...
Starting Name Service Cache Daemon: nscd.

Errors were encountered while processing:
jabber
E: Sub-process /usr/bin/dpkg returned an error code (1)


In this next attempt, I manually deleted the pid file, and tried
again. This time, the daemon quits because it cannot access
/var/run/jabber/jabber.pid. Yet, /var/run/jabber/jabber.pid does exist
after the daemon has quit, so the forked process must create it.

# rm /var/run/jabber/jabber.pid [EMAIL PROTECTED]:/etc/init.d
# strace start-stop-daemon -b -c jabber:adm --start --pidfile
/var/run/jabber/jabber.pid --exec /usr/sbin/jabberd
execve("/sbin/start-stop-daemon", ["start-stop-daemon", "-b", "-c",
"jabber:adm", "--start", "--pidfile", "/var/run/jabber/jabber.pid",
"--exec", "/usr/sbin/jabberd"], [/* 18 vars */]) = 0
uname({sys="Linux", node="LKG7102D7", ...}) = 0
brk(0)                                  = 0x15000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x40015000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=8545, ...}) = 0
mmap2(NULL, 8545, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40016000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\1\1a\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0HO\1\0004"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1091040, ...}) = 0
mmap2(NULL, 1128068, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE,
3, 0) = 0x4001e000
mprotect(0x40125000, 50820, PROT_NONE)  = 0
mmap2(0x4012c000, 12288, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x106) = 0x4012c000
mmap2(0x4012f000, 9860, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4012f000
close(3)                                = 0
mprotect(0x4012c000, 8192, PROT_READ)   = 0
mprotect(0x4001c000, 4096, PROT_READ)   = 0
munmap(0x40016000, 8545)                = 0
brk(0)                                  = 0x15000
brk(0x36000)                            = 0x36000
stat64("/usr/sbin/jabberd", {st_mode=S_IFREG|0755, st_size=155132, ...}) = 0
socket(PF_FILE, SOCK_STREAM, 0)         = 3
fcntl64(3, F_GETFL)                     = 0x2 (flags O_RDWR)
fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
connect(3, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 112) = 0
poll([{fd=3, events=POLLOUT|POLLERR|POLLHUP, revents=POLLOUT}], 1, 5000) = 1
writev(3, [{"\2\0\0\0\f\0\0\0\6\0\0\0", 12}, {"group\0", 6}], 2) = 18
poll([{fd=3, events=POLLIN|POLLERR|POLLHUP, revents=POLLIN|POLLHUP}],
1, 5000) = 1
recvmsg(3, {msg_name(0)=NULL, msg_iov(1)=[{"group\0", 6}],
msg_controllen=16, {cmsg_len=16, cmsg_level=SOL_SOCKET,
cmsg_type=SCM_RIGHTS, {4}}, msg_flags=0}, MSG_NOSIGNAL) = 6
fstat64(4, {st_mode=S_IFREG|0600, st_size=217016, ...}) = 0
pread(4, "\1\0\0\0h\0\0\0\4\0\0\0\0\0\0\0\27\242\0F\0\0\0\0\323\0"...,
104, 0) = 104
time(NULL)                              = 1174447035
close(4)                                = 0
close(3)                                = 0
socket(PF_FILE, SOCK_STREAM, 0)         = 3
fcntl64(3, F_GETFL)                     = 0x2 (flags O_RDWR)
fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
connect(3, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 112) = 0
poll([{fd=3, events=POLLOUT|POLLERR|POLLHUP, revents=POLLOUT}], 1, 5000) = 1
writev(3, [{"\2\0\0\0\2\0\0\0\4\0\0\0", 12}, {"adm\0", 4}], 2) = 16
poll([{fd=3, events=POLLIN|POLLERR|POLLHUP, revents=POLLIN|POLLHUP}],
1, 5000) = 1
read(3, "\2\0\0\0\1\0\0\0\4\0\0\0\2\0\0\0\4\0\0\0\0\0\0\0", 24) = 24
readv(3, [{"", 0}, {"adm\0x\0", 6}], 2) = 6
read(3, NULL, 0)                        = 0
close(3)                                = 0
socket(PF_FILE, SOCK_STREAM, 0)         = 3
fcntl64(3, F_GETFL)                     = 0x2 (flags O_RDWR)
fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
connect(3, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 112) = 0
poll([{fd=3, events=POLLOUT|POLLERR|POLLHUP, revents=POLLOUT}], 1, 5000) = 1
writev(3, [{"\2\0\0\0\v\0\0\0\7\0\0\0", 12}, {"passwd\0", 7}], 2) = 19
poll([{fd=3, events=POLLIN|POLLERR|POLLHUP, revents=POLLIN|POLLHUP}],
1, 5000) = 1
recvmsg(3, {msg_name(0)=NULL, msg_iov(1)=[{"passwd\0", 7}],
msg_controllen=16, {cmsg_len=16, cmsg_level=SOL_SOCKET,
cmsg_type=SCM_RIGHTS, {4}}, msg_flags=0}, MSG_NOSIGNAL) = 7
fstat64(4, {st_mode=S_IFREG|0600, st_size=217016, ...}) = 0
pread(4, "\1\0\0\0h\0\0\0\0\0\0\0\0\0\0\0\27\242\0F\0\0\0\0\323\0"...,
104, 0) = 104
time(NULL)                              = 1174447035
close(4)                                = 0
close(3)                                = 0
socket(PF_FILE, SOCK_STREAM, 0)         = 3
fcntl64(3, F_GETFL)                     = 0x2 (flags O_RDWR)
fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
connect(3, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 112) = 0
poll([{fd=3, events=POLLOUT|POLLERR|POLLHUP, revents=POLLOUT}], 1, 5000) = 1
writev(3, [{"\2\0\0\0\0\0\0\0\7\0\0\0", 12}, {"jabber\0", 7}], 2) = 19
poll([{fd=3, events=POLLIN|POLLERR|POLLHUP, revents=POLLIN|POLLHUP}],
1, 5000) = 1
read(3, "\2\0\0\0\1\0\0\0\7\0\0\0\2\0\0\0i\0\0\0\376\377\0\0\1\0"..., 36) = 36
read(3, "jabber\0x\0\0/var/run/jabber\0/bin/f"..., 37) = 37
close(3)                                = 0
access("/var/run/jabber", F_OK)         = 0
open("/var/run/jabber/jabber.pid", O_RDONLY|O_LARGEFILE) = -1 ENOENT
(No such file or directory)
fork()                                  = 2598
io_submit(0, 0, 0x8 <unfinished ... exit status 0>
Process 2597 detached
[EMAIL PROTECTED]:/etc/init.d# cat /var/run/jabber/jabber.pid
2598


If I just strace jabberd, I get a segmentation fault.

# strace jabberd
execve("/usr/sbin/jabberd", ["jabberd"], [/* 18 vars */]) = 0
uname({sys="Linux", node="LKG7102D7", ...}) = 0
brk(0)                                  = 0x38000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x40015000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=8545, ...}) = 0
mmap2(NULL, 8545, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40016000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/usr/lib/libexpat.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1a\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\374 \0\000"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=117540, ...}) = 0
mmap2(NULL, 149220, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x4001e000
mprotect(0x40039000, 38628, PROT_NONE)  = 0
mmap2(0x40041000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b) = 0x40041000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/usr/lib/libssl.so.0.9.8", O_RDONLY) = 3
read(3, "\177ELF\1\1\1a\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0h\252\0\000"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=230436, ...}) = 0
mmap2(NULL, 262040, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x40043000
mprotect(0x40079000, 40856, PROT_NONE)  = 0
mmap2(0x40080000, 12288, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x35) = 0x40080000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/usr/lib/libcrypto.so.0.9.8", O_RDONLY) = 3
read(3, "\177ELF\1\1\1a\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0$T\3\0004"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=1169384, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x40019000
mmap2(NULL, 1214040, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE,
3, 0) = 0x40083000
mprotect(0x4018e000, 120408, PROT_NONE) = 0
mmap2(0x40196000, 77824, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10b) = 0x40196000
mmap2(0x401a9000, 9816, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x401a9000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/usr/lib/libpth.so.20", O_RDONLY) = 3
read(3, "\177ELF\1\1\1a\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\3603\0\000"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=63640, ...}) = 0
mmap2(NULL, 101776, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x401ac000
mprotect(0x401bb000, 40336, PROT_NONE)  = 0
mmap2(0x401c3000, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xf) = 0x401c3000
mmap2(0x401c4000, 3472, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x401c4000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libdl.so.2", O_RDONLY)       = 3
read(3, "\177ELF\1\1\1a\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\250\v\0\000"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=9592, ...}) = 0
mmap2(NULL, 41124, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x401c5000
mprotect(0x401c7000, 32932, PROT_NONE)  = 0
mmap2(0x401ce000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1) = 0x401ce000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libresolv.so.2", O_RDONLY)   = 3
read(3, "\177ELF\1\1\1a\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0$$\0\0004"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=63248, ...}) = 0
mmap2(NULL, 104476, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x401d0000
mprotect(0x401de000, 47132, PROT_NONE)  = 0
mmap2(0x401e6000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xe) = 0x401e6000
mmap2(0x401e8000, 6172, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x401e8000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\1\1a\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0HO\1\0004"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1091040, ...}) = 0
mmap2(NULL, 1128068, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE,
3, 0) = 0x401ea000
mprotect(0x402f1000, 50820, PROT_NONE)  = 0
mmap2(0x402f8000, 12288, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x106) = 0x402f8000
mmap2(0x402fb000, 9860, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x402fb000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libpthread.so.0", O_RDONLY)  = 3
read(3, "\177ELF\1\1\1a\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\260=\0\000"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=92378, ...}) = 0
mmap2(NULL, 367872, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x402fe000
mprotect(0x4030d000, 306432, PROT_NONE) = 0
mmap2(0x40314000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xe) = 0x40314000
mmap2(0x40316000, 269568, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40316000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/usr/lib/libz.so.1", O_RDONLY)    = 3
read(3, "\177ELF\1\1\1a\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\254\26\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=84988, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x4001a000
mmap2(NULL, 116668, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x40358000
mprotect(0x4036d000, 30652, PROT_NONE)  = 0
mmap2(0x40374000, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14) = 0x40374000
close(3)                                = 0
mprotect(0x40314000, 4096, PROT_READ)   = 0
mprotect(0x402f8000, 8192, PROT_READ)   = 0
mprotect(0x401e6000, 4096, PROT_READ)   = 0
mprotect(0x401ce000, 4096, PROT_READ)   = 0
mprotect(0x4001c000, 4096, PROT_READ)   = 0
munmap(0x40016000, 8545)                = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
setrlimit(RLIMIT_STACK, {rlim_cur=2044*1024, rlim_max=RLIM_INFINITY}) = 0
getpid()                                = 2777
rt_sigaction(SIGRTMIN, {0x40305e98, [], 0x4000000 /* SA_??? */}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x40305b1c, [RTMIN], 0x4000000 /* SA_??? */},
NULL, 8) = 0
rt_sigaction(SIGRT_2, {0x40305894, [], 0x4000000 /* SA_??? */}, NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [RTMIN], NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RT_1], NULL, 8) = 0
brk(0)                                  = 0x38000
brk(0x59000)                            = 0x59000
chdir("/usr/lib/jabber")                = 0
open("/etc/jabber/jabber.xml", O_RDONLY) = 3
read(3, "<jabber>\n\n  <!--\n  This is the J"..., 8192) = 8192
read(3, "      This enables the server to"..., 8192) = 8192
read(3, "- \n  This is the default server "..., 8192) = 7282
close(3)                                = 0
open("/var/run/jabber/jabber.pid", O_WRONLY|O_CREAT|O_EXCL, 0600) = 3
getpid()                                = 2777
write(3, "2777", 4)                     = 4
close(3)                                = 0
rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGHUP, {0x4030a898, [HUP], SA_RESTART|0x4000000},
{SIG_DFL}, 8) = 0
rt_sigaction(SIGINT, {0x4030a898, [INT], SA_RESTART|0x4000000},
{SIG_DFL}, 8) = 0
rt_sigaction(SIGTERM, {0x4030a898, [TERM], SA_RESTART|0x4000000},
{SIG_DFL}, 8) = 0
pipe([3, 4])                            = 0
fcntl64(3, F_GETFL)                     = 0 (flags O_RDONLY)
fcntl64(3, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
fcntl64(4, F_GETFL)                     = 0x1 (flags O_WRONLY)
fcntl64(4, F_SETFL, O_WRONLY|O_NONBLOCK) = 0
gettimeofday({1174449155, 749493}, NULL) = 0
brk(0x7a000)                            = 0x7a000
gettimeofday({1174449155, 755698}, NULL) = 0
rt_sigprocmask(SIG_BLOCK, [USR1], [RTMIN], 8) = 0
rt_sigaction(SIGUSR1, {0x4030a898, [], SA_STACK}, {SIG_DFL}, 8) = 0
sigaltstack({ss_sp=0x49288, ss_flags=0, ss_size=65536}, {ss_sp=0,
ss_flags=SS_DISABLE, ss_size=0}) = 0
getpid()                                = 2777
kill(2777, SIGUSR1)                     = 0
rt_sigsuspend(~[USR1] <unfinished ...>
--- SIGUSR1 (User defined signal 1) @ 0 (0) ---
<... rt_sigsuspend resumed> )           = 10
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
Process 2777 detached

I did try to build jabber with debugging symbols included (export
DEB_BUILD_OPTS=nostrip,noopt; dpkg-buildpackage -rfakeroot -uc -us),
but it appears that there was no debugging information added to the
binary. I am not sure whether the build scripts for jabber obey
DEB_BUILD_OPTS. I am happy to try again if somebody tells me how to
include debugging information.

# gdb jabberd
GNU gdb 6.4.90-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "arm-linux-gnu"...(no debugging symbols found)
Using host libthread_db library "/lib/libthread_db.so.1".

(gdb) run
Starting program: /usr/sbin/jabberd
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 16384 (LWP 4499)]
(no debugging symbols found)
(no debugging symbols found)

Program received signal SIGUSR1, User defined signal 1.
[Switching to Thread 16384 (LWP 4499)]
0x40214744 in sigsuspend () from /lib/libc.so.6


At this point, I gave up trying to debug the problem, and filed this
bug report. I do realize that this bug report has been filed close to
the release of etch...


-- System Information:
Debian Release: 4.0
 APT prefers testing
 APT policy: (500, 'testing')
Architecture: arm (armv5tel)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-4-ixp4xx
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages jabber depends on:
ii  jabber-common               0.4          Jabber server and transport (commo
ii  libc6                       2.3.6.ds1-13 GNU C Library: Shared libraries
ii  libexpat1                   1.95.8-3.4   XML parsing C library - runtime li
ii  libpth20                    2.0.7-6      The GNU Portable Threads
ii  libssl0.9.8                 0.9.8c-4     SSL shared libraries
ii  procps                      1:3.2.7-3    /proc file system utilities

jabber recommends no packages.

-- no debconf information

[1] http://news.gmane.org/gmane.comp.misc.nslu2.linux

--
Gordon Farquharson


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to