Bug 90004

Summary: Missing newline in dbus_trace_ref verbose output
Product: dbus Reporter: Ralf Habacker <ralf.habacker>
Component: coreAssignee: D-Bus Maintainers <dbus>
Status: RESOLVED FIXED QA Contact: D-Bus Maintainers <dbus>
Severity: normal    
Priority: medium Keywords: patch
Version: 1.8   
Hardware: Other   
OS: All   
Whiteboard: review+
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 90005    
Attachments: Add newline to verbose output in _dbus_trace_ref().
Fix 'dbus connection referencing issue in test-relay'.

Description Ralf Habacker 2015-04-13 06:24:31 UTC
dbus code provide an environment variable to DBUS_CONNECTION_TRACE to dump connection referencing like shown below.

13465: [dbus/dbus-internals.c(521):_dbus_trace_ref] DBusConnection 0x1490e00 3 -> 4 refs (ref_unlocked)[dbus/dbus-internals.c(521):_dbus_trace_ref]

This output misses a newline at the end of each reference dump. 

The expected output format is shown below: 

30122: [dbus/dbus-internals.c(521):_dbus_trace_ref] DBusConnection 0x1e1cf50 6 -> 5 refs (unref_unlocked)
30122: [dbus/dbus-internals.c(521):_dbus_trace_ref] DBusConnection 0x1e1cf50 5 -> 6 refs (ref_unlocked)
30122: [dbus/dbus-internals.c(521):_dbus_trace_ref] DBusConnection 0x1e1cf50 6 -> 5 refs (unref)

The appended patch fixes this issue.
Comment 1 Simon McVittie 2015-04-13 10:47:05 UTC
(In reply to Ralf Habacker from comment #0)
> The appended patch fixes this issue.

You forgot to attach the patch?
Comment 2 Ralf Habacker 2015-04-13 11:27:46 UTC
(In reply to Simon McVittie from comment #1)
> (In reply to Ralf Habacker from comment #0)
> > The appended patch fixes this issue.
> 
> You forgot to attach the patch?

Seems to be a bug in bugzilla :-( I added a patch on bug creation. Will readd later.
Comment 3 Ralf Habacker 2015-04-13 13:06:07 UTC
Created attachment 115055 [details] [review]
Add newline to verbose output in _dbus_trace_ref().
Comment 4 Ralf Habacker 2015-04-13 13:08:15 UTC
Created attachment 115056 [details] [review]
Fix 'dbus connection referencing issue in test-relay'.
Comment 5 Ralf Habacker 2015-04-13 13:08:37 UTC
Comment on attachment 115056 [details] [review]
Fix 'dbus connection referencing issue in test-relay'.

added to wrong bug :-(
Comment 6 Simon McVittie 2015-04-13 13:25:06 UTC
Comment on attachment 115055 [details] [review]
Add newline to verbose output in _dbus_trace_ref().

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

Yes please!
Comment 7 Ralf Habacker 2015-04-13 13:32:53 UTC
Comment on attachment 115055 [details] [review]
Add newline to verbose output in _dbus_trace_ref().

committed to dbus-1.8
Comment 8 Simon McVittie 2015-04-13 16:30:53 UTC
(In reply to Ralf Habacker from comment #7)
> committed to dbus-1.8

This is such a trivial change that I'm probably not going to revert it, but in future please avoid committing stuff like this on stable-branches. Every change in a stable-branch is something that Linux distributions' QA people have to look at when deciding whether to approve a new version as "yes, this is a minimal fix"; and the more changes there are, the more likely they are to decide to do their own mini-fork of dbus instead, which hurts everyone in the long run.

I would like change-averse distributions to be able to follow our stable branches.

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.