chirpstack / chirpstack-gateway-bridge

ChirpStack Gateway Bridge abstracts Packet Forwarder protocols into Protobuf or JSON over MQTT.
https://www.chirpstack.io
MIT License
423 stars 272 forks source link

Binary doing nothing from version 3.9 onwards #195

Closed r41d closed 1 year ago

r41d commented 3 years ago

What happened?

Tried running latest version (3.11) on Dragino LG308 and the binary does not produce any output and consumes a lot of CPU

What did you expect?

Some output of any kind

Steps to reproduce this issue

Steps:

  1. SSH into Dragino LG308
  2. Install chirpstack-gateway-bridge ipk file via opkg
  3. Execute /opt/chirpstack-gateway-bridge/chirpstack-gateway-bridge --help
  4. Binary runs endlessly, consuming ~1/8 of RAM and grilling the CPU (killed it after an hour)

Could you share your log output?

Not really, because the binary doesn't output anything.

Version 3.8 is working! The erroneous part must have been introduced in version 3.9.

Your Environment

I don't think this is relevant here, because I cannot even get the binary to start up

brocaar commented 3 years ago

Hi @r41d please note that I needed to perform some workarounds to make the binary fit and work at all on the LG308 gateway, due to the limited amount of flash memory. It could be that due to changes / compiler chain updates the size increased which broke support for the LG308 gateway.

I don't think there is an easy fix for this, other than implementing a slimmed down version of the ChirpStack Gateway Bridge. I am considering something like this in the future, but I have first a couple of other items I want / need to work on.

r41d commented 3 years ago

Hmm, I don't really observe a change in file size from 3.8 to 3.9 :thinking: From looking over the git history betweeen 3.8 and 3.9, I think the only commit that had significant changes was the one called "Support multi-downlink commands and acks." and from briefly looking into it I saw that the patrickmn/go-cache library was added, my best guess would be that it could have something to do with that

brocaar commented 1 year ago

Please see https://www.chirpstack.io/docs/chirpstack-mqtt-forwarder/install/dragino.html. This is a re-implementation of the ChirpStack Gateway Bridge, but then a lot more compact and only intended to install on the gateway.