gdb Trace: vor ENTER drücken, aber Motor lässt sich noch nicht mehr steuern, nach ENTER endet das Program jedoch noch: (gdb) thread apply all backtrace full Thread 4 (Thread 0x7fd98c981700 (LWP 6208)): #0 0x00007fd98d497010 in sem_wait () from /lib64/libpthread.so.0 No symbol table info available. #1 0x0000000000401fb5 in semaphore_acquire (semaphore=) at ip_connection.c:479 No locals. #2 queue_get (length=, data=, kind=, queue=0x60e118) at ip_connection.c:731 item = #3 ipcon_callback_loop (opaque=0x60e110) at ip_connection.c:1126 callback = 0x60e110 kind = data = length = #4 0x000000000040158e in thread_wrapper (opaque=) at ip_connection.c:534 thread = #5 0x00007fd98d490f05 in start_thread () from /lib64/libpthread.so.0 Thread 3 (Thread 0x7fd98c180700 (LWP 6210)): #0 0x00007fd98d4951eb in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 No symbol table info available. #1 0x0000000000401726 in event_wait (event=0x7fff623a2d48, timeout=) at ip_connection.c:399 tp = {tv_sec = 1375986998, tv_usec = 983516} ts = {tv_sec = 1375987003, tv_nsec = 983516000} ret = 0 #2 0x0000000000403195 in ipcon_disconnect_probe_loop (opaque=0x7fff623a1c40) at ip_connection.c:1197 ipcon = 0x7fff623a1c40 disconnect_probe = {uid = 0, length = 8 '\b', function_id = 128 '\200', sequence_number_and_options = 16 '\020', error_code_and_future_use = 0 '\000'} #3 0x000000000040158e in thread_wrapper (opaque=) at ip_connection.c:534 thread = #4 0x00007fd98d490f05 in start_thread () from /lib64/libpthread.so.0 Thread 2 (Thread 0x7fd98b97f700 (LWP 6211)): #0 0x00007fd98d49812c in recv () from /lib64/libpthread.so.0 No symbol table info available. #1 0x00000000004022c1 in socket_receive (length=800, buffer=0x7fd98b97eb50, socket=) at ip_connection.c:270 No locals. #2 ipcon_receive_loop (opaque=0x7fff623a1c40) at ip_connection.c:1275 ipcon = 0x7fff623a1c40 socket_id = 1 pending_data = {{header = {uid = 39256, length = 10 '\n', function_id = 13 '\r', sequence_number_and_options = 8 '\b', error_code_and_future_use = 0 '\000'}, payload = "\343\377\000\000X\231\000\000\n\r\b\000\343\377\000\000X\231\000\000\n\r\b\000\343\377\000\000X\231\000\000\n\r\b\000\343\377X\231\000\000\n\r\b\000\343\377\000\000X\231\000\000\n\r\b\000\343\377X\231\000", optional_data = "\n\r\b\000\343\377\000"}, { header = {uid = 39256, length = 10 '\n', function_id = 13 '\r', sequence_number_and_options = 8 '\b', error_code_and_future_use = 0 '\000'}, payload = "\343\377X\231\000\000\n\r\b\000\002\000c\001\000\000\002\000\000\341\000\001", '\000' , optional_data = "\000\000\000\000\000\000\000"}, {header = {uid = 0, length = 0 '\000', function_id = 0 '\000', sequence_number_and_options = 0 '\000', error_code_and_future_use = 0 '\000'}, payload = '\000' , optional_data = "\000\000\000\000\000\000\000"}, {header = {uid = 0, length = 0 '\000', function_id = 0 '\000', sequence_number_and_options = 0 '\000', error_code_and_future_use = 0 '\000'}, payload = '\000' , optional_data = "\000\000\000\000\000\000\000"}, {header = {uid = 0, length = 0 '\000', function_id = 0 '\000', sequence_number_and_options = 0 '\000', error_code_and_future_use = 0 '\000'}, payload = '\000' , optional_data = "\000\000\000\000\000\000\000"}, {header = {uid = 0, length = 0 '\000', function_id = 0 '\000', sequence_number_and_options = 0 '\000', error_code_and_future_use = 0 '\000'}, payload = '\000' , optional_data = "\000\000\000\000\000\000\000"}, {header = {uid = 0, length = 0 '\000', function_id = 0 '\000', sequence_number_and_options = 0 '\000', error_code_and_future_use = 0 '\000'}, payload = '\000' , optional_data = "\000\000\000\000\000\000\000"}, {header = {uid = 0, length = 0 '\000', function_id = 0 '\000', sequence_number_and_options = 0 '\000', error_code_and_future_use = 0 '\000'}, payload = '\000' , optional_data = "\000\000\000\000\000\000\000"}, {header = {uid = 0, length = 0 '\000', function_id = 0 '\000', sequence_number_and_options = 0 '\000', error_code_and_future_use = 0 '\000'}, payload = '\000' , optional_data = "\000\000\000\000\000\000\000"}, {header = {uid = 0, length = 0 '\000', function_id = 0 '\000', sequence_number_and_options = 0 '\000', error_code_and_future_use = 0 '\000'}, payload = '\000' , optional_data = "\000\000\000\000\000\000\000"}} pending_length = 0 length = #3 0x000000000040158e in thread_wrapper (opaque=) at ip_connection.c:534 thread = #4 0x00007fd98d490f05 in start_thread () from /lib64/libpthread.so.0 Thread 1 (Thread 0x7fd98d89c720 (LWP 6207)): #0 0x00007fd98ca4f18d in read () from /lib64/libc.so.6 No symbol table info available. #1 0x00007fd98c9f4d18 in _IO_new_file_underflow () from /lib64/libc.so.6 No symbol table info available. #2 0x00007fd98c9f5d8e in _IO_default_uflow_internal () from /lib64/libc.so.6 #3 0x00007fd98c9f0fad in getc () from /lib64/libc.so.6 #4 0x0000000000401273 in getchar () at /usr/include/bits/stdio.h:47 No locals. #5 main (argc=3, argv=) at dc_test.cpp:122 ipcon = {host = 0x60e0f0 "tinkertest", port = 4223, timeout = 2500, auto_reconnect = true, auto_reconnect_allowed = false, auto_reconnect_pending = false, sequence_number_mutex = {handle = {__data = {__lock = 0, __count = 0, __owner = 0, __nusers = 0, __kind = 0, __spins = 0, __list = {__prev = 0x0, __next = 0x0}}, __size = '\000' , __align = 0}}, next_sequence_number = 6, devices = {mutex = {handle = {__data = {__lock = 0, __count = 0, __owner = 0, __nusers = 0, __kind = 0, __spins = 0, __list = {__prev = 0x0, __next = 0x0}}, __size = '\000' , __align = 0}}, used = 3, allocated = 16, keys = 0x60e010, values = 0x60e060}, registered_callbacks = {0x0 }, registered_callback_user_data = {0x0 }, socket_mutex = {handle = {__data = {__lock = 0, __count = 0, __owner = 0, __nusers = 0, __kind = 0, __spins = 0, __list = {__prev = 0x0, __next = 0x0}}, __size = '\000' , __align = 0}}, socket = 0x60e710, socket_id = 1, receive_flag = true, receive_thread = { handle = 140572326622976, function = 0x402260 , opaque = 0x7fff623a1c40}, callback = 0x60e110, disconnect_probe_flag = true, disconnect_probe_thread = {handle = 140572335015680, function = 0x403150 , opaque = 0x7fff623a1c40}, disconnect_probe_event = {condition = { __data = {__lock = 0, __futex = 19, __total_seq = 10, __wakeup_seq = 9, __woken_seq = 9, __mutex = 0x7fff623a2d78, __nwaiters = 2, __broadcast_seq = 0}, __size = "\000\000\000\000\023\000\000\000\n\000\000\000\000\000\000\000\t\000\000\000\000\000\000\000\t\000\000\000\000\000\000\000x-:b\377\177\000\000\002\000\000\000\000\000\000", __align = 81604378624}, mutex = {__data = {__lock = 0, __count = 0, __owner = 0, __nusers = 1, __kind = 0, __spins = 0, __list = {__prev = 0x0, __next = 0x0}}, __size = '\000' , "\001", '\000' , __align = 0}, flag = false}, wait = {object = { __size = "\000\000\000\000\200", '\000' "\304, \022@\000\000\000\000\000\260.:b\377\177\000", __align = 549755813888}, pointer = 0x7fff623a2da8}} Anderer Trace: Motor lässt sich nicht mehr steuern, nach ENTER beendet sich das Programm nicht mehr (gdb) thread apply all backtrace full Thread 4 (Thread 0x7fa9fa503700 (LWP 7160)): #0 0x00007fa9fb0198d4 in __lll_lock_wait () from /lib64/libpthread.so.0 No symbol table info available. #1 0x00007fa9fb0151c5 in _L_lock_883 () from /lib64/libpthread.so.0 No symbol table info available. #2 0x00007fa9fb01501a in pthread_mutex_lock () from /lib64/libpthread.so.0 No symbol table info available. #3 0x0000000000401e3d in ipcon_send_request (ipcon=0x7fffa01c1da0, request=0x7fa9fa502df0) at ip_connection.c:1525 ret = 0 #4 0x0000000000402a86 in device_send_request (device=0x608160, request=0x7fa9fa502df0, response=0x0) at ip_connection.c:924 ret = 0 sequence_number = 12 '\f' response_expected = 0 '\000' error_code = 0 '\000' #5 0x0000000000403a52 in dc_set_velocity (dc=0x608160, velocity=-2184) at brick_dc.c:362 request = {header = {uid = 3438743602, length = 10 '\n', function_id = 1 '\001', sequence_number_and_options = 192 '\300', error_code_and_future_use = 0 '\000'}, velocity = -2184} ret = #6 0x00000000004014fc in accelerateTo (speed=) at dc_test.cpp:34 rc = #7 0x0000000000401548 in potentiometerCallback (value=-10, user_data=) at dc_test.cpp:46 speed = -2184 time = "D\v\000\000\000\000\000\000\020\341`\000\000\000\000\000p\022", #8 0x0000000000402038 in ipcon_dispatch_packet (packet=0x7fa9f4001270, ipcon=) at ip_connection.c:1115 enumerate_callback_function = enumerate_callback = device = user_data = callback_wrapper_function = #9 ipcon_callback_loop (opaque=0x60e110) at ip_connection.c:1144 callback = 0x60e110 kind = 2 data = 0x7fa9f4001270 length = #10 0x000000000040158e in thread_wrapper (opaque=) at ip_connection.c:534 thread = #11 0x00007fa9fb012f05 in start_thread () from /lib64/libpthread.so.0 Thread 3 (Thread 0x7fa9f9d02700 (LWP 7161)): #0 0x00007fa9fb0198d4 in __lll_lock_wait () from /lib64/libpthread.so.0 No symbol table info available. #1 0x00007fa9fb0151c5 in _L_lock_883 () from /lib64/libpthread.so.0 No symbol table info available. #2 0x00007fa9fb01501a in pthread_mutex_lock () from /lib64/libpthread.so.0 No symbol table info available. #3 0x00000000004031b8 in ipcon_disconnect_probe_loop (opaque=0x7fffa01c1da0) at ip_connection.c:1199 ipcon = 0x7fffa01c1da0 disconnect_probe = {uid = 0, length = 8 '\b', function_id = 128 '\200', sequence_number_and_options = 32 ' ', error_code_and_future_use = 0 '\000'} #4 0x000000000040158e in thread_wrapper (opaque=) at ip_connection.c:534 thread = #5 0x00007fa9fb012f05 in start_thread () from /lib64/libpthread.so.0 Thread 2 (Thread 0x7fa9f9501700 (LWP 7162)): #0 0x00007fa9fb01a12c in recv () from /lib64/libpthread.so.0 No symbol table info available. #1 0x00000000004022c1 in socket_receive (length=800, buffer=0x7fa9f9500b50, socket=) at ip_connection.c:270 No locals. #2 ipcon_receive_loop (opaque=0x7fffa01c1da0) at ip_connection.c:1275 ipcon = 0x7fffa01c1da0 socket_id = 1 pending_data = {{header = {uid = 40012, length = 12 '\f', function_id = 24 '\030', sequence_number_and_options = 8 '\b', error_code_and_future_use = 0 '\000'}, payload = ",\v\000\000L\234\000\000\f\030\b\000\375\n\000\000L\234\000\000\f\030\b\000\375\n\000\000L\234\000\000\f\030\b\000\375\n\000\000L\234\000\000\f\030\b\000\375\n\000\000L\234\000\000\f\030\b\000\375\n\000", optional_data = "L\234\000\000\f\030\b"}, { header = {uid = 2813, length = 76 'L', function_id = 156 '\234', sequence_number_and_options = 0 '\000', error_code_and_future_use = 0 '\000'}, payload = "\f\030\b\000\375\n\000\000L\234\000\000\f\030\b\000\375\n\000\000L\234\000\000\f\030\b\000\375\n\000\000L\234\000\000\f\030\b\000\375\n\000\000L\234\000\000\f\030\b\000\375\n\000\000L\234\000\000\f\030\b", optional_data = "\375\n\000\000L\234\000"}, { header = {uid = 530444, length = 253 '\375', function_id = 10 '\n', sequence_number_and_options = 0 '\000', ---Type to continue, or q to quit--- error_code_and_future_use = 0 '\000'}, payload = "L\234\000\000\f\030\b\000\375\n\000\000L\234\000\000\f\030\b\000\375\n\000\000L\234\000\000\f\030\b\000\375\n\000\000L\234\000\000\f\030\b\000\375\n\000\000L\234\000\000\f\030\b\000\375\n\000\000L\234\000", optional_data = "\f\030\b\000\375\n\000"}, { header = {uid = 40012, length = 12 '\f', function_id = 24 '\030', sequence_number_and_options = 8 '\b', error_code_and_future_use = 0 '\000'}, payload = "\375\n\000\000L\234\000\000\f\030\b\000\375\n\000\000L\234\000\000\f\030\b\000\375\n\000\000L\234\000\000\f\030\b\000\375\n\000\000L\234\000\000\f\030\b\000\375\n\000\000L\234\000\000\f\030\b\000\375\n\000", optional_data = "L\234\000\000\f\030\b"}, { header = {uid = 2813, length = 76 'L', function_id = 156 '\234', sequence_number_and_options = 0 '\000', error_code_and_future_use = 0 '\000'}, payload = "\f\030\b\000\375\n\000\000L\234\000\000\f\030\b\000\375\n\000\000L\234\000\000\f\030\b\000\375\n\000\000L\234\000\000\f\030\b\000\375\n\000\000L\234\000\000\f\030\b\000\375\n\000\000L\234\000\000\f\030\b", optional_data = "\375\n\000\000L\234\000"}, { header = {uid = 530444, length = 253 '\375', function_id = 10 '\n', sequence_number_and_options = 0 '\000', error_code_and_future_use = 0 '\000'}, payload = "L\234\000\000\f\030\b\000\375\n\000\000L\234\000\000\f\030\b\000\375\n\000\000L\234\000\000\f\030\b\000\375\n\000\000L\234\000\000\f\030\b\000\375\n\000\000L\234\000\000\f\030\b\000\375\n\000\000L\234\000", optional_data = "\f\030\b\000\375\n\000"}, { header = {uid = 40012, length = 12 '\f', function_id = 24 '\030', sequence_number_and_options = 8 '\b', error_code_and_future_use = 0 '\000'}, payload = "\375\n\000\000L\234\000\000\f\030\b\000\375\n\000\000L\234\000\000\f\030\b\000\375\n\000\000L\234\000\000\f\030\b\000\375\n\000\000L\234\000\000\f\030\b\000\375\n\000\000L\234\000\000\f\030\b\000\375\n\000", optional_data = "L\234\000\000\f\030\b"}, { header = {uid = 2813, length = 76 'L', function_id = 156 '\234', sequence_number_and_options = 0 '\000', error_code_and_future_use = 0 '\000'}, payload = "\f\030\b\000\375\n\000\000L\234\000\000\f\030\b\000\375\n\000\000\360\000L\234\000\000\f\026\b\000\360\000L\234\000\000\f\026\b\000\360\000L\234\000\000\f\026\b\000\360\000\005\000L\234\000\000\f\026\b", , optional_data = "\005\000L\234\000\000\f\026"}, {header = {uid = 15728648, length = 76 'L', function_id = 156 '\234', sequence_number_and_options = 0 '\000', error_code_and_future_use = 0 '\000'}, payload = "\f\026\b\000\360\000L\234\000\000\f\026\b\000\360\000\005\000L\234\000\000\f\026\b\000\360\000\005\000L\234\000\000\f\026\b\000\360\000L\234\000\000\f\026\b\000\360\000L\234\000\000\f\026\b\000\360\000\005\000L\234", optional_data = "\000\000\f\026\b", }, {header = {uid = 2622226437, length = 0 '\000', function_id = 0 '\000', sequence_number_and_options = 12 '\f', error_code_and_future_use = 22 '\026'}, payload = "\b\000\360\000\005\000L\234\000\000\f\026\b\000\360\000\005\000L\234\000\000\f\026\b\000\360\000L\234\000\000\f\026\b\000\360\000\005\000L\234\000\000\f\026\b\000\360\000\005\000L\234\000\000\f\026\b\000\360\000L\234", optional_data = "\000\000\f\026\b", }} pending_length = 0 length = #3 0x000000000040158e in thread_wrapper (opaque=) at ip_connection.c:534 thread = #4 0x00007fa9fb012f05 in start_thread () from /lib64/libpthread.so.0 Thread 1 (Thread 0x7fa9fb41e720 (LWP 7159)): #0 0x00007fa9fb0141cf in pthread_join () from /lib64/libpthread.so.0 No symbol table info available. #1 0x000000000040177c in ipcon_disconnect_unlocked (ipcon=0x7fffa01c1da0) at ip_connection.c:1488 No locals. #2 0x0000000000402e52 in ipcon_disconnect (ipcon=0x7fffa01c1da0) at ip_connection.c:1659 callback = meta = {function_id = 0 '\000', parameter = 0 '\000', socket_id = 4199108} #3 0x0000000000402e85 in ipcon_destroy (ipcon=0x7fffa01c1da0) at ip_connection.c:1588 No locals. #4 0x0000000000401285 in main (argc=3, argv=) at dc_test.cpp:124 ipcon = {host = 0x60e0f0 "tinkertest", port = 4223, timeout = 2500, auto_reconnect = true, auto_reconnect_allowed = false, auto_reconnect_pending = false, sequence_number_mutex = {handle = {__data = {__lock = 0, __count = 0, __owner = 0, __nusers = 0, __kind = 0, __spins = 0, __list = {__prev = 0x0, __next = 0x0}}, __size = '\000' , __align = 0}}, next_sequence_number = 12, devices = {mutex = {handle = {__data = {__lock = 0, __count = 0, __owner = 0, __nusers = 0, __kind = 0, __spins = 0, __list = {__prev = 0x0, __next = 0x0}}, __size = '\000' , __align = 0}}, used = 3, allocated = 16, keys = 0x60e010, values = 0x60e060}, registered_callbacks = {0x0 }, registered_callback_user_data = {0x0 }, socket_mutex = {handle = {__data = {__lock = 2, __count = 0, __owner = 7159, __nusers = 1, __kind = 0, __spins = 0, __list = {__prev = 0x0, __next = 0x0}}, __size = "\002\000\000\000\000\000\000\000\367\033\000\000\001", '\000' , __align = 2}}, socket = 0x60e710, socket_id = 1, receive_flag = true, receive_thread = {handle = 140368008976128, function = 0x402260 , opaque = 0x7fffa01c1da0}, callback = 0x60e110, disconnect_probe_flag = false, disconnect_probe_thread = {handle = 140368017368832, function = 0x403150 , opaque = 0x7fffa01c1da0}, disconnect_probe_event = {condition = {__data = {__lock = 0, __futex = 12, __total_seq = 6, __wakeup_seq = 6, __woken_seq = 6, __mutex = 0x7fffa01c2ed8, __nwaiters = 0, __broadcast_seq = 0}, __size = "\000\000\000\000\f\000\000\000\006\000\000\000\000\000\000\000\006\000\000\000\000\000\000\000\006\000\000\000\000\000\000\000\330.\034\240\377\177\000\000\000\000\000\000\000\000\000", __align = 51539607552}, mutex = {__data = {__lock = 0, __count = 0, __owner = 0, __nusers = 0, __kind = 0, __spins = 0, __list = {__prev = 0x0, __next = 0x0}}, __size = '\000' , __align = 0}, flag = true}, wait = {object = { __size = "\000\000\000\000\200", '\000' "\304, \022@\000\000\000\000\000\020\060\034\240\377\177\000", __align = 549755813888}, pointer = 0x7fffa01c2f08}}