zeitgeist-daemon crashed with RuntimeError in _check_index(): basic_string::assign

Bug #839740 reported by Carl Ansell
592
This bug affects 64 people
Affects Status Importance Assigned to Milestone
Zeitgeist Extensions
Fix Released
High
Mikkel Kamstrup Erlandsen
zeitgeist-extensions (Ubuntu)
Fix Released
High
Mikkel Kamstrup Erlandsen
Oneiric
Fix Released
High
Mikkel Kamstrup Erlandsen

Bug Description

Crash occured while using Opera.

Ubuntu 11.10 Beta 1
Zeitgeist 0.8.1.1-1

ProblemType: Crash
DistroRelease: Ubuntu 11.10
Package: zeitgeist-core 0.8.1.1-1
ProcVersionSignature: Ubuntu 3.0.0-9.15-generic 3.0.3
Uname: Linux 3.0.0-9-generic i686
Architecture: i386
Date: Fri Sep 2 18:02:19 2011
ExecutablePath: /usr/bin/zeitgeist-daemon
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Beta i386 (20110901)
InterpreterPath: /usr/bin/python2.7
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/bin/zeitgeist-daemon
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, no user)
 LANGUAGE=en_GB:en
 LANG=en_GB.UTF-8
PythonArgs: ['/usr/bin/zeitgeist-daemon']
SourcePackage: zeitgeist
Title: zeitgeist-daemon crashed with RuntimeError in _check_index(): basic_string::assign
Traceback:
 Traceback (most recent call last):
   File "/usr/share/zeitgeist/_zeitgeist/engine/extensions/fts.py", line 283, in _check_index
     hits = self._enquire.get_mset (0, 1)
 RuntimeError: basic_string::assign
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

Revision history for this message
Carl Ansell (afccarl1994) wrote :
visibility: private → public
tags: removed: need-duplicate-check
Changed in zeitgeist (Ubuntu):
status: New → Confirmed
affects: zeitgeist (Ubuntu) → zeitgeist-extensions (Ubuntu)
tags: added: bugpattern-needed
Changed in zeitgeist-extensions (Ubuntu):
assignee: nobody → Canonical Desktop Team (canonical-desktop-team)
importance: Undecided → High
status: Confirmed → Triaged
tags: added: bugpattern-written
removed: bugpattern-needed
Martin Pitt (pitti)
Changed in zeitgeist-extensions (Ubuntu Oneiric):
assignee: Canonical Desktop Team (canonical-desktop-team) → Mikkel Kamstrup Erlandsen (kamstrup)
Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

Note: The stack trace on this bug is for With zeitgeist-extension-fts v 0.0.10 while for 0.0.11,which is currently in Oneiric, we should look at something like bug 839849.

Changed in zeitgeist-extensions:
assignee: nobody → Mikkel Kamstrup Erlandsen (kamstrup)
importance: Undecided → High
status: New → Triaged
Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

Despite a persevering effort by your humble correspondent I've not been able to reproduce this. I just fixed a handful other bugs in zeitgeist-extension-fts that *could* be related to this bug. Among others a race condition and a memory/index corruption issue, which rings fairly well with this bug being about a RuntimeError from something as unexpected as basic_string::assign().

So I am putting my money on that this bug is fixed - if you still get this after upgrading to zeitgeist-extension-fts-0.0.12 - and rebooting, then please reopen.

Changed in zeitgeist-extensions:
milestone: none → fts-0.0.12
status: Triaged → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package zeitgeist-extensions - 0.0.12-0ubuntu1

---------------
zeitgeist-extensions (0.0.12-0ubuntu1) oneiric; urgency=low

  * New upstream release:
    - fts can SIGSEGV ZG during reindex (LP: #617309)
    - zeitgeist-daemon crashed with RuntimeError in _check_index():
      basic_string::assign (LP: #839740)
    - Blowing Xapian max term length corrupts index (LP: #843668)
    - Can't recover from FTS index corruption (LP: #705944)
 -- Didier Roche <email address hidden> Thu, 08 Sep 2011 11:25:16 +0200

Changed in zeitgeist-extensions (Ubuntu Oneiric):
status: Triaged → Fix Released
Revision history for this message
Jason Warner (jasoncwarner) wrote :

I just updated, rebooted and am still getting this (sorry!).

I attached my latest crash log so you can take a look.

Revision history for this message
joey.blacksmith (joey-blacksmith) wrote :

Hello,

I also still get this bug after rebooting. My problem is that I do not know where to find the crash log so unfortunately, I cannot not attach it.

Revision history for this message
joey.blacksmith (joey-blacksmith) wrote :

Hello again, there is my log from crash. This should replace my last comment.

Revision history for this message
Carl Ansell (afccarl1994) wrote :

I haven't experienced this since the update. Is there any reliable way to reproduce this?

Revision history for this message
Ben Slone (benslone) wrote : Re: [Bug 839740] Re: zeitgeist-daemon crashed with RuntimeError in _check_index(): basic_string::assign

I just updated about 30min ago. All I have to do is boot, log in, do
nothing else and it will crash in about 1-2 minutes.

On Fri, 09 Sep 2011 12:15:29 -0400, Carl Ansell
<email address hidden> wrote:

> I haven't experienced this since the update. Is there any reliable way
> to reproduce this?
>

--
Using Opera's revolutionary email client: http://www.opera.com/mail/

Revision history for this message
sebastian-s (sebastian-s) wrote :

me to, still happening after logging in

Revision history for this message
Carl Ansell (afccarl1994) wrote :

I'm still unable to reproduce, but then it seemed to occur randomly for me so I could have been lucky so far.

Setting status to confirmed as per the comments above.

Changed in zeitgeist-extensions (Ubuntu Oneiric):
status: Fix Released → Confirmed
Changed in zeitgeist-extensions:
status: Fix Released → Confirmed
Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

Ok. The updated crash reports looks sensible. I am still quite in the
dark about this, it could be a binding issue or something - do you
guys get it consistently or only occasionally?

So my guess work so far goes something like this: Consider the buggy
expression from the fts.py Python code:

  query = self._query_parser.parse_query ("zgsu:file*",

self.QUERY_PARSER_FLAGS)

Since this gives an error in basic_string::assign, which is a C++
function, it's probably raising an error from the autogenerated SWIG
bindings for libxapian marshalling that into a RuntimeError. Meaning
that we are probably passing either a malformed string or a non-string
where it expects a string.

I tried passing weird combos of strings and ints to parse_query() just
now, and no matter how I cut it I can only get it to raise a TypeError
ala TypeError: in method 'QueryParser_parse_query', argument 2 of type
'std::string const &'. Never a RuntimeError. So it's something deeper
than that.

So still in the dark here...

@joey - did you manually twiddle with the fts.py file you have
installed (like adding debug statements or such)? Oddly enough your
line number seems to be off by 2 compared to the 0.0.12 code.

Revision history for this message
Jigar Shah (jigar-shah1984) wrote :

I get the ceash report consistently. It occurs specifically after a
restart or login into the system.

On Sat 10 Sep 2011 05:41:08 AM CDT, Mikkel Kamstrup Erlandsen
<email address hidden> wrote:

> Ok. The updated crash reports looks sensible. I am still quite in the
> dark about this, it could be a binding issue or something - do you
> guys get it consistently or only occasionally?
>
> So my guess work so far goes something like this: Consider the buggy
> expression from the fts.py Python code:
>
> query = self._query_parser.parse_query ("zgsu:file*",
>
> self.QUERY_PARSER_FLAGS)
>
> Since this gives an error in basic_string::assign, which is a C++
> function, it's probably raising an error from the autogenerated SWIG
> bindings for libxapian marshalling that into a RuntimeError. Meaning
> that we are probably passing either a malformed string or a non-string
> where it expects a string.
>
> I tried passing weird combos of strings and ints to parse_query() just
> now, and no matter how I cut it I can only get it to raise a TypeError
> ala TypeError: in method 'QueryParser_parse_query', argument 2 of type
> 'std::string const&'. Never a RuntimeError. So it's something deeper
> than that.
>
> So still in the dark here...
>
> @joey - did you manually twiddle with the fts.py file you have
> installed (like adding debug statements or such)? Oddly enough your
> line number seems to be off by 2 compared to the 0.0.12 code.
>

Revision history for this message
haug (josefa4) wrote :

... the same by me...

Am Samstag, den 10.09.2011, 15:00 +0000 schrieb Jigar Shah:

> I get the ceash report consistently. It occurs specifically after a
> restart or login into the system.
>
>
> On Sat 10 Sep 2011 05:41:08 AM CDT, Mikkel Kamstrup Erlandsen
> <email address hidden> wrote:
>
> > Ok. The updated crash reports looks sensible. I am still quite in the
> > dark about this, it could be a binding issue or something - do you
> > guys get it consistently or only occasionally?
> >
> > So my guess work so far goes something like this: Consider the buggy
> > expression from the fts.py Python code:
> >
> > query = self._query_parser.parse_query ("zgsu:file*",
> >
> > self.QUERY_PARSER_FLAGS)
> >
> > Since this gives an error in basic_string::assign, which is a C++
> > function, it's probably raising an error from the autogenerated SWIG
> > bindings for libxapian marshalling that into a RuntimeError. Meaning
> > that we are probably passing either a malformed string or a non-string
> > where it expects a string.
> >
> > I tried passing weird combos of strings and ints to parse_query() just
> > now, and no matter how I cut it I can only get it to raise a TypeError
> > ala TypeError: in method 'QueryParser_parse_query', argument 2 of type
> > 'std::string const&'. Never a RuntimeError. So it's something deeper
> > than that.
> >
> > So still in the dark here...
> >
> > @joey - did you manually twiddle with the fts.py file you have
> > installed (like adding debug statements or such)? Oddly enough your
> > line number seems to be off by 2 compared to the 0.0.12 code.
> >
>

Revision history for this message
Jason Warner (jasoncwarner) wrote :

still getting this...attached log.

tags: added: rls-mgr-o-tracking
Revision history for this message
Ben Slone (benslone) wrote :

I just updated today and I get it.

On Tue, 27 Sep 2011 03:04:17 +0800, Carl Ansell
<email address hidden> wrote:

> Its been a while since any updates and there are no new duplicate bugs,
> are people still experiencing this?
>

--
Using Opera's revolutionary email client: http://www.opera.com/mail/

Revision history for this message
Carl Ansell (afccarl1994) wrote :

Its been a while since any updates and there are no new duplicate bugs, are people still experiencing this?

Revision history for this message
Jigar Shah (jigar-shah1984) wrote :

Yes, everytime I restart the PC, or log-out and log back into the system....

On Mon 26 Sep 2011 02:04:17 PM CDT, Carl Ansell
<email address hidden> wrote:

> Its been a while since any updates and there are no new duplicate bugs,
> are people still experiencing this?
>

Revision history for this message
sebastian-s (sebastian-s) wrote :

yes, just restarted after 170 updated packages and the bug is still there (0.0.12-0ubuntu1)
Where is the log so I can attach it?

Revision history for this message
Manish Sinha (मनीष सिन्हा) (manishsinha) wrote : Re: [Zeitgeist] [Bug 839740] Re: zeitgeist-daemon crashed with RuntimeError in _check_index(): basic_string::assign

Mikkel, yes correct me if I am wrong.
AFAIK for many zeitgeist bugs the crash was happening during logout which
was getting reported next time the user logged in.

After the user updated zeitgeist to 0.8.2 and fts to 0.0.12 then is the
daemon restarting after update?

If the daemon is not restarting then I can put forward a guess - the user
updates to the latest version but is still running the previous version of
zeitgeist daemon and fts. The now he logs out or shuts down. Crash. Next
time he logs in the bug is reported and it looks that the update didn't fix
it.

People who are still experiencing this after update: please restart again
and check if the crash is still reproducible?
On Sep 27, 2011 4:47 PM, "sebastian-s" <email address hidden> wrote:
> yes, just restarted after 170 updated packages and the bug is still there
(0.0.12-0ubuntu1)
> Where is the log so I can attach it?
>
> --
> You received this bug notification because you are a member of Zeitgeist
> Extensions, which is the registrant for Zeitgeist Extensions.
> https://bugs.launchpad.net/bugs/839740
>
> Title:
> zeitgeist-daemon crashed with RuntimeError in _check_index():
> basic_string::assign
>
> Status in Zeitgeist Extensions:
> Confirmed
> Status in “zeitgeist-extensions” package in Ubuntu:
> Confirmed
> Status in “zeitgeist-extensions” source package in Oneiric:
> Confirmed
>
> Bug description:
> Crash occured while using Opera.
>
> Ubuntu 11.10 Beta 1
> Zeitgeist 0.8.1.1-1
>
> ProblemType: Crash
> DistroRelease: Ubuntu 11.10
> Package: zeitgeist-core 0.8.1.1-1
> ProcVersionSignature: Ubuntu 3.0.0-9.15-generic 3.0.3
> Uname: Linux 3.0.0-9-generic i686
> Architecture: i386
> Date: Fri Sep 2 18:02:19 2011
> ExecutablePath: /usr/bin/zeitgeist-daemon
> InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Beta i386 (20110901)
> InterpreterPath: /usr/bin/python2.7
> PackageArchitecture: all
> ProcCmdline: /usr/bin/python /usr/bin/zeitgeist-daemon
> ProcEnviron:
> SHELL=/bin/bash
> PATH=(custom, no user)
> LANGUAGE=en_GB:en
> LANG=en_GB.UTF-8
> PythonArgs: ['/usr/bin/zeitgeist-daemon']
> SourcePackage: zeitgeist
> Title: zeitgeist-daemon crashed with RuntimeError in _check_index():
basic_string::assign
> Traceback:
> Traceback (most recent call last):
> File "/usr/share/zeitgeist/_zeitgeist/engine/extensions/fts.py", line 283,
in _check_index
> hits = self._enquire.get_mset (0, 1)
> RuntimeError: basic_string::assign
> UpgradeStatus: No upgrade log present (probably fresh install)
> UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/zeitgeist-extensions/+bug/839740/+subscriptions
>
> _______________________________________________
> Mailing list: https://launchpad.net/~zeitgeist
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~zeitgeist
> More help : https://help.launchpad.net/ListHelp

Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

The attached branch, lp:~mhr3/zeitgeist-extensions/scheme-detection Remove , by Michal stands a good chance of fixing this issue:

 * It fixes a potential race, where we might end up trying to put data in a corrupt index
 * It removes the code branch where exception happens with some simpler logic
 * It forces a rebuild of existing indexes, meaning that anyone out there stuck with a buggy index will have it cleaned up

Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

Ok. The Desktop team is pushing this to a PPA https://launchpad.net/~ubuntu-desktop/+archive/ppa (ppa:ubuntu-desktop/ppa). Anyone willing to test out the proposed fix will be of great help! Thanks in advance.

Revision history for this message
Mark Russell (marrusl) wrote :

Works for me! Thanks.

Michal Hruby (mhr3)
Changed in zeitgeist-extensions:
milestone: fts-0.0.12 → fts-0.0.13
status: Confirmed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package zeitgeist-extensions - 0.0.13-0ubuntu1

---------------
zeitgeist-extensions (0.0.13-0ubuntu1) oneiric; urgency=low

  * New upstream release
    - zeitgeist-daemon crashed with RuntimeError in _check_index():
      basic_string::assign (LP: #839740)
    - FTS doesn't index paths correctly (LP: #860362)
    - Add version metadata to FTS index (LP: #862333)
 -- Didier Roche <email address hidden> Mon, 03 Oct 2011 10:00:21 +0200

Changed in zeitgeist-extensions (Ubuntu Oneiric):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.