Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 05 Nov 2010 19:24:10 +0200
From:      Andriy Gapon <avg@freebsd.org>
To:        Kevin Oberman <oberman@es.net>
Cc:        gnome@freebsd.org, bug-followup@freebsd.org
Subject:   Re: ports/151725: sysutils/hal: hald fails to start with dbus-1.4
Message-ID:  <4CD43DBA.1000308@freebsd.org>
In-Reply-To: <4CD43218.60205@freebsd.org>
References:  <20101105161556.0AE311CC0F@ptavv.es.net> <4CD42F13.6020105@icyb.net.ua> <4CD43218.60205@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
on 05/11/2010 18:34 Andriy Gapon said the following:
> Run started hald-probe-scsi (20000) (0)
> !  full path is '/usr/local/libexec/hald-probe-scsi', program_dir is
> '/usr/local/libexec'
> 18:30:33.136 [I] hald_runner.c:110: runner_server_message_handler:
> destination=(null) obj_path=/org/freedesktop/DBus/Local
> interface=org.freedesktop.DBus.Local method=Disconnected
> 18:30:33.136 [I] hald_runner.c:151: runner process disconnected
> *** [DIE] hald_runner.c:runner_died():204 : Runner died
> 

Not sure what is the problem, perhaps someone who knows the code better can come
up with an explanation, but the following informally specified patch seems to fix
the issue for me (verified with 24 hald start-ups):

In hald-runner/runner.c, function run_request_run():

g_free (program_dir);

-if (r->input) {
+if (r->input && strlen(r->input) > 0) {
        if (write(stdin_v, r->input, strlen(r->input)) != (ssize_t) strlen(r->input))
                printf("Warning: Error while writing r->input (%s) to stdin_v.\n",
r->input);
        close(stdin_v);
}

I hope that it's easy to apply this change by hand.
I will have a proper patch once I clean out all my debugging modifications from
the sources.

It looked like the issue was caused by the above write() call after a sufficiently
quick child process had already exited.

-- 
Andriy Gapon



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4CD43DBA.1000308>