[IEC 61850] v2.3.10 native driver aborts the whole JVM once fd numbers exceed FD_SETSIZE=1024

Env: Ignition 8.3.10, IEC 61850 Driver v2.3.10, Linux, [N] offline devices on one gateway, [21] historian providers.

TL;DR
With 100+ IEC 61850 devices configured and unreachable, the gateway starts, then is killed by glibc ~1 s after the 61850 module initializes. wrapper.log: *** buffer overflow detected ***: terminated. Backtrace lands in __fdelt_chk inside libcLibrary.so — i.e. FD_SET() is called with an fd number ≥ FD_SETSIZE (1024). This is not a resource limit issue: the JVM already runs at RLIMIT_NOFILE=524288/524288.

Evidence

Starting up module 'com.inductiveautomation.opcua.drivers.iec61850' v2.3.10
Gateway started in 76 seconds.
*** buffer overflow detected ***: terminated
STATUS | wrapper | JVM appears hung ... Restarting JVM. / SIGKILL (9)

Reproduces deterministically on every restart, on two gateways (100 and 183 devices).

Why fd_set, not ulimit

  • __fdelt_chk calls __chk_fail(), which prints exactly that string. FD_SETSIZE=1024 is compiled into the .so; it has nothing to do with ulimit.
  • JVM Max open files is 524288/524288 (HotSpot -XX:+MaxFDLimit default), measured fds 955–1685 with numbers > 1024.
  • Baseline fd comes from historian RocksDB handles (21 providers × ~69), so new device sockets land above 1000 before any device is reached.

What we tested

Change Result
Raise limit to 65535 / 524288 No change, still crashes
Lower to 1024:1024 + -XX:-MaxFDLimit Fd numbers stayed < 1024, HTTP 302 OK, but died 109 s later with corrupted double-linked list — heap corruption on the EMFILE path

So there is no safe operating point in either direction: too high → FD_SET overflow; too low → heap corruption.

What we're asking for

  1. Replace select()/fd_set with poll()/epoll() in the 61850 native stack — no fd ceiling, removes the failure mode outright.
  2. Short term: guard fd >= FD_SETSIZE before every FD_SET, log and skip that device instead of aborting the entire JVM. One unreachable device should never take down the gateway.
  3. Separately fix the EMFILE path (corrupted double-linked list is corruption, not graceful failure).

Workaround we're running now
Keep the fd number (ls /proc/<pid>/fd | sort -n | tail -1) under ~900 by trimming historian providers and enabling devices in small batches. Works, but costs us head-room we'd rather spend on devices.

Full wrapper.log (both crash variants), gdb bt full, and fd sampling curves available on request.

We're tracking this bug already, though I'm not sure if it's from you or a coworker via support or this is just a coincidence.

Either way, we have to work with company that develops/maintains the 61850 stack to get it fixed. It's in motion, but not sure what the timeline will look like.

Got it, thanks, not my coworker.