Comment 8 for bug 1760092

Revision history for this message
Battant (mparchet) wrote :

Hello,

I tried to locking for the bug :

Here is my result :

In /usr/lib/python3/dist-packages/dbus/proxies.py

615 def call_blocking(self, bus_name, object_path, dbus_interface, method,
616 signature, args, timeout=2.0,
617 byte_arrays=False, **kwargs):
618 """Call the given method, synchronously.
619 :Since: 0.81.0
620 """
621 if object_path == LOCAL_PATH:
622 raise DBusException('Methods may not be called on the reserved '
623 'path %s' % LOCAL_PATH)
624 if dbus_interface == LOCAL_IFACE:
625 raise DBusException('Methods may not be called on the reserved '
626 'interface %s' % LOCAL_IFACE)
627 # no need to validate other args - MethodCallMessage ctor will do
628
629 get_args_opts = dict(byte_arrays=byte_arrays)
630 if is_py2:
631 get_args_opts['utf8_strings'] = kwargs.get('utf8_strings', False )
632 elif 'utf8_strings' in kwargs:
633 raise TypeError("unexpected keyword argument 'utf8_strings'")

634
635 message = MethodCallMessage(destination=bus_name,
636 path=object_path,
637 interface=dbus_interface,
638 method=method)
639 # Add the arguments to the function
640 try:
641 message.append(signature=signature, *args)
642 except Exception as e:
643 logging.basicConfig()
644 _logger.error('Unable to set arguments %r according to '
645 'signature %r: %s: %s',
646 args, signature, e.__class__, e)
647 raise
648 # make a blocking call
649
650
651 print ("message : ",message)
652 print("timeout",timeout)
653
654 _logger.info ("message : ",message)
655 _logger.info("timeout",timeout)

657 print ("reply meaage : ",self.send_message_with_reply_and_block(
658 message, timeout))
659 _logger.info ("reply meaage : ",self.send_message_with_reply_and_blo ck(
660 message, timeout))
the program crash at this line.

661 reply_message = self.send_message_with_reply_and_block(
662 message, timeout)
663 # reply_message = self.send_message_with_reply_and_block(message,time out)
664 args_list = reply_message.get_args_list(**get_args_opts)
665 if len(args_list) == 0:
666 return None
667 elif len(args_list) == 1:
668 return args_list[0]
669 else:
670 return tuple(args_list)
this lines is never execute :

128 print ("poxis ignore_reply : ",ignore_reply )
129 print ("proxis reply_handler : ",reply_handler)
130 if ignore_reply or reply_handler is not None:
131 self._connection.call_async(self._named_service,
132 self._object_path,
133 dbus_interface,
134 self._method_name,
135 signature,
136 args,
137 reply_handler,
138 error_handler,
139 **keywords)

140 else:

this lines is always execute :

141 return self._connection.call_blocking(self._named_service,
142 self._object_path,
143 dbus_interface,
144 self._method_name,
145 signature,
146 args,
147 **keywords)

the async call is never execute, Is is not possible in this case ?
661 reply_message = self.send_message_with_reply_and_block(
662 message, timeout)

U hop I can help to solve this issues

Best regards

Battant