Bug 81552 - CRASH: draw or impress fail to start if avahi service publishing disabled
Summary: CRASH: draw or impress fail to start if avahi service publishing disabled
Status: RESOLVED FIXED
Alias: None
Product: Impress Remote
Classification: Unclassified
Component: General (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium critical
Assignee: Bryan Quigley
URL:
Whiteboard: target:4.4.0 target:4.3.2 target:4.2.7
Keywords:
: 81037 81349 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-07-19 20:52 UTC by Rene Engelhard
Modified: 2018-10-19 10:18 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
incomplete avahi fix (2.00 KB, patch)
2014-08-02 05:09 UTC, Bryan Quigley
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rene Engelhard 2014-07-19 20:52:28 UTC
From https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=755309:

--- snip ---
I have Avahi service publishing disabled with the following setting in
/etc/avahi/avahi-daemon.conf:

  [publish]
  disable-publishing=yes

Attempting to run either LibreOffice Draw or LibreOffice Impress fails, giving
an error message like this:

  $ soffice --draw
  Adding service 'pangloss'
  Failed to add _impressremote._tcp service: Not permitted
  soffice.bin: client.c:626: avahi_client_free: Assertion `client' failed.

With service publishing enabled, these applications start up normally.

[...]

Disabling service publishing is IMHO a reasonable security measure which is
suggested in the avahi-daemon.conf man page; I use Avahi mDNS as a client for
printer discovery but don't need to broadcast services to the net.  I think
LibreOffice should be able to deal with this without refusing to run.
--- snip ---

I agree...
Comment 1 Jean-Baptiste Faure 2014-07-22 17:01:23 UTC
Seems not been confirmed for me under Ubuntu 14.04. I modified the avahi daemon configuration and restarted the daemon using the following command:
sudo /etc/init.d/avahi-daemon restart
On LO 4.1.6 (TDF build) which is the only version I have where remote control is enabled, Impress and Draw start without problem. I tested with Bluetouth enabled and visible.
Will rebuild 4.2 branch with remote control enabled and test again.

Best regards. JBF
Comment 2 Rene Engelhard 2014-07-22 17:12:18 UTC
jbfaure:

- 4.1.6 didn't have any avahi stuff there so of course it works

- that's only in 4.2.x/4.3.x/.. _and_ you need NON-TDF builds, as TDF builds are not configured with --enable-avahi so that part is not even compiled in. So you of course also would not be able to reproduce this on a TDF-4.2.x. And Remote Control itself is not directly responsible for it but the avahi support for it.
Comment 3 Joel Madero 2014-07-23 02:16:04 UTC
@Rene - of course this should just be put to NEW as you are one of our developers who know their stuff :)
Comment 4 Jean-Baptiste Faure 2014-07-23 06:31:21 UTC
Reproducible with LO 4.2.7.0.0+ build with avahi support. Launching Impress from the StartCenter make LO crashing with the same error message in the terminal as in the bug description.

Same problem when starting Draw. I know that Impress and Draw share many code, but it seems to me that Draw shouldn't be subject to impress-remote connection problems.

Set importance to critical because there is a crash.

Best regards. JBF
Comment 5 Jean-Baptiste Faure 2014-07-23 18:24:49 UTC
*** Bug 81037 has been marked as a duplicate of this bug. ***
Comment 6 Bryan Quigley 2014-08-02 05:09:04 UTC
Created attachment 103851 [details]
incomplete avahi fix

I fixed the original issue by just checking if(client).  However it seems like the issue goes deeper.

Current error is - soffice.bin: thread-watch.c:132: avahi_threaded_poll_start: Assertion `!p->thread_running' failed.  If a return statement is added before "Finally, start the event loop thread" then we don't crash.
Comment 7 Bryan Quigley 2014-08-04 16:33:36 UTC
Submitted a fix in https://gerrit.libreoffice.org/#/c/10735/

My testing was run libreoffice --impress in the following scenarios:
daemon off
daemon on - just disable-publishing=yes
daemon on - just disable-user-service-publishing=yes
daemon on - publishing enabled, check to make sure it works
Comment 8 Commit Notification 2014-08-05 18:44:31 UTC
Bryan Quigley committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=3c57701cf0a169bd8d1893d1b2271d48b8072147

fdo#81552 Fail nicely if avahi doesn't let libreoffice publish items



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 9 Commit Notification 2014-08-08 20:21:53 UTC
Bryan Quigley committed a patch related to this issue.
It has been pushed to "libreoffice-4-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=d2eec11f0a6f27e13a4a834942f8acf20ae62cec&h=libreoffice-4-3

fdo#81552 Fail nicely if avahi doesn't let libreoffice publish items


It will be available in LibreOffice 4.3.2.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 10 Commit Notification 2014-08-08 20:23:39 UTC
Bryan Quigley committed a patch related to this issue.
It has been pushed to "libreoffice-4-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=8de2e9b4bc53e6c097897142bad223c100d36292&h=libreoffice-4-2

fdo#81552 Fail nicely if avahi doesn't let libreoffice publish items


It will be available in LibreOffice 4.2.7.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 11 Buovjaga 2014-10-24 14:28:42 UTC
*** Bug 81349 has been marked as a duplicate of this bug. ***
Comment 12 Robinson Tryon (qubit) 2015-02-13 19:15:37 UTC
Moving bug to (new) 'Impress Remote' product.