Your message dated Sat, 26 Jan 2013 18:17:35 +0000
with message-id <e1tzajr-0003np...@franck.debian.org>
and subject line Bug#697173: fixed in epiphany-browser 3.4.2-2.1
has caused the Debian Bug report #697173,
regarding ia64 (Itanium), race condition on the start of the history service 
thread
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
697173: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=697173
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: epiphany-browser
Version: 3.4.2-2
Severity: serious
Tags: patch


Machine: Dell PowerEdge 3250
Processor: 2x Itanium Madison 1.5GHz 6M
Memory: 16G


While working on bug#642750, I realized a failing assertion in the epiphany browser:
    at lib/history/ephy-history-service.c:363
          g_assert (priv->history_thread == g_thread_self ());

The assertion failed almost often upon the start of epiphany browser; sometimes epiphany could start with success.


The ephy_history_service_init() function creates a new thread (using g_thread_new()); run_history_service_thread() is the starting function of the thread.

static void
ephy_history_service_init (EphyHistoryService *self)
{
  self->priv = EPHY_HISTORY_SERVICE_GET_PRIVATE (self);

self->priv->history_thread = g_thread_new ("EphyHistoryService", (GThreadFunc) run_history_service_thread, self);
  self->priv->queue = g_async_queue_new ();
}


static gpointer
run_history_service_thread (EphyHistoryService *self)
{
  EphyHistoryServicePrivate *priv = self->priv;
  EphyHistoryServiceMessage *message;

  g_assert (priv->history_thread == g_thread_self ());

  if (ephy_history_service_open_database_connections (self) == FALSE)
    return NULL;

  do {
    message = g_async_queue_try_pop (priv->queue);
    if (!message) {
      /* Schedule commit if needed. */
      if (ephy_history_service_is_scheduled_to_commit (self))
        ephy_history_service_commit (self);

      /* Block the thread until there's data in the queue. */
      message = g_async_queue_pop (priv->queue);
    }

    /* Process item. */
    ephy_history_service_process_message (self, message);

  } while (!ephy_history_service_is_scheduled_to_quit (self));

  ephy_history_service_close_database_connections (self);
  ephy_history_service_execute_quit (self, NULL, NULL);

  return NULL;
}

The third non-empty line of run_history_service_thread() is the failing assertion.

The assertion fails because the created thread can execute its code before g_thread_new() returns and before the history_thread member is initialized. Whether it happens or not depends on how the operating system schedules the processors to the threads.

The history_thread member isn't any problem; it is used just for the assertions. But there is also an async queue (->queue) which is initialized *after* creating the new thread in ephy_history_service_init(). This means that the code in run_history_service_thread() touches the queue when it isn't initialized or while the queue is being initialized by the main thread.
That isn't healthy; this can result in data corruption.

The patch
- fixes the issue with the queue, and
- fixes the mentioned assertion.

Although it was experienced on ia64, the bug affects all archs.


You can find a link to the built debs on bug report#642750.

Stephan

Attachment: history-thread-startup-race.patch
Description: history-thread-startup-race.patch


--- End Message ---
--- Begin Message ---
Source: epiphany-browser
Source-Version: 3.4.2-2.1

We believe that the bug you reported is fixed in the latest version of
epiphany-browser, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 697...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Julien Cristau <jcris...@debian.org> (supplier of updated epiphany-browser 
package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Sat, 26 Jan 2013 17:38:36 +0000
Source: epiphany-browser
Binary: epiphany-browser epiphany-browser-data epiphany-browser-dev 
epiphany-browser-dbg gir1.2-epiphany-3.4
Architecture: source all amd64
Version: 3.4.2-2.1
Distribution: unstable
Urgency: low
Maintainer: Josselin Mouette <j...@debian.org>
Changed-By: Julien Cristau <jcris...@debian.org>
Description: 
 epiphany-browser - Intuitive GNOME web browser
 epiphany-browser-data - Data files for the GNOME web browser
 epiphany-browser-dbg - Debugging symbols for the GNOME web browser
 epiphany-browser-dev - Development files for the GNOME web browser
 gir1.2-epiphany-3.4 - GObject introspection data for the GNOME web browser
Closes: 697173
Changes: 
 epiphany-browser (3.4.2-2.1) unstable; urgency=low
 .
   * Non-maintainer upload.
   * Apply patch from Stephan Schreiber to fix a race condition starting the
     history service thread (closes: #697173).
Checksums-Sha1: 
 acbe3470b4605cb3d60604d3219af31160146c68 3112 epiphany-browser_3.4.2-2.1.dsc
 b2c24c8e6c6d419d86efeea792aaedef20f10b29 31907 
epiphany-browser_3.4.2-2.1.debian.tar.gz
 09cc27eb3b343cce1f3762cde8f0a763550b9965 4332608 
epiphany-browser-data_3.4.2-2.1_all.deb
 11e4e6d4ec42986bef8d6bfb62e8eb2dc3a0c403 1397510 
epiphany-browser_3.4.2-2.1_amd64.deb
 6d86490b73c7a4e2b0b92a02716acc77e9698612 1182604 
epiphany-browser-dev_3.4.2-2.1_amd64.deb
 0c59354972f8fad67461de6655a1fe61a1cee24d 1999898 
epiphany-browser-dbg_3.4.2-2.1_amd64.deb
 078febef2dbfebd0f5fa1e04343107ea4bb65fdb 1133278 
gir1.2-epiphany-3.4_3.4.2-2.1_amd64.deb
Checksums-Sha256: 
 21f5a76e706f50789e085760ef78d004d1b65308513077a8a6bf0ba0b276e34b 3112 
epiphany-browser_3.4.2-2.1.dsc
 407a85a70b2649582d12311d583db642b6f2a2614c39d2464d7cfd9875c42d19 31907 
epiphany-browser_3.4.2-2.1.debian.tar.gz
 9d5f839f73d5dcf94e2966e4de00f1357a1d579b9e5d4590fe83769673f8265e 4332608 
epiphany-browser-data_3.4.2-2.1_all.deb
 e51433ee9ac9ebf57ad1a55bd9b35597d7cb109ee83b5a2be6510582cbf50a34 1397510 
epiphany-browser_3.4.2-2.1_amd64.deb
 baffffcdaaff42f4796d47b2c11d1fc5cf6188282c42a45ed0b233760806eb40 1182604 
epiphany-browser-dev_3.4.2-2.1_amd64.deb
 6c16362ce2c88d63023f2becb3bc07a7ad97c6a33e7d81b9ff1b7f40c9e479c7 1999898 
epiphany-browser-dbg_3.4.2-2.1_amd64.deb
 d1af4b877ffde3e98726ec5dbb3c523c9f8a993fd3fc156ea910e079667f13dc 1133278 
gir1.2-epiphany-3.4_3.4.2-2.1_amd64.deb
Files: 
 d2c4bc2c1c7d291c5032456b82542d01 3112 gnome optional 
epiphany-browser_3.4.2-2.1.dsc
 7bd9eb86f50ad7eea11db9cd12d89ab5 31907 gnome optional 
epiphany-browser_3.4.2-2.1.debian.tar.gz
 6b6d6f9d6483211897fece6b6863d69f 4332608 gnome optional 
epiphany-browser-data_3.4.2-2.1_all.deb
 6bc826c0a8d113cbdf30acf9d50896fe 1397510 gnome optional 
epiphany-browser_3.4.2-2.1_amd64.deb
 ff91b41c3dec31cee812e774443acea4 1182604 devel optional 
epiphany-browser-dev_3.4.2-2.1_amd64.deb
 98193305e4350292a04b1dcc83ed04d6 1999898 debug extra 
epiphany-browser-dbg_3.4.2-2.1_amd64.deb
 9b44d6ffb5e28c858418bd13dd41556d 1133278 introspection optional 
gir1.2-epiphany-3.4_3.4.2-2.1_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQIcBAEBCAAGBQJRBBkCAAoJEDEBgAUJBeQMG6UP/jm78XnbnUXYfoKfjb4+J8De
j1XUvcLectaTSvYoFmG7H3C/3sjvXG3X8aVvyciMuv1c9p0tvEUl7JttlAPCoFoO
8ovDWkvdeQ7+npYgvQL5hxWISfjNtpcScc2LIa3ICq4IJ8qq9sAGrY487pgRYdpT
Rt8kwUfz8/5MfC8EVS4p3reF/9sxsrQBWSEY1aIJ3WCHGCamCjmydI/JfZ4hAtmQ
rQz8/Rk/ogrlXgQYzKZJebrKpk0P+vCjysUYRPFPBVwsQbaVfwdZtUsyvDhCMW0Z
w8lxCnToNP1YdlqyQ53XkXl5fBbN3+A3e+ZsC0TKRTRFHtIN8bCFmmgDWZfvyDY5
ad1sfF2nDRaSgLfz5v9ik3P7wI4u9AuI/3p9OB6dECX9FFAEyCdVlfH2N7JeAykN
6RmQjFcVBCvzsv7/XO6uMDsQJvxgwDqi5jOap9k4wZVd3vo5X9Ih8SQISL8ZcYQK
+z734u+lEfFbS+PQarBBHVcaD+uQrQv6e9oNBqcPQ6Ji7k73rcXDrUXkCCr8Mkki
vN5EUvUixsOsqlwMglWlpu2FiK8CMFRbuz9UoFvJOZI7eUtauIB91jipcyumAi5K
FrkVKyyl+Q8RVp0B7n9D7STLeV9m95ohEzPECvfHCGC0bwQsWgzDFfrgg2mHrErc
fr1pMzG/IVt0kU1w9MFv
=QAsl
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to