Concurrent requests

Discuss issues related to PS3 Media Server development (only for programmers)

Concurrent requests

Postby Raptor399 » Sun Nov 06, 2011 11:33 pm

Issue 1156 is about concurrent requests causing all kinds of nastiness. I suspect it is behind several reports of crashes, stuttering, CPU hogging, etc.

I think I have found the source of the problem, but I'm stuck solving it and could use some help from you guys. :-)

Ideas, anyone?
Raptor399
Project Member
 
Posts: 1916
Joined: Thu Mar 10, 2011 12:06 am

Re: Concurrent requests

Postby Raptor399 » Sat Dec 10, 2011 10:50 am

I commited a fix for this, but it could use some testing.
Please check out my repo and let me know if PMS (still) works as expected - preferably without nasty exceptions in the logs. ;-)
Raptor399
Project Member
 
Posts: 1916
Joined: Thu Mar 10, 2011 12:06 am

Re: Concurrent requests

Postby mazey » Sun Dec 11, 2011 10:15 am

if it was on googlecode i would be able to test it, but i have problems compiling on github, i already tried b4.
PMS 1.90.2 Snapshot - Intel Celeron G1840 2.8Ghz / Asus Z97m-plus / Corsair Vengeance 8GB / Windows 8.1 Pro (64 bit)
mazey
 
Posts: 783
Joined: Sat Oct 24, 2009 9:07 am

Re: Concurrent requests

Postby Raptor399 » Sun Dec 11, 2011 9:23 pm

mazey wrote:if it was on googlecode i would be able to test it, but i have problems compiling on github, i already tried b4.

Did you follow the instructions?
If there's anything not working for you in there, I would like to learn. :-)
Raptor399
Project Member
 
Posts: 1916
Joined: Thu Mar 10, 2011 12:06 am

Re: Concurrent requests

Postby mazey » Mon Dec 12, 2011 12:23 am

nar i didnt i wasnt doing it right at all.
PMS 1.90.2 Snapshot - Intel Celeron G1840 2.8Ghz / Asus Z97m-plus / Corsair Vengeance 8GB / Windows 8.1 Pro (64 bit)
mazey
 
Posts: 783
Joined: Sat Oct 24, 2009 9:07 am

Re: Concurrent requests

Postby StreamHD » Tue Jan 10, 2012 9:03 am

Hi Raptor399

My video's stopped transcoding and I traced it back to this commit. If I disable HTTP V2 engine then videos will transcode again. Attached is the debug.log.
Let me know if you need more information.

Edit: Upon further investigation, the PS3 still transcodes fine with HTTP V2 engine. It is a Samsung TV which doesn't like the commit.
Attachments
debug.zip
(11.68 KiB) Downloaded 92 times
Last edited by StreamHD on Tue Jan 10, 2012 9:22 am, edited 1 time in total.
PMS 1.50.1-Snapshot (latest commit); 400MB buffer;
Samsung LCD D550 Series with custom conf; Sony PS3; Xbox 360;
Win7 x64; JDK-7u2-x64; Intel i7 930 + X58 chipset; 3 x 2GB DDR3 1333Mhz; Gigabit backbone;
StreamHD
 
Posts: 63
Joined: Tue Dec 20, 2011 3:26 am

Re: Concurrent requests

Postby Raptor399 » Tue Jan 10, 2012 9:10 am

Bah, I feared as much. :-(
The buffering logic is more tricky than anticipated. I'll rollback the commit.

Thanks for reporting!
Raptor399
Project Member
 
Posts: 1916
Joined: Thu Mar 10, 2011 12:06 am

Re: Concurrent requests

Postby StreamHD » Tue Jan 10, 2012 9:32 am

Oh the commit is to do with buffering logic. Perhaps it explains why only the Samsung bombs out... I've always had strange buffer behaviour with it. Under normal circumstances, the buffer will start to fill then shoot into the negative before playback starts. The same is happening now except instead of playback I get a still image from the middle of the video.

I have eclipse set up, still learning it but if you point me in the right direction I should be able to gather any debug info you need.
PMS 1.50.1-Snapshot (latest commit); 400MB buffer;
Samsung LCD D550 Series with custom conf; Sony PS3; Xbox 360;
Win7 x64; JDK-7u2-x64; Intel i7 930 + X58 chipset; 3 x 2GB DDR3 1333Mhz; Gigabit backbone;
StreamHD
 
Posts: 63
Joined: Tue Dec 20, 2011 3:26 am

Re: Concurrent requests

Postby ExSport » Tue Jan 10, 2012 9:32 am

StreamHD:
Code: Select all
[pool-4-thread-1] INFO  09:57:40.260 java.lang.ArrayIndexOutOfBoundsException: -1
[pool-4-thread-1] INFO  09:57:40.261    at java.util.ArrayList.add(Unknown Source)
[pool-4-thread-1] INFO  09:57:40.261    at net.pms.io.BufferedOutputFileImpl.getInputStream(BufferedOutputFileImpl.java:259)
[pool-4-thread-1] INFO  09:57:40.261    at net.pms.io.ProcessWrapperImpl.getInputStream(ProcessWrapperImpl.java:234)
[pool-4-thread-1] INFO  09:57:40.261    at net.pms.dlna.DLNAResource.getInputStream(DLNAResource.java:1598)
[pool-4-thread-1] INFO  09:57:40.261    at net.pms.network.RequestV2.answer(RequestV2.java:313)
[pool-4-thread-1] INFO  09:57:40.262    at net.pms.network.RequestHandlerV2.writeResponse(RequestHandlerV2.java:290)
[pool-4-thread-1] INFO  09:57:40.262    at net.pms.network.RequestHandlerV2.messageReceived(RequestHandlerV2.java:253)
[pool-4-thread-1] INFO  09:57:40.262    at org.jboss.netty.handler.stream.ChunkedWriteHandler.handleUpstream(ChunkedWriteHandler.java:148)
[pool-4-thread-1] INFO  09:57:40.262    at org.jboss.netty.handler.execution.ChannelEventRunnable.run(ChannelEventRunnable.java:69)
[pool-4-thread-1] INFO  09:57:40.262    at org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor$ChildExecutor.run(OrderedMemoryAwareThreadPoolExecutor.java:316)
[pool-4-thread-1] INFO  09:57:40.263    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
[pool-4-thread-1] INFO  09:57:40.263    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
[pool-4-thread-1] INFO  09:57:40.263    at java.lang.Thread.run(Unknown Source)
[pool-4-thread-1] DEBUG 09:57:45.345 Setting InputStream new position to: 99,996,000,000
[pool-4-thread-1] DEBUG 09:58:07.862 Setting InputStream new position to: 99,996,000,000
[pool-4-thread-1] DEBUG 09:58:30.366 Setting InputStream new position to: 1
[pool-4-thread-1] DEBUG 09:58:30.517 Setting InputStream new position to: 1
[pool-4-thread-2] INFO  09:59:06.352 java.lang.ArrayIndexOutOfBoundsException: -1
[pool-4-thread-2] INFO  09:59:06.352    at java.util.ArrayList.add(Unknown Source)
[pool-4-thread-2] INFO  09:59:06.352    at net.pms.io.BufferedOutputFileImpl.getInputStream(BufferedOutputFileImpl.java:259)
[pool-4-thread-2] INFO  09:59:06.353    at net.pms.io.ProcessWrapperImpl.getInputStream(ProcessWrapperImpl.java:234)
[pool-4-thread-2] INFO  09:59:06.353    at net.pms.dlna.DLNAResource.getInputStream(DLNAResource.java:1598)
[pool-4-thread-2] INFO  09:59:06.353    at net.pms.network.RequestV2.answer(RequestV2.java:313)
[pool-4-thread-2] INFO  09:59:06.353    at net.pms.network.RequestHandlerV2.writeResponse(RequestHandlerV2.java:290)
[pool-4-thread-2] INFO  09:59:06.353    at net.pms.network.RequestHandlerV2.messageReceived(RequestHandlerV2.java:253)
[pool-4-thread-2] INFO  09:59:06.354    at org.jboss.netty.handler.stream.ChunkedWriteHandler.handleUpstream(ChunkedWriteHandler.java:148)
[pool-4-thread-2] INFO  09:59:06.354    at org.jboss.netty.handler.execution.ChannelEventRunnable.run(ChannelEventRunnable.java:69)
[pool-4-thread-2] INFO  09:59:06.354    at org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor$ChildExecutor.run(OrderedMemoryAwareThreadPoolExecutor.java:316)
[pool-4-thread-2] INFO  09:59:06.354    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
[pool-4-thread-2] INFO  09:59:06.354    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
[pool-4-thread-2] INFO  09:59:06.354    at java.lang.Thread.run(Unknown Source)

Do you have similar log without this commit? In log there are lot of other "problems?" with playing/parsing DVD ISO file plus exception above.
So question is you have problem only with this file or also with others like MKV etc.? Same exception is generated also for mkv files when transcoded?
Thx
ExSport
 
Posts: 2168
Joined: Mon Jan 19, 2009 5:40 pm

Re: Concurrent requests

Postby StreamHD » Tue Jan 10, 2012 9:52 am

I have the problem with all files. Only on Samsung renderer, haven't been able to test Xbox 360 yet. Attached are 2 debug.logs:
1) attempt to transcode mkv with this commit (6edfca169f469b4057650853ad27e76a95fef25c). fails with errors.
2) attempt to transcode mkv with the previous commit (5424aea7b3bd40682eaf2c3bc38ebf7b389a05b1). transcodes successfully without error. (I streamed the movie 1st by mistake, then proceeded to transcode).
Attachments
debug logs with mkv.zip
(15.42 KiB) Downloaded 95 times
PMS 1.50.1-Snapshot (latest commit); 400MB buffer;
Samsung LCD D550 Series with custom conf; Sony PS3; Xbox 360;
Win7 x64; JDK-7u2-x64; Intel i7 930 + X58 chipset; 3 x 2GB DDR3 1333Mhz; Gigabit backbone;
StreamHD
 
Posts: 63
Joined: Tue Dec 20, 2011 3:26 am

Next

Return to Developers

Who is online

Users browsing this forum: Majestic-12 [Bot] and 2 guests