discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] xmlrpc and threading


From: Marcus Müller
Subject: Re: [Discuss-gnuradio] xmlrpc and threading
Date: Sat, 01 Nov 2014 00:34:50 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

HI Achilleas,

You could just write your own class that does that, and modify the <import>s and <make> in the .xml. BUT then you yourself are in charge of making sure you don't concurrently access block members in damaging ways.
However, these crashes you see are suboptimal. You should maybe file a bug on gnuradio.org, so that this doesn't get lost in time.

Greetings,
Marcus

On 11/01/2014 12:19 AM, Achilleas Anastasopoulos wrote:
I have an application that uses two probes/function_probe blocks
and an xmlrpc client.
Most of the times I see that the two threads are crushing, I guess making concurrent requests to the SimpleXMLRPCServer.

I googled it and I found that the SimpleXMLRPCServer cannot by default handle these cases, but if it is derived by the "*MixIn" classes you can handle concurrent requests.

Is there something obvious and simple that needs to be changed in the xmlrpc_server.xml block?

thanks
Achilleas

===============

Exception in thread Thread-4:
Traceback (most recent call last):
  File "/usr/lib64/python2.7/threading.py", line 811, in __bootstrap_inner
    self.run()
  File "/usr/lib64/python2.7/threading.py", line 764, in run
    self.__target(*self.__args, **self.__kwargs)
  File "./cdma_rx1.py", line 213, in _Esest_probe
    self.set_Esest(val)
  File "./cdma_rx1.py", line 280, in set_Esest
    self.set_EsN0dB_est(10*numpy.log10(  cp.epsilon + abs(self.Esest)/ (abs(self.N0est)+cp.epsilon)  )   )
  File "./cdma_rx1.py", line 296, in set_EsN0dB_est
    self.set_DataEsN0dB_est(self.EsN0dB_est + 10*numpy.log10( 1.0-self.training_percent/100.0 ) )
  File "./cdma_rx1.py", line 329, in set_DataEsN0dB_est
    self.set_appr_tcm_type(2 if (self.DataEsN0dB_est<=15.0) else (1 if (self.DataEsN0dB_est<=20.0) else 0))
  File "./cdma_rx1.py", line 455, in set_appr_tcm_type
    self.xmlrpc_client_0.set_tcm_type_selector(self.appr_tcm_type)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1224, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1578, in __request
    verbose=self.__verbose
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1264, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1289, in single_request
    self.send_request(h, handler, request_body)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1391, in send_request
    connection.putrequest("POST", handler, skip_accept_encoding=True)
  File "/usr/lib64/python2.7/httplib.py", line 871, in putrequest
    raise CannotSendRequest()
CannotSendRequest

Exception in thread Thread-3:
Traceback (most recent call last):
  File "/usr/lib64/python2.7/threading.py", line 811, in __bootstrap_inner
    self.run()
  File "/usr/lib64/python2.7/threading.py", line 764, in run
    self.__target(*self.__args, **self.__kwargs)
  File "./cdma_rx1.py", line 201, in _N0est_probe
    self.set_N0est(val)
  File "./cdma_rx1.py", line 273, in set_N0est
    self.set_EsN0dB_est(10*numpy.log10(  cp.epsilon + abs(self.Esest)/ (abs(self.N0est)+cp.epsilon)  )   )
  File "./cdma_rx1.py", line 296, in set_EsN0dB_est
    self.set_DataEsN0dB_est(self.EsN0dB_est + 10*numpy.log10( 1.0-self.training_percent/100.0 ) )
  File "./cdma_rx1.py", line 329, in set_DataEsN0dB_est
    self.set_appr_tcm_type(2 if (self.DataEsN0dB_est<=15.0) else (1 if (self.DataEsN0dB_est<=20.0) else 0))
  File "./cdma_rx1.py", line 455, in set_appr_tcm_type
    self.xmlrpc_client_0.set_tcm_type_selector(self.appr_tcm_type)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1224, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1578, in __request
    verbose=self.__verbose
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1264, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1294, in single_request
    response = h.getresponse(buffering=True)
  File "/usr/lib64/python2.7/httplib.py", line 1033, in getresponse
    raise ResponseNotReady()
ResponseNotReady



_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


reply via email to

[Prev in Thread] Current Thread [Next in Thread]