lircd segfaults with commandir driver

Bug #471452 reported by Ben Garrett
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lirc (Ubuntu)
Invalid
High
Unassigned
Lucid
Invalid
High
Unassigned

Bug Description

Binary package hint: lirc

lirc:
  Installed: 0.8.6-0ubuntu2
  Candidate: 0.8.6-0ubuntu2
  Version table:
 *** 0.8.6-0ubuntu2 0
        500 http://archive.linux.duke.edu karmic/universe Packages
        100 /var/lib/dpkg/status

In Ubuntu 9.10, lirc-0.8.6-0ubuntu2, on both 64-bit and 32-bit platforms, lircd segfaults when /etc/lirc/hardware.conf is configured for the commandir driver.

When using the init script /etc/init.d/lirc to start the daemon, the segfault shows up right away in /var/log/syslog

When testing with
   /usr/sbin/lircd -n --driver=commandir
lircd stays up, but immediately segfaults when I connect to it with irw

I have not been able to test with any other USB receiver hardware, but I've talked to a friend who is using the same version successfully with a hauppauge PVR card.

syslog.1:Nov 1 19:09:59 mythtv kernel: [ 3048.583449] lircd[4443]: segfault at 4641eddc0 ip 0000000000410db4 sp 00007fffdd868930 error 4 in lircd[400000+2b000]

My /etc/lirc/hardware.conf:

--Begin

# /etc/lirc/hardware.conf
#
#Chosen Remote Control
REMOTE="CommandIR2_RCVR"
REMOTE_MODULES=""
REMOTE_DRIVER="commandir"
REMOTE_DEVICE=""
REMOTE_SOCKET=""
REMOTE_LIRCD_CONF=""
REMOTE_LIRCD_ARGS=""

#Chosen IR Transmitter
TRANSMITTER="CommandIR2_XMIT"
TRANSMITTER_MODULES=""
TRANSMITTER_DRIVER="commandir"
TRANSMITTER_DEVICE=""
TRANSMITTER_SOCKET=""
TRANSMITTER_LIRCD_CONF=""
TRANSMITTER_LIRCD_ARGS=""

#Enable lircd
START_LIRCD="true"

#Don't start lircmd even if there seems to be a good config file
#START_LIRCMD="false"

#Try to load appropriate kernel modules
LOAD_MODULES="false"

# Default configuration files for your hardware if any
LIRCMD_CONF=""

#Forcing noninteractive reconfiguration
#If lirc is to be reconfigured by an external application
#that doesn't have a debconf frontend available, the noninteractive
#frontend can be invoked and set to parse REMOTE and TRANSMITTER
#It will then populate all other variables without any user input
#If you would like to configure lirc via standard methods, be sure
#to leave this set to "false"
FORCE_NONINTERACTIVE_RECONFIGURATION="false"
START_LIRCMD=""

--end

Revision history for this message
Brennan Sellner (brennan-sellner) wrote :

I'm having an identical problem on a machine I just upgraded from Intrepid to Karmic. After mucking about for a long time, I was grasping at straws, and manually installed the 0.8.3 packages intended for Hardy from the CommandIR PPA (https://launchpad.net/~commandir-team/+archive/ppa/+packages), since that's the version of LIRC I had working in Ubuntu 8.10. The "lirc - 0.8.3~pre1-0ubuntu7.1+ppa7" packages are working fine for me in Karmic/9.10 (if you install them, remember to pin them to avoid accidental upgrades). The 0.8.4a packages from the same source exhibit the same problems as the official Karmic packages, so the regressions seems to be in 0.8.4. Haven't done any further digging; this has already sucked down half a week's evening hacking time.

If there's any information I can provide or testing I can do to help resolve this regression in the latest LIRC packages, please let me know.

Revision history for this message
Eric Shattow (eshattow) wrote :

Me too.
lirc 0.8.6-0ubuntu2

/etc/lirc/hardware.conf:
#Chosen Remote Control
REMOTE="USB-UIRT-RX"
REMOTE_MODULES=""
REMOTE_DRIVER="usb_uirt_raw"
REMOTE_DEVICE="/dev/ttyUSB0"
REMOTE_SOCKET="/dev/lircd-rx"
REMOTE_LIRCD_CONF=""
REMOTE_LIRCD_ARGS=""
#Chosen IR Transmitter
TRANSMITTER="USB-UIRT-TX"
TRANSMITTER_MODULES=""
TRANSMITTER_DRIVER="usb_uirt_raw"
TRANSMITTER_DEVICE="/dev/ttyUSB0"
TRANSMITTER_SOCKET="/dev/lircd-tx"
TRANSMITTER_LIRCD_CONF=""
TRANSMITTER_LIRCD_ARGS=""

Reproduce:
$ irsend -d /dev/lircd-tx1 send_once "WD_HD_TV_Media_Player_v1" "KEY_POWER"
$ dmesg
[431712.848423] lircd[20427]: segfault at 8 ip 0806abf0 sp bffc6230 error 4 in lircd[8048000+29000]
[431712.849127] lircd[20420]: segfault at 8 ip 0806abf0 sp bfddf5c0 error 4 in lircd[8048000+29000]

Revision history for this message
MarcRandolph (mrand) wrote :

Thank you for helping to improve Lirc by opening this ticket. I am marking this ticket as confirmed because it appears to have enough information to help the developers understand the problem. It is possible I am wrong and another more experienced triager or developer may adjust the status of the ticket to "incomplete" and request additional information.

Changed in lirc (Ubuntu):
importance: Undecided → High
status: New → Triaged
Revision history for this message
CommandIR (commandir) wrote :

I can confirm some reproducibility of this segfault if the USB Bus number > 7. The driver has a hash table that assumes a maximum of 8 USB Buses, but newer computers have more.

Can anyone confirm moving their CommandIR to another USB Bus eliminates the segfault for them? 'lsusb' will show you where it's at.

tags: added: regression-release
Revision history for this message
Novacek (mnovacek) wrote :

I'm seeing the segfault with the USB-UIRT like Eric Shattow above. In my case at least, it's not on a bus >7

Revision history for this message
Andrew L (a-lavers) wrote :

lircd[2766]: segfault at 8 ip 0806abf0 sp bf88f770 error 4 in lircd[8048000+29000]

Mythbuntu
9.10 Karmic
2.6.31-20-generic #57-Ubuntu

lircd 0.8.6

i can reproduce this segfault when configuring both a receive and a transmit with usb uirt2 (see hardware.conf) . If I configure remote only (comment out the transmitter) the remote works fine. If i configure transmitter only (comment out the the remote) the tranmitter works fine. If both are configured, remote does not work and segfault caused by following irsend command

--begin

irsend -d /dev/lircd1 SEND_ONCE SAE8000 3

-- end

Have also reproduce using hd homerun as remote and usbuirt2 as transmitter,

Have not directly reproduced yet, but believe this may happen in other combinations. I also have an Hauppage HD PVR which I failed to configure as a transmitter (hence the purchase of the usb uirt2). This may have been the cause although I am unsure.

I tried to reverse the order of the transmitter and remote (based on some online comments) but problem still appear to happen with transmitter first and remote second or the other way around

I am a newbie to this so apologize in advance if I have omitted details or if this is a known issue. I may be able to help test resolution (dependign on complexity of install)

--- begin

 # /etc/lirc/hardware.conf
#

#Chosen IR Transmitter
TRANSMITTER="SAE8000"
TRANSMITTER_MODULES=""
TRANSMITTER_DRIVER="uirt2_raw"
TRANSMITTER_DEVICE="/dev/ttyUSB0"
TRANSMITTER_SOCKET=""
TRANSMITTER_LIRCD_CONF="/usr/share/lirc/extras/transmitters/scientificatlanta/general.conf"
TRANSMITTER_LIRCD_ARGS=""
#Chosen Remote Control
REMOTE="Samsung BN59-00599A (HD HomeRun)"
REMOTE_MODULES=""
REMOTE_DRIVER="uirt2_raw"
REMOTE_DEVICE="/dev/ttyUSB0"
REMOTE_LIRCD_CONF="samsung/lircd.conf.BN59-00599A"
REMOTE_LIRCD_ARGS=""

#Enable lircd
START_LIRCD="true"

#Don't start lircmd even if there seems to be a good config file
#START_LIRCMD="false"

#Try to load appropriate kernel modules
LOAD_MODULES="true"

# Default configuration files for your hardware if any
LIRCMD_CONF=""

#Forcing noninteractive reconfiguration
#If lirc is to be reconfigured by an external application
#that doesn't have a debconf frontend available, the noninteractive
#frontend can be invoked and set to parse REMOTE and TRANSMITTER
#It will then populate all other variables without any user input
#If you would like to configure lirc via standard methods, be sure
#to leave this set to "false"
FORCE_NONINTERACTIVE_RECONFIGURATION="false"
START_LIRCMD=""
REMOTE_SOCKET=""
TRANSMITTER_SOCKET=""

-- end

Revision history for this message
Andrew L (a-lavers) wrote :

oh, forgot to add ls usb output to previous post

--begin
Bus 002 Device 004: ID 046d:c058 Logitech, Inc.
Bus 002 Device 003: ID 04f2:0402 Chicony Electronics Co., Ltd
Bus 002 Device 002: ID 0403:f850 Future Technology Devices International, Ltd
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 003: ID 2040:4902 Hauppauge
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
--end

Revision history for this message
Andrew L (a-lavers) wrote :

I now can no longer reproduce - remote and transmitter are both working correctly. i was about to reproduce and test the #of USB ports theory -- but cannot reproduce now.

Apologies for the noise.

Revision history for this message
Mario Limonciello (superm1) wrote :

Closing as Invalid as this can no longer be reproduced.

Changed in lirc (Ubuntu Lucid):
status: Triaged → Invalid
Changed in lirc (Ubuntu):
status: Triaged → Invalid
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.