CESNET / libnetconf

C NETCONF library
Other
113 stars 84 forks source link

segfault during session close #245

Open bhupeshkothari opened 7 years ago

bhupeshkothari commented 7 years ago

Hard to reproduce but have seen multiple times. Occurs for cases that involve closing session (either due to malformed messages or if other side closes sessions).

(gdb) where

0 0x00007f50ac945f0c in nc_session_close (session=0x30329a0,

reason=NC_SESSION_TERM_OTHER) at /home/bhupesh/libnetconf/src/session.c:1354

1 0x00007f50ac948e80 in nc_session_receive (session=0x30329a0, timeout=100,

msg=0x7fff11c5aa50) at /home/bhupesh/libnetconf/src/session.c:2357

2 0x00007f50ac94690f in nc_session_recv_msg (session=0x30329a0, timeout=100,

msg=0x7fff11c5aa50) at /home/bhupesh/libnetconf/src/session.c:2366

3 0x00007f50ac946683 in nc_session_recv_reply (session=0x30329a0,

timeout=10000, reply=0x7fff11c5aaa8) at /home/bhupesh/libnetconf/src/session.c:2412

4 0x00007f50ac945fea in announce_nc_session_closing (session=0x30329a0)

at /home/bhupesh/libnetconf/src/session.c:1173

5 0x00007f50ac945b63 in nc_session_close (session=0x30329a0,

reason=NC_SESSION_TERM_OTHER) at /home/bhupesh/libnetconf/src/session.c:1231

6 0x00007f50ac948e80 in nc_session_receive (session=0x30329a0, timeout=100,

msg=0x7fff11c5acd0) at /home/bhupesh/libnetconf/src/session.c:2357

7 0x00007f50ac94690f in nc_session_recv_msg (session=0x30329a0, timeout=100,

msg=0x7fff11c5acd0) at /home/bhupesh/libnetconf/src/session.c:2366

8 0x00007f50ac946683 in nc_session_recv_reply (session=0x30329a0,

timeout=-1, reply=0x7fff11c5adc0) at /home/bhupesh/libnetconf/src/session.c:2412

9 0x00007f50ac949914 in nc_session_send_recv (session=0x30329a0,

rpc=0x20afc80, reply=0x7fff11c5adc0) at /home/bhupesh/libnetconf/src/session.c:3039

10 0x0000000000406570 in ?? ()

11 0x00007fff11c5ae20 in ?? ()

12 0x0000000001e958d0 in ?? ()

13 0x0000000000000000 in ?? ()