[vpp-dev] [VCL] hoststack app crash with invalid memfd segment address

2019-11-15 Thread wanghanlin
hi ALL,I accidentally got following crash stack when I used VCL with hoststack and memfd. But corresponding invalid rx_fifo address (0x2f42e2480) is valid in VPP process and also can be found in /proc/map. That is, shared memfd segment memory is not consistent between hoststack a

Re: [vpp-dev] [VCL] hoststack app crash with invalid memfd segment address

2019-11-15 Thread Florin Coras
Hi Hanlin, Just to make sure, are you running master or some older VPP? Regarding the issue you could be hitting lower, here’s [1] a patch that I have not yet pushed for merging because it leads to api changes for applications that directly use the session layer application interface instead of

Re: [vpp-dev] [VCL] hoststack app crash with invalid memfd segment address

2019-11-18 Thread wanghanlin
Hi  Florin,VPP vsersion is v19.08.I'll apply this patch and check it. Thanks a lot! Regards,Hanlin

Re: [vpp-dev] [VCL] hoststack app crash with invalid memfd segment address

2019-11-21 Thread wanghanlin
Hi Florin, I have applied the patch, and found some problems in my case.  I have not right to post it in gerrit, so I post here. 1)evt->event_type should be set  with SESSION_CTRL_EVT_APP_DEL_SEGMENT rather than SESSION_CTRL_EVT_APP_ADD_SEGMENT. File: src/vnet/ses

Re: [vpp-dev] [VCL] hoststack app crash with invalid memfd segment address

2019-11-21 Thread Jon Loeliger via Lists.Fd.Io
On Thu, Nov 21, 2019 at 4:50 AM wanghanlin wrote: > Hi Florin, > I have applied the patch, and found some problems in my case. I have not > right to post it in gerrit, so I post here. > Why don't you register with Gerrit, like this: https://wiki.fd.io/view/DEV/Setting_up_Gerrit HTH, jdl -=-=-

Re: [vpp-dev] [VCL] hoststack app crash with invalid memfd segment address

2019-11-21 Thread Florin Coras
Hi Hanlin, As Jon pointed out, you may want to register with gerrit. You comments with respect to points 1) and 2) are spot on. I’ve updated the patch to fix them. Regarding 3), if I understood your scenario correctly, it should not happen. The ssvm infra forces applications to map segments

Re: [vpp-dev] [VCL] hoststack app crash with invalid memfd segment address

2019-11-21 Thread wanghanlin
Hi Florin, Regarding 3), I think main problem maybe in function vl_socket_client_recv_fd_msg called by vcl_session_app_add_segment_handler.  Mutiple worker threads share the same scm->client_socket.fd, so B2 may receive the segment memfd belong to A1. Regards,Han

Re: [vpp-dev] [VCL] hoststack app crash with invalid memfd segment address

2019-11-22 Thread Florin Coras
Hi Hanlin, Okay, that’s a different issue. The expectation is that each vcl worker has a different binary api transport into vpp. This assumption holds for applications with multiple process workers (like nginx) but is not completely satisfied for applications with thread workers. Namely, fo

Re: [vpp-dev] [VCL] hoststack app crash with invalid memfd segment address

2019-12-11 Thread Florin Coras
Hi Hanlin, Thanks to Dave, we can now have per thread binary api connections to vpp. I’ve updated the socket client and vcl to leverage this so, after [1] we have per vcl worker thread binary api sockets that are used to exchange fds. Let me know if you’re still hitting the issue. Regards,

Re: [vpp-dev] [VCL] hoststack app crash with invalid memfd segment address

2019-12-11 Thread wanghanlin
That's great! I'll apply and check it soon. Thanks & Regards,Hanlin

Re: [vpp-dev] [VCL] hoststack app crash with invalid memfd segment address

2020-01-18 Thread wanghanlin
Hi Florin, With latest master code,the problem regarding 3) has been fixed.Thanks & Regards,Hanlin

Re: [vpp-dev] [VCL] hoststack app crash with invalid memfd segment address

2020-01-19 Thread Florin Coras
Hi Hanlin, Thanks for confirming! Regards, Florin > On Jan 18, 2020, at 7:00 PM, wanghanlin wrote: > > Hi Florin, > With latest master code,the problem regarding 3) has been fixed. > > Thanks & Regards, > Hanlin > > > wanghanlin > > wanghan...@corp.netease.com > >