# \[IEC 61850\] v2.3.10 native driver aborts the whole JVM once fd numbers exceed FD\_SETSIZE=1024

**URL:** <https://forum.inductiveautomation.com/t/iec-61850-v2-3-10-native-driver-aborts-the-whole-jvm-once-fd-numbers-exceed-fd-setsize-1024/117908>\
**Category:** General Discussion\
**Created:** [November 19, 2026, 2:03pm UTC](https://forum.inductiveautomation.com/t/iec-61850-v2-3-10-native-driver-aborts-the-whole-jvm-once-fd-numbers-exceed-fd-setsize-1024/117908 "2026-11-19T14:03:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![liuwf2139](https://avatars.discourse-cdn.com/v4/letter/l/48db29/32.png) [@liuwf2139](https://forum.inductiveautomation.com/u/liuwf2139)\
**Post date:** [November 19, 2026, 2:03pm UTC](https://forum.inductiveautomation.com/t/iec-61850-v2-3-10-native-driver-aborts-the-whole-jvm-once-fd-numbers-exceed-fd-setsize-1024/117908/1 "2026-11-19T14:03:43Z")

</div>

**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**

```Plain
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.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [November 19, 2026, 2:15pm UTC](https://forum.inductiveautomation.com/t/iec-61850-v2-3-10-native-driver-aborts-the-whole-jvm-once-fd-numbers-exceed-fd-setsize-1024/117908/2 "2026-11-19T14:15:51Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![liuwf2139](https://avatars.discourse-cdn.com/v4/letter/l/48db29/32.png) [@liuwf2139](https://forum.inductiveautomation.com/u/liuwf2139)\
**Post date:** [November 19, 2026, 2:44pm UTC](https://forum.inductiveautomation.com/t/iec-61850-v2-3-10-native-driver-aborts-the-whole-jvm-once-fd-numbers-exceed-fd-setsize-1024/117908/3 "2026-11-19T14:44:51Z")

</div>

Got it, thanks, not my coworker.
