Segfault

Bug #134572 reported by Pavel Mlčoch
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nbd (Ubuntu)
Fix Released
Undecided
Scott Balneaves

Bug Description

Binary package hint: nbd-server

nbd server segfault for every start, but its running.

pavka@pavka:~$ sudo /etc/init.d/nbd-server restart
Restarting the Network Block Device server is pretty harsh on clients still using it.
waiting 5 seconds...You have been warned!
Restarting Network Block Device server: Stopping Network Block Device server: nbd-server.
Segmentation fault (core dumped)
 nbd-server.
pavka@pavka:~$ ps aux | grep nbd
nobody 2865 0.0 0.0 1752 496 ? Ss 18:11 0:00 /bin/sh /usr/sbin/nbdrootd /opt/ltsp/images/i386.img
nobody 2866 0.0 0.0 3428 944 ? S 18:11 0:00 /bin/nbd-server 0 /opt/ltsp/images/i386.img -r -C /dev/null
pavka 10508 0.0 0.0 2984 796 pts/5 S+ 19:55 0:00 grep nbd
pavka@pavka:~$

Revision history for this message
Oliver Grawert (ogra) wrote :

which version of nbd-server is that ?

Revision history for this message
Scott Balneaves (sbalneav) wrote :

I'll poke it.

Changed in nbd:
assignee: nobody → sbalneav
Revision history for this message
Pavel Mlčoch (pavkamlc) wrote :

pavka@pavka:~$ dpkg -l | grep nbd
ii nbd-client 1:2.9.6-1ubuntu1 the Network Block Device client
ii nbd-server 1:2.9.6-1ubuntu1 the Network Block Device server
ii nbd-server-dbgsym 1:2.9.6-1ubuntu1 debug symbols for package nbd-server

Revision history for this message
Oliver Grawert (ogra) wrote :

since nbd-server runs from inetd here we should just add an /etc/default/nbd-server file to the package and have a FROM_INETD (or so) variable in there.

source that file from the initscript and exit if the variable is set.

Revision history for this message
Scott Balneaves (sbalneav) wrote :

Poked into this tonight. Turns out a variable is dereferenced when it's not being set. I've patched the source, and hobbsee was about, and has uploaded a patch. We'll see if the autoclose magic works....

Scott

Changed in nbd:
status: New → Fix Committed
Revision history for this message
Pavel Mlčoch (pavkamlc) wrote :

After upgrade here is in package wrong config file:

root@pavka:/home/pavka# sudo dpkg --force-all --purge nbd-server
dpkg: nbd-server: problém se závislostmi, ale odstraňuji podle požadavku:
 ltsp-server-standalone závisí na nbd-server.
 ltsp-server závisí na nbd-server.
(Čtu databázi ... nyní je nainstalováno 657368 souborů a adresářů.)
Odinstalování balíku nbd-server ...
Stopping Network Block Device server: nbd-server.
Odstraňuji konfigurační soubory balíku nbd-server ...
root@pavka:/home/pavka# sudo apt-get install --reinstall nbd-server
Čtu seznamy balíků... Hotovo
Vytvářím strom závislostí
Reading state information... Hotovo
Následující NOVÉ balíky budou nainstalovány:
  nbd-server
0 aktualizováno, 1 nově instalováno, 0 k odstranění a 0 neaktualizováno.
Potřebuji stáhnout 0B/38,7kB archivů.
Po rozbalení bude na disku použito dalších 156kB.
VAROVÁNÍ: Následující balíky nemohou být autentizovány!
  nbd-server
Autentizační varování potlačeno.
Přednastavuji balíky...
Instaluji balík nbd-server.
(Čtu databázi ... nyní je nainstalováno 657365 souborů a adresářů.)
Rozbaluji nbd-server (z .../nbd-server_1%3a2.9.6-1ubuntu2_i386.deb) ...
Nastavuji balík nbd-server (1:2.9.6-1ubuntu2) ...

Creating config file /etc/nbd-server/config with new version

** (process:29067): WARNING **: Could not parse config file: Unknown error
** Message: Nothing to do! Bye!
 nbd-server.

root@pavka:/home/pavka#

Revision history for this message
Scott Balneaves (sbalneav) wrote :

By default, nbd-server comes shipped with a pretty empty config file. Personally, The error really isn't appropriate, it isn't that there's something WRONG with the config file, just that there's no stanzas in the config file that nbd-server wants. The error is bogus, and nbd-server simply exits, as it's supposed to. Personally, I'll talk to Wouter upstream, and see if I can get the error message changed to something a little less frightening. Something like "No configured services, exiting." or like that.

Cheers,
Scott

Revision history for this message
Pavel Mlčoch (pavkamlc) wrote :

I think, this package isn't shipped with a empty config file, but with wrong file. Ive problem with right configuration, because /usr/share/doc/nbd-server/ don't contains documentation and in man page istn config file overwriten too. Perfect error message will be path to right documentation or is possible add to package example config file.

pavka@pavka:~$ sudo cat /etc/nbd-server/config
[generic]
# If you want to run everything as root rather than the nbd user, you
# may either say "root" in the two following lines, or remove them
# altogether. Do not remove the [generic] section, however.
        user = nbd
        group = nbd

# What follows are export definitions. You may create as much of them as
# you want, but the section header has to be unique.
pavka@pavka:~$

Revision history for this message
Oliver Grawert (ogra) wrote :

that was fixed long ago i think ...

Changed in nbd:
status: Fix Committed → Fix Released
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.