monome / serialosc

multi-device, bonjour-capable monome OSC server
http://monome.org/docs/serialosc/osc
Other
147 stars 33 forks source link

serialosc eats cpu on linux when a monome is disconnected #10

Closed artfwo closed 11 years ago

artfwo commented 11 years ago

I think we have already discussed this issue and it was fixed, but I'm encountering this again in the current git master.

artfwo commented 11 years ago

Woah, just found last the year's backtrace for this bug: http://paste.ubuntu.com/1181679/

And here's a more current one (looking very similar):

(gdb) bt
#0  0x00007ffff70cf3cd in poll () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffff75b0475 in monome_platform_wait_for_input ()
   from /usr/lib/libmonome.so.1
#2  0x00007ffff75b088c in monome_platform_read () from /usr/lib/libmonome.so.1
#3  0x00007ffff66b5f1f in ?? () from /usr/lib/monome/protocol_40h.so
#4  0x00007ffff75b16ea in monome_event_next () from /usr/lib/libmonome.so.1
#5  0x00007ffff75b171b in monome_event_handle_next ()
   from /usr/lib/libmonome.so.1
#6  0x0000000000403fb0 in sosc_event_loop (state=0x7fffffffde70)
    at ../src/event_loop/select.c:58
#7  0x0000000000407c03 in sosc_server_run (monome=0x60e530)
    at ../src/server.c:259
#8  0x0000000000408210 in main (argc=2, argv=0x7fffffffe008)
    at ../src/serialosc.c:97
artfwo commented 11 years ago

And this was the change that fixed it: https://github.com/monome/serialosc/commit/bd7c4f0650945e621ea27c3cb98afcb938f12475

But it looks like waf is back to the poll() error again. Looking further...

artfwo commented 11 years ago

Just to confirm that the problem is related to the earlier poll.c vs. select.c problem:

in wscript, commenting out obj("event_loop/select.c") and leaving obj("event_loop/poll.c") uncommented fixes the problem.