irexec isn't started automatically on existing installs

Bug #505705 reported by Thomas Mashos
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mythbuntu
Expired
High
Unassigned
lirc (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Irexec does not start with the lirc service on 9.10 (Ubuntu+MythTV, not Mythbuntu). In my testing, it seems that the following line might be the issue.

(from /etc/init.d/lirc)
start-stop-daemon --start --quiet --oknodo --exec /usr/bin/irexec -- -d /etc/lirc/lircrc < /dev/null

I've compared my two systems and there doesn't seem to be that big of difference (one is Mythbuntu, the other is Ubuntu+MythTV). The Mythbuntu system works correctly where the Ubuntu+MythTV does not.

/etc/lirc/lircrc does not exist on either system.

If I edit the line to just

start-stop-daemon --start --quiet --oknodo --exec /usr/bin/irexec --

Then it does work, but it stays in the terminal and thus is not really a viable option.

Revision history for this message
Dave Walker (dogatemycomputer) wrote :

Thomas:

I do not use Mythbutu so I am not sure I understand exactly what his bug is referring too. In any case I would be happy to confirm this bug if you could provide the specific steps necessary to reproduce it including what actually occurs and what should occur.

If you would prefer then we can always wait for someone with more experience debugging this product to come along and offer some assistance.

Revision history for this message
Thomas Mashos (tgm4883) wrote : Re: [Bug 505705] Re: irexec isn't started automatically on existing installs

I added the following lines to the end of my ~/.lirc/mythtv file (in my
~/.lircrc file I have "include ~/.lirc/mythtv")

begin
    remote = mceusb
    prog = irexec
    button = Power
    config = /usr/bin/myth-restart.sh
    repeat = 0
    delay = 0
end

It's my understanding that after adding this that irexec should be
automatically started on the next reboot. This is how it is working on my
Mythbuntu machine, but on my Ubuntu machine it does not automatically start.
I have the same remote hardware on both systems (MCEUSB2)

Reproducing should be just

1) Add those lines to a file that will be parsed by lirc (.lircrc)
2) Reboot machine
3) Watch script not be run when you hit the power button.

On Sun, Jan 10, 2010 at 7:13 PM, Dave Walker <email address hidden>wrote:

> Thomas:
>
> I do not use Mythbutu so I am not sure I understand exactly what his bug is
> referring too. In any case I would be happy to confirm this bug if you
> could provide the specific steps necessary to reproduce it including what
> actually occurs and what should occur.
>
> If you would prefer then we can always wait for someone with more
> experience debugging this product to come along and offer some assistance.
>
> --
> irexec isn't started automatically on existing installs
> https://bugs.launchpad.net/bugs/505705
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Dave Walker (dogatemycomputer) wrote :

Thanks for reporting this bug and any supporting documentation. Since this bug has enough information provided for a developer to begin work, I'm going to mark it as confirmed and let them handle it from here. Thanks for taking the time to make Ubuntu better!

Changed in lirc (Ubuntu):
status: New → Confirmed
Changed in mythbuntu:
status: New → Confirmed
Revision history for this message
Dave Walker (dogatemycomputer) wrote :

Thomas:

I confirmed this bug because it appears to have enough information to help the developers quickly resolve the problem. It is possible I am wrong and another more experienced triager or developer may adjust the status of the bug to "incomplete" and request additional information.

Revision history for this message
brjhaverkamp (bert-bertenselena) wrote :

I see the same problems on one of my clients systems. On my own system this bug is not present.
restarting gdm makes irexec also starting. I have confirmed that this is due to a timing issue between gdm and lirc in upstart.
gdm and /usr/share/mythbuntu/session.sh are started before lircd is running.
I have added the following to the start of session.sh. This cures at least the symptom:

BTW, the same problem exists for /usr/share/mythtv/mythfrontend.sh

LOGFILE="/var/log/winebox.log"
LOGENTRY="$(date +"%b %d %T") Session.sh:"

    echo $LOGENTRY "Are mysql, mythbackend and lirc runnning" | tee -a $LOGFILE
    delay=30
    while [ ! "$(pidof mysqld)" ] && [ "$delay" -gt "0" ]; do
       delay=$((delay-1))
       sleep 1
       echo $LOGENTRY No mysqld yet. Delay: $delay | tee -a $LOGFILE
    done
    if [ "$(pidof mysqld)" ]; then
 echo $LOGENTRY mysqld started. pid is $(pidof mysqld) | tee -a $LOGFILE
    fi
    while [ -z "$(pidof mythbackend)" ] && [ "$delay" -gt "0" ]; do
       delay=$((delay-1))
       sleep 1
       echo $LOGENTRY No mythbackend yet. Delay: $delay | tee -a $LOGFILE
    done
    if [ "$(pidof mythbackend)" ]; then
 echo $LOGENTRY mythbackend started. pid is $(pidof mythbackend) | tee -a $LOGFILE
    fi
    while [ ! "$(pidof lircd)" ] && [ "$delay" -gt "0" ]; do
       delay=$((delay-1))
       sleep 1
       echo $LOGENTRY No lircd yet. Delay: $delay | tee -a $LOGFILE
    done
    if [ "$(pidof lircd)" ]; then
 echo $LOGENTRY lircd started. pid is $(pidof lircd) | tee -a $LOGFILE
    fi

Revision history for this message
MarcRandolph (mrand) wrote :

Related (possibly identical) bug: https://bugs.launchpad.net/mythbuntu/+bug/563139

Changed in mythbuntu:
importance: Undecided → High
status: Confirmed → Triaged
Revision history for this message
Thomas Mashos (tgm4883) wrote :

Marking incomplete as releases prior to 10.04 are no longer supported. Could someone confirm if this issue is still present on a supported Mythbuntu/MythTV release?

Changed in mythbuntu:
status: Triaged → Fix Committed
status: Fix Committed → Incomplete
Revision history for this message
Thomas Mashos (tgm4883) wrote :

We really do appreciate you opening this ticket to help improve Mythbuntu, but it needs to be closed for a number of reasons. The biggest one is that upstream has moved on to a new version and believes this to be fixed. Could you please verify if this issue still exists in the latest version?

Please do not let the closing of this ticket dissuade you from opening a new ticket if this (or any other) problem occurs with the newer versions.

Changed in mythbuntu:
status: Incomplete → Expired
Revision history for this message
Alec Leamas (leamas-alec) wrote :

As for the lirc part, the last 0.9.4 release solves this since the lircd output socket is created at an very early point in the boot sequence. lircd is started using socket activation when irexec or some otther client connects to the socket. So, no race is possible.

IMHO, mysql should do the same, and might indeed have so already. Don't know, closing as fixed.

Changed in lirc (Ubuntu):
status: Confirmed → Fix Released
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.