TMS 6.0.30 on QNAP TS-109II dies when caching pictures

Other OS or NAS discussions
Post Reply
sba
Posts:28
Joined:Sun Jun 05, 2011 12:21 pm
AV Hardware:Server : TwonkyMedia 6.0.30 qkpg build running on QNAP TS-109II
Clients : Noxio Audio 1, Yamaha RX-V1067 AV receiver, Sony BDP-S580 Blu-Ray player
TMS 6.0.30 on QNAP TS-109II dies when caching pictures

Post by sba » Sun Jun 05, 2011 2:25 pm

I've just purchased a DNLA-compliant Sony BDP-S580 blu-ray player so I wanted to try serving my pictures.

I'm running the qpkg build of TMS 6.0.30.

When my picture folder is shared, TMS dies after some time with the following message on the console where I have started it from:

*** glibc detected *** double free or corruption (out): 0x40210c88 ***

The last entry written to the logfile is:

2:27:51:511 [Info] - LOG_SYSTEM: transcode_this_item : transcode /share/P/Photos/2010-08-20/IMG_0790.JPG
12:27:51:513 [Trace] - LOG_SYSTEM: transcode_this_item : JPEG1920x1080 --> /var/twonkymedia/twonkymedia/db/cache/images/9b8291492cd2fed2eb20d68ed01bedc4/1920x1080/IMG_0790.JPG
12:27:51:513 [Info] - LOG_SYSTEM: system_call_waiting_prio : strProg /share/HDA_DATA/.qpkg/TwonkyMedia/cgi-bin/cgi-jpegscale
12:27:51:514 [Info] - LOG_SYSTEM: system_call_waiting_prio : strParam "/share/P/Photos/2010-08-20/IMG_0790.JPG" "/var/twonkymedia/twonkymedia/db/cache/images/9b8291492cd2fed2eb20d68ed01bedc4/1920x1080/IMG_0790.JPG" "1920" "1080"
12:27:51:534 [Trace] - LOG_SYSTEM: system_call_waiting_prio : waitpid 23927...


Any clue?

Twonky_Rick
Posts:3816
Joined:Wed Nov 19, 2008 1:59 am
AV Hardware:Samsung 650 Series TV (2010), 4.5TB HP MediaSmart server with 100,000 songs, 5) AT&T U-Verse STB, CE form-factor Media Center PC and 6 other networked PCs running TwonkyManager, 2 Sonos ZP80, Sonos S5 speaker, Apple TV (running XBMC), Roku Soundbridge, X-Box 360, Sony PS3, Kodak 10" Wireless Photo Frame, iPhone with PlugPlayer software, Sonos CR-100.
Location:San Diego
Contact:

Re: TMS 6.0.30 on QNAP TS-109II dies when caching pictures

Post by Twonky_Rick » Mon Jun 06, 2011 10:32 pm

I've forwarded this info to an engineer. I'll let you know if they have a suggestion for you.

- Rick
Follow me on Twitter! mostlytech1
Checkout my blog: http://mostly-tech.com/

sba
Posts:28
Joined:Sun Jun 05, 2011 12:21 pm
AV Hardware:Server : TwonkyMedia 6.0.30 qkpg build running on QNAP TS-109II
Clients : Noxio Audio 1, Yamaha RX-V1067 AV receiver, Sony BDP-S580 Blu-Ray player

Re: TMS 6.0.30 on QNAP TS-109II dies when caching pictures

Post by sba » Tue Jun 07, 2011 8:25 am

Thx Rick.

Note that in the meantime I have found out TMS dies even if no pictures are included, even if I rebuild the database from scratch. It gets rebuilt OK, the server remains up for several hours, and then just disappears... I have kept logging enabled so I can provide the file to you upon request (but apparently not via this forum as it doesn't seem to support attached files).

Best regards,

Stéphane.

P.S. I'm a professional software engineer so don't hesitate to ask me for "complex" things e.g. involving shell-level stuff. I could even run a debug / instrumented build if needed.

[quote="TMM_Product_Manager"]I've forwarded this info to an engineer. I'll let you know if they have a suggestion for you.

- Rick[/quote]

Twonky_Rick
Posts:3816
Joined:Wed Nov 19, 2008 1:59 am
AV Hardware:Samsung 650 Series TV (2010), 4.5TB HP MediaSmart server with 100,000 songs, 5) AT&T U-Verse STB, CE form-factor Media Center PC and 6 other networked PCs running TwonkyManager, 2 Sonos ZP80, Sonos S5 speaker, Apple TV (running XBMC), Roku Soundbridge, X-Box 360, Sony PS3, Kodak 10" Wireless Photo Frame, iPhone with PlugPlayer software, Sonos CR-100.
Location:San Diego
Contact:

Re: TMS 6.0.30 on QNAP TS-109II dies when caching pictures

Post by Twonky_Rick » Tue Jun 07, 2011 6:57 pm

Thanks for the offer. I've passed it along with your new info.

One of our engineers is going to try to reproduce this in our lab. He suggests that you reinstall the newest version of TwonkyServer again and see if that makes a difference.

- Rick
Follow me on Twitter! mostlytech1
Checkout my blog: http://mostly-tech.com/

sba
Posts:28
Joined:Sun Jun 05, 2011 12:21 pm
AV Hardware:Server : TwonkyMedia 6.0.30 qkpg build running on QNAP TS-109II
Clients : Noxio Audio 1, Yamaha RX-V1067 AV receiver, Sony BDP-S580 Blu-Ray player

Re: TMS 6.0.30 on QNAP TS-109II dies when caching pictures

Post by sba » Tue Jun 07, 2011 7:54 pm

Before I attempt to install the newest binaries (assuming I can find them on your website for the exact architecture QNAP's TS-109II is using -- maybe you can help me pick from the list at http://www.twonkyforum.com/downloads/6.0.32/ ? And how would I activate that binary? I usually get builds from QNAP and never have attempted a manual install...) I will try to rebuild the database once more, and collect a fresh logfile from the point of startup to the crash.

I don't know whether you guys can get a repro -- it's probably related to some file(s) in the directory I share...

I'll keep you posted.

Best regards,

Stéphane.


[quote="TMM_Product_Manager"]Thanks for the offer. I've passed it along with your new info.

One of our engineers is going to try to reproduce this in our lab. He suggests that you reinstall the newest version of TwonkyServer again and see if that makes a difference.

- Rick[/quote]

Twonky_Rick
Posts:3816
Joined:Wed Nov 19, 2008 1:59 am
AV Hardware:Samsung 650 Series TV (2010), 4.5TB HP MediaSmart server with 100,000 songs, 5) AT&T U-Verse STB, CE form-factor Media Center PC and 6 other networked PCs running TwonkyManager, 2 Sonos ZP80, Sonos S5 speaker, Apple TV (running XBMC), Roku Soundbridge, X-Box 360, Sony PS3, Kodak 10" Wireless Photo Frame, iPhone with PlugPlayer software, Sonos CR-100.
Location:San Diego
Contact:

Re: TMS 6.0.30 on QNAP TS-109II dies when caching pictures

Post by Twonky_Rick » Tue Jun 07, 2011 11:53 pm

Unfortunately I know nothing about installing TwonkyServer on a NAS. Unless you can find someone here who has done this on a QNAP NAS, I recommend that you wait for an official update from QNAP. You can really mess things up if you don't do things correctly.

Since you're more technical than most, I will share some directions I saw for another NAS, that might give you some clues. But unless you have a way to revert back to your original factory install if things go wrong, I would recommend you do NOT attempt this.

The "admin" account is different from "root". Search for "terastation root access" or similar.

If you want or need to install it manually you need to do this:

- Get system level access to the NAS (ssh or telnet)

- Locate the Twonky installation directory on the NAS (often something like /usr/local/TwonkyVision...).

- Rename the original installation directory (e.g. append something like "_org")

- Create a new folder named as the original installation directory and place the 6.x files there.

- You might need to edit the startup script that launches Twonky (usually located in the folder in /etc/init.d/) and append the "-appdata" switch to the command line. Using the -appdata command line property, you can tell the 6.x servers where to place all runtime generated files. On most NAS devices you need to specify that to prevent Twonky from writing to the ram disc.
Follow me on Twitter! mostlytech1
Checkout my blog: http://mostly-tech.com/

sba
Posts:28
Joined:Sun Jun 05, 2011 12:21 pm
AV Hardware:Server : TwonkyMedia 6.0.30 qkpg build running on QNAP TS-109II
Clients : Noxio Audio 1, Yamaha RX-V1067 AV receiver, Sony BDP-S580 Blu-Ray player

Re: TMS 6.0.30 on QNAP TS-109II dies when caching pictures

Post by sba » Wed Jun 08, 2011 7:03 am

Hi,

Thx for the attempt to create instructions, but that's not what I need. For a simple test, I don't need to know how to properly install TMS so that it runs automatically, I just need to know what binaries I need to use. I have tried the little-endian ARM glibc binaries but they don't start up... Wrong build? Missing libraries? I cannot even run 'ldd' on the 'twonkymedia' launcher...

My test run during the night has already died. Would you be interested in the logfile? If yes, how can I send it to you?

Best regards,

Stéphane.


[quote="TMM_Product_Manager"]Unfortunately I know nothing about installing TwonkyServer on a NAS. Unless you can find someone here who has done this on a QNAP NAS, I recommend that you wait for an official update from QNAP. You can really mess things up if you don't do things correctly.

Since you're more technical than most, I will share some directions I saw for another NAS, that might give you some clues. But unless you have a way to revert back to your original factory install if things go wrong, I would recommend you do NOT attempt this.

The "admin" account is different from "root". Search for "terastation root access" or similar.

[...]

- You might need to edit the startup script that launches Twonky (usually located in the folder in /etc/init.d/) and append the "-appdata" switch to the command line. Using the -appdata command line property, you can tell the 6.x servers where to place all runtime generated files. On most NAS devices you need to specify that to prevent Twonky from writing to the ram disc.[/quote]

sba
Posts:28
Joined:Sun Jun 05, 2011 12:21 pm
AV Hardware:Server : TwonkyMedia 6.0.30 qkpg build running on QNAP TS-109II
Clients : Noxio Audio 1, Yamaha RX-V1067 AV receiver, Sony BDP-S580 Blu-Ray player

Re: TMS 6.0.30 on QNAP TS-109II dies when caching pictures

Post by sba » Wed Jun 08, 2011 10:27 pm

I've reverted to the QNAP-supplied TMS 5.1.6

It dies after some time the exact same way (I did rebuild the database from scratch).

Is there anything you'd suggest?

Want to look at the new (5.1.6) logfile?

Best regards,

Stéphane.

Twonky_Rick
Posts:3816
Joined:Wed Nov 19, 2008 1:59 am
AV Hardware:Samsung 650 Series TV (2010), 4.5TB HP MediaSmart server with 100,000 songs, 5) AT&T U-Verse STB, CE form-factor Media Center PC and 6 other networked PCs running TwonkyManager, 2 Sonos ZP80, Sonos S5 speaker, Apple TV (running XBMC), Roku Soundbridge, X-Box 360, Sony PS3, Kodak 10" Wireless Photo Frame, iPhone with PlugPlayer software, Sonos CR-100.
Location:San Diego
Contact:

Re: TMS 6.0.30 on QNAP TS-109II dies when caching pictures

Post by Twonky_Rick » Wed Jun 08, 2011 11:31 pm

I probably don't need the log file because we were able to reproduce this issue. :) We can see this problem in 6.0.30. It hangs while rebuilding the database. I've asked them to create an official bug report for this issue, which will eventually be assigned to an engineer. Not sure when this will occur however, since everyone is very busy now trying to get TS 6.0.34 and TS 7.0 completed.

- Rick
Follow me on Twitter! mostlytech1
Checkout my blog: http://mostly-tech.com/

Twonky_Rick
Posts:3816
Joined:Wed Nov 19, 2008 1:59 am
AV Hardware:Samsung 650 Series TV (2010), 4.5TB HP MediaSmart server with 100,000 songs, 5) AT&T U-Verse STB, CE form-factor Media Center PC and 6 other networked PCs running TwonkyManager, 2 Sonos ZP80, Sonos S5 speaker, Apple TV (running XBMC), Roku Soundbridge, X-Box 360, Sony PS3, Kodak 10" Wireless Photo Frame, iPhone with PlugPlayer software, Sonos CR-100.
Location:San Diego
Contact:

Re: TMS 6.0.30 on QNAP TS-109II dies when caching pictures

Post by Twonky_Rick » Wed Jun 08, 2011 11:33 pm

Thx for the attempt to create instructions, but that's not what I need. For a simple test, I don't need to know how to properly install TMS so that it runs automatically, I just need to know what binaries I need to use. I have tried the little-endian ARM glibc binaries but they don't start up... Wrong build? Missing libraries? I cannot even run 'ldd' on the 'twonkymedia' launcher...
I don't know which file is best for your QNAP, but others on this forum should know. Hopefully one of them will respond soon.

- Rick
Follow me on Twitter! mostlytech1
Checkout my blog: http://mostly-tech.com/

sba
Posts:28
Joined:Sun Jun 05, 2011 12:21 pm
AV Hardware:Server : TwonkyMedia 6.0.30 qkpg build running on QNAP TS-109II
Clients : Noxio Audio 1, Yamaha RX-V1067 AV receiver, Sony BDP-S580 Blu-Ray player

Re: TMS 6.0.30 on QNAP TS-109II dies when caching pictures

Post by sba » Thu Jun 09, 2011 12:37 pm

I'm kinda surprised that you consider my problem and your repro the same thing.

My current situation is that with any of 4.x, 5.1.6 and 6.0.30, I get the same thing: the server dies after some point.

So either some information is corrupted that does not get re-created when the database is rebuilt (is there a "manual cleanup" procedure?), or one my MP3 files causes the server to crash at some point.

Where can we go from here?

Best regards,

Stéphane.

TMM_Product_Manager wrote:I probably don't need the log file because we were able to reproduce this issue. :) We can see this problem in 6.0.30. It hangs while rebuilding the database.[...]
- Rick

Twonky_Rick
Posts:3816
Joined:Wed Nov 19, 2008 1:59 am
AV Hardware:Samsung 650 Series TV (2010), 4.5TB HP MediaSmart server with 100,000 songs, 5) AT&T U-Verse STB, CE form-factor Media Center PC and 6 other networked PCs running TwonkyManager, 2 Sonos ZP80, Sonos S5 speaker, Apple TV (running XBMC), Roku Soundbridge, X-Box 360, Sony PS3, Kodak 10" Wireless Photo Frame, iPhone with PlugPlayer software, Sonos CR-100.
Location:San Diego
Contact:

Re: TMS 6.0.30 on QNAP TS-109II dies when caching pictures

Post by Twonky_Rick » Thu Jun 09, 2011 4:55 pm

The issue that we were able to reproduce was the one about the server stopping when "Rebuild Database" is clicked on WD MyBook NAS device. We did not go back and test on 4.0 and 5.0. Only 6.0.

A ticket was created on this issue. The check on the status of this issue in the future, please ask me about DLNA-4053.

Seperate from this issue, it sounds like you might also have some corrupted media files. The best solution to this problem is to try and locate and remove those files from your collection.

- Rick
Follow me on Twitter! mostlytech1
Checkout my blog: http://mostly-tech.com/

sba
Posts:28
Joined:Sun Jun 05, 2011 12:21 pm
AV Hardware:Server : TwonkyMedia 6.0.30 qkpg build running on QNAP TS-109II
Clients : Noxio Audio 1, Yamaha RX-V1067 AV receiver, Sony BDP-S580 Blu-Ray player

Re: TMS 6.0.30 on QNAP TS-109II dies when caching pictures

Post by sba » Thu Jun 09, 2011 7:23 pm

How do you suggest I try and locate the problematic file from more than 4,700 files?

Dunno if this can ring a bell, but the last line of the log is almost always:

22:02:55:758 LOG_SCAN filescanner thread checking plugins

or

20:50:14:271 [Trace] - LOG_SCAN: file_scanner : filescanner thread checking plugins

Is there a way to enable more verbose logging, showing all file accesses?
TMM_Product_Manager wrote:.

Seperate from this issue, it sounds like you might also have some corrupted media files. The best solution to this problem is to try and locate and remove those files from your collection.

- Rick

Twonky_Rick
Posts:3816
Joined:Wed Nov 19, 2008 1:59 am
AV Hardware:Samsung 650 Series TV (2010), 4.5TB HP MediaSmart server with 100,000 songs, 5) AT&T U-Verse STB, CE form-factor Media Center PC and 6 other networked PCs running TwonkyManager, 2 Sonos ZP80, Sonos S5 speaker, Apple TV (running XBMC), Roku Soundbridge, X-Box 360, Sony PS3, Kodak 10" Wireless Photo Frame, iPhone with PlugPlayer software, Sonos CR-100.
Location:San Diego
Contact:

Re: TMS 6.0.30 on QNAP TS-109II dies when caching pictures

Post by Twonky_Rick » Sat Jun 11, 2011 12:44 am

Why don't you try this method first and let me know if it helps. If it doesn't, I'll see if I can find a better way for you.

You'll need to scroll down to find the section which refers to corrupt media:
http://www.mediasmartserver.net/2010/03 ... 0-patch-2/

- Rick
Follow me on Twitter! mostlytech1
Checkout my blog: http://mostly-tech.com/

sba
Posts:28
Joined:Sun Jun 05, 2011 12:21 pm
AV Hardware:Server : TwonkyMedia 6.0.30 qkpg build running on QNAP TS-109II
Clients : Noxio Audio 1, Yamaha RX-V1067 AV receiver, Sony BDP-S580 Blu-Ray player

Re: TMS 6.0.30 on QNAP TS-109II dies when caching pictures

Post by sba » Mon Jun 13, 2011 8:02 pm

The approach with the SysInternals tools would probably suit me best... if I was running TMS on Windows (is it possible to run an unregistered / demo build for testing?)

Moving files / directories out of the shared location until I find the problematic file(s) will take me ages... given that TMS doesn't die immediately but only after several hours...

I'll check if I can determine the creation date of my files, to first remove the most recently added files.

Best regards,

Stéphane.

TMM_Product_Manager wrote:Why don't you try this method first and let me know if it helps. If it doesn't, I'll see if I can find a better way for you.

You'll need to scroll down to find the section which refers to corrupt media:
http://www.mediasmartserver.net/2010/03 ... 0-patch-2/

- Rick

sba
Posts:28
Joined:Sun Jun 05, 2011 12:21 pm
AV Hardware:Server : TwonkyMedia 6.0.30 qkpg build running on QNAP TS-109II
Clients : Noxio Audio 1, Yamaha RX-V1067 AV receiver, Sony BDP-S580 Blu-Ray player

Re: TMS 6.0.30 on QNAP TS-109II dies when caching pictures

Post by sba » Wed Jun 15, 2011 8:33 pm

Just to keep you posted: I have moved outside of the shared location the most recent 66 files, and so far TMS 6.0.30 has been running for more than 13 hours...
sba wrote:Moving files / directories out of the shared location until I find the problematic file(s) will take me ages... given that TMS doesn't die immediately but only after several hours...

I'll check if I can determine the creation date of my files, to first remove the most recently added files.

Best regards,

Stéphane.

Twonky_Rick
Posts:3816
Joined:Wed Nov 19, 2008 1:59 am
AV Hardware:Samsung 650 Series TV (2010), 4.5TB HP MediaSmart server with 100,000 songs, 5) AT&T U-Verse STB, CE form-factor Media Center PC and 6 other networked PCs running TwonkyManager, 2 Sonos ZP80, Sonos S5 speaker, Apple TV (running XBMC), Roku Soundbridge, X-Box 360, Sony PS3, Kodak 10" Wireless Photo Frame, iPhone with PlugPlayer software, Sonos CR-100.
Location:San Diego
Contact:

Re: TMS 6.0.30 on QNAP TS-109II dies when caching pictures

Post by Twonky_Rick » Thu Jun 16, 2011 1:03 am

Obviously there is still a corrupted file or something that is messing up the file scanner. On a modern PC, it never takes more than 5-10 minutes to scan a library. Although most NAS CPUs are much slower, I would be surprised if it would ever need to take more than 30 minutes to scan a library. Of course, if they NAS runs out of memory, that could also really slow things down.

- Rick
Follow me on Twitter! mostlytech1
Checkout my blog: http://mostly-tech.com/

sba
Posts:28
Joined:Sun Jun 05, 2011 12:21 pm
AV Hardware:Server : TwonkyMedia 6.0.30 qkpg build running on QNAP TS-109II
Clients : Noxio Audio 1, Yamaha RX-V1067 AV receiver, Sony BDP-S580 Blu-Ray player

Re: TMS 6.0.30 on QNAP TS-109II dies when caching pictures

Post by sba » Thu Jun 16, 2011 6:39 am

Hi Rick,

You obviously got me wrong.

Now that I have removed these 66 files, TMS doesn't die anymore. It has been running for almost 24 hours now, I have played a number of songs, without any problem.

Next step is probably to move back some files (one directory at a time, maybe) until it crashes again.

And I will start another thread about folder.jpg's not showing up anymore on my Yamaha AV receiver with 6.0.30, but that's another story altogether... :P
TMM_Product_Manager wrote:Obviously there is still a corrupted file or something that is messing up the file scanner. On a modern PC, it never takes more than 5-10 minutes to scan a library. Although most NAS CPUs are much slower, I would be surprised if it would ever need to take more than 30 minutes to scan a library. Of course, if they NAS runs out of memory, that could also really slow things down.

- Rick

Twonky_Rick
Posts:3816
Joined:Wed Nov 19, 2008 1:59 am
AV Hardware:Samsung 650 Series TV (2010), 4.5TB HP MediaSmart server with 100,000 songs, 5) AT&T U-Verse STB, CE form-factor Media Center PC and 6 other networked PCs running TwonkyManager, 2 Sonos ZP80, Sonos S5 speaker, Apple TV (running XBMC), Roku Soundbridge, X-Box 360, Sony PS3, Kodak 10" Wireless Photo Frame, iPhone with PlugPlayer software, Sonos CR-100.
Location:San Diego
Contact:

Re: TMS 6.0.30 on QNAP TS-109II dies when caching pictures

Post by Twonky_Rick » Thu Jun 16, 2011 7:30 pm

Sorry. I get a huge number of e-mails each day and I have to read them very quickly. Sometimes I misunderstand things.

At least it's working now. :D

- Rick
Follow me on Twitter! mostlytech1
Checkout my blog: http://mostly-tech.com/

Post Reply