[Linux-cluster] qdiskd does not start

Stephan Windmüller stephan.windmueller at cs.uni-dortmund.de
Tue Jun 3 09:27:19 UTC 2008


On Tue, 03. Jun 2008, Stephan Windmüller wrote:

> With strace I see that qdiskd reads /var/run/qdiskd.pid and tries to
> access this process (which is not running any more). Even when I delete
> this pid-file nothing changes.

After reading parts of the source code I think that I found the problem.
In qdisk/main.c the function daemon_init is called:

| if (daemon_init(argv[0]) < 0)
|     goto out;

But the type of daemon_init is "void" and it does not return a value:

| void
| daemon_init(char *prog)
| {
|
|       [...]
|
|       daemon(0, 0);
|
|       update_pidfile(prog);
| }

I do not understand why the linker does not produce an error here. Also it
seems unwanted that daemon_init dies with "exit(1)" when an error occurs
instead of returning -1.

However, qdiskd will always exit when daemonized with this code. I removed the
comparison < 0 and got this in syslog:

| qdiskd: <info> Initial score 3/3 
| qdiskd: <info> Initialization complete 
| qdiskd: <notice> Score sufficient for master operation (3/3; required=1); upgrading 
| qdiskd: <debug> Making bid for master 
| qdiskd: <info> Assuming master role 

But after that "cman_tool status" hangs and produces no output.

- Stephan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/linux-cluster/attachments/20080603/2d18c746/attachment.sig>


More information about the Linux-cluster mailing list