Your message dated Wed, 14 Nov 2007 20:47:11 +0000
with message-id <[EMAIL PROTECTED]>
and subject line Bug#451231: fixed in nbd 1:2.9.9-1
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: nbd-server
Version: 2.9.8-1
Severity: important
Tags: patch

Hi,

nbd-server works fine if there is only one export configured in
/etc/nbd-server/config. If there is more than one export, the server
forks to serve the connection, but the child immediately segfaults - see
attached gdb backtrace and strace output. nbd-client just hangs at this
point:

---------------------8<---------------------
dl-client:~# nbd-client dl-server 5053 /dev/nbd0
Negotiation:
---------------------8<---------------------

The attached patch seems to work - I didn't delve to much into the code
though, so take it with a grain of salt. Essentially I copied the
assignment of serve from earlier in the source.

Cheers, Til
Core was generated by `nbd-server'.
Program terminated with signal 11, Segmentation fault.
#0  0x0804ca7d in serveloop (servers=0x8051400) at nbd-server.c:1455
1455                                                    close(serve->socket);
(gdb) bt
#0  0x0804ca7d in serveloop (servers=0x8051400) at nbd-server.c:1455
#1  0x0804cba4 in main (argc=134552808, argv=0x2) at nbd-server.c:1690
Process 2865 attached - interrupt to quit
accept(3, {sa_family=AF_INET, sin_port=htons(4804), 
sin_addr=inet_addr("192.168.5.36")}, [16]) = 5
getpeername(5, {sa_family=AF_INET, sin_port=htons(4804), 
sin_addr=inet_addr("192.168.5.36")}, [16]) = 0
futex(0xb7e9ad08, FUTEX_WAKE, 2147483647) = 0
time([1195032037])                      = 1195032037
open("/etc/localtime", O_RDONLY)        = 6
fstat64(6, {st_mode=S_IFREG|0644, st_size=685, ...}) = 0
fstat64(6, {st_mode=S_IFREG|0644, st_size=685, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0xb7f31000
read(6, "TZif\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0\0\0\4\0"..., 4096) = 685
close(6)                                = 0
munmap(0xb7f31000, 4096)                = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=685, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=685, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=685, ...}) = 0
socket(PF_FILE, SOCK_DGRAM, 0)          = 6
fcntl64(6, F_SETFD, FD_CLOEXEC)         = 0
connect(6, {sa_family=AF_FILE, path="/dev/log"}, 16) = 0
send(6, "<30>Nov 14 10:20:37 nbd_server[2"..., 91, MSG_NOSIGNAL) = 91
open(NULL, O_RDONLY|O_LARGEFILE)        = -1 EFAULT (Bad address)
time([1195032037])                      = 1195032037
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=685, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=685, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=685, ...}) = 0
send(6, "<30>Nov 14 10:20:37 nbd_server[2"..., 89, MSG_NOSIGNAL) = 89
time([1195032037])                      = 1195032037
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=685, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=685, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=685, ...}) = 0
send(6, "<30>Nov 14 10:20:37 nbd_server[2"..., 55, MSG_NOSIGNAL) = 55
clone(Process 2869 attached
child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, 
child_tidptr=0xb7d4e708) = 2869
[pid  2865] close(5)                    = 0
[pid  2865] select(5, [3 4], NULL, NULL, {0, 500} <unfinished ...>
[pid  2869] close(0)                    = 0
[pid  2869] --- SIGSEGV (Segmentation fault) @ 0 (0) ---
Process 2869 detached
<... select resumed> )                  = ? ERESTARTNOHAND (To be restarted)
--- SIGCHLD (Child exited) @ 0 (0) ---
waitpid(-1, [{WIFSIGNALED(s) && WTERMSIG(s) == SIGSEGV}], WNOHANG) = 2869
waitpid(-1, 0xbfe4aeac, WNOHANG)        = -1 ECHILD (No child processes)
=== nbd-server.c
==================================================================
--- nbd-server.c	(revision 3)
+++ nbd-server.c	(local)
@@ -1451,7 +1451,7 @@
 					/* child */
 					g_hash_table_destroy(children);
 					for(i=0;i<servers->len;i++) {
-						serve=g_array_index(servers, SERVER*, i);
+						serve=&(g_array_index(servers, SERVER, i));
 						close(serve->socket);
 					}
 					/* FALSE does not free the

--- End Message ---
--- Begin Message ---
Source: nbd
Source-Version: 1:2.9.9-1

We believe that the bug you reported is fixed in the latest version of
nbd, which is due to be installed in the Debian FTP archive:

nbd-client-udeb_2.9.9-1_powerpc.udeb
  to pool/main/n/nbd/nbd-client-udeb_2.9.9-1_powerpc.udeb
nbd-client_2.9.9-1_powerpc.deb
  to pool/main/n/nbd/nbd-client_2.9.9-1_powerpc.deb
nbd-server_2.9.9-1_powerpc.deb
  to pool/main/n/nbd/nbd-server_2.9.9-1_powerpc.deb
nbd_2.9.9-1.diff.gz
  to pool/main/n/nbd/nbd_2.9.9-1.diff.gz
nbd_2.9.9-1.dsc
  to pool/main/n/nbd/nbd_2.9.9-1.dsc
nbd_2.9.9.orig.tar.gz
  to pool/main/n/nbd/nbd_2.9.9.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [EMAIL PROTECTED],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Wouter Verhelst <[EMAIL PROTECTED]> (supplier of updated nbd package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [EMAIL PROTECTED])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Wed, 14 Nov 2007 20:53:29 +0100
Source: nbd
Binary: nbd-client nbd-server nbd-client-udeb
Architecture: source powerpc
Version: 1:2.9.9-1
Distribution: unstable
Urgency: low
Maintainer: Wouter Verhelst <[EMAIL PROTECTED]>
Changed-By: Wouter Verhelst <[EMAIL PROTECTED]>
Description: 
 nbd-client - the Network Block Device client
 nbd-client-udeb - the Network Block Device client (udeb)
 nbd-server - the Network Block Device server
Closes: 448225 450430 451231
Changes: 
 nbd (1:2.9.9-1) unstable; urgency=low
 .
   * New upstream release
     - Fixes PID file naming; Closes: #450430.
     - Fixes segfault on multiple exports in config file; Closes: #451231.
   * Add experimental LSB headers. Initscript dependency info should really be
     calculated dynamically, but at least this is better than nothing.
     Closes: #448225.
Files: 
 8f50e9530b42118f96eb724fe270649d 603 admin optional nbd_2.9.9-1.dsc
 55e938060caa7826ee8d788f917de69a 208743 admin optional nbd_2.9.9.orig.tar.gz
 ae336dd51414b64f440717084276544b 44718 admin optional nbd_2.9.9-1.diff.gz
 c0d6fe8cfecb5faabd586c0a8420e6c2 52048 admin optional 
nbd-server_2.9.9-1_powerpc.deb
 ace091268d79789903884460fb9d182a 36216 admin optional 
nbd-client_2.9.9-1_powerpc.deb
 e444539bd99b88ef69335b094362387b 6928 debian-installer optional 
nbd-client-udeb_2.9.9-1_powerpc.udeb
Package-Type: udeb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFHO1PFPfwsYq950p4RAgCfAJ9/xT7gJH9JUMu7cUQUgsxyMwGZbQCdEeiK
+J1GFvzjAoS9BSRluE4Xfeg=
=LsX1
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to