FAQ  •  Register  •  Login

Stream interupts with "I/O error: Write end dead"

<<

SysBeh

Serviio newbie

Posts: 10

Joined: Tue Jan 29, 2013 10:27 am

Location: The Hague, Holland

Post Thu May 08, 2014 11:58 am

Stream interupts with "I/O error: Write end dead"

I'm sharing a MMS stream from internet through Serviio 1.4.1.2 on Windows 7 Professional.
This works ok, but the stream interupts a view times a day with the following log entries:
2014-05-08 09:36:18,662 DEBUG [TranscodingJobListener] Transcoding finished; successful: true
2014-05-08 09:36:19,290 DEBUG [WebServer] I/O error: Write end dead


The closest thing to an awnser I found is in this article:
http://techtavern.wordpress.com/2008/07 ... -end-dead/
Unfortunately I cannot translate it to a solution.
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Thu May 08, 2014 12:33 pm

Re: Stream interupts with "I/O error: Write end dead"

is there something else above in the log?
<<

SysBeh

Serviio newbie

Posts: 10

Joined: Tue Jan 29, 2013 10:27 am

Location: The Hague, Holland

Post Thu May 08, 2014 12:46 pm

Re: Stream interupts with "I/O error: Write end dead"

The 20 seconds before:
2014-05-08 09:35:50,416 DEBUG [GETMethodProcessor] Stream entity has length: 759032
2014-05-08 09:35:51,477 DEBUG [ResourceDeliveryProcessor] Request for resource 782 and type 'COVER_IMAGE' received
2014-05-08 09:35:51,477 DEBUG [CoverImageDAOImpl] Reading a CoverImage (id = 782)
2014-05-08 09:35:51,478 DEBUG [CoverImageRetrievalStrategy] Retrieving info of Cover image with id 782
2014-05-08 09:35:51,478 DEBUG [CoverImageDAOImpl] Reading a CoverImage (id = 782)
2014-05-08 09:35:51,478 DEBUG [CoverImageRetrievalStrategy] Retrieving Cover image (SD) with id 782
2014-05-08 09:35:51,478 DEBUG [GETMethodProcessor] Stream entity has length: 5460
2014-05-08 09:35:54,305 DEBUG [GETMethodProcessor] Stream entity has length: 563987
2014-05-08 09:35:55,348 DEBUG [ResourceDeliveryProcessor] Request for resource 783 and type 'COVER_IMAGE' received
2014-05-08 09:35:55,348 DEBUG [CoverImageDAOImpl] Reading a CoverImage (id = 783)
2014-05-08 09:35:55,349 DEBUG [CoverImageRetrievalStrategy] Retrieving info of Cover image with id 783
2014-05-08 09:35:55,349 DEBUG [CoverImageDAOImpl] Reading a CoverImage (id = 783)
2014-05-08 09:35:55,349 DEBUG [CoverImageRetrievalStrategy] Retrieving Cover image (SD) with id 783
2014-05-08 09:35:55,349 DEBUG [GETMethodProcessor] Stream entity has length: 3519
2014-05-08 09:35:58,179 DEBUG [GETMethodProcessor] Stream entity has length: 824171
2014-05-08 09:35:59,338 DEBUG [ResourceDeliveryProcessor] Request for resource 784 and type 'COVER_IMAGE' received
2014-05-08 09:35:59,338 DEBUG [CoverImageDAOImpl] Reading a CoverImage (id = 784)
2014-05-08 09:35:59,338 DEBUG [CoverImageRetrievalStrategy] Retrieving info of Cover image with id 784
2014-05-08 09:35:59,338 DEBUG [CoverImageDAOImpl] Reading a CoverImage (id = 784)
2014-05-08 09:35:59,338 DEBUG [CoverImageRetrievalStrategy] Retrieving Cover image (SD) with id 784
2014-05-08 09:35:59,338 DEBUG [GETMethodProcessor] Stream entity has length: 7126
2014-05-08 09:36:02,185 DEBUG [GETMethodProcessor] Stream entity has length: 686050
2014-05-08 09:36:03,316 DEBUG [ResourceDeliveryProcessor] Request for resource 785 and type 'COVER_IMAGE' received
2014-05-08 09:36:03,316 DEBUG [CoverImageDAOImpl] Reading a CoverImage (id = 785)
2014-05-08 09:36:03,316 DEBUG [CoverImageRetrievalStrategy] Retrieving info of Cover image with id 785
2014-05-08 09:36:03,316 DEBUG [CoverImageDAOImpl] Reading a CoverImage (id = 785)
2014-05-08 09:36:03,316 DEBUG [CoverImageRetrievalStrategy] Retrieving Cover image (SD) with id 785
2014-05-08 09:36:03,317 DEBUG [GETMethodProcessor] Stream entity has length: 6174
2014-05-08 09:36:03,589 DEBUG [RepositoryDAOImpl] Reading all Repositories
2014-05-08 09:36:04,403 DEBUG [RepositoryDAOImpl] Marking Repository 1 as scanned with current timestamp
2014-05-08 09:36:06,142 DEBUG [GETMethodProcessor] Stream entity has length: 421053
2014-05-08 09:36:06,794 DEBUG [FeedUpdaterThread] Checking for new and expired online resources
2014-05-08 09:36:06,794 DEBUG [OnlineRepositoryDAOImpl] Reading all OnlineRepositories
2014-05-08 09:36:06,795 DEBUG [OnlineRepositoryDAOImpl] Reading an OnlineRepository (id = 2)
2014-05-08 09:36:06,796 DEBUG [SearchIndexer] Adding term 'Troelstrazaal' to search index
2014-05-08 09:36:06,796 DEBUG [OnlineRepositoryDAOImpl] Reading an OnlineRepository (id = 5)
2014-05-08 09:36:06,796 DEBUG [FeedUpdaterThread] Skipping retrieving technical metadata for item mmsh://wms.pmedia07.kpnstreaming.nl/Twe ... Extern500k, because its essence is invalid.
2014-05-08 09:36:06,797 DEBUG [SearchIndexer] Adding term 'Perszaal' to search index
2014-05-08 09:36:06,797 DEBUG [OnlineRepositoryDAOImpl] Reading an OnlineRepository (id = 9)
2014-05-08 09:36:06,798 DEBUG [SearchIndexer] Adding term 'Tweede Kamer' to search index
2014-05-08 09:36:06,799 DEBUG [OnlineRepositoryDAOImpl] Reading an OnlineRepository (id = 10)
2014-05-08 09:36:06,799 DEBUG [SearchIndexer] Adding term 'Eerste Kamer' to search index
2014-05-08 09:36:06,800 DEBUG [OnlineRepositoryDAOImpl] Reading an OnlineRepository (id = 12)
2014-05-08 09:36:06,800 DEBUG [FeedUpdaterThread] Skipping retrieving technical metadata for item rtsp://192.168.2.81:554/h264, because its essence is invalid.
2014-05-08 09:36:06,800 DEBUG [SearchIndexer] Adding term 'Hofweg Live 3e' to search index
2014-05-08 09:36:07,036 DEBUG [ResourceDeliveryProcessor] Request for resource 786 and type 'COVER_IMAGE' received
2014-05-08 09:36:07,036 DEBUG [CoverImageDAOImpl] Reading a CoverImage (id = 786)
2014-05-08 09:36:07,037 DEBUG [CoverImageRetrievalStrategy] Retrieving info of Cover image with id 786
2014-05-08 09:36:07,037 DEBUG [CoverImageDAOImpl] Reading a CoverImage (id = 786)
2014-05-08 09:36:07,037 DEBUG [CoverImageRetrievalStrategy] Retrieving Cover image (SD) with id 786
2014-05-08 09:36:07,037 DEBUG [GETMethodProcessor] Stream entity has length: 4132
2014-05-08 09:36:08,305 DEBUG [RepositoryDAOImpl] Marking Repository 2 as scanned with current timestamp
2014-05-08 09:36:09,864 DEBUG [GETMethodProcessor] Stream entity has length: 1073955
2014-05-08 09:36:10,950 DEBUG [ResourceDeliveryProcessor] Request for resource 787 and type 'COVER_IMAGE' received
2014-05-08 09:36:10,950 DEBUG [CoverImageDAOImpl] Reading a CoverImage (id = 787)
2014-05-08 09:36:10,951 DEBUG [CoverImageRetrievalStrategy] Retrieving info of Cover image with id 787
2014-05-08 09:36:10,951 DEBUG [CoverImageDAOImpl] Reading a CoverImage (id = 787)
2014-05-08 09:36:10,951 DEBUG [CoverImageRetrievalStrategy] Retrieving Cover image (SD) with id 787
2014-05-08 09:36:10,951 DEBUG [GETMethodProcessor] Stream entity has length: 6886
2014-05-08 09:36:14,354 DEBUG [SearchManager] Committing search index
2014-05-08 09:36:16,143 DEBUG [GETMethodProcessor] Stream entity has length: 193914
2014-05-08 09:36:16,989 DEBUG [ResourceDeliveryProcessor] Request for resource 788 and type 'COVER_IMAGE' received
2014-05-08 09:36:16,989 DEBUG [CoverImageDAOImpl] Reading a CoverImage (id = 788)
2014-05-08 09:36:16,990 DEBUG [CoverImageRetrievalStrategy] Retrieving info of Cover image with id 788
2014-05-08 09:36:16,990 DEBUG [CoverImageDAOImpl] Reading a CoverImage (id = 788)
2014-05-08 09:36:16,990 DEBUG [CoverImageRetrievalStrategy] Retrieving Cover image (SD) with id 788
2014-05-08 09:36:16,990 DEBUG [GETMethodProcessor] Stream entity has length: 3592
2014-05-08 09:36:18,662 DEBUG [TranscodingJobListener] Transcoding finished; successful: true
2014-05-08 09:36:19,290 DEBUG [WebServer] I/O error: Write end dead
<<

SysBeh

Serviio newbie

Posts: 10

Joined: Tue Jan 29, 2013 10:27 am

Location: The Hague, Holland

Post Mon May 12, 2014 10:53 am

Re: Stream interupts with "I/O error: Write end dead"

In one of three occurrences the error seems to be preceded by:
2014-05-12 11:12:05,290 DEBUG [SearchManager] Committing search index

Also messages which I would like to get rid of are like:
2014-05-12 11:11:03,759 DEBUG [FeedUpdaterThread] Skipping retrieving technical metadata for item rtsp://192.168.2.81:554/h264, because its essence is invalid.

Any suggestions what I can do to troubleshoot this problem further?
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Mon May 12, 2014 8:17 pm

Re: Stream interupts with "I/O error: Write end dead"

It looks like the stream is not available just before it stops, at least to the ffmpeg / serviio process.
<<

SysBeh

Serviio newbie

Posts: 10

Joined: Tue Jan 29, 2013 10:27 am

Location: The Hague, Holland

Post Tue May 20, 2014 2:19 pm

Re: Stream interupts with "I/O error: Write end dead"

I played the stream with VLC directly and with VLC through Serviio simultaneously.
The steam through Serviio interrupted after a while, while the direct stream played on.
This does not exclude the possibility that there was an interruption in the stream, but it does say that there is a way to handle it.
Does the link in my initial post offer a solution?
<<

SysBeh

Serviio newbie

Posts: 10

Joined: Tue Jan 29, 2013 10:27 am

Location: The Hague, Holland

Post Tue Jun 10, 2014 10:32 am

Re: Stream interupts with "I/O error: Write end dead"

Do the following quotes help getting to a solution:
“Write end dead” exceptions will arise when you have:
1) A PipedInputStream connected to a PipedOutputStream and
2) The ends of these pipe are read/writen by two different threads
3) The threads finish without closing their side of the pipe.

If you encapsulate the PipedInputStream into a BufferendInputStream and/or encapsulate the PipedOutpuStream into a BufferedOutputStream, then the problem will get even more non-deterministic.

When using PipedInputStream and PipedOutputStream, now consider:
1) A thread that writes to a stream should always close the OutputStream before terminating.
2) The PipedInputStream should always be read by the same thread. The PipedOutputStream should always be written by the same thread.
3) Of course, the thread of the PipedInputStream should not be the same as the one of the PipedOutputStream, or unexpected deadlock might happen.
4) In general, any InputStream or OutputStream should never be shared among different threads.
Last edited by SysBeh on Wed Aug 06, 2014 7:12 am, edited 1 time in total.
<<

SysBeh

Serviio newbie

Posts: 10

Joined: Tue Jan 29, 2013 10:27 am

Location: The Hague, Holland

Post Tue Jun 24, 2014 8:26 am

Re: Stream interupts with "I/O error: Write end dead"

Serviio seems to use the following syntax:
C:\Program Files\Serviio\bin\\..\lib/ffmpeg.exe -analyzeduration 10000000 -threads auto -i mmsh://213.75.89.223:80/TweedeKamerlive ... Extern500k -y -threads auto -c:v mpeg2video -pix_fmt yuv420p -qscale:v 1 -r 25 -g 15 -c:a ac3 -b:a 384k -ac 2 -map 0:1 -map 0:0 -sn -f vob pipe:
I would like to apply it to get a more detailed error message. It really gives me rumble.

Does anyone have a troubleshoot suggestion?

Return to Serviio Support & Help

Who is online

Users browsing this forum: No registered users and 71 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.