Crashes after first tone played with "pa_simple_Write failed"

Bug #1461755 reported by PaulSchulz
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
morse (Debian)
Fix Released
Unknown
morse (Ubuntu)
Fix Released
High
Kamal Mostafa
Vivid
Fix Released
High
Kamal Mostafa
Wily
Fix Released
High
Kamal Mostafa

Bug Description

*** Ubuntu Vivid SRU Justification -- see Comment #7 ***

-----

On a recently upgraded Ubuntu 15.04

- installing the morse' package,
- Run 'morse a'

Heard a short beep, then program exits with message: "pa_simple_Write failed"

Changed in morse (Ubuntu):
status: New → Confirmed
status: Confirmed → Opinion
PaulSchulz (paulschulz)
Changed in morse (Ubuntu):
status: Opinion → New
Changed in morse (Ubuntu):
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Kamal Mostafa (kamalmostafa) wrote :

Note that the 'morseALSA' program (supplied along with 'morse' in the same package) seems to still work fine.

Changed in morse (Ubuntu):
assignee: nobody → Kamal Mostafa (kamalmostafa)
status: Confirmed → In Progress
Revision history for this message
Kamal Mostafa (kamalmostafa) wrote : fix for morse: pa_simple_write failed

The bug in 'morse':

morse.d/beepPA.c opens a two-channel (stereo) PulseAudio stream, but then
mis-handles it as if it was just one channel of audio data, including
trying to write a non-mulitple of the (stereo) PulseAudio frame size via
pa_simple_write(). Earlier versions of PulseAudio silently ignored the
discrepancy, but newer versions rightly return a PulseAudio "Invalid
argument" error.

Attached patch to morse.d/beepPA.c fixes the bug.

 -Kamal

Changed in morse (Ubuntu Vivid):
status: New → In Progress
assignee: nobody → Kamal Mostafa (kamalmostafa)
importance: Undecided → High
Changed in morse (Debian):
status: Unknown → Incomplete
tags: added: patch
Revision history for this message
Kamal Mostafa (kamalmostafa) wrote :

This is now fixed in Debian's morse (2.4-3), which also merges the only pending ubuntu1 patch, so will land in Wily soon with a Vivid SRU to follow.

Fixed morse (2.4-3) packages for supported Ubuntu versions are available now from the Ubuntu Hams Updates PPA:
    https://launchpad.net/~ubuntu-hams-updates/+archive/ubuntu/ppa

Changed in morse (Debian):
status: Incomplete → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package morse - 2.4-3

---------------
morse (2.4-3) unstable; urgency=high

  * Open a mono (not stereo) PulseAudio output stream and hence avoid
    improperly passing non-multiples of the frame size to pa_simple_write
    (Closes: #784285, LP: #1461755). Thanks to Kamal Mostafa for providing
    the patch.
  * New patch fixing FTBFS (LP: #770766). Thanks to John Nogatch.

 -- Nanakos Chrysostomos <email address hidden> Sat, 06 Jun 2015 12:26:41 +0300

Changed in morse (Ubuntu Wily):
status: In Progress → Fix Released
Revision history for this message
Kamal Mostafa (kamalmostafa) wrote :

Ubuntu Vivid SRU Justification

[Impact]

 * This bug makes 'morse' crash when it tries to sound a "dash" at its
   default speed, rendering the program useless.

 * Vivid's morse (2.4-2ubuntu1) exhibits this bug.

 * This bug is fixed by Debian's morse (2.4-3), which is comprised _only_
   of this bug fix plus the pending ubuntu1 patch currenlty carried in Vivid.
   I.e. the morse (2.4-3) package is the appropriate SRU fix package for
   Vivid.

 * This bug also affected Wily and was fixed by the morse (2.4-3) package.

[Test Case]

 * To reproduce and verify with Vivid's morse (2.4-2ubuntu1).

   1. Run 'morse a' expecting to hear "dot dash" but get "dot <crash>" instead.
   2. Install morse (2.4-3) then run 'morse a' and hear "dot dash".

[Regression Potential]

 * The fix affects only the PulseAudio output back-end; Possible regressions
   would (like the bug) probably affect only the PulseAudio back-end and would
   likely manifest the same way: pa_simple_write failures.

description: updated
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello PaulSchulz, or anyone else affected,

Accepted morse into vivid-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/morse/2.4-3~0ubuntu0.15.04.0 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in morse (Ubuntu Vivid):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Kamal Mostafa (kamalmostafa) wrote :

Verification done for vivid:

ii morse 2.4-3~0ubuntu0.15.04.0 amd64 training program about morse-code for aspiring radio hams

"morse a" and other invocations work fine now.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package morse - 2.4-3~0ubuntu0.15.04.0

---------------
morse (2.4-3~0ubuntu0.15.04.0) vivid; urgency=high

  * Open a mono (not stereo) PulseAudio output stream and hence avoid
    improperly passing non-multiples of the frame size to pa_simple_write
    (Closes: #784285, LP: #1461755). Thanks to Kamal Mostafa for providing
    the patch.
  * New patch fixing FTBFS (LP: #770766). Thanks to John Nogatch.

 -- Nanakos Chrysostomos <email address hidden> Sat, 06 Jun 2015 12:26:41 +0300

Changed in morse (Ubuntu Vivid):
status: Fix Committed → Fix Released
Revision history for this message
Chris Halse Rogers (raof) wrote : Update Released

The verification of the Stable Release Update for morse has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.