Music app segfaults when scanning large collections of Music

Bug #1200513 reported by David Planella
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Ubuntu Music App
Fix Released
Critical
Unassigned

Bug Description

When testing the Music app with a relatively large collection of music (~30Gb), it ends up segfaulting. Here's an extract of the terminal output:

[...]
Debug: Scanner fileDelegate onComplete
Debug: Scanner fileDelegate onComplete
Debug: Scanner fileDelegate onComplete
Debug: Scanner fileDelegate onComplete
Debug: Scanner fileDelegate onComplete
Debug: Scanner fileDelegate onComplete
Debug: Scanner fileDelegate onComplete
Debug: Scanner fileDelegate onComplete
Debug: Scanner fileDelegate onComplete
Debug: Scanner fileDelegate onComplete
Segmentation fault (core dumped)

I'm not sure where the segmentation fault actually happens, but I can reproduce it every time. One thing I noticed is that I also got the segfault when scanning deep directory hierarchies (e.g. more than 2 directories deep) with Music on smaller collections. However, the latest branch with scanning optimizations seemed to fix that later case.

Related branches

David Planella (dpm)
Changed in music-app:
status: New → Triaged
importance: Undecided → Critical
Revision history for this message
Victor Thompson (vthompson) wrote :

Does it produce a core file? If so, could you either use gdb to get a stack trace or attach the core so someone else can analyze?

Revision history for this message
Victor Thompson (vthompson) wrote :

If this is a memory related issue chances are the core would occur at varying library sizes, but I'm running with a 44GB library right now without a core. I was also unable to reproduce using many copies (about 1/3 of a 35GB library) of an album [1] that has very large cover art in the ID3 tag which slowed down the scan process so it takes well over 20 minutes (each song from that album took about 1 second to scan whereas others took milliseconds).

Is there any possibility that this is due to the processing of an individual track in the library rather than the size of the library? I'd like to see a stack trace, if at all possible. Alternatively, you could add debug to LibraryLoader.qml to spit out track info to determine if the issue is related to a particular track.

Need more info.

[1] http://archive.org/details/Alt-jAnAwesomeWave

Revision history for this message
David Planella (dpm) wrote :

Hm, strangely enough, I cannot reproduce it now. Marking it as Incomplete for now.

Changed in music-app:
status: Triaged → Incomplete
Changed in music-app:
status: Incomplete → Confirmed
Revision history for this message
David Planella (dpm) wrote :

Unfortunately I cannot retrace the core dump, as I've got no space left on my laptop to install all the debug symbol packages, but I'm attaching it so that others can have a go at it.

I can now reproduce the segfault every time I run r62 or onwards. I do not get it with r61 or previous revisions.

summary: - Music app segfaults when scanning large collections of Music
+ Music app segfaults upon start
Revision history for this message
David Planella (dpm) wrote : Re: Music app segfaults upon start

timp from the SDK team could reproduce it this morning too: http://pastebin.ubuntu.com/5890180/

Changed in music-app:
status: Confirmed → Triaged
Revision history for this message
Tim Peeters (tpeeters) wrote :

indeed, for me the app also quits after loading the mp3s from ~/Music. But for me it is not a large collection of music, just a single album.

Revision history for this message
Tim Peeters (tpeeters) wrote :

note that I am not running trunk or a released package, but lp:~vthompson/music-app/fixes-1201094
I start it from qtcreator.

Revision history for this message
Tim Peeters (tpeeters) wrote :

I can confirm that the app works fine with r61 and it crashes with r62

Revision history for this message
Tim Peeters (tpeeters) wrote :

when I scroll to the end of the list of my songs (in the Music tab), it still crashes with r61

Revision history for this message
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) wrote :

Crashes on a nexus 4 here too.. http://paste.ubuntu.com/5890904/

Revision history for this message
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) wrote :

Dunno if this is any use. Ran it under gdb...

{"artist":"Intercontinental Music Lab","album":"Superheroes Of Science","title":"Sailing Back To Spain","file":"/home/phablet/Music/Intercontinental Music Lab/Superheroes Of Science/07 - Intercontinental Music Lab - Sailing Back To Spain.mp3","cover":"image://cover-art//home/phablet/Music/Intercontinental Music Lab/Superheroes Of Science/07 - Intercontinental Music Lab - Sailing Back To Spain.mp3","length":"243"}
virtual void AalMediaPlayerControl::setMedia(const QMediaContent&, QIODevice*)

virtual QMediaPlayer::MediaStatus AalMediaPlayerControl::mediaStatus() const

virtual QMediaPlayer::MediaStatus AalMediaPlayerControl::mediaStatus() const

Clearing playing list
[New Thread 0x4a3bd460 (LWP 6766)]
[New Thread 0x4abbd460 (LWP 6767)]
[New Thread 0x4b3bd460 (LWP 6768)]
[New Thread 0x4d720460 (LWP 6778)]

Program received signal SIGSEGV, Segmentation fault.
0x45014488 in TagLib::ID3v2::Tag::frameListMap() const ()
   from /usr/lib/arm-linux-gnueabihf/libtag.so.1
(gdb) backtrace full
#0 0x45014488 in TagLib::ID3v2::Tag::frameListMap() const ()
   from /usr/lib/arm-linux-gnueabihf/libtag.so.1
No symbol table info available.
#1 0x43bea68c in ?? ()
   from /usr/lib/arm-linux-gnueabihf/qt5/qml/org/nemomobile/folderlistmodel/libnemofolderlistmodel.so
No symbol table info available.
#2 0x43bea68c in ?? ()
   from /usr/lib/arm-linux-gnueabihf/qt5/qml/org/nemomobile/folderlistmodel/libnemofolderlistmodel.so
No symbol table info available.
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Revision history for this message
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) wrote :

Ok. Moved songs in and out of my Music folder until I found the one that breaks it. Conveniently it's a creative commons song so you can download it too! Track one "Overture" on this album causes the segfault.

http://www.jamendo.com/en/list/a57713/ancient-greeks-circus-freaks

Revision history for this message
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) wrote :

alan@deep-thought:~/Music/Intercontinental Music Lab/Ancient Greeks$ eyeD3 01\ -\ Intercontinental\ Music\ Lab\ -\ Overture.mp3

01 - Intercontinental Music Lab - Overture.mp3 [ 1.85 MB ]
-------------------------------------------------------------------------------
Time: 01:15 MPEG1, Layer III [ ~204 kb/s @ 44100 Hz - Joint stereo ]
-------------------------------------------------------------------------------
ID3 v2.4:
title: Overture artist: Intercontinental Music Lab
album: Ancient Greeks & Circus Freaks year: 2009
track: genre: Unknown (id 255)
Publisher/label: Jamendo
Comment: [Description: ID3 v1 Comment] [Lang: eng]
Attribution-Noncommercial-No D
Comment: [Description: ] [Lang: eng]
http://www.jamendo.com Attribution-Noncommercial-No Derivative Works 3.0

WCOM: http://www.jamendo.com
WCOP: http://creativecommons.org/licenses/by-nc-nd/3.0/
WOAF: http://www.jamendo.com/en/track/492324
WOAR: http://www.jamendo.com/en/artist/Intercontinental_Music_Lab
WOAS: http://www.jamendo.com/en/album/57713
WPUB: http://www.jamendo.com

FRONT_COVER Image: [Size: 28643 bytes] [Type: image/jpeg]
Description:

Revision history for this message
Victor Thompson (vthompson) wrote :

Could you file a separate bug to track this ID3 tag scanning issue? You'll want to associate it with music-app and ubuntu-filemanager-app.

Revision history for this message
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) wrote :

Ok, filed as bug 1203181

summary: - Music app segfaults upon start
+ Music app segfaults when scanning large collections of Music
Revision history for this message
ncuevas (nicolascuevas) wrote :

opening a 38GB music folder.... very slow

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :

Fix committed into lp:music-app at revision 118, scheduled for release in music-app, milestone Unknown

Changed in music-app:
status: Triaged → Fix Committed
David Planella (dpm)
Changed in music-app:
status: Fix Committed → 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.