ConnectivityFoundry / AwaLWM2M

Awa LWM2M is an implementation of the OMA Lightweight M2M protocol in C.
BSD 3-Clause "New" or "Revised" License
102 stars 66 forks source link

awa_bootstrapd keeps crashing when multiple clients wants to connect #355

Open wrazik opened 7 years ago

wrazik commented 7 years ago

After creating simplified Dockerfile, on single machine I've run: $ docker network create --internal awa_network

$ docker run -p 5683:5683/udp -d --net=awa_network --name awa_serverd -it awa awa_serverd --verbose

docker run -p 15685:15685/udp -d --net=awa_network --name=awa_bootstrapd -it awa awa_bootstrapd --verbose --port 15685 --config bootstrap.conf

On third docker, I've run /bin/bash and created 10 clients. Below command causes segmentation fault on bootstrapd

$ docker run -p 15686:15685/udp --net=awa_network -it awa /bin/bash

(boostrapd_docker) $ for i in {1..10}; do (awa_clientd --endPointName client$i --bootstrap coap://awa_bootstrapd:15685 --ipcPort 1234$i &) ; done

On docker awa_boostrapd we can see: `[DEBUG] [lwm2m_bootstrap.c:202] Put to coap://172.18.0.5:6315/1 [INFO] [coap_abstraction_erbium.c:395] Coap request: coap://172.18.0.5:6315/1

[DEBUG] [lwm2m_bootstrap.c:209] Post to coap://172.18.0.5:6315//bs [INFO] [lwm2m_bootstrap.c:210] Client bootstrapped: coap://172.18.0.5:6315, 'client2' [INFO] [coap_abstraction_erbium.c:395] Coap request: coap://172.18.0.5:6315//bs

During startup program terminated with signal SIGSEGV, Segmentation fault

Occurrence: 3/3