[SRU] pitivi crashed with SIGSEGV in __GI___pthread_mutex_lock()

Bug #1307746 reported by Leo Milano on 2014-04-14
68
This bug affects 13 people
Affects Status Importance Assigned to Milestone
PiTiVi
Fix Released
Critical
pitivi (Ubuntu)
High
Unassigned
Trusty
Undecided
Timo Jyrinki

Bug Description

[Impact]

Some users, mostly users who have installed more software like eg. GStreamer codecs needed for common formats, are unable to start Pitivi on 14.04 LTS, because of a crasher.

[Test Case]

Start pitivi on affected computer.

[Regression Potential]

The original single patch fixed the issue but caused another window to pop up behind the Pitivi window, which was a regression for fresh install users. The new patch set both fixes the crasher and improves the overall Pitivi usage like timeline drawing without regressions.

---

I just upgraded to Kubuntu 14.04 (Trusty) yesterday, and pitivi stopped working. It segfaults immediately, with the following stdout error:

lmilano@grisell:crash$ pitivi
Missing soft dependency:
- pycanberra not found on the system
    -> enables sound notifications when rendering is complete
Segmentation fault (core dumped)

Apport is not popping up, even if I launch pitivi from the main menu in KDE. But it did, just once, and it dumped a report in /var/crash - I will try to upload that file manually.

Leo Milano (lmilano) wrote :
Leo Milano (lmilano) on 2014-04-14
description: updated
Changed in pitivi:
importance: Unknown → Critical
status: Unknown → Confirmed
Leo Milano (lmilano) wrote :

I just tested installing the Unity package to see if a more typical Ubuntu installation would not crash, but I had not luck. I'll gladly help with testing if anyone has any ideas of what to try.

Lubosz Sarnecki (lubosz) wrote :

Does the crash occur when you run Pitivi as root?

Does the crash occur when you run Pitivi in GNOME Shell?

Both methods should be work arounds for the crash.

If you are interested, the upstream Bug can be found here:
https://bugzilla.gnome.org/show_bug.cgi?id=727851

Leo Milano (lmilano) wrote :

Ouch, it might be the same issue. I don't have gnome-shell installed, and installing the metapackage didn't enable a session in lightdm. The "Ubuntu" (Unity) shell prouces the same crash. But "sudo pitivi" works fine.

I'll look around to enable a gnome-shell session and try from there. Thanks for the suggestion, Lubosz!

(in the meantime, for anyone having the same issue, you can download a self contained pitivi bundle, see here for more info:
http://www.pitivi.org/?go=download)

Leo Milano (lmilano) wrote :

Ok. It looks like running from the gnome-shell doesn't help.

This is what I added to my Kubuntu install:

* gnome-shell
* ubuntu-gnome-desktop

Now I can login to Ubuntu (unity), Gnome (gnome-shell, I believe), Gnome Classic, KDE Plasma and others. Pitivi crashes in all of them, whether from the menu or the command line. Only root can run it without segfaulting.

Hope this helps!

Leo Milano (lmilano) wrote :

Another update. As of today, pitivi is not crashing anymore. I've been running updates daily, though I didn't see remember having seen any pitivi update. The changelog doesn't show any recent changes, either:

http://changelogs.ubuntu.com/changelogs/pool/universe/p/pitivi/

I guess some unnderlying library must have been updated (or uninstalling gnome-shell and unity, something I did yesterday after testing with them, removed a conflicting binary?)

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in pitivi (Ubuntu):
status: New → Confirmed
Michael Gratton (mjog) wrote :

This also affects me on Trusty under gnome-shell, when using the GNOME3-staging PPA.

Changed in pitivi (Ubuntu):
importance: Undecided → Critical
importance: Critical → High
Download full text (3.2 KiB)

Having set up Kubuntu 14.04 at 2014-08-29, doing also:
sudo apt-get update && sudo apt-get dist-upgrade
i do get the interface to pitivi, but no buttons, like + to import clip, no Timeline!
It shows however the text: Import and some icon, looking like a page of paper.

Start with sudo pitivi in teminal:
tuxator@tuxolino:~$ sudo pitivi
[sudo] password for tuxator:
Missing soft dependency:
- pycanberra not found on the system
    -> aktiviert einen Benachrichtigungston sobald das Erstellen fertig ist
Missing soft dependency:
- GnomeDesktop not found on the system
    -> file thumbnails provided by GNOME's thumbnailers
Missing soft dependency:
- Notify not found on the system
    -> aktiviert visuelle Benachrichtigungen, sobald das Erstellen fertig ist

(pitivi:3822): Gdk-WARNING **: gdk_window_set_icon_list: icons too large
Traceback (most recent call last):
  File "/usr/lib/x86_64-linux-gnu/pitivi/python/pitivi/project.py", line 834, in do_loaded
    self._ensureTracks()
  File "/usr/lib/x86_64-linux-gnu/pitivi/python/pitivi/project.py", line 1022, in _ensureTracks
    for track in self.timeline.get_tracks()]
TypeError: Couldn't find conversion for foreign struct 'cairo.Context'
tuxator@tuxolino:~$

starting in terminal as user:

tuxator@tuxolino:~$ pitivi
Missing soft dependency:
- pycanberra not found on the system
    -> aktiviert einen Benachrichtigungston sobald das Erstellen fertig ist
Missing soft dependency:
- GnomeDesktop not found on the system
    -> file thumbnails provided by GNOME's thumbnailers
Missing soft dependency:
- Notify not found on the system
    -> aktiviert visuelle Benachrichtigungen, sobald das Erstellen fertig ist

(pitivi:3927): Gdk-WARNING **: gdk_window_set_icon_list: icons too large
Traceback (most recent call last):
  File "/usr/lib/x86_64-linux-gnu/pitivi/python/pitivi/project.py", line 834, in do_loaded
    self._ensureTracks()
  File "/usr/lib/x86_64-linux-gnu/pitivi/python/pitivi/project.py", line 1022, in _ensureTracks
    for track in self.timeline.get_tracks()]
TypeError: Couldn't find conversion for foreign struct 'cairo.Context'
Traceback (most recent call last):
  File "/usr/lib/x86_64-linux-gnu/pitivi/python/pitivi/project.py", line 1361, in _presetChangedCb
    preset = model[iter_][0]
  File "/usr/lib/python2.7/dist-packages/gi/overrides/Gtk.py", line 1038, in __getitem__
    return self.model.get_value(self.iter, key)
TypeError: Couldn't find conversion for foreign struct 'cairo.Context'

(pitivi:3927): Gdk-CRITICAL **: gdk_device_ungrab: assertion 'GDK_IS_DEVICE (device)' failed

(pitivi:3927): Gtk-CRITICAL **: gtk_device_grab_remove: assertion 'GDK_IS_DEVICE (device)' failed

(pitivi:3927): Gdk-CRITICAL **: gdk_device_ungrab: assertion 'GDK_IS_DEVICE (device)' failed

(pitivi:3927): Gtk-CRITICAL **: gtk_device_grab_remove: assertion 'GDK_IS_DEVICE (device)' failed
tuxator@tuxolino:~$

picture can be seen:
[URL=http://www.pic-upload.de/view-24442954/pitivi-0.93-3.png.html][IMG]http://www11.pic-upload.de/thumb/31.08.14/d5pks4dohjap.png[/IMG][/URL]

System-information:
Kubuntu 14.04 LTS
QT-Version: 4.8.6
Kernel-Version: 3.13.0-35-generic
OS: 64-bit
---------
Processor: i7 3770
memory: 16G
Grap...

Read more...

Changed in pitivi:
status: Confirmed → Expired
Gunnar Hjalmarsson (gunnarhj) wrote :

Since upstream seems to have dropped the maintenance of Pitivi, I just posted to the ubuntu-desktop mailing list:

https://lists.ubuntu.com/archives/ubuntu-desktop/2014-October/004555.html

Please feel free to add your input on the list.

Timo Jyrinki (timo-jyrinki) wrote :

As replied (https://lists.ubuntu.com/archives/ubuntu-desktop/2014-October/004558.html), I don't see indications of upstream dropping maintenance of Pitivi, with a lot of activity in upstream code repository lately. They have also switched away from the problematic video sink that is apparently causing this crash.

That said, this bug would definitely need fixing in 14.04. The crasher didn't exist at some point in January-February of 14.04 cycle, where I remember using pitivi 0.93 successfully.

Timo Jyrinki (timo-jyrinki) wrote :

The attached patch seems to fix the crash in 14.04 LTS on one of my computers where I saw the crash.

In a VM I didn't even have the crash.

Timo Jyrinki (timo-jyrinki) wrote :

I have a test version you can test on 14.04 LTS:
sudo apt-add-repository ppa:timo-jyrinki/ppa
sudo apt update
sudo apt install pitivi

You can revert to the old version with:
sudo apt install ppa-purge
sudo ppa-purge ppa:timo-jyrinki/ppa

I tested it and imported some ogg video and produced webm out of it successfully. It also didn't break anything in that VM where pitivi worked even originally. It still does have some problem drawing the timeline, though, and patches in Debian didn't seem to fix the issue for me so I didn't include them.

Testing would be welcome, even though the fixes should be first pushed to 14.10 - the problem is that 14.10 has another crasher bug #1377804 so even if this fix would be uploaded there, pitivi would still crash in 14.10. A somewhat functional version in 14.04 LTS might be worth it, though.

description: updated
tags: added: patch
Gunnar Hjalmarsson (gunnarhj) wrote :

Timo, I'm hesitating for the reasons mentioned at

https://lists.ubuntu.com/archives/ubuntu-desktop/2014-October/004560.html

Maybe you should wait and see what Iain comes up with, i.e. if he is able to fix 14.04 without the regression.

Timo Jyrinki (timo-jyrinki) wrote :

I'll do a couple of more test builds based on Iain's extra patches cherry-picked from upstream. At first look it may be that 14.04 LTS needs slightly different set of patches, but it will be anyway a good step forward when 14.10 gets fixed.

Changed in pitivi:
status: Expired → Fix Released
Iain Lane (laney) wrote :

This is in Utopic now

Changed in pitivi (Ubuntu):
status: Confirmed → Fix Released
Changed in pitivi (Ubuntu Trusty):
assignee: nobody → Timo Jyrinki (timo-jyrinki)
Changed in pitivi (Ubuntu Trusty):
status: New → In Progress
Timo Jyrinki (timo-jyrinki) wrote :

Hey! I think I've found a good combination of patches for 14.04 LTS.

Could you people test the latest build ~trusty1~test7 on 14.04 LTS as instructed in the comment #13, and give feedback? I tested it on my machine and was able to produce video again.

So I first tried to include all of Iain's changes, but there is no glimagesink on GStreamer 1.2. I then commented out the 0005 patch and modified 0006 a bit, but that gives the "second window appears" problem. Then this morning it occured to me to try xvimagesink instead of glimagesink, and that seems to work. That's the only change from 14.10.

Gunnar Hjalmarsson (gunnarhj) wrote :

I just tested it successfully. Great work, Timo!

Timo Jyrinki (timo-jyrinki) wrote :

Thanks. I'm quite confident it's an improvement over current trusty version, so I uploaded it in the queue. It needs verification testing again in this bug once it hits proposed updates later.

description: updated
summary: - pitivi crashed with SIGSEGV in __GI___pthread_mutex_lock()
+ [SRU] pitivi crashed with SIGSEGV in __GI___pthread_mutex_lock()
Jeff Fortin Tam (kiddo) wrote :

Not sure if related, possibly a different issue, but I'm sort of seeing another crasher bug pattern emerge upstream (in case you have that trace somewhere around here too): https://bugzilla.gnome.org/show_bug.cgi?id=738078

Hello Leo, or anyone else affected,

Accepted pitivi into trusty-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/pitivi/0.93-3ubuntu0.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in pitivi (Ubuntu Trusty):
status: In Progress → Fix Committed
tags: added: verification-needed
Leo Milano (lmilano) wrote :

Hi Chris

Thank you for uploading the package. Unfortunately, I already upgraded the machine where I had the crash to Utopic. I tried on another machine running trusty, and both before and after enabling proposed (and therefore upgrading to 0.93-3ubuntu0.1 ), pitivi loads just fine. So, all I can say on my end is that I don't see any obvious regression. I hope others can test this fix!

Cheers
Leo

Gunnar Hjalmarsson (gunnarhj) wrote :

On a clean 14.04.1 I have successfully installed and run pitivi 0.93-3ubuntu0.1 from trusty-proposed. As regards whether the crash bug is fixed, I refer to my previous test with the version from Timo's PPA (comment #18). (Like Leo I have upgraded the 14.04 installation where pitivi crashed to 14.10.)

tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pitivi - 0.93-3ubuntu0.1

---------------
pitivi (0.93-3ubuntu0.1) trusty; urgency=medium

  [ Iain Lane ]
  * 0001-work-around-fix-crash-in-non-GNOME-Shell-WMs.-timeli.patch
    - Take patch from upstream bug #727851 to fix a crash on startup due to
      initialising clutter-gtk and clutter-gst in the wrong order.
  * Cherry-pick patches from upstream
    - 0002-project-Fix-setting-of-restriction-caps-values.patch
      + Use set_value, not assignment as GstStructure doesn't support the
        latter.
    - 0003-elements-Don-t-use-path_round_rectangle.patch
    - 0004-elements-Don-t-use-Cogl-anymore.patch
      + Don't drop Cogl.path_round_rectangle which wasn't used and gave
        warnings on the console since they were accidentally dropped from
        Cogl's gi bindings (see
        http://lists.freedesktop.org/archives/cogl/2014-April/001641.html)
    - 0005-pitivi-Start-using-glimagesink-as-default-sink.patch
    - 0006-pipeline-Reimplement-connectWithViewer-for-glimagesi.patch
      + Use glimagesink instead of cluttersink which resolves serious
        rendeiring problems with the preview window.
        > Depend on gstreamer1.0-plugins-bad for this.

  [ Timo Jyrinki ]
  * Sync Iain's changes from Ubuntu 14.10 to fix crash for some of the users
    without causing regressions for users that don't experience the crash.
    (LP: #1307746)
  * Backport from 14.10 to fix error when producing video: add dependency on
    python-gi-cairo (Closes: #743825)
  * 0005-pitivi-Start-using-glimagesink-as-default-sink.patch:
    - Do not use glimagesink as it does not exist on GStreamer 1.2. Use
      xvimagesink instead, which seems to work as drop-in replacement.
 -- Timo Jyrinki <email address hidden> Thu, 09 Oct 2014 11:41:56 +0300

Changed in pitivi (Ubuntu Trusty):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for pitivi has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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