Bug 72251

Summary: bus-test dispatch test fail on FreeBSD 9.1
Product: dbus Reporter: Chengwei Yang <chengwei.yang.cn>
Component: coreAssignee: D-Bus Maintainers <dbus>
Status: RESOLVED MOVED QA Contact: D-Bus Maintainers <dbus>
Severity: normal    
Priority: medium CC: chengwei.yang.cn, msniko14
Version: 1.5Keywords: patch
Hardware: All   
OS: All   
Whiteboard: review?
i915 platform: i915 features:
Attachments: The last 2000 lines of test-service log when it fail
[PATCH] Disconnect client if the socket hang up

Description Chengwei Yang 2013-12-03 01:16:49 UTC
After applied patch to fix #bug72213

./bus/bus-test test/data dispatch

still fails like below

Activating service name='org.freedesktop.DBus.TestSuiteEchoService'
Successfully activated service 'org.freedesktop.DBus.TestSuiteEchoService'
Activating service name='org.freedesktop.DBus.TestSuiteEchoService'
Successfully activated service 'org.freedesktop.DBus.TestSuiteEchoService'
Activating service name='org.freedesktop.DBus.TestSuiteEchoService'
Failed to activate service 'org.freedesktop.DBus.TestSuiteEchoService': timed out
Did not expect error org.freedesktop.DBus.Error.TimedOut
existent_service_no_auto_start failed during oom
File "dispatch.c" line 4445 process 91803 should not have been reached: test failed
  D-Bus not compiled with backtrace support so unable to print a backtrace
Abort trap (core dumped)
Comment 1 Chengwei Yang 2013-12-03 03:25:29 UTC
Created attachment 90134 [details]
The last 2000 lines of test-service log when it fail

See the log attached, from 1845, the poll(2) on FreeBSD 9.1 always returns revent = POLLHUP. So at last the connection fail to authenticate. And "StartServiceByName" failed with "TimedOut".

Not for sure why the client socket is POLLHUP so far.
Comment 2 Chengwei Yang 2013-12-03 04:57:33 UTC
Created attachment 90142 [details] [review]
[PATCH] Disconnect client if the socket hang up

The patch to disconnect client if its socket hang up.

After the patch applied, bus/bus-test test/data dispatch on FreeBSD complains 2 blocks leak, after patches from #bug69332 applied, there still 1 block leaks. So need another patch.
Comment 3 Chengwei Yang 2013-12-03 07:23:47 UTC
(In reply to comment #2)
> Created attachment 90142 [details] [review] [review]
> [PATCH] Disconnect client if the socket hang up
> 
> The patch to disconnect client if its socket hang up.
> 
> After the patch applied, bus/bus-test test/data dispatch on FreeBSD
> complains 2 blocks leak, after patches from #bug69332 applied, there still 1
> block leaks. So need another patch.

Patches (in total two) for #bug69332 updated and after those two patches applied, no memleak now.
Comment 4 Simon McVittie 2014-04-30 18:54:11 UTC
Comment on attachment 90142 [details] [review]
[PATCH] Disconnect client if the socket hang up

Review of attachment 90142 [details] [review]:
-----------------------------------------------------------------

This... seems reasonable? But it's such a simple thing that I'm concerned I'm missing a good reason why it wasn't like this already, so don't count this as a positive review yet.
Comment 5 GitLab Migration User 2018-10-12 21:17:05 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/dbus/dbus/issues/91.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.