libyang icon indicating copy to clipboard operation
libyang copied to clipboard

Many prints "ly_vprint_: writing data failed (Success)"

Open starx1000 opened this issue 3 years ago • 2 comments

hi, we are using latest libyang 2.0.194 (also corresponding latest netopeer2). during the test I have seen that the following logs printing:

 <30>1 2022-06-26T02:29:04.426406+00:00 netopeer2-server 15 - - Event "rpc" with ID 1112 priority 0 succeeded.
 <27>1 2022-06-26T02:29:05.355402+00:00 netopeer2-server 15 - - Session 22: Communication socket unexpectedly closed.
 <27>1 2022-06-26T02:29:05.355561+00:00 netopeer2-server 15 - - ly_write_: writing data failed (Success).
 <27>1 2022-06-26T02:29:05.355647+00:00 netopeer2-server 15 - - ly_vprint_: writing data failed (Success).
 <27>1 2022-06-26T02:29:05.355727+00:00 netopeer2-server 15 - - ly_vprint_: writing data failed (Success).
 <27>1 2022-06-26T02:29:05.355805+00:00 netopeer2-server 15 - - ly_vprint_: writing data failed (Success).

-- 14338 lines about `ly_vprint_: writing data failed (Success)`. 
--  with some prints about `ly_write_: writing data failed (Success)`
 
 <27>1 2022-06-26T02:29:08.412404+00:00 netopeer2-server 15 - - Session 22: Failed to write reply (error).
 <30>1 2022-06-26T02:29:08.412616+00:00 netopeer2-server 15 - - Session 22: thread 0 event new RPC.
 <30>1 2022-06-26T02:29:08.412734+00:00 netopeer2-server 15 - - Session 22: thread 0 event session terminated.
 <30>1 2022-06-26T02:29:08.413065+00:00 netopeer2-server 15 - - There are no subscribers for "ietf-netconf-notifications" notifications.

About 14338 lines for ly_vprint_: writing data failed (Success).

I did some search for the source code and find similar prints in out.c:467.

https://github.com/CESNET/libyang/blob/87375f15159545a87a1e0de200f5d9d67e9091d7/src/out.c#L467

Can you have a look for this? thanks.

starx1000 avatar Jun 29 '22 02:06 starx1000

I have never encountered such a behavior so I am not sure what the problem may be. Could you maybe help with debugging this? If you just use gdb to stop at the line you referenced and then print out->type, format, and written, at least.

michalvasko avatar Jul 14 '22 07:07 michalvasko

OK, I will have a try and let you know the result later. thanks.

starx1000 avatar Jul 22 '22 01:07 starx1000

I do not found the issue repeated recently, let us close this ticket firstly. if more logs found in new version I will update it..

Thank you very much.

starx1000 avatar Oct 19 '22 07:10 starx1000