[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Nbd] nbd-server silently exits if user/group not exist



On Wed, Aug 12, 2009 at 09:04:35PM +0300, Alexander Todorov wrote:
> Hi,
> 
> /etc/nbd-server/config is
> 
> [generic]
>         user = nbd
>         group = nbd
> [export1]
>         exportname = /root/nbd.img
>         listenaddr = 0.0.0.0
>         port = 4444
> 
> if I run (as root)
> # ndb-server it silently exits. If user/group lines are commented out then the
> server is started.
> 
> There's no sign of nbd user or group on my system. The last lines of
> the strace are:
> 
> open("/etc/nbd-server/config", O_RDONLY|O_LARGEFILE) = 3
> fstat64(3, {st_mode=S_IFREG|0644, st_size=187, ...}) = 0
> read(3, "[generic]\n        user = nbd\n    "..., 4096) = 187
> read(3, ""..., 4096)                    = 0
> close(3)                                = 0
> clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
> child_tidptr=0xb7f49728) = 23775
> exit_group(0)                           = ?

That has nothing to do with the users being set, but everything with
daemon() being called. If you want useful strace data, use strace -ff -o
<outputfile>. Warning, this may create many output files.

However, strace really is not a proper debugging tool for open source
software. It may help as a last resort if you don't have the actual
source, but that's all.

In this case, the issue is that nbd-server tries to send an error
message to stdout or stderr, rather than to syslog. Since we're running
as a daemon at that point, we don't have an stdout or stderr. Oops.

> Btw: how do I report issues ? I didn't see Issues tab in SF project page.

By sending mail to this list :-)

I consider the "bug tracking system" of sourceforge to be broken.
Actually, I consider most of sourceforge to be broken these days,
really, and I might move the project to somewhere else (but if/when that
happens, I'll make a proper announcement on this list).

-- 
The biometric identification system at the gates of the CIA headquarters
works because there's a guard with a large gun making sure no one is
trying to fool the system.
  http://www.schneier.com/blog/archives/2009/01/biometrics.html



Reply to: