[grpc-io] Re: ImportError: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.33' not found

2021-11-30 Thread jeremy scott
I'm having the same exact issue. Did this issue ever get resolved?


On Wednesday, October 27, 2021 at 8:44:54 PM UTC-7 Antonio Orozco wrote:

> This is the first time trying to use google pub/sub python package.
>
> Command that I used to install:
> python3 -m pip --no-cache-dir install grpcio
>
> I tried many other ways, all yield the same result. "sudo pip3..", "sudo 
> pip...", "pip3 ...", "pip..."
> It works perfectly on Ubuntu 20.04.
> Looking in indexes: https://pypi.org/simple, 
> https://www.piwheels.org/simple
> Collecting grpcio
>   Downloading 
> https://files.pythonhosted.org/packages/9e/68/721d94afa6fea6c559b1d795d2bae0147b3db9b43f4069d392371a2b8cab/grpcio-1.41.1-cp37-cp37m-linux_armv7l.whl
>  
> (47.9MB)
> 100% || 48.0MB 12.8MB/s
> Requirement already satisfied: six>=1.5.2 in 
> ./.local/lib/python3.7/site-packages (from grpcio) (1.16.0)
> Installing collected packages: grpcio
> Successfully installed grpcio-1.41.1
>
> ldd --version
> ldd (*Debian GLIBC 2.28-10+rpt2+rpi1*) 2.28
> Copyright (C) 2018 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> Written by Roland McGrath and Ulrich Drepper.
>
> On Wednesday, October 27, 2021 at 10:21:07 AM UTC-7 rbel...@google.com 
> wrote:
>
>>
>> How did you install grpcio? If you used pip install grpcio, can you 
>> please include the installation logs?
>>
>> Did this work on previous versions?
>> On Monday, October 25, 2021 at 8:33:16 PM UTC-7 Antonio Orozco wrote:
>>
>>> Traceback (most recent call last):
>>>   File "fpl_notifications.py", line 4, in 
>>> *from google.cloud import pubsub_v1*
>>>   File 
>>> "/home/antonio/.local/lib/python3.7/site-packages/google/cloud/pubsub_v1/__init__.py",
>>>  
>>> line 17, in 
>>> from google.cloud.pubsub_v1 import types
>>>   File 
>>> "/home/antonio/.local/lib/python3.7/site-packages/google/cloud/pubsub_v1/types.py",
>>>  
>>> line 25, in 
>>> from google.api_core import gapic_v1
>>>   File 
>>> "/home/antonio/.local/lib/python3.7/site-packages/google/api_core/gapic_v1/__init__.py",
>>>  
>>> line 16, in 
>>> from google.api_core.gapic_v1 import config
>>>   File 
>>> "/home/antonio/.local/lib/python3.7/site-packages/google/api_core/gapic_v1/config.py",
>>>  
>>> line 23, in 
>>> import grpc
>>>   File 
>>> "/home/antonio/.local/lib/python3.7/site-packages/grpc/__init__.py", line 
>>> 22, in 
>>> from grpc import _compression
>>>   File 
>>> "/home/antonio/.local/lib/python3.7/site-packages/grpc/_compression.py", 
>>> line 15, in 
>>> from grpc._cython import cygrpc
>>> *ImportError: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.33' 
>>> not found* (required by 
>>> /home/antonio/.local/lib/python3.7/site-packages/grpc/_cython/
>>> cygrpc.cpython-37m-arm-linux-gnueabihf.so)
>>>
>>> On Monday, October 25, 2021 at 8:22:28 PM UTC-7 Antonio Orozco wrote:
>>>
 Hello,

 Running into the following issue on a Raspberry Pi 4

 $ lsb_release -a
 No LSB modules are available.
 Distributor ID: Raspbian
 Description:Raspbian GNU/Linux 10 (buster)
 Release:10
 Codename:   buster
 $ uname -a
 Linux liverpool 5.10.63-v7l+ #1459 SMP Wed Oct 6 16:41:57 BST 2021 
 armv7l GNU/Linux


 Python 3.7.3 (default, Jan 22 2021, 20:04:44)
 [GCC 8.3.0] on linux
 Type "help", "copyright", "credits" or "license" for more information.
 >>> from grpc._cython import cygrpc
 Traceback (most recent call last):
   File "", line 1, in 
   File 
 "/home/antonio/.local/lib/python3.7/site-packages/grpc/__init__.py", line 
 22, in 
 from grpc import _compression
   File 
 "/home/antonio/.local/lib/python3.7/site-packages/grpc/_compression.py", 
 line 15, in 
 from grpc._cython import cygrpc
 ImportError: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.33' 
 not found (required by 
 /home/antonio/.local/lib/python3.7/site-packages/grpc/_cython/
 cygrpc.cpython-37m-arm-linux-gnueabihf.so)

>>>

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to grpc-io+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/23ca04ca-65ef-49ee-b924-be4e4753540an%40googlegroups.com.


[grpc-io] Re: How to analyze potential memory leak in Grpc-Java

2021-11-30 Thread 'sanjay...@google.com' via grpc.io
> My question is SHOULD I call responseObserver.onCompleted() in onError 
too?

It will be a good idea to call responseObserver.onError() inside your 
server's request-observer e.g.

@Override
public void onError(Throwable t) {
responseObserver.onError(t);   // or alternatively return a fixed throwable 
instead of the throwable you received 
LOG.error("Command send on error. Exception: ", t);
}

The reason it's a good idea is because even though gRPC code doesn't need 
it you could have some interceptor code that leaks resources in such 
situations.

> I found there is inconsistent answers on stack overflow,

One of the links is for the client side so that logic doesn't apply here.

> And occationally,  I will get 
"io.netty.util.internal.OutOfDirectMemoryError: failed to allocate *** 
byte(s) of direct memory (used: ***, max: ***)" error on server side too.

This is unlikely to be caused by the above but could possibly be because of 
lack of flow control in your implementation.


On Wednesday, November 24, 2021 at 7:52:34 PM UTC-8 chir...@gmail.com wrote:

> There is a lot "io.grpc.StatusRuntimeException: CANCELLED: client 
> cancelled" error in server side. 
> And occationally,  I will get 
> "io.netty.util.internal.OutOfDirectMemoryError: failed to allocate *** 
> byte(s) of direct memory (used: ***, max: ***)" error on server side too. 
>
> Set "io.netty.leakDetection.level=paranoid",  there is no leak related 
> LOGs. 
>
> Server side function looks like this, 
>
> @Override
> public StreamObserver send(
> StreamObserver responseObserver) {
> return new StreamObserver() {
>
> @Override
> public void onNext(CommandRequestProto request) {
> try {
> CommandResponseProto resp =
> function(request);
> responseObserver.onNext(resp);
> } catch (Throwable e) {
> LOG.error("Got exception when processing"
> + "CommandRequestProto {}", request, e);
> responseObserver.onError(e);
> }
> }
>
> @Override
> public void onError(Throwable t) {
> // for now we just log a msg
> LOG.error("Command send on error. Exception: ", t);
> }
>
> @Override
> public void onCompleted() {
> LOG.debug("Command send completed");
> responseObserver.onCompleted();
> }
>
> };
>
> My question is SHOULD I call responseObserver.onCompleted() in onError 
> too? 
> I found there is inconsistent answers on stack overflow, 
>
> This one 
>
> https://stackoverflow.com/questions/64257725/can-someone-explain-to-me-whats-the-proper-usage-of-grpc-streamobserver-onerror
>  
> Says that onError/onCompleted should not call requestObserver. 
>
> While this one 
> https://stackoverflow.com/questions/65488395/grpc-oncomplete-for-bidistream
> Says if you don't call requestObserver.onCompleted, there will be a memory 
> leak.
>
> I'm not sure which one is corrent.  I'd like to hear the more 
> authoritative answer. 
> Should server side request StreamObserver.onError/onCompleted call 
> response's StreamObserver.onCompleted?
>
> Thanks in advance. 
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to grpc-io+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/0beaed1d-7220-4329-bde0-fb83f453d339n%40googlegroups.com.


[grpc-io] Using the gRPC AsyncIO API in python

2021-11-30 Thread Nishit Mengar
Hello,
I apologize in advance if it is a dumb question, but I was wondering how 
can I do something like stream.write() or stream.read() in bidirectional 
streaming in python where I want to asynchronously call these.

The official gRPC Python AsyncIO API documentation only has abstract 
methods in the classes. Does this mean that I actually have to (override) 
implement the methods myself? How do I actually get the context to 
correctly configure a class like grpc.aio.StreamStreamCall() ? (Apologies 
again if it is a dumb question, I'm a beginner to this and development in 
general)

I referred to these sources but couldn't find a direct answer-
https://grpc.github.io/grpc/python/grpc_asyncio.html#overview
https://github.com/grpc/grpc.io/issues/726#issuecomment-806234300
https://stackoverflow.com/questions/67465629/grpc-python-server-to-client-communication-through-function-call
https://pretagteam.com/question/how-do-i-handle-streaming-messages-with-python-grpc
https://grpclib.readthedocs.io/en/latest/client.html

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to grpc-io+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/f0adae7a-c760-450c-979a-388a44574c75n%40googlegroups.com.