Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #97359 > unrolled thread

Pyserial and Ubuntu Linux kernel 3.13.0-65-generic

Started byRob Gaddi <rgaddi@technologyhighland.invalid>
First post2015-10-02 22:36 +0000
Last post2015-10-07 09:29 +0100
Articles 12 — 5 participants

Back to article view | Back to comp.lang.python


Contents

  Pyserial and Ubuntu Linux kernel 3.13.0-65-generic Rob Gaddi <rgaddi@technologyhighland.invalid> - 2015-10-02 22:36 +0000
    Re: Pyserial and Ubuntu Linux kernel 3.13.0-65-generic Grant Edwards <invalid@invalid.invalid> - 2015-10-02 23:36 +0000
    Re: Pyserial and Ubuntu Linux kernel 3.13.0-65-generic Laura Creighton <lac@openend.se> - 2015-10-03 11:07 +0200
    Re: Pyserial and Ubuntu Linux kernel 3.13.0-65-generic Laura Creighton <lac@openend.se> - 2015-10-03 11:12 +0200
      Re: Pyserial and Ubuntu Linux kernel 3.13.0-65-generic Rob Gaddi <rgaddi@technologyhighland.invalid> - 2015-10-05 16:34 +0000
    Re: Pyserial and Ubuntu Linux kernel 3.13.0-65-generic Laura Creighton <lac@openend.se> - 2015-10-03 11:19 +0200
    Re: Pyserial and Ubuntu Linux kernel 3.13.0-65-generic Michael Torrie <torriem@gmail.com> - 2015-10-03 08:38 -0600
    Re: Pyserial and Ubuntu Linux kernel 3.13.0-65-generic Laura Creighton <lac@openend.se> - 2015-10-03 18:23 +0200
      Re: Pyserial and Ubuntu Linux kernel 3.13.0-65-generic Grant Edwards <invalid@invalid.invalid> - 2015-10-06 21:31 +0000
        Re: Pyserial and Ubuntu Linux kernel 3.13.0-65-generic Rob Gaddi <rgaddi@technologyhighland.invalid> - 2015-10-06 21:46 +0000
        Re: Pyserial and Ubuntu Linux kernel 3.13.0-65-generic Laura Creighton <lac@openend.se> - 2015-10-06 23:51 +0200
    Re: Pyserial and Ubuntu Linux kernel 3.13.0-65-generic Dave Farrance <df@see.replyto.invalid> - 2015-10-07 09:29 +0100

#97359 — Pyserial and Ubuntu Linux kernel 3.13.0-65-generic

FromRob Gaddi <rgaddi@technologyhighland.invalid>
Date2015-10-02 22:36 +0000
SubjectPyserial and Ubuntu Linux kernel 3.13.0-65-generic
Message-ID<mun0t7$68r$1@dont-email.me>
So, this is odd.  I'm running Ubuntu 14.04, and my system did a kernel 
upgrade from the repository from 3.13.0-63-generic to 3.13.0-65-generic.  
And pyserial (2.7, installed through pip) stopped working.

Specifically, when I make read() calls on a Serial object, I get the error

serial.serialutil.SerialException: device reports readiness to read but 
returned no data (device disconnected?)

This comes from the PosixSerial.read() method in serialposix.py, and 
seems to be a result of the select.select call screwing up.

I reboot under 3.13.0-63-generic.  My code works.  I reboot under 
3.13.0-65-generic.  My code doesn't.  Implication would seem to be that 
somehow between these kernel versions, the select() logic in the serial 
driver changed.  This happens regardless of whether the serial port is 
real, FTDI USB-UART, or Prolific USB-UART.

Can anyone else confirm?  Also, who do I try to report this one to?

Thanks,
Rob

-- 
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order.  See above to fix.

[toc] | [next] | [standalone]


#97360

FromGrant Edwards <invalid@invalid.invalid>
Date2015-10-02 23:36 +0000
Message-ID<mun4d8$94e$2@reader1.panix.com>
In reply to#97359
On 2015-10-02, Rob Gaddi <rgaddi@technologyhighland.invalid> wrote:

> Also, who do I try to report this one to?

I'd try here:

https://github.com/pyserial/pyserial/issues

[toc] | [prev] | [next] | [standalone]


#97364

FromLaura Creighton <lac@openend.se>
Date2015-10-03 11:07 +0200
Message-ID<mailman.358.1443863307.28679.python-list@python.org>
In reply to#97359
In a message of Fri, 02 Oct 2015 22:36:23 -0000, Rob Gaddi writes:
>So, this is odd.  I'm running Ubuntu 14.04, and my system did a kernel 
>upgrade from the repository from 3.13.0-63-generic to 3.13.0-65-generic.  
>And pyserial (2.7, installed through pip) stopped working.
>
>Specifically, when I make read() calls on a Serial object, I get the error
>
>serial.serialutil.SerialException: device reports readiness to read but 
>returned no data (device disconnected?)
>
>This comes from the PosixSerial.read() method in serialposix.py, and 
>seems to be a result of the select.select call screwing up.
>
>I reboot under 3.13.0-63-generic.  My code works.  I reboot under 
>3.13.0-65-generic.  My code doesn't.  Implication would seem to be that 
>somehow between these kernel versions, the select() logic in the serial 
>driver changed.  This happens regardless of whether the serial port is 
>real, FTDI USB-UART, or Prolific USB-UART.
>
>Can anyone else confirm?  Also, who do I try to report this one to?
>
>Thanks,
>Rob
>
>-- 
>Rob Gaddi, Highland Technology -- www.highlandtechnology.com
>Email address domain is currently out of order.  See above to fix.
>-- 
>https://mail.python.org/mailman/listinfo/python-list

I think you have this bug
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/460857

or rather, you like the behaviour that ubuntu thinks is buggy,
which never got fixed, and don't like that it changed to be
what ubuntu thinks is correct in .65.

I'd talk to the pyserial issue tracker as the people there ought
to be well aware of this problem, and then see if talking to
ubuntu is the right thing to do.

Laura

[toc] | [prev] | [next] | [standalone]


#97365

FromLaura Creighton <lac@openend.se>
Date2015-10-03 11:12 +0200
Message-ID<mailman.359.1443863551.28679.python-list@python.org>
In reply to#97359
In a message of Sat, 03 Oct 2015 11:07:04 +0200, Laura Creighton writes:
>In a message of Fri, 02 Oct 2015 22:36:23 -0000, Rob Gaddi writes:
>>So, this is odd.  I'm running Ubuntu 14.04, and my system did a kernel 
>>upgrade from the repository from 3.13.0-63-generic to 3.13.0-65-generic.  
>>And pyserial (2.7, installed through pip) stopped working.
>>
>>Specifically, when I make read() calls on a Serial object, I get the error
>>
>>serial.serialutil.SerialException: device reports readiness to read but 
>>returned no data (device disconnected?)
>>
>>This comes from the PosixSerial.read() method in serialposix.py, and 
>>seems to be a result of the select.select call screwing up.
>>
>>I reboot under 3.13.0-63-generic.  My code works.  I reboot under 
>>3.13.0-65-generic.  My code doesn't.  Implication would seem to be that 
>>somehow between these kernel versions, the select() logic in the serial 
>>driver changed.  This happens regardless of whether the serial port is 
>>real, FTDI USB-UART, or Prolific USB-UART.
>>
>>Can anyone else confirm?  Also, who do I try to report this one to?
>>
>>Thanks,
>>Rob
>>
>>-- 
>>Rob Gaddi, Highland Technology -- www.highlandtechnology.com
>>Email address domain is currently out of order.  See above to fix.
>>-- 
>>https://mail.python.org/mailman/listinfo/python-list
>
>I think you have this bug
>https://bugs.launchpad.net/ubuntu/+source/linux/+bug/460857
>
>or rather, you like the behaviour that ubuntu thinks is buggy,
>which never got fixed, and don't like that it changed to be
>what ubuntu thinks is correct in .65.
>
>I'd talk to the pyserial issue tracker as the people there ought
>to be well aware of this problem, and then see if talking to
>ubuntu is the right thing to do.
>
>Laura
>-- 
>https://mail.python.org/mailman/listinfo/python-list

I think I said that poorly.

What I think happened is that ubuntu made some changes to fix this
problem, and along the way they managed to break things for you,
and maybe all pyserial users.  But I would talk to the pyserial people
about that.

Laura

[toc] | [prev] | [next] | [standalone]


#97420

FromRob Gaddi <rgaddi@technologyhighland.invalid>
Date2015-10-05 16:34 +0000
Message-ID<muu8qj$cea$1@dont-email.me>
In reply to#97365
On Sat, 03 Oct 2015 11:12:28 +0200, Laura Creighton wrote:

> In a message of Sat, 03 Oct 2015 11:07:04 +0200, Laura Creighton writes:
>>In a message of Fri, 02 Oct 2015 22:36:23 -0000, Rob Gaddi writes:
>>>So, this is odd.  I'm running Ubuntu 14.04, and my system did a kernel
>>>upgrade from the repository from 3.13.0-63-generic to
>>>3.13.0-65-generic. And pyserial (2.7, installed through pip) stopped
>>>working.
>>>
>>>Specifically, when I make read() calls on a Serial object, I get the
>>>error
>>>
>>>serial.serialutil.SerialException: device reports readiness to read but
>>>returned no data (device disconnected?)
>>>
>>>This comes from the PosixSerial.read() method in serialposix.py, and
>>>seems to be a result of the select.select call screwing up.
>>>
>>>I reboot under 3.13.0-63-generic.  My code works.  I reboot under
>>>3.13.0-65-generic.  My code doesn't.  Implication would seem to be that
>>>somehow between these kernel versions, the select() logic in the serial
>>>driver changed.  This happens regardless of whether the serial port is
>>>real, FTDI USB-UART, or Prolific USB-UART.
>>>
>>>Can anyone else confirm?  Also, who do I try to report this one to?
>>>
>>>Thanks,
>>>Rob
>>>
>>>--
>>>Rob Gaddi, Highland Technology -- www.highlandtechnology.com Email
>>>address domain is currently out of order.  See above to fix.
>>>--
>>>https://mail.python.org/mailman/listinfo/python-list
>>
>>I think you have this bug
>>https://bugs.launchpad.net/ubuntu/+source/linux/+bug/460857
>>
>>or rather, you like the behaviour that ubuntu thinks is buggy, which
>>never got fixed, and don't like that it changed to be what ubuntu thinks
>>is correct in .65.
>>
>>I'd talk to the pyserial issue tracker as the people there ought to be
>>well aware of this problem, and then see if talking to ubuntu is the
>>right thing to do.
>>
>>Laura --
>>https://mail.python.org/mailman/listinfo/python-list
> 
> I think I said that poorly.
> 
> What I think happened is that ubuntu made some changes to fix this
> problem, and along the way they managed to break things for you,
> and maybe all pyserial users.  But I would talk to the pyserial people
> about that.
> 
> Laura

I'm not sure poorly as much as "could have offended someone who hasn't 
been caught by these sorts of issues before".  I took it as meant, that 
one person's bug is another's fix, rather than as "Your bug report is 
stupid and you should feel bad and never Python again."

And thanks for the find on https://bugs.launchpad.net/ubuntu/+source/
linux-lts-trusty/+bug/1501345.  That is PRECISELY what I should have been 
able to find.  I'll make only the excuse that it was late Friday with me 
having to run for the airport and I wanted to at least flag it as an 
issue before I hit the door.

-- 
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order.  See above to fix.

[toc] | [prev] | [next] | [standalone]


#97366

FromLaura Creighton <lac@openend.se>
Date2015-10-03 11:19 +0200
Message-ID<mailman.360.1443863983.28679.python-list@python.org>
In reply to#97359
With better searching, I find this bug.
https://bugs.launchpad.net/ubuntu/+source/linux-lts-trusty/+bug/1501345

Looks like that's the real one.

Laura

[toc] | [prev] | [next] | [standalone]


#97378

FromMichael Torrie <torriem@gmail.com>
Date2015-10-03 08:38 -0600
Message-ID<mailman.365.1443883467.28679.python-list@python.org>
In reply to#97359
On 10/03/2015 03:19 AM, Laura Creighton wrote:
> With better searching, I find this bug.
> https://bugs.launchpad.net/ubuntu/+source/linux-lts-trusty/+bug/1501345
> 
> Looks like that's the real one.

This ubuntu bug and the other bug you mention seem to be about FTDI
devices. Rob said in his original post that the problem occurs with a
real UART serial port as well, and also the prolific USB chipset.

[toc] | [prev] | [next] | [standalone]


#97382

FromLaura Creighton <lac@openend.se>
Date2015-10-03 18:23 +0200
Message-ID<mailman.368.1443889405.28679.python-list@python.org>
In reply to#97359
In a message of Sat, 03 Oct 2015 08:38:53 -0600, Michael Torrie writes:
>On 10/03/2015 03:19 AM, Laura Creighton wrote:
>> With better searching, I find this bug.
>> https://bugs.launchpad.net/ubuntu/+source/linux-lts-trusty/+bug/1501345
>> 
>> Looks like that's the real one.
>
>This ubuntu bug and the other bug you mention seem to be about FTDI
>devices. Rob said in his original post that the problem occurs with a
>real UART serial port as well, and also the prolific USB chipset.
>
>-- 
>https://mail.python.org/mailman/listinfo/python-list

 https://bugs.launchpad.net/ubuntu/+source/linux-lts-trusty/+bug/1501345
 seems to be about a whole lot of serial ports to me, not just FTDI

Laura

[toc] | [prev] | [next] | [standalone]


#97457

FromGrant Edwards <invalid@invalid.invalid>
Date2015-10-06 21:31 +0000
Message-ID<mv1eim$2hd$1@reader1.panix.com>
In reply to#97382
On 2015-10-03, Laura Creighton <lac@openend.se> wrote:

>  https://bugs.launchpad.net/ubuntu/+source/linux-lts-trusty/+bug/1501345
>  seems to be about a whole lot of serial ports to me, not just FTDI

We just ran into the OP's problem where I work: Ununtu kernel updated
and all serial ports stopped working (it isn't just an FTDI problem). 

Booting with the previous kernel makes the serial ports work again.

What I'm trying to figure out: is this something _Ubuntu_ did so that
only affects Ubuntu kernels?  [I haven't seen it mentioned on the
linux-serial mailing list, and nobody other than Ubuntu users seem to
have the problem, so I think the answer to my question is "yes".]

-- 
Grant Edwards               grant.b.edwards        Yow! Am I SHOPLIFTING?
                                  at               
                              gmail.com            

[toc] | [prev] | [next] | [standalone]


#97458

FromRob Gaddi <rgaddi@technologyhighland.invalid>
Date2015-10-06 21:46 +0000
Message-ID<mv1fgf$lve$1@dont-email.me>
In reply to#97457
On Tue, 06 Oct 2015 21:31:02 +0000, Grant Edwards wrote:

> On 2015-10-03, Laura Creighton <lac@openend.se> wrote:
> 
>>  https://bugs.launchpad.net/ubuntu/+source/linux-lts-trusty/
+bug/1501345
>>  seems to be about a whole lot of serial ports to me, not just FTDI
> 
> We just ran into the OP's problem where I work: Ununtu kernel updated
> and all serial ports stopped working (it isn't just an FTDI problem).
> 
> Booting with the previous kernel makes the serial ports work again.
> 
> What I'm trying to figure out: is this something _Ubuntu_ did so that
> only affects Ubuntu kernels?  [I haven't seen it mentioned on the
> linux-serial mailing list, and nobody other than Ubuntu users seem to
> have the problem, so I think the answer to my question is "yes".]

Glad I was able to get you some heads-up on it; I wound up burning 4 
hours before I figured out what the problem was.

I'm not sure if these are Ubuntu specific problems, but I slung some C to 
test and confirmed that they're not Python specific problems.  Pyserial 
uses select(), and on Linux all of select(), poll(), and epoll() are 
handled at the driver level by the same entry point.  Anything in the 
genre is hosed until they get it back under control.

Personally, I'm so upset that I'm going to call Linux and demand my money 
back.  But until then I'm regressed to -63.

-- 
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order.  See above to fix.

[toc] | [prev] | [next] | [standalone]


#97459

FromLaura Creighton <lac@openend.se>
Date2015-10-06 23:51 +0200
Message-ID<mailman.435.1444168305.28679.python-list@python.org>
In reply to#97457
In a message of Tue, 06 Oct 2015 21:31:02 -0000, Grant Edwards writes:
>On 2015-10-03, Laura Creighton <lac@openend.se> wrote:
>
>>  https://bugs.launchpad.net/ubuntu/+source/linux-lts-trusty/+bug/1501345
>>  seems to be about a whole lot of serial ports to me, not just FTDI
>
>We just ran into the OP's problem where I work: Ununtu kernel updated
>and all serial ports stopped working (it isn't just an FTDI problem). 
>
>Booting with the previous kernel makes the serial ports work again.
>
>What I'm trying to figure out: is this something _Ubuntu_ did so that
>only affects Ubuntu kernels?  [I haven't seen it mentioned on the
>linux-serial mailing list, and nobody other than Ubuntu users seem to
>have the problem, so I think the answer to my question is "yes".]
>
>-- 
>Grant Edwards               grant.b.edwards        Yow! Am I SHOPLIFTING?
>                                  at               
>                              gmail.com            

Upstream from ubuntu is debian.
I am running debian unstable.
I did a kernel update, all my serial ports work fine,
but since I don't have a simple script to test if
I have the problem, I cannot swear for certain ubuntu did it ...

Laura

[toc] | [prev] | [next] | [standalone]


#97473

FromDave Farrance <df@see.replyto.invalid>
Date2015-10-07 09:29 +0100
Message-ID<r1l91bhm3lbkklel2bnpmh4qnodldhltrf@4ax.com>
In reply to#97359
Rob Gaddi <rgaddi@technologyhighland.invalid> wrote:

>So, this is odd.  I'm running Ubuntu 14.04, and my system did a kernel 
>upgrade from the repository from 3.13.0-63-generic to 3.13.0-65-generic.  
>And pyserial (2.7, installed through pip) stopped working.

When KDE's "Plasma 5" appeared with Kubuntu 15.04, I found it to be too
new and have too many dysfunctions, so I reverted to Kubuntu 14.04 LTS.

Now this problem.  Looking at the Ubuntu 14.04 repository, I found that
it contained a backported version of the kernel used in 15.04.  So...

Remove "meta" packages that have latest 3.13 kernel as dependencies:

sudo apt-get purge linux-generic linux-signed-generic

Install meta packages that pull in the latest 3.19 kernel:

sudo apt-get install linux-generic-lts-vivid
  linux-signed-generic-lts-vivid

Serial now works fine. The later kernel introduces no functional changes
in (K)ubuntu 14.04 that I can discern.  I presume that since it is a
"backported" version of the 3.19 kernel, that its video drivers have
been matched to Ubuntu 14.04's version of X.Org, and so on.

Anyway, that's what works for me. I could've put a "hold" on the
3.13.0-63 kernel, but this seems a better fix.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web