Skip to content
Advertisement

segfault when using shout-python inside a thread

Recently a machine was upgraded/reinstalled from an older Ubuntu version to the most recent Debian version. Since then, I get a segfault in an application I wrote which sends data to an icecast daemon.

After some searching, I focused it down to threading. As soon as I call shout.send from inside a thread, I get a segfault. Below is a minimal piece of code which reproduces the error.

The error occurs on the second-last line (icy_handle.send(chunk))

I am running:

  • Python 2.7
  • shout-python==0.2.1
  • Debian 8.0
  • Linux 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt2-1 (2014-12-08) x86_64 GNU/Linux

I am honestly a bit stumped. After roughly 4 hours of hit-and-miss I am out of ideas. I have not yet tried to set up an old machine representing the old Ubuntu environment. I also don’t remember the exact Ubuntu release. I think it was 12.04 but I am not sure. But I do know that it was running on that system. By the way: there were no hardware changes!

Any ideas?

The example code:

JavaScript

Advertisement

Answer

I can reproduce your problem with 0.2.1, but not with trunk. Please try:

JavaScript

I’m pretty sure that this is the relevant fix:

https://trac.xiph.org/changeset/19174

We should release a new version. Let me get right on to that. (JFTR, this will involve me migrating the repository from SVN to git, so the above URL becomes invalid outside of this particular scope)

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement