Ticket #257 (closed defect: duplicate)

Opened 7 years ago

Last modified 6 years ago

segfault in release 2.1.1

Reported by: erik løvlie <eriklovlie@…> Owned by:
Priority: major Milestone:
Component: telldus-core Version: 2.1.1
Keywords: Cc:
Blocked By: Blocking:
Platform: Linux Sensitive: no
Verified by Telldus: no

Description

After a short period the telldus library segfaults. It would seem to be a threading/timing issue as the segfault happens at different times. This happens with both tdtool.py -t and a program of my own. The program registers a listener for raw events and prints these to stdout.

  • Telldus HW: Duo
  • Batch: #3
  • SNo: 354
  • Telldus SDK version: 2.1.1 (the tarball download)
  • OS: Ubuntu 12.04.
  • Uname: 3.0.0-26-generic #43-Ubuntu SMP Tue Sep 25 17:19:22 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

Backtrace at time of segfault:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffed627700 (LWP 11622)]
0x00007ffff75e87fa in pthread_cond_signal@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
(gdb) bt
#0  0x00007ffff75e87fa in pthread_cond_signal@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007ffff7bcb45e in EventHandler::signal (this=0x7ffff6e39c80, event=0x603a30)
    at /home/eriklovlie/Dropbox/telldus/telldus-core-2.1.1/common/EventHandler_unix.cpp:58
#2  0x00007ffff7bce0e6 in Event::sendSignal (this=0x603a30) at /home/eriklovlie/Dropbox/telldus/telldus-core-2.1.1/common/Event_unix.cpp:24
#3  0x00007ffff7bcd204 in EventBase::signal (this=0x603a30, eventData=0x6071b0) at /home/eriklovlie/Dropbox/telldus/telldus-core-2.1.1/common/Event.cpp:61
#4  0x00007ffff7bcd172 in EventBase::signal (this=0x603a30) at /home/eriklovlie/Dropbox/telldus/telldus-core-2.1.1/common/Event.cpp:53
#5  0x00007ffff7bcac4f in TelldusCore::Thread::exec (ptr=0x607170) at /home/eriklovlie/Dropbox/telldus/telldus-core-2.1.1/common/Thread.cpp:82
#6  0x00007ffff75e3efc in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#7  0x00007ffff78ddf4d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#8  0x0000000000000000 in ?? ()
(gdb) thr apply all bt

Thread 307 (Thread 0x7fffed627700 (LWP 11622)):
#0  0x00007ffff75e87fa in pthread_cond_signal@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007ffff7bcb45e in EventHandler::signal (this=0x7ffff6e39c80, event=0x603a30)
    at /home/eriklovlie/Dropbox/telldus/telldus-core-2.1.1/common/EventHandler_unix.cpp:58
#2  0x00007ffff7bce0e6 in Event::sendSignal (this=0x603a30) at /home/eriklovlie/Dropbox/telldus/telldus-core-2.1.1/common/Event_unix.cpp:24
#3  0x00007ffff7bcd204 in EventBase::signal (this=0x603a30, eventData=0x6071b0) at /home/eriklovlie/Dropbox/telldus/telldus-core-2.1.1/common/Event.cpp:61
#4  0x00007ffff7bcd172 in EventBase::signal (this=0x603a30) at /home/eriklovlie/Dropbox/telldus/telldus-core-2.1.1/common/Event.cpp:53
#5  0x00007ffff7bcac4f in TelldusCore::Thread::exec (ptr=0x607170) at /home/eriklovlie/Dropbox/telldus/telldus-core-2.1.1/common/Thread.cpp:82
#6  0x00007ffff75e3efc in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#7  0x00007ffff78ddf4d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#8  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7ffff6e3a700 (LWP 11293)):
#0  0x00007ffff782d99b in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffff78241d4 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007ffff7824667 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#3  0x00007ffff781c422 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#4  0x00007ffff781ad22 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#5  0x00007ffff781a902 in iconv_open () from /lib/x86_64-linux-gnu/libc.so.6
#6  0x00007ffff7bca372 in TelldusCore::wideToString (input=...) at /home/eriklovlie/Dropbox/telldus/telldus-core-2.1.1/common/Strings.cpp:200
#7  0x00007ffff7bbff19 in TelldusCore::Client::callbackRawEvent (this=0x603010, command=..., controllerId=-2)
    at /home/eriklovlie/Dropbox/telldus/telldus-core-2.1.1/client/Client.cpp:98
#8  0x00007ffff7bc0a1e in TelldusCore::Client::run (this=0x603010) at /home/eriklovlie/Dropbox/telldus/telldus-core-2.1.1/client/Client.cpp:207
#9  0x00007ffff7bcac66 in TelldusCore::Thread::exec (ptr=0x603010) at /home/eriklovlie/Dropbox/telldus/telldus-core-2.1.1/common/Thread.cpp:84
#10 0x00007ffff75e3efc in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#11 0x00007ffff78ddf4d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#12 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7ffff7fe2740 (LWP 11292)):
#0  0x00007ffff78a9bcd in nanosleep () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffff78d7804 in usleep () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00000000004010f0 in msleep (msec=10000000) at /home/eriklovlie/Dropbox/telldus/telldus-core-2.1.1/gjoekeredet/../common/common.h:27
#3  0x0000000000401081 in listen () at /home/eriklovlie/Dropbox/telldus/telldus-core-2.1.1/gjoekeredet/main.cpp:84
#4  0x00000000004010ad in main0 () at /home/eriklovlie/Dropbox/telldus/telldus-core-2.1.1/gjoekeredet/main.cpp:94
#5  0x00000000004010c8 in main (argc=1, argv=0x7fffffffe638) at /home/eriklovlie/Dropbox/telldus/telldus-core-2.1.1/gjoekeredet/main.cpp:100

Change History

comment:1 follow-up: ↓ 4 Changed 7 years ago by erik løvlie <eriklovlie@…>

It is fairly easy to reproduce the issue, hence

  1. I can give more info if required, just ask
  2. please investigate asap, as the product is somewhat crippled with a crashing driver

comment:2 Changed 7 years ago by erik løvlie <eriklovlie@…>

The cpu is an AMD E-350 (dual core).

comment:3 Changed 7 years ago by erik løvlie <eriklovlie@…>

Sorry, the OS is Ubuntu 11.10, not 12.04.

comment:4 in reply to: ↑ 1 Changed 7 years ago by micke prag <micke.prag@…>

Replying to erik løvlie <eriklovlie@…>:

It is fairly easy to reproduce the issue, hence

  1. I can give more info if required, just ask

If it is easy to reproduce, please tell us how to reproduce the issue.

comment:5 Changed 7 years ago by erik løvlie <eriklovlie@…>

Uh... did you read the description? Ok, steps to reproduce:

  1. Run tdtool.py -t
  2. Wave hand in front of a Nexa LMDT-810 motion detector (or something similar)
  3. Wait X seconds/minutes.
  4. If no segfault: goto 2.
  5. Segfault.
Last edited 7 years ago by erik løvlie <eriklovlie@…> (previous) (diff)

comment:6 Changed 7 years ago by someone somewhere <pere-telldus@…>

What happen when you run the program under valgrind? It is very good at telling exactly why a program
segfault.

comment:7 Changed 6 years ago by stefan persson <stefan.persson@…>

  • Status changed from new to closed
  • Resolution set to duplicate

Duplicate of #215

Note: See TracTickets for help on using tickets.