[Pkg-lirc-maint] Bug#872375: lirc: irrecord segfaults when recording a button

Alec Leamas leamas.alec at gmail.com
Sun Sep 24 08:12:53 UTC 2017


On 24/09/17 03:50, Francois Gouget wrote:
> Actually it's the -f option that causes the crash. I can reproduce it
> with:
> 
> # irrecord -f /tmp/foo.conf

This would just indicate that foo.conf is broken somehow. Given the 
state of lirc, I don't think it's feasible to make it handle any kind of 
broken input files - it's just too fragile.

> But it's not 100% reproducible now, particularly when I try to use
> my own libirrecord.so so I have debugging symbols. What I can give you
> though is the irrecord backtrace:
> 
> #0  0x0000000000000000 in ?? ()
> #1  0x00007f5644aaae73 in record_buttons ()
>     from /usr/lib/x86_64-linux-gnu/libirrecord.so.0
> #2  0x000055555555802d in get_button_data (opts=0x7fffffffe2d0, state=0x7fffffffe290,
>      btn_state=0x7fffffffe110) at irrecord-ui.cpp:759
> #3  do_record_buttons (state=0x7fffffffe290, opts=0x7fffffffe2d0) at irrecord-ui.cpp:814
> #4  0x0000555555556ddf in main (argc=<optimized out>, argv=<optimized out>)
>      at irrecord-ui.cpp:1179
> 
> Compiled from git commit be62884be227.
> So the crash happens somewhere in record_buttons() in irrecord.c.
> I suspect the curr_driver methods are not getting initialized...
> sometimes. 

Thanks. That said, if this from a version you compiled yourself, the 
libirrecord.so seems to be the wrong one (i. e., the one installed by 
the package). This will by definition be unstable - the libirrecord ABI 
being part of lirc_private.h is not supposed to be the same between 
versions.

> Now as to why I have driver=devinput in lirc_options.conf, it's because
> it's the only way I found to get my remote to work. Setting
> driver=default driver does not work and if I only provide
> devinput.lircd.conf and no Hauppauge_PVR350.conf file then it does not
> work either.

I think you really need to take a step back here. The way you use lirc 
does not match the official guidelines in [1], which you probably need 
to check. In short:

   - As mentioned in the irrecord message the way to update 
devinput.lircd.conf is the lirc-make-devinput(1) script, not irrecord.
   - Use mode2(1) to check if you get something sane using the devinput 
and/or the default driver.
   - If you go with the devinput driver, use devinput.lircd.conf. In a 
off-the-shelf setup, just copy it into /etc/lirc/lircd.conf.d. Check 
that /etc/lircd.conf does nothing but include the files in lircd.conf.d.
   - If you go with the default driver, you might very well need  to use 
irrecord with this driver. Copy the generated file into lircd.conf.d.
   - In any case, don't use irrecord with the devinput driver since this 
is not a supported usecase.
   - When running into problems, raise the loglevel and submit the 
console logs.

IMHO, this is now more of a support issue than a bug report.


Cheers!

--alec


[1] http://lirc.org/html/configuration-guide.html



More information about the Pkg-lirc-maint mailing list