pl2303h and ftdi serial port bug

Bug #1542862 reported by Jason Curl
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Expired
Medium
Unassigned

Bug Description

When developing an application using serial ports, behaviour between process restarts is undefined for particular usb serial port chipsets.

Tested chipsets to fail are:
* pl2303H
* ftdi

Tested chipsets to work are:
* 16550A
* pl2303ra

Attached is a minimal test program to recreate the issue. The program needs to run twice, the first to create the problem, the second instance that shows the problem. See the comments at the beginning of the test program to see expected output and observed output.

You'll need the device under question attached and running as the receiver in the test program and a NULL modem cable (3 wire). Easiest to show the problem if you have two of the same USB devices attached and execute the command with "./a.out /dev/ttyUSB0 /dev/ttyUSB1".

Note, flushing, and other workarounds haven't worked, only physically removing and reinserting the problematic devices between runs (in particular, the device that is receiving the data over the serial port).

As there appears to be data in a buffer between runs that can't be properly flushed, I can't say if this is a potential security issue or not.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: linux-image-3.19.0-49-generic 3.19.0-49.55~14.04.1
ProcVersionSignature: Ubuntu 3.19.0-49.55~14.04.1-generic 3.19.8-ckt12
Uname: Linux 3.19.0-49-generic i686
ApportVersion: 2.14.1-0ubuntu3.19
Architecture: i386
CurrentDesktop: Unity
Date: Sun Feb 7 15:28:42 2016
InstallationDate: Installed on 2016-02-04 (2 days ago)
InstallationMedia:

SourcePackage: linux-lts-vivid
UpgradeStatus: No upgrade log present (probably fresh install)
---
ApportVersion: 2.14.1-0ubuntu3.19
Architecture: i386
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: jcurl 2149 F.... pulseaudio
CurrentDesktop: Unity
DistroRelease: Ubuntu 14.04
HibernationDevice: RESUME=UUID=f20d2ed2-18be-4b14-b4f2-d28d8962a377
InstallationDate: Installed on 2016-02-04 (31 days ago)
InstallationMedia:

MachineType: LENOVO 64577WG
NonfreeKernelModules: nvidia
Package: linux (not installed)
PccardctlIdent:
 Socket 0:
   no product info available
PccardctlStatus:
 Socket 0:
   3.3V
  32-bit
  PC Card
ProcFB:

ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.19.0-49-generic root=UUID=77ac576d-595e-4ec1-ae5e-3791f7cfe23b ro quiet splash
ProcVersionSignature: Ubuntu 3.19.0-49.55~14.04.1-generic 3.19.8-ckt12
RelatedPackageVersions:
 linux-restricted-modules-3.19.0-49-generic N/A
 linux-backports-modules-3.19.0-49-generic N/A
 linux-firmware 1.127.20
Tags: trusty
Uname: Linux 3.19.0-49-generic i686
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo
_MarkForUpload: True
dmi.bios.date: 04/08/2010
dmi.bios.vendor: LENOVO
dmi.bios.version: 7LETC7WW (2.27 )
dmi.board.name: 64577WG
dmi.board.vendor: LENOVO
dmi.board.version: Not Available
dmi.chassis.asset.tag: No Asset Information
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Not Available
dmi.modalias: dmi:bvnLENOVO:bvr7LETC7WW(2.27):bd04/08/2010:svnLENOVO:pn64577WG:pvrThinkPadT61p:rvnLENOVO:rn64577WG:rvrNotAvailable:cvnLENOVO:ct10:cvrNotAvailable:
dmi.product.name: 64577WG
dmi.product.version: ThinkPad T61p
dmi.sys.vendor: LENOVO

Revision history for this message
Jason Curl (jcurl) wrote :
Jason Curl (jcurl)
description: updated
Revision history for this message
penalvch (penalvch) wrote :

Jason Curl, thank you for taking the time to report this bug and helping to make Ubuntu better. Please execute the following command only once, as it will automatically gather debugging information, in a terminal:
apport-collect 1542862

affects: linux-lts-vivid (Ubuntu) → linux (Ubuntu)
Changed in linux (Ubuntu):
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Jason Curl (jcurl) wrote : AlsaInfo.txt

apport information

tags: added: apport-collected
description: updated
Revision history for this message
Jason Curl (jcurl) wrote : BootDmesg.txt

apport information

Revision history for this message
Jason Curl (jcurl) wrote : CRDA.txt

apport information

Revision history for this message
Jason Curl (jcurl) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Jason Curl (jcurl) wrote : IwConfig.txt

apport information

Revision history for this message
Jason Curl (jcurl) wrote : Lspci.txt

apport information

Revision history for this message
Jason Curl (jcurl) wrote : Lsusb.txt

apport information

Revision history for this message
Jason Curl (jcurl) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Jason Curl (jcurl) wrote : ProcEnviron.txt

apport information

Revision history for this message
Jason Curl (jcurl) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Jason Curl (jcurl) wrote : ProcModules.txt

apport information

Revision history for this message
Jason Curl (jcurl) wrote : PulseList.txt

apport information

Revision history for this message
Jason Curl (jcurl) wrote : RfKill.txt

apport information

Revision history for this message
Jason Curl (jcurl) wrote : UdevDb.txt

apport information

Revision history for this message
Jason Curl (jcurl) wrote : UdevLog.txt

apport information

Revision history for this message
Jason Curl (jcurl) wrote : WifiSyslog.txt

apport information

penalvch (penalvch)
tags: added: bios-outdated-2.30
Revision history for this message
Jason Curl (jcurl) wrote :

I've updated the BIOS to 2.30, so that now my dmesg shows:
[ 20.346577] thinkpad_acpi: ThinkPad ACPI Extras v0.25
[ 20.346580] thinkpad_acpi: http://ibm-acpi.sf.net/
[ 20.346582] thinkpad_acpi: ThinkPad BIOS 7LETD0WW (2.30 ), EC 7KHT24WW-1.08
[ 20.346583] thinkpad_acpi: Lenovo ThinkPad T61p, model 64577WG

The problem is still reproducible with *no change in behaviour*. So it's not related to the BIOS.

jcurl@leon-ubuntu:~$ sudo dmidecode -s bios-version && sudo dmidecode -s bios-release-date
7LETD0WW (2.30 )
02/27/2012

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
penalvch (penalvch) wrote :

Jason Curl, in order to allow additional upstream developers to examine the issue, at your earliest convenience, could you please test the latest upstream kernel available from http://kernel.ubuntu.com/~kernel-ppa/mainline/?C=N;O=D ? Please keep in mind the following:
1) The one to test is at the very top line at the top of the page (not the daily folder).
2) The release names are irrelevant.
3) The folder time stamps aren't indicative of when the kernel actually was released upstream.
4) Install instructions are available at https://wiki.ubuntu.com/Kernel/MainlineBuilds .

If testing on your main install would be inconvenient, one may:
1) Install Ubuntu to a different partition and then test this there.
2) Backup, or clone the primary install.

If the latest kernel did not allow you to test to the issue (ex. you couldn't boot into the OS) please make a comment in your report about this, and continue to test the next most recent kernel version until you can test to the issue. Once you've tested the upstream kernel, please comment on which kernel version specifically you tested. If this issue is fixed in the mainline kernel, please add the following tags by clicking on the yellow circle with a black pencil icon, next to the word Tags, located at the bottom of the report description:
kernel-fixed-upstream
kernel-fixed-upstream-X.Y-rcZ

Where X, and Y are the first two numbers of the kernel version, and Z is the release candidate number if it exists.

If the mainline kernel does not fix the issue, please add the following tags:
kernel-bug-exists-upstream
kernel-bug-exists-upstream-X.Y-rcZ

Please note, an error to install the kernel does not fit the criteria of kernel-bug-exists-upstream.

Also, you don't need to apport-collect further unless specifically requested to do so.

Once testing of the latest upstream kernel is complete, please mark this report Status Confirmed. Please let us know your results.

Thank you for your understanding.

tags: added: latest-bios-2.30
removed: bios-outdated-2.30
Changed in linux (Ubuntu):
importance: Low → Medium
status: Confirmed → Incomplete
Revision history for this message
Jason Curl (jcurl) wrote :

While I haven't been able to set up another Ubuntu installation just yet, I did need to reinstall something for production and updated to Ubuntu 16.04 (Dev branch) x64 and I confirm that the bug is still there (same machine as in the original problem report).

jcurl@leon-ubuntu:~/Programming/serialunix/build/libnserial/comptest$ uname -a
Linux leon-ubuntu 4.4.0-15-generic #31-Ubuntu SMP Fri Mar 18 19:08:31 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

jcurl@leon-ubuntu:~/Programming/serialunix/build/libnserial/comptest$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu Xenial Xerus (development branch)
Release: 16.04
Codename: xenial

penalvch (penalvch)
tags: added: xenial
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for linux (Ubuntu) because there has been no activity for 60 days.]

Changed in linux (Ubuntu):
status: Incomplete → Expired
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.