Hi Kieran, Hi Simon There is a second thread, but it is caused by LwIP itself: When the PPP connection goes up, LwIP creates a new thread for the PPP in line 538 in ppp.c (Function pppOverSerialOpen): sys_thread_new(PPP_THREAD_NAME, pppMain, (void*)pd, PPP_THREAD_STACKSIZE, PPP_THREAD_PRIO); When shutting down the PPP (pppclose), this thread seems to exit causing sys_thread_func to kill the thread: void sys_thread_func( void *pvArg ) { xThreadCtx_t *pxThreadCtx = pvArg; /* Call the lwIP thread function. */ pxThreadCtx->pvThreadFunc( pxThreadCtx->pvArg ); vDrvDebugPrint( "Warning: lwIP task returned!!!\r\n" ); /* In case lwIP thread returns kill it. */ SYS_THREAD_HDL_RESET( pxThreadCtx ); /* Kill this task */ vTaskDelete( xTaskGetCurrentTaskHandle( ) ); } After this happened (the PPP was closed one or more times), the mentioned effect occured. I'm using 1.3.2 (and i think this effect is relatively new, maybe caused by the update to 1.3.2?). As the creation of the PPP thread is done by LwIP itself, i assume that this should not cause any trouble. However, is there a way to "shut down" the PPP with its pcb's correctly so there is no issue after closing the PPP link? Or is it maybe a bug in LwIP? Thanks, Marco Simon Goldschmidt schrieb: Marco Jakobs wrote:LWIP_ASSERT("tcp_slowtmr: TIME-WAIT pcb->state == TIME-WAIT", pcb->state == TIME_WAIT);That means that one of the PCBs on the TIME-WAIT list is not in state TIME-WAIT, which is not correct. This could either be a bug in lwIP (state changed without removing the PCB from this list or added it to the list without changing its state).However, in the past, things like this (essentially a list-corruption) has often been provoked by having more than one thread (or thread and interrupt) being active in the lwIP core code at the same time (tcp.c, tcp_in.c and tcp_out.c in this case). You might want to check your setup regarding this (and of course make sure you are using v1.3.2). Simon |
_______________________________________________ lwip-users mailing list lwip-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/lwip-users