Hello Sylvain,

I have been using latest ppp-new commit from git and also lwip but im 
experiencing a problem ONLY when I close the ppp connection. When the ppp 
thread is left open (running always) everything is OK. Let me explain to you 
what happens:

I initiate a connection and once the link is up I send my data.
I then close the connection and use ppp_delete().
After around 5 tries it seems that I get an LCP timeout. This occurs because I 
don’t have any pbuf available.
It seems that there might be a memory leak when closing the connection and 
deleting ppp?

I have attached serial output.

Regards,
Nick
PPP Start
CONNECT
netif: IP address of interface set to 0.0.0.0
netif: netmask of interface set to 0.0.0.0
netif: GW address of interface set to 0.0.0.0
netif: added interface pp IP addr 0.0.0.0 netmask 0.0.0.0 gw 0.0.0.0
ppp phase changed: unit 5: phase=0
PPP Serial open
ppp phase changed: unit 5: phase=1
ppp_over_serial_open: unit 5: connecting
ppp_start: unit 5
ppp_set_xaccm[5]: out_accm=0 0 0 0
ppp_send_config[5]: out_accm=FF FF FF FF
ppp_recv_config[5]: in_accm=FF FF FF FF
neg_upap: 1
pbuf_alloc(length=24)
pbuf_alloc: allocated pbuf 0x10001f2c
pbuf_alloc(length=24) == 0x10001f2c
pbuf_alloc(length=0)
pbuf_alloc: allocated pbuf 0x10001d1c
pbuf_alloc(length=0) == 0x10001d1c
ppp_write[5]: len=47
pbuf_free(0x10001d1c)
pbuf_free: deallocating 0x10001d1c
pbuf_free(0x10001f2c)
pbuf_free: deallocating 0x10001f2c
ppp_start: finished
pppos_input_proc[5]: got 14 bytes
pppos_input_proc[5]: Dropping ACCM char <0>
pppos_input_proc[5]: Dropping ACCM char <0>
pppos_input_proc[5]: Dropping ACCM char <0>
pppos_input_proc[5]: Dropping ACCM char <0>
pppos_input_proc[5]: Dropping ACCM char <0>
pppos_input_proc[5]: Dropping ACCM char <0>
pppos_input_proc[5]: Dropping ACCM char <0>
pppos_input_proc[5]: Dropping ACCM char <0>
pppos_input_proc[5]: Dropping ACCM char <0>
pppos_input_proc[5]: Dropping ACCM char <0>
pppos_input_proc[5]: Dropping ACCM char <0>
pppos_input_proc[5]: Dropping ACCM char <0>
pppos_input_proc[5]: Dropping ACCM char <0>
pppos_input_proc[5]: Dropping ACCM char <0>
pppos_input_proc[5]: got 14 bytes
pbuf_alloc(length=0)
pbuf_alloc: allocated pbuf 0x10001f2c
pbuf_alloc(length=0) == 0x10001f2c
pppos_input_proc[5]: got 14 bytes
pppos_input_proc[5]: got 14 bytes
pbuf_alloc(length=4)
pbuf_alloc: allocated pbuf 0x10001d1c
pbuf_alloc(length=4) == 0x10001d1c
pbuf_chain: 0x10001d1c references 0x10001f2c
pbuf_free(0x10001d1c)
pbuf_free: deallocating 0x10001d1c
pbuf_free: 0x10001f2c has ref 1, ending here.
pbuf_header: old 0x10001f3c new 0x10001f3e (-2)
pbuf_alloc(length=512)
pbuf_alloc: allocated pbuf 0x10001d1c
pbuf_alloc(length=512) == 0x10001d1c
pbuf_free(0x10001d1c)
pbuf_free: deallocating 0x10001d1c
pbuf_alloc(length=18)
pbuf_alloc: allocated pbuf 0x10001d1c
pbuf_alloc(length=18) == 0x10001d1c
pbuf_alloc(length=0)
pbuf_alloc: allocated pbuf 0x0
pbuf_free(0x10001d1c)
pbuf_free: deallocating 0x10001d1c
pbuf_free(0x10001f2c)
pbuf_free: deallocating 0x10001f2c
pppos_input_proc[5]: got 27 bytes
pbuf_alloc(length=0)
pbuf_alloc: allocated pbuf 0x10001f2c
pbuf_alloc(length=0) == 0x10001f2c
pbuf_alloc(length=4)
pbuf_alloc: allocated pbuf 0x10001d1c
pbuf_alloc(length=4) == 0x10001d1c
pbuf_chain: 0x10001d1c references 0x10001f2c
pbuf_free(0x10001d1c)
pbuf_free: deallocating 0x10001d1c
pbuf_free: 0x10001f2c has ref 1, ending here.
pbuf_header: old 0x10001f3c new 0x10001f3e (-2)
pbuf_alloc(length=14)
pbuf_alloc: allocated pbuf 0x10001d1c
pbuf_alloc(length=14) == 0x10001d1c
pbuf_alloc(length=0)
pbuf_alloc: allocated pbuf 0x0
pbuf_free(0x10001d1c)
pbuf_free: deallocating 0x10001d1c
pbuf_free(0x10001f2c)
pbuf_free: deallocating 0x10001f2c
pppos_input_proc[5]: got 14 bytes
pbuf_alloc(length=0)
pbuf_alloc: allocated pbuf 0x10001f2c
pbuf_alloc(length=0) == 0x10001f2c
pppos_input_proc[5]: got 14 bytes
pppos_input_proc[5]: got 7 bytes
pbuf_alloc(length=4)
pbuf_alloc: allocated pbuf 0x10001d1c
pbuf_alloc(length=4) == 0x10001d1c
pbuf_chain: 0x10001d1c references 0x10001f2c
pbuf_free(0x10001d1c)
pbuf_free: deallocating 0x10001d1c
pbuf_free: 0x10001f2c has ref 1, ending here.
pbuf_header: old 0x10001f3c new 0x10001f3e (-2)
pbuf_alloc(length=512)
pbuf_alloc: allocated pbuf 0x10001d1c
pbuf_alloc(length=512) == 0x10001d1c
pbuf_free(0x10001d1c)
pbuf_free: deallocating 0x10001d1c
pbuf_alloc(length=18)
pbuf_alloc: allocated pbuf 0x10001d1c
pbuf_alloc(length=18) == 0x10001d1c
pbuf_alloc(length=0)
pbuf_alloc: allocated pbuf 0x0
pbuf_free(0x10001d1c)
pbuf_free: deallocating 0x10001d1c
pbuf_free(0x10001f2c)
pbuf_free: deallocating 0x10001f2c
pppos_input_proc[5]: got 14 bytes
pbuf_alloc(length=0)
pbuf_alloc: allocated pbuf 0x10001f2c
pbuf_alloc(length=0) == 0x10001f2c
pppos_input_proc[5]: got 14 bytes
pppos_input_proc[5]: got 7 bytes
pbuf_alloc(length=4)
pbuf_alloc: allocated pbuf 0x10001d1c
pbuf_alloc(length=4) == 0x10001d1c
pbuf_chain: 0x10001d1c references 0x10001f2c
pbuf_free(0x10001d1c)
pbuf_free: deallocating 0x10001d1c
pbuf_free: 0x10001f2c has ref 1, ending here.
pbuf_header: old 0x10001f3c new 0x10001f3e (-2)
pbuf_alloc(length=512)
pbuf_alloc: allocated pbuf 0x10001d1c
pbuf_alloc(length=512) == 0x10001d1c
pbuf_free(0x10001d1c)
pbuf_free: deallocating 0x10001d1c
pbuf_alloc(length=18)
pbuf_alloc: allocated pbuf 0x10001d1c
pbuf_alloc(length=18) == 0x10001d1c
pbuf_alloc(length=0)
pbuf_alloc: allocated pbuf 0x0
pbuf_free(0x10001d1c)
pbuf_free: deallocating 0x10001d1c
pbuf_free(0x10001f2c)
pbuf_free: deallocating 0x10001f2c
pbuf_alloc(length=14)
pbuf_alloc: allocated pbuf 0x10001f2c
pbuf_alloc(length=14) == 0x10001f2c
pbuf_alloc(length=0)
pbuf_alloc: allocated pbuf 0x10001d1c
pbuf_alloc(length=0) == 0x10001d1c
ppp_write[5]: len=29
pbuf_free(0x10001d1c)
pbuf_free: deallocating 0x10001d1c
pbuf_free(0x10001f2c)
pbuf_free: deallocating 0x10001f2c
pppos_input_proc[5]: got 14 bytes
pbuf_alloc(length=0)
pbuf_alloc: allocated pbuf 0x10001f2c
pbuf_alloc(length=0) == 0x10001f2c
pppos_input_proc[5]: got 14 bytes
pppos_input_proc[5]: got 1 bytes
pbuf_alloc(length=4)
pbuf_alloc: allocated pbuf 0x10001d1c
pbuf_alloc(length=4) == 0x10001d1c
pbuf_chain: 0x10001d1c references 0x10001f2c
pbuf_free(0x10001d1c)
pbuf_free: deallocating 0x10001d1c
pbuf_free: 0x10001f2c has ref 1, ending here.
pbuf_header: old 0x10001f3c new 0x10001f3e (-2)
ppp_send_config[5]: out_accm=0 0 A 0
ppp_recv_config[5]: in_accm=0 0 0 0
ppp phase changed: unit 5: phase=5
pbuf_alloc(length=10)
pbuf_alloc: allocated pbuf 0x10001d1c
pbuf_alloc(length=10) == 0x10001d1c
pbuf_alloc(length=0)
pbuf_alloc: allocated pbuf 0x0
pbuf_free(0x10001d1c)
pbuf_free: deallocating 0x10001d1c
pbuf_free(0x10001f2c)
pbuf_free: deallocating 0x10001f2c
pppos_input_proc[5]: got 14 bytes
pbuf_alloc(length=0)
pbuf_alloc: allocated pbuf 0x10001f2c
pbuf_alloc(length=0) == 0x10001f2c
pppos_input_proc[5]: got 14 bytes
pppos_input_proc[5]: got 7 bytes
pbuf_alloc(length=4)
pbuf_alloc: allocated pbuf 0x10001d1c
pbuf_alloc(length=4) == 0x10001d1c
pbuf_chain: 0x10001d1c references 0x10001f2c
pbuf_free(0x10001d1c)
pbuf_free: deallocating 0x10001d1c
pbuf_free: 0x10001f2c has ref 1, ending here.
pbuf_header: old 0x10001f3c new 0x10001f3e (-2)
ppp phase changed: unit 5: phase=4
ppp_link_down: unit 5
ppp_send_config[5]: out_accm=FF FF FF FF
ppp_recv_config[5]: in_accm=0 0 0 0
neg_upap: 1
pbuf_alloc(length=24)
pbuf_alloc: allocated pbuf 0x10001d1c
pbuf_alloc(length=24) == 0x10001d1c
pbuf_alloc(length=0)
pbuf_alloc: allocated pbuf 0x0
pbuf_free(0x10001d1c)
pbuf_free: deallocating 0x10001d1c
pbuf_alloc(length=512)
pbuf_alloc: allocated pbuf 0x10001d1c
pbuf_alloc(length=512) == 0x10001d1c
pbuf_free(0x10001d1c)
pbuf_free: deallocating 0x10001d1c
pbuf_alloc(length=18)
pbuf_alloc: allocated pbuf 0x10001d1c
pbuf_alloc(length=18) == 0x10001d1c
pbuf_alloc(length=0)
pbuf_alloc: allocated pbuf 0x0
pbuf_free(0x10001d1c)
pbuf_free: deallocating 0x10001d1c
pbuf_free(0x10001f2c)
pbuf_free: deallocating 0x10001f2c
pppos_input_proc[5]: got 14 bytes
pbuf_alloc(length=0)
pbuf_alloc: allocated pbuf 0x10001f2c
pbuf_alloc(length=0) == 0x10001f2c
pppos_input_proc[5]: got 14 bytes
pppos_input_proc[5]: got 7 bytes
pbuf_alloc(length=4)
pbuf_alloc: allocated pbuf 0x10001d1c
pbuf_alloc(length=4) == 0x10001d1c
pbuf_chain: 0x10001d1c references 0x10001f2c
pbuf_free(0x10001d1c)
pbuf_free: deallocating 0x10001d1c
pbuf_free: 0x10001f2c has ref 1, ending here.
pbuf_header: old 0x10001f3c new 0x10001f3e (-2)
pbuf_alloc(length=512)
pbuf_alloc: allocated pbuf 0x10001d1c
pbuf_alloc(length=512) == 0x10001d1c
pbuf_free(0x10001d1c)
pbuf_free: deallocating 0x10001d1c
pbuf_alloc(length=18)
pbuf_alloc: allocated pbuf 0x10001d1c
pbuf_alloc(length=18) == 0x10001d1c
pbuf_alloc(length=0)
pbuf_alloc: allocated pbuf 0x0
pbuf_free(0x10001d1c)
pbuf_free: deallocating 0x10001d1c
pbuf_free(0x10001f2c)
pbuf_free: deallocating 0x10001f2c
pppos_input_proc[5]: got 14 bytes
pbuf_alloc(length=0)
pbuf_alloc: allocated pbuf 0x10001f2c
pbuf_alloc(length=0) == 0x10001f2c
pppos_input_proc[5]: got 14 bytes
pppos_input_proc[5]: got 7 bytes
pbuf_alloc(length=4)
pbuf_alloc: allocated pbuf 0x10001d1c
pbuf_alloc(length=4) == 0x10001d1c
pbuf_chain: 0x10001d1c references 0x10001f2c
pbuf_free(0x10001d1c)
pbuf_free: deallocating 0x10001d1c
pbuf_free: 0x10001f2c has ref 1, ending here.
pbuf_header: old 0x10001f3c new 0x10001f3e (-2)
pbuf_alloc(length=512)
pbuf_alloc: allocated pbuf 0x10001d1c
pbuf_alloc(length=512) == 0x10001d1c
pbuf_free(0x10001d1c)
pbuf_free: deallocating 0x10001d1c
pbuf_alloc(length=18)
pbuf_alloc: allocated pbuf 0x10001d1c
pbuf_alloc(length=18) == 0x10001d1c
pbuf_alloc(length=0)
pbuf_alloc: allocated pbuf 0x0
pbuf_free(0x10001d1c)
pbuf_free: deallocating 0x10001d1c
pbuf_free(0x10001f2c)
pbuf_free: deallocating 0x10001f2c
pbuf_alloc(length=24)
pbuf_alloc: allocated pbuf 0x10001f2c
pbuf_alloc(length=24) == 0x10001f2c
pbuf_alloc(length=0)
pbuf_alloc: allocated pbuf 0x10001d1c
pbuf_alloc(length=0) == 0x10001d1c
ppp_write[5]: len=45
pbuf_free(0x10001d1c)
pbuf_free: deallocating 0x10001d1c
pbuf_free(0x10001f2c)
pbuf_free: deallocating 0x10001f2c
pppos_input_proc[5]: got 14 bytes
pbuf_alloc(length=0)
pbuf_alloc: allocated pbuf 0x10001f2c
pbuf_alloc(length=0) == 0x10001f2c
pppos_input_proc[5]: got 14 bytes
pppos_input_proc[5]: got 5 bytes
pbuf_alloc(length=4)
pbuf_alloc: allocated pbuf 0x10001d1c
pbuf_alloc(length=4) == 0x10001d1c
pbuf_chain: 0x10001d1c references 0x10001f2c
pbuf_free(0x10001d1c)
pbuf_free: deallocating 0x10001d1c
pbuf_free: 0x10001f2c has ref 1, ending here.
pbuf_header: old 0x10001f3c new 0x10001f3e (-2)
pbuf_alloc(length=14)
pbuf_alloc: allocated pbuf 0x10001d1c
pbuf_alloc(length=14) == 0x10001d1c
pbuf_alloc(length=0)
pbuf_alloc: allocated pbuf 0x0
pbuf_free(0x10001d1c)
pbuf_free: deallocating 0x10001d1c
pbuf_free(0x10001f2c)
pbuf_free: deallocating 0x10001f2c
pppos_input_proc[5]: got 14 bytes
pbuf_alloc(length=0)
pbuf_alloc: allocated pbuf 0x10001f2c
pbuf_alloc(length=0) == 0x10001f2c
pbuf_alloc(length=14)
pbuf_alloc: allocated pbuf 0x10001d1c
pbuf_alloc(length=14) == 0x10001d1c
pbuf_alloc(length=0)
pbuf_alloc: allocated pbuf 0x0
pbuf_free(0x10001d1c)
pbuf_free: deallocating 0x10001d1c
pbuf_alloc(length=14)
pbuf_alloc: allocated pbuf 0x10001d1c
pbuf_alloc(length=14) == 0x10001d1c
pbuf_alloc(length=0)
pbuf_alloc: allocated pbuf 0x0
pbuf_free(0x10001d1c)
pbuf_free: deallocating 0x10001d1c
pbuf_alloc(length=14)
pbuf_alloc: allocated pbuf 0x10001d1c
pbuf_alloc(length=14) == 0x10001d1c
pbuf_alloc(length=0)
pbuf_alloc: allocated pbuf 0x0
pbuf_free(0x10001d1c)
pbuf_free: deallocating 0x10001d1c
pbuf_alloc(length=14)
pbuf_alloc: allocated pbuf 0x10001d1c
pbuf_alloc(length=14) == 0x10001d1c
pbuf_alloc(length=0)
pbuf_alloc: allocated pbuf 0x0
pbuf_free(0x10001d1c)
pbuf_free: deallocating 0x10001d1c
pbuf_alloc(length=14)
pbuf_alloc: allocated pbuf 0x10001d1c
pbuf_alloc(length=14) == 0x10001d1c
pbuf_alloc(length=0)
pbuf_alloc: allocated pbuf 0x0
pbuf_free(0x10001d1c)
pbuf_free: deallocating 0x10001d1c
pbuf_alloc(length=14)
pbuf_alloc: allocated pbuf 0x10001d1c
pbuf_alloc(length=14) == 0x10001d1c
pbuf_alloc(length=0)
pbuf_alloc: allocated pbuf 0x0
pbuf_free(0x10001d1c)
pbuf_free: deallocating 0x10001d1c
pbuf_alloc(length=14)
pbuf_alloc: allocated pbuf 0x10001d1c
pbuf_alloc(length=14) == 0x10001d1c
pbuf_alloc(length=0)
pbuf_alloc: allocated pbuf 0x0
pbuf_free(0x10001d1c)
pbuf_free: deallocating 0x10001d1c
pbuf_alloc(length=14)
pbuf_alloc: allocated pbuf 0x10001d1c
pbuf_alloc(length=14) == 0x10001d1c
pbuf_alloc(length=0)
pbuf_alloc: allocated pbuf 0x0
pbuf_free(0x10001d1c)
pbuf_free: deallocating 0x10001d1c
pbuf_alloc(length=14)
pbuf_alloc: allocated pbuf 0x10001d1c
pbuf_alloc(length=14) == 0x10001d1c
pbuf_alloc(length=0)
pbuf_alloc: allocated pbuf 0x0
pbuf_free(0x10001d1c)
pbuf_free: deallocating 0x10001d1c
LCP: timeout sending Config-Requests

ppp phase changed: unit 5: phase=10
Connection terminated.
ppp phase changed: unit 5: phase=0
ppp_link_terminated: unit 5
ppp_link_terminated: unit 5: link_status_cb=0xe15 err_code=0
PPP Error=8
ppp_delete: unit 5
netif_remove: removed netif
ppp_link_terminated: finished.
Delete pppos_input_thread

PPP Start
CONNECT
netif: IP address of interface set to 0.0.0.0
netif: netmask of interface set to 0.0.0.0
netif: GW address of interface set to 0.0.0.0
netif: added interface pp IP addr 0.0.0.0 netmask 0.0.0.0 gw 0.0.0.0
ppp phase changed: unit 6: phase=0
PPP Serial open
ppp phase changed: unit 6: phase=1
ppp_over_serial_open: unit 6: connecting
ppp_start: unit 6
ppp_set_xaccm[6]: out_accm=0 0 0 0
ppp_send_config[6]: out_accm=FF FF FF FF
ppp_recv_config[6]: in_accm=FF FF FF FF
neg_upap: 1
pbuf_alloc(length=24)
pbuf_alloc: allocated pbuf 0x10001d1c
pbuf_alloc(length=24) == 0x10001d1c
pbuf_alloc(length=0)
pbuf_alloc: allocated pbuf 0x0
pbuf_free(0x10001d1c)
pbuf_free: deallocating 0x10001d1c
ppp_start: finished
pbuf_alloc(length=24)
pbuf_alloc: allocated pbuf 0x10001d1c
pbuf_alloc(length=24) == 0x10001d1c
pbuf_alloc(length=0)
pbuf_alloc: allocated pbuf 0x0
pbuf_free(0x10001d1c)
pbuf_free: deallocating 0x10001d1c
pbuf_alloc(length=24)
pbuf_alloc: allocated pbuf 0x10001d1c
pbuf_alloc(length=24) == 0x10001d1c
pbuf_alloc(length=0)
pbuf_alloc: allocated pbuf 0x0
pbuf_free(0x10001d1c)
pbuf_free: deallocating 0x10001d1c
pbuf_alloc(length=24)
pbuf_alloc: allocated pbuf 0x10001d1c
pbuf_alloc(length=24) == 0x10001d1c
pbuf_alloc(length=0)
pbuf_alloc: allocated pbuf 0x0
pbuf_free(0x10001d1c)
pbuf_free: deallocating 0x10001d1c
pbuf_alloc(length=24)
pbuf_alloc: allocated pbuf 0x10001d1c
pbuf_alloc(length=24) == 0x10001d1c
pbuf_alloc(length=0)
pbuf_alloc: allocated pbuf 0x0
pbuf_free(0x10001d1c)
pbuf_free: deallocating 0x10001d1c
pbuf_alloc(length=24)
pbuf_alloc: allocated pbuf 0x10001d1c
pbuf_alloc(length=24) == 0x10001d1c
pbuf_alloc(length=0)
pbuf_alloc: allocated pbuf 0x0
pbuf_free(0x10001d1c)
pbuf_free: deallocating 0x10001d1c
pbuf_alloc(length=24)
pbuf_alloc: allocated pbuf 0x10001d1c
pbuf_alloc(length=24) == 0x10001d1c
pbuf_alloc(length=0)
pbuf_alloc: allocated pbuf 0x0
pbuf_free(0x10001d1c)
pbuf_free: deallocating 0x10001d1c
pbuf_alloc(length=24)
pbuf_alloc: allocated pbuf 0x10001d1c
pbuf_alloc(length=24) == 0x10001d1c
pbuf_alloc(length=0)
pbuf_alloc: allocated pbuf 0x0
pbuf_free(0x10001d1c)
pbuf_free: deallocating 0x10001d1c
pbuf_alloc(length=24)
pbuf_alloc: allocated pbuf 0x10001d1c
pbuf_alloc(length=24) == 0x10001d1c
pbuf_alloc(length=0)
pbuf_alloc: allocated pbuf 0x0
pbuf_free(0x10001d1c)
pbuf_free: deallocating 0x10001d1c
pbuf_alloc(length=24)
pbuf_alloc: allocated pbuf 0x10001d1c
pbuf_alloc(length=24) == 0x10001d1c
pbuf_alloc(length=0)
pbuf_alloc: allocated pbuf 0x0
pbuf_free(0x10001d1c)
pbuf_free: deallocating 0x10001d1c
LCP: timeout sending Config-Requests

ppp phase changed: unit 6: phase=10
Connection terminated.
ppp phase changed: unit 6: phase=0
ppp_link_terminated: unit 6
ppp_link_terminated: unit 6: link_status_cb=0xe15 err_code=0
PPP Error=8
ppp_delete: unit 6
netif_remove: removed netif
ppp_link_terminated: finished.
Delete pppos_input_thread
_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to