Re: [vpp-dev] #socket-api get stuck in socket function

2022-04-27 Thread 2595676015a
Hi, Florin Coras

I found out that because I run the next program right next to the last one, the 
VCL didn't clear the last connection, so I get stuck in the socket function. 
Thanks a lot.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#21291): https://lists.fd.io/g/vpp-dev/message/21291
Mute This Topic: https://lists.fd.io/mt/90680910/21656
Mute #socket-api:https://lists.fd.io/g/vpp-dev/mutehashtag/socket-api
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [vpp-dev] #socket-api get stuck in socket function

2022-04-26 Thread Florin Coras
Hi, 

I’m guessing you’re asking how to run LDP from gdb. For that either create a 
gdb script file and: gdb -x cmd.gdb --args ./epollandsocket, or run the 
commands after starting gdb. 

The minimal set of commands to start: 
set exec-wrapper env 
‘LD_PRELOAD=/vpp/build-root/build-vpp-native/vpp/lib/libvcl_ldpreload.so’
set environment VCL_CONFIG=/vcl.conf

Hope this helps!

Regards,
Florin

> On Apr 26, 2022, at 10:50 AM, 25956760...@gmail.com wrote:
> 
> Thanks, I'm using LDP. When I use gdb to debug, it comes out with output as 
> follows.
> I guess LDP recovers some libraries that gdb needs. When I switch to normal 
> env, gdb runs correctly. How can I solve this, thanks. Correct output as 
> follows.
> 
> 
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#21286): https://lists.fd.io/g/vpp-dev/message/21286
Mute This Topic: https://lists.fd.io/mt/90680910/21656
Mute #socket-api:https://lists.fd.io/g/vpp-dev/mutehashtag/socket-api
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [vpp-dev] #socket-api get stuck in socket function

2022-04-26 Thread 2595676015a
Thanks, I'm using LDP. When I use gdb to debug, it comes out with output as 
follows.
I guess LDP recovers some libraries that gdb needs. When I switch to normal 
env, gdb runs correctly. How can I solve this, thanks. Correct output as 
follows.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#21285): https://lists.fd.io/g/vpp-dev/message/21285
Mute This Topic: https://lists.fd.io/mt/90680910/21656
Mute #socket-api:https://lists.fd.io/g/vpp-dev/mutehashtag/socket-api
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [vpp-dev] #socket-api get stuck in socket function

2022-04-25 Thread Florin Coras
Hi, 

Are you trying to run the test app through LDP? If yes, sharing one epoll fd 
between two threads might be the source of the issues, although hard to say 
what could go wrong. 

With respect to your app, could you run it from gdb and check where it’s stuck? 

Regards,
Florin

> On Apr 25, 2022, at 2:16 AM, 25956760...@gmail.com wrote:
> 
> Hi All ,
> 
> I'm trying to use nonblock socket with epoll. 
> I wonder why I sometimes get stuck in socket function when I use VCL .
> Code as following:
> printf ("before socket\n");
> if ((c_fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
> perror("create socket fail.\n");
> exit(0);
> }
> printf ("after socket\n");
> The only output is "before socket",socket function even dosen't return.
> Thank you very much
> 
> complete code is in attachments
>  
> 
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#21284): https://lists.fd.io/g/vpp-dev/message/21284
Mute This Topic: https://lists.fd.io/mt/90680910/21656
Mute #socket-api:https://lists.fd.io/g/vpp-dev/mutehashtag/socket-api
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-