Bug 17323 - Scanner crashes when music is on NFS mounted directory
: Scanner crashes when music is on NFS mounted directory
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Scanner
: 7.7.0
: PC Ubuntu Linux
: -- normal with 2 votes (vote)
: 7.7.0
Assigned To: Andy Grundman
: libmediascan
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-07-21 01:14 UTC by Erland Isaksson
Modified: 2011-09-15 11:58 UTC (History)
3 users (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Erland Isaksson 2011-07-21 01:14:12 UTC
It seems like the music scanner crashes when the music in LMS is stored on a NFS mounted directory.

I get this when I try to scan from the command line:
[11-07-21 03:36:33.5262] Slim::Utils::Scanner::LMS::__ANON__ (707) Handling new image /mnt/flacmusic/Absolute Music 23/cover.jpg
Segmentation fault

I've tried the same library on the same computer but mounted the directory via VirtualBox shared folders and then it works correctly as far as I can see.

I haven't seen the problem in standard 7.6 which I use with NFS mounted directories, so I think this is something specific to LMS.
Comment 1 Erland Isaksson 2011-07-21 22:03:44 UTC
With some more extensive logging enabled, it instead crashes with:
Scanning file /mnt/flacmusic/Laleh - Me and Simon/folder.jpg
Init JPEG buffer src, 4096 bytes in buffer
Resizing from 500 x 496 -> 300 x 297
Using JPEG scale factor 1/1, new source dimensions 500 x 496
thumb using width padding 0, inner width 299, height padding 0, inner height 0, bgcolor 0
[11-07-22 01:02:18.1660] Slim::Utils::Scanner::LMS::__ANON__ (707) Handling new image /mnt/flacmusic/Laleh - Me and Simon/folder.jpg
Segmentation fault
Comment 2 Michael Herger 2011-08-30 23:36:46 UTC
Did you ever test with a SMB mount? Would be good to know whether it's NFS only.
Comment 3 Michael Herger 2011-08-30 23:37:43 UTC
> Did you ever test with a SMB mount? Would be good to know whether it's NFS
> only.

Just read your forum posting where you mentioned SMB to be ok.

http://forums.slimdevices.com/showpost.php?p=654287&postcount=11
Comment 4 Andy Grundman 2011-09-14 13:38:37 UTC
I tested NFS from a Debian 5 client to a ReadyNAS, and had no problems scanning. Do you still see this?

You could try getting some info from a core dump:

ulimit -c unlimited
<reproduce segfault>
gdb perl core
bt
Comment 5 Erland Isaksson 2011-09-14 23:14:40 UTC
(In reply to comment #4)
> I tested NFS from a Debian 5 client to a ReadyNAS, and had no problems
> scanning. Do you still see this?
> 
> You could try getting some info from a core dump:
> 
> ulimit -c unlimited
> <reproduce segfault>
> gdb perl core
> bt

On the Ubuntu 10.04 machine which I had the problem on previously it no longer seems to crash it now seems to scan all files properly.

On my Ubuntu 8.04 development machine, using the same NFS share, it doesn't crash it just hangs with the following message:
[11-09-15 08:04:16.9296] Slim::Music::Import::runImporter (475) Starting Slim::Media::MediaFolderScan scan
*** glibc detected *** /usr/bin/perl: malloc(): memory corruption: 0x09ed3e80 ***
(The number is different each time I run it)

I guess the core dump won't do you any good in this case as it's not crashing it just hangs and doesn't use any CPU ?

The 8.04 machine have libglib2.0-0 of version 2.16.6-0ubuntu1.2

The memory corruption seems to be related to the media scanner not the music scanner because it doesn't happen if I disable Video and Pictures for the configured music folder under "File Types".

Would it be better to handle this in a new bug report ? It doesn't seem to be the same issue as the original problem.
Comment 6 Erland Isaksson 2011-09-14 23:21:42 UTC
Also, not sure if this is related, but my MythTV video folder still doesn't work on 10.04, I get messages like these both when mounting it via NFS and Samba:
stat error on file /mnt/video1/1081_20060803121400.mpg, errno=75

And scanner ends with a segmentation fault, running the gdb command as you instructed gives this:

GNU gdb (GDB) 7.1-ubuntu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/perl...(no debugging symbols found)...done.
[New Thread 22658]

warning: Can't read pathname for load map: Input/output error.
Reading symbols from /lib/tls/i686/cmov/libdl.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/tls/i686/cmov/libdl.so.2
Reading symbols from /lib/tls/i686/cmov/libm.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/tls/i686/cmov/libm.so.6
Reading symbols from /lib/tls/i686/cmov/libpthread.so.0...(no debugging symbols found)...done.
Loaded symbols for /lib/tls/i686/cmov/libpthread.so.0
Reading symbols from /lib/tls/i686/cmov/libc.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/tls/i686/cmov/libc.so.6
Reading symbols from /lib/tls/i686/cmov/libcrypt.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/tls/i686/cmov/libcrypt.so.1
Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /usr/lib/perl/5.10/auto/Cwd/Cwd.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/perl/5.10/auto/Cwd/Cwd.so
Reading symbols from /usr/lib/perl/5.10/auto/Fcntl/Fcntl.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/perl/5.10/auto/Fcntl/Fcntl.so
Reading symbols from /usr/lib/perl/5.10/auto/POSIX/POSIX.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/perl/5.10/auto/POSIX/POSIX.so
Reading symbols from /lib/tls/i686/cmov/libnss_compat.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/tls/i686/cmov/libnss_compat.so.2
Reading symbols from /lib/tls/i686/cmov/libnsl.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/tls/i686/cmov/libnsl.so.1
Reading symbols from /lib/tls/i686/cmov/libnss_nis.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/tls/i686/cmov/libnss_nis.so.2
Reading symbols from /lib/tls/i686/cmov/libnss_files.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/tls/i686/cmov/libnss_files.so.2
Reading symbols from /usr/lib/perl/5.10/auto/Time/HiRes/HiRes.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/perl/5.10/auto/Time/HiRes/HiRes.so
Reading symbols from /lib/tls/i686/cmov/librt.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/tls/i686/cmov/librt.so.1
Reading symbols from /var/lib/sbssvn/squeezeboxserver/CPAN/arch/5.10/i386-linux-thread-multi/auto/DBI/DBI.so...(no debugging symbols found)...done.
Loaded symbols for /var/lib/sbssvn/squeezeboxserver/CPAN/arch/5.10/i386-linux-thread-multi/auto/DBI/DBI.so
Reading symbols from /usr/lib/perl/5.10/auto/List/Util/Util.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/perl/5.10/auto/List/Util/Util.so
Reading symbols from /var/lib/sbssvn/squeezeboxserver/CPAN/arch/5.10/i386-linux-thread-multi/auto/HTML/Parser/Parser.so...(no debugging symbols found)...done.
Loaded symbols for /var/lib/sbssvn/squeezeboxserver/CPAN/arch/5.10/i386-linux-thread-multi/auto/HTML/Parser/Parser.so
Reading symbols from /var/lib/sbssvn/squeezeboxserver/CPAN/arch/5.10/i386-linux-thread-multi/auto/XML/Parser/Expat/Expat.so...(no debugging symbols found)...done.
Loaded symbols for /var/lib/sbssvn/squeezeboxserver/CPAN/arch/5.10/i386-linux-thread-multi/auto/XML/Parser/Expat/Expat.so
Reading symbols from /var/lib/sbssvn/squeezeboxserver/CPAN/arch/5.10/i386-linux-thread-multi/auto/YAML/XS/LibYAML/LibYAML.so...(no debugging symbols found)...done.
Loaded symbols for /var/lib/sbssvn/squeezeboxserver/CPAN/arch/5.10/i386-linux-thread-multi/auto/YAML/XS/LibYAML/LibYAML.so
Reading symbols from /usr/lib/perl/5.10/auto/B/B.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/perl/5.10/auto/B/B.so
Reading symbols from /usr/lib/perl/5.10/auto/Sys/Hostname/Hostname.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/perl/5.10/auto/Sys/Hostname/Hostname.so
Reading symbols from /usr/lib/perl/5.10/auto/IO/IO.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/perl/5.10/auto/IO/IO.so
Reading symbols from /usr/lib/perl/5.10/auto/Storable/Storable.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/perl/5.10/auto/Storable/Storable.so
Reading symbols from /var/lib/sbssvn/squeezeboxserver/CPAN/arch/5.10/i386-linux-thread-multi/auto/JSON/XS/XS.so...(no debugging symbols found)...done.
Loaded symbols for /var/lib/sbssvn/squeezeboxserver/CPAN/arch/5.10/i386-linux-thread-multi/auto/JSON/XS/XS.so
Reading symbols from /usr/lib/perl/5.10/auto/Encode/Encode.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/perl/5.10/auto/Encode/Encode.so
Reading symbols from /usr/lib/perl/5.10/auto/Encode/Unicode/Unicode.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/perl/5.10/auto/Encode/Unicode/Unicode.so
Reading symbols from /usr/lib/perl/5.10/auto/Digest/MD5/MD5.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/perl/5.10/auto/Digest/MD5/MD5.so
Reading symbols from /var/lib/sbssvn/squeezeboxserver/CPAN/arch/5.10/i386-linux-thread-multi/auto/Digest/SHA1/SHA1.so...(no debugging symbols found)...done.
Loaded symbols for /var/lib/sbssvn/squeezeboxserver/CPAN/arch/5.10/i386-linux-thread-multi/auto/Digest/SHA1/SHA1.so
Reading symbols from /var/lib/sbssvn/squeezeboxserver/CPAN/arch/5.10/i386-linux-thread-multi/auto/Sub/Name/Name.so...(no debugging symbols found)...done.
Loaded symbols for /var/lib/sbssvn/squeezeboxserver/CPAN/arch/5.10/i386-linux-thread-multi/auto/Sub/Name/Name.so
Reading symbols from /usr/lib/perl/5.10/auto/mro/mro.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/perl/5.10/auto/mro/mro.so
Reading symbols from /var/lib/sbssvn/squeezeboxserver/CPAN/arch/5.10/i386-linux-thread-multi/auto/Class/XSAccessor/XSAccessor.so...(no debugging symbols found)...done.
Loaded symbols for /var/lib/sbssvn/squeezeboxserver/CPAN/arch/5.10/i386-linux-thread-multi/auto/Class/XSAccessor/XSAccessor.so
Reading symbols from /var/lib/sbssvn/squeezeboxserver/CPAN/arch/5.10/i386-linux-thread-multi/auto/DBD/SQLite/SQLite.so...(no debugging symbols found)...done.
Loaded symbols for /var/lib/sbssvn/squeezeboxserver/CPAN/arch/5.10/i386-linux-thread-multi/auto/DBD/SQLite/SQLite.so
Reading symbols from /usr/lib/libstdc++.so.6...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libstdc++.so.6
Reading symbols from /lib/libgcc_s.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /var/lib/sbssvn/squeezeboxserver/CPAN/arch/5.10/i386-linux-thread-multi/auto/Media/Scan/Scan.so...(no debugging symbols found)...done.
Loaded symbols for /var/lib/sbssvn/squeezeboxserver/CPAN/arch/5.10/i386-linux-thread-multi/auto/Media/Scan/Scan.so
Reading symbols from /lib/libbz2.so.1.0...(no debugging symbols found)...done.
Loaded symbols for /lib/libbz2.so.1.0
Reading symbols from /lib/libz.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libz.so.1
Reading symbols from /usr/lib/perl/5.10/auto/Socket/Socket.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/perl/5.10/auto/Socket/Socket.so
Reading symbols from /var/lib/sbssvn/squeezeboxserver/CPAN/arch/5.10/i386-linux-thread-multi/auto/EV/EV.so...(no debugging symbols found)...done.
Loaded symbols for /var/lib/sbssvn/squeezeboxserver/CPAN/arch/5.10/i386-linux-thread-multi/auto/EV/EV.so
Reading symbols from /usr/lib/perl/5.10/auto/MIME/Base64/Base64.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/perl/5.10/auto/MIME/Base64/Base64.so
Reading symbols from /var/lib/sbssvn/squeezeboxserver/CPAN/arch/5.10/i386-linux-thread-multi/auto/Audio/Scan/Scan.so...(no debugging symbols found)...done.
Loaded symbols for /var/lib/sbssvn/squeezeboxserver/CPAN/arch/5.10/i386-linux-thread-multi/auto/Audio/Scan/Scan.so
Reading symbols from /usr/lib/perl/5.10/auto/File/Glob/Glob.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/perl/5.10/auto/File/Glob/Glob.so
Reading symbols from /var/lib/sbssvn/squeezeboxserver/CPAN/arch/5.10/i386-linux-thread-multi/auto/Compress/Raw/Zlib/Zlib.so...(no debugging symbols found)...done.
Loaded symbols for /var/lib/sbssvn/squeezeboxserver/CPAN/arch/5.10/i386-linux-thread-multi/auto/Compress/Raw/Zlib/Zlib.so
Core was generated by `/usr/bin/perl /var/lib/sbssvn/squeezeboxserver/scanner.pl --priority=0 --logcon'.
Program terminated with signal 11, Segmentation fault.
#0  0x030230ba in av_packet_split_side_data () from /var/lib/sbssvn/squeezeboxserver/CPAN/arch/5.10/i386-linux-thread-multi/auto/Media/Scan/Scan.so
(gdb) bt
#0  0x030230ba in av_packet_split_side_data () from /var/lib/sbssvn/squeezeboxserver/CPAN/arch/5.10/i386-linux-thread-multi/auto/Media/Scan/Scan.so
#1  0x0a8df2c0 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb)
Comment 7 Andy Grundman 2011-09-15 05:24:31 UTC
How big is that MythTV mpg file? I have a test file that also crashes in av_packet_split_side_data, I need to spend some more time on that one.
Comment 8 Erland Isaksson 2011-09-15 05:28:02 UTC
(In reply to comment #7)
> How big is that MythTV mpg file? I have a test file that also crashes in
> av_packet_split_side_data, I need to spend some more time on that one.

It's 3.3 GB
Comment 9 SVN Bot 2011-09-15 11:58:40 UTC
 == Auto-comment from SVN commit #33463 to the slim repo by agrundman ==
 == http://svn.slimdevices.com/slim?view=revision&revision=33463 ==

Fixed bug 17323 and bug 17573, Media::Scan 04773839