Debian Bug report logs - #697173
ia64 (Itanium), race condition on the start of the history service thread

version graph

Package: epiphany-browser; Maintainer for epiphany-browser is Josselin Mouette <>; Source for epiphany-browser is src:epiphany-browser.

Reported by: Stephan Schreiber <>

Date: Wed, 2 Jan 2013 07:18:02 UTC

Severity: serious

Tags: patch

Found in version epiphany-browser/3.4.2-2

Fixed in version epiphany-browser/3.4.2-2.1

Done: Julien Cristau <>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox

Report forwarded to, Josselin Mouette <>:
Bug#697173; Package epiphany-browser. (Wed, 02 Jan 2013 07:18:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stephan Schreiber <>:
New Bug report received and forwarded. Copy sent to Josselin Mouette <>. (Wed, 02 Jan 2013 07:18:05 GMT) Full text and rfc822 format available.

Message #5 received at (full text, mbox):

From: Stephan Schreiber <>
Subject: ia64 (Itanium), race condition on the start of the history service thread
Date: Wed, 02 Jan 2013 08:15:01 +0100
[Message part 1 (text/plain, inline)]
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->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  
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  
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.


[history-thread-startup-race.patch (application/octet-stream, attachment)]

Information forwarded to, Josselin Mouette <>:
Bug#697173; Package epiphany-browser. (Sat, 26 Jan 2013 17:57:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Julien Cristau <>:
Extra info received and forwarded to list. Copy sent to Josselin Mouette <>. (Sat, 26 Jan 2013 17:57:05 GMT) Full text and rfc822 format available.

Message #10 received at (full text, mbox):

From: Julien Cristau <>
Subject: epiphany-browser: diff for NMU version 3.4.2-2.1
Date: Sat, 26 Jan 2013 17:55:45 +0000
[Message part 1 (text/plain, inline)]
tags 697173 + pending

Dear maintainer,

I've prepared an NMU for epiphany-browser (versioned as 3.4.2-2.1) and
will upload it in a minute.

[epiphany-browser-3.4.2-2.1-nmu.diff (text/x-diff, attachment)]
[signature.asc (application/pgp-signature, inline)]

Added tag(s) pending. Request was from Julien Cristau <> to (Sat, 26 Jan 2013 17:57:07 GMT) Full text and rfc822 format available.

Reply sent to Julien Cristau <>:
You have taken responsibility. (Sat, 26 Jan 2013 18:21:11 GMT) Full text and rfc822 format available.

Notification sent to Stephan Schreiber <>:
Bug acknowledged by developer. (Sat, 26 Jan 2013 18:21:11 GMT) Full text and rfc822 format available.

Message #17 received at (full text, mbox):

From: Julien Cristau <>
Subject: Bug#697173: fixed in epiphany-browser 3.4.2-2.1
Date: Sat, 26 Jan 2013 18:17:35 +0000
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

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

Debian distribution maintenance software
Julien Cristau <> (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

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 <>
Changed-By: Julien Cristau <>
 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
 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).
 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
 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
 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

Version: GnuPG v1.4.12 (GNU/Linux)


Bug archived. Request was from Debbugs Internal Request <> to (Wed, 06 Mar 2013 07:27:52 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.

Debian bug tracking system administrator <>. Last modified: Fri Apr 18 15:55:47 2014; Machine Name:

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.