Hi, 

Interesting, thanks for the info. But the thing I was worried about is java’s 
threading model and interaction with the network. VLS, the shim between vcl and 
ldp, tries to guess how the app uses the network and enforces locking to make 
sure only one thread interacts with a vcl worker's resources. If vls does not 
correctly guess the threading model, it can lead to issues. 

Regarding the crash lower, it seems nio tries to EPOLL_CTL_MOD a session and 
that session has no fifo. That should not crash (see [1]). Are you using an 
older version of vpp?

Regards,
Florin

[1] https://git.fd.io/vpp/tree/src/vcl/vppcom.c#n2883

> On May 25, 2022, at 1:43 AM, NUAA无痕 <nuaawan...@gmail.com> wrote:
> 
> 
> 
> ---------- Forwarded message ---------
> 发件人: NUAA无痕 <nuaawan...@gmail.com <mailto:nuaawan...@gmail.com>>
> Date: 2022年5月25日周三 16:37
> Subject: Re: [vpp-dev] hoststack-java netty segmentfault
> To: Florin Coras <fcoras.li...@gmail.com <mailto:fcoras.li...@gmail.com>>
> 
> 
> hi, Florin
> yes, im use LDP + java, i hava tested java socket, it works fine!
> i think jvm also use libc.so, so i guess java socket will translate to c 
> socket, it is
> 
> now i m use LDP for netty,but it segmentfault
> vpp version is 2101
> 
> this is info
> 
> Thread 17 "nioEventLoopGro" received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 0x7f977571d0 (LWP 7042)]
> 0x0000007fb7d998a8 in svm_fifo_del_want_deq_ntf (f=0x0, ntf_type=2 '\002') at 
> /home/wanghe/ZFP-2101/src/svm/svm_fifo.h:770
> 770       f->want_deq_ntf &= ~ntf_type;
> (gdb) bt
> #0  0x0000007fb7d998a8 in svm_fifo_del_want_deq_ntf (f=0x0, ntf_type=2 
> '\002') at /home/wanghe/ZFP-2101/src/svm/svm_fifo.h:770
> #1  0x0000007fb7da6ba0 in vppcom_epoll_ctl (vep_handle=1, op=3, 
> session_handle=10, event=0x7f97755c68) at 
> /home/wanghe/ZFP-2101/src/vcl/vppcom.c:2740
> #2  0x0000007fb7dc02f0 in vls_epoll_ctl (ep_vlsh=0, op=3, vlsh=9, 
> event=0x7f97755c68) at /home/wanghe/ZFP-2101/src/vcl/vcl_locked.c:1293
> #3  0x0000007fb7fbc390 in epoll_ctl (epfd=128, op=3, fd=137, 
> event=0x7f97755c68) at /home/wanghe/ZFP-2101/src/vcl/ldp.c:2294
> #4  0x0000007fa8135b1c in Java_sun_nio_ch_EPollArrayWrapper_epollCtl () from 
> /usr/lib/jvm/java-8-openjdk-arm64/jre/lib/aarch64/libnio.so
> #5  0x0000007f9c08f49c in ?? ()
> Backtrace stopped: previous frame identical to this frame (corrupt stack?)
> 
> 
> this may a bug, if vpp can support java, it will very good
> i need to enhance java web performance 
> 
> best wish
> 
> Florin Coras <fcoras.li...@gmail.com <mailto:fcoras.li...@gmail.com>> 
> 于2022年5月22日周日 06:43写道:
> Hi, 
> 
> Are you trying to use LDP + java? I suspect that has never been tested and 
> I’d be surprised if it worked. 
> 
> Regards, 
> Florin
> 
> > On May 20, 2022, at 2:18 AM, NUAA无痕 <nuaawan...@gmail.com 
> > <mailto:nuaawan...@gmail.com>> wrote:
> > 
> > hi, vpp expert
> > im use vpp hoststack for java netty
> > but it segmentfault, reason is epoll use svm_fifo_t is null
> > can u give some suggestion,thank u
> > 
> > 
> > 
> > 
> 
> 
> 
> 

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

Reply via email to