Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1365338 - After system update, espeak quits when reading from pipe
Summary: After system update, espeak quits when reading from pipe
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: espeak
Version: 24
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ondřej Lysoněk
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-09 01:26 UTC by Paul DeStefano
Modified: 2016-08-27 10:28 UTC (History)
2 users (show)

Fixed In Version: espeak-1.48.04-9.fc24 espeak-1.48.04-9.fc25
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-08-18 03:50:28 UTC


Attachments (Terms of Use)
proposed patch (deleted)
2016-08-15 12:22 UTC, Ondřej Lysoněk
no flags Details | Diff

Description Paul DeStefano 2016-08-09 01:26:55 UTC
Description of problem:
I updated my Fedora 24 system yesterday, espeak will not work reading from a pipe.

Version-Release number of selected component (if applicable):
espeak-1.48.04-8.fc24.x86_64

How reproducible:
Always since update.

Steps to Reproduce:
1. create named pipe <pipfile>: mknod /tmp/namedpipe p
2. run espeak: espeak --stdout -f /tmp/namedpipe | paplay --playback
3. send text to pipe: echo 'hi there' >/tmp/namedpipe

Actual results:
If you strace espeak after step (2), then run step (3) you get:

strace: Process 11283 attached
open("/home/pdestefa/tmp/_reuse/tts.pipe.txt", O_RDONLY) = 3
fstat(1, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
close(3)                                = 0
tgkill(11283, 11285, SIGRTMIN)          = 0
futex(0x7f8f4965f9d0, FUTEX_WAIT, 11285, NULL) = 0
munmap(0x7f8f55e28000, 409600)          = 0
write(1, "RIFF$\360\377\177WAVEfmt \20\0\0\0\1\0\1\0\"V\0\0D\254\0\0"..., 352) = 352
exit_group(0)                           = ?
+++ exited with 0 +++

Output is invalid, only a few hundred bytes.  paplay plays it, but wave contains nothing audible.

Expected results:
Should read from pine and produce wav output.  Should be a read call before close, right?

Additional info:
This worked yesterday!  I've been using this exact same command for months now, since F24 released, and it has worked perfectly.  I use it many times every day.

Espeak works if you use an unnamed pipe (i.e: echo 'hi there' | espeak --stdout | paplay --playback ), so I'm completely baffled why this doesn't work now or what could have changed.

I did not update espeak, or the kernel, but other things.  I realize this isn't a change in espeak that caused this, but I can't think of anyone else who might be able to help me with this new problem other than espeak developers.

Comment 1 Jaroslav Škarvada 2016-08-09 12:01:19 UTC
(In reply to Paul DeStefano from comment #0)
> Description of problem:
> I updated my Fedora 24 system yesterday, espeak will not work reading from a
> pipe.
> 
> Version-Release number of selected component (if applicable):
> espeak-1.48.04-8.fc24.x86_64
> 
> How reproducible:
> Always since update.
> 
> Steps to Reproduce:
> 1. create named pipe <pipfile>: mknod /tmp/namedpipe p
> 2. run espeak: espeak --stdout -f /tmp/namedpipe | paplay --playback
> 3. send text to pipe: echo 'hi there' >/tmp/namedpipe
> 
> Actual results:
> If you strace espeak after step (2), then run step (3) you get:
> 
> strace: Process 11283 attached
> open("/home/pdestefa/tmp/_reuse/tts.pipe.txt", O_RDONLY) = 3
> fstat(1, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
> close(3)                                = 0
> tgkill(11283, 11285, SIGRTMIN)          = 0
> futex(0x7f8f4965f9d0, FUTEX_WAIT, 11285, NULL) = 0
> munmap(0x7f8f55e28000, 409600)          = 0
> write(1, "RIFF$\360\377\177WAVEfmt \20\0\0\0\1\0\1\0\"V\0\0D\254\0\0"...,
> 352) = 352
> exit_group(0)                           = ?
> +++ exited with 0 +++
> 
> Output is invalid, only a few hundred bytes.  paplay plays it, but wave
> contains nothing audible.
> 
> Expected results:
> Should read from pine and produce wav output.  Should be a read call before
> close, right?
> 
> Additional info:
> This worked yesterday!  I've been using this exact same command for months
> now, since F24 released, and it has worked perfectly.  I use it many times
> every day.
> 
> Espeak works if you use an unnamed pipe (i.e: echo 'hi there' | espeak
> --stdout | paplay --playback ), so I'm completely baffled why this doesn't
> work now or what could have changed.
> 
> I did not update espeak, or the kernel, but other things.  I realize this
> isn't a change in espeak that caused this, but I can't think of anyone else
> who might be able to help me with this new problem other than espeak
> developers.

I am not aware of any change. It's also reproducible on f23 (espeak-1.48.04-6.fc23.x86_64). If it worked for you yesterday, I think it was by an 	
coincidence.

Comment 2 Jaroslav Škarvada 2016-08-09 14:12:07 UTC
It has never worked:

espeak.cpp:
filesize = GetFileLength(filename);

This is 0 for FIFO, so the upstream didn't count with FIFOs.

Comment 3 Paul DeStefano 2016-08-10 19:32:00 UTC
I understand the code you found; that makes complete sense.  But, I have incontrovertible proof that it did work for two whole months.  Could GetFileLength() have changed it's behavior?

What happens when espeak uses STDIN?  It must have a different code path for that?

Can I use this bug to get espeak to work with named pipes?  The fact that it works with unnamed pipes and not namedpipes seems like a bug to me, but if that distinction was intentional then I guess it's an enhancement request.  If the former, I could submit a patch, but without knowing the history, I don't feel comfortable designing the solution myself.

Comment 4 Jaroslav Škarvada 2016-08-15 09:56:17 UTC
(In reply to Paul DeStefano from comment #3)
> I understand the code you found; that makes complete sense.  But, I have
> incontrovertible proof that it did work for two whole months.  Could
> GetFileLength() have changed it's behavior?
> 
It seems we rebased it "Fri Mar 7 2014" so if there was any change it had to be done outside of espeak.

> What happens when espeak uses STDIN?  It must have a different code path for
> that?
> 
Yes it's different code path there.

> Can I use this bug to get espeak to work with named pipes?  The fact that it
> works with unnamed pipes and not namedpipes seems like a bug to me, but if
> that distinction was intentional then I guess it's an enhancement request. 
> If the former, I could submit a patch, but without knowing the history, I
> don't feel comfortable designing the solution myself.

Ondra is working on it and I am sure he will provide patch/solution soon.

Comment 5 Ondřej Lysoněk 2016-08-15 12:22:25 UTC
Created attachment 1190885 [details]
proposed patch

The attached patch should resolve the issue. However before rebuilding, I'll send it upstream and wait for their comments.

Comment 6 Paul DeStefano 2016-08-15 21:33:25 UTC
Awesome!  Thanks so much.  I realize not many people were annoyed by this, so I appreciate your help.

Comment 7 Fedora Update System 2016-08-16 12:38:10 UTC
espeak-1.48.04-9.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-fe889d7399

Comment 8 Fedora Update System 2016-08-16 12:58:38 UTC
espeak-1.48.04-9.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-c64030073d

Comment 9 Fedora Update System 2016-08-16 16:25:17 UTC
espeak-1.48.04-9.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-fe889d7399

Comment 10 Fedora Update System 2016-08-16 23:20:55 UTC
espeak-1.48.04-9.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-c64030073d

Comment 11 Fedora Update System 2016-08-18 03:50:25 UTC
espeak-1.48.04-9.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2016-08-27 10:28:45 UTC
espeak-1.48.04-9.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.