[Bug 1820584] Re: seahorse assert failure: seahorse: glib-watch.c:195: timeout_update: Assertion `!t->dead' failed.

Elias Rudberg 1820584 at bugs.launchpad.net
Wed Feb 10 21:18:27 UTC 2021


After some more digging and having reproduced the issue a few more
times, here is what seems to happen.

Seahorse is running, using the avahi library. Seahorse has called
avahi_glib_poll_new() and some AvahiTimeout timeouts have been created.

Then things are stopped because the computer is about to be rebooted.
Seahorse is closing down and therefore does some cleanup, among other
things it calls avahi_glib_poll_free() which calls cleanup_timeouts()
which destroys all the timeouts.

However, after the timeouts were destroyed, there still exists a pointer
to one of those timeouts in the dispatch_timeout member in a
ConnectionData struct. For some reason the dispatch_timeout_callback()
function is called at this point, and it does "ConnectionData *d =
userdata" and that ConnectionData struct has inside it a
dispatch_timeout pointer which is now invalid because the timeout was
destroyed, its memory was freed, as a result of the
avahi_glib_poll_free() call earlier. dispatch_timeout_callback() passes
the ConnectionData *d to request_dispatch() which calls timeout_update()
passing the invalid d->dispatch_timeout pointer, which is then used and
happens to point to some garbage which gives the assertion failure.

Not sure exactly how to fix the problem, but it seems bad that pointers
to destroyed data structures are still lying around, maybe things should
be destroyed in a different order.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to avahi in Ubuntu.
https://bugs.launchpad.net/bugs/1820584

Title:
  seahorse assert failure: seahorse: glib-watch.c:195: timeout_update:
  Assertion `!t->dead' failed.

Status in avahi package in Ubuntu:
  Confirmed

Bug description:
  ---------------------------------------------------------
  Description:	Ubuntu Disco Dingo (development branch)
  Release:	19.04
  ---------------------------------------------------------
  seahorse:
    Installed: 3.32-1
    Candidate: 3.32-1
    Version table:
   *** 3.32-1 500
          500 http://br.archive.ubuntu.com/ubuntu disco/main amd64 Packages
          100 /var/lib/dpkg/status
  ---------------------------------------------------------

  I have absolutely no idea why or how. Just collected this report from
  apport-cli.

  Some times receiving "internal error" reports, no details provided,
  just "Cancel" or "Send report" options. So, I decided to check apport
  and there was this report.

  ProblemType: Crash
  DistroRelease: Ubuntu 19.04
  Package: seahorse 3.32-1
  ProcVersionSignature: Ubuntu 5.0.0-7.8-generic 5.0.0
  Uname: Linux 5.0.0-7-generic x86_64
  NonfreeKernelModules: nvidia_modeset nvidia
  ApportVersion: 2.20.10-0ubuntu23
  Architecture: amd64
  AssertionMessage: seahorse: glib-watch.c:195: timeout_update: Assertion `!t->dead' failed.
  CurrentDesktop: ubuntu:GNOME
  Date: Sun Mar 17 18:09:01 2019
  ExecutablePath: /usr/bin/seahorse
  InstallationDate: Installed on 2019-03-17 (0 days ago)
  InstallationMedia: Ubuntu 19.04 "Disco Dingo" - Alpha amd64 (20190316)
  ProcCmdline: /usr/bin/seahorse --gapplication-service
  Signal: 6
  SourcePackage: seahorse
  StacktraceTop:
   __assert_fail_base (fmt=0x7f733ae49588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x7f733aecf02d "!t->dead", file=0x7f733aecf000 "glib-watch.c", line=195, function=<optimized out>) at assert.c:92
   __GI___assert_fail (assertion=0x7f733aecf02d "!t->dead", file=0x7f733aecf000 "glib-watch.c", line=195, function=0x7f733aecf1d8 "timeout_update") at assert.c:101
   ?? () from /lib/x86_64-linux-gnu/libavahi-glib.so.1
   ?? () from /lib/x86_64-linux-gnu/libavahi-client.so.3
   ?? () from /lib/x86_64-linux-gnu/libavahi-glib.so.1
  Title: seahorse assert failure: seahorse: glib-watch.c:195: timeout_update: Assertion `!t->dead' failed.
  UpgradeStatus: No upgrade log present (probably fresh install)
  UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo
  separator:

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/avahi/+bug/1820584/+subscriptions



More information about the foundations-bugs mailing list