🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.debian.bugs.dist
Article #4939

Bug#1092898: onnxruntime: Schema error when creating session — still in 1.21.0+dfsg-1 (trixie), via the C API

#4939
From: Christian Grothoff
Date: Wed, 18 Nov 2026 13:40
24 lines
2673 bytes
The issue is still reproducible on Debian 13 amd64 with 
libonnxruntime1.21 1.21.0+dfsg-1 and libonnx1t64 1.17.0-3+b1, through 
the C API as well (not only Python).

Here is a minimal reproducer: a Python ctypes script using only the C 
API: dlopen("libonnxruntime.so.1.21"),
OrtGetApiBase()->GetApi(21), CreateEnv(level, "probe", &env),
CreateSessionOptions, CreateSession(env, "<any .onnx>", opts, &s).

Nothing is printed after dlopen or CreateEnv. At the first 
CreateSession, stderr gets 567 messages like:

     Schema error: Trying to register schema with name Abs (domain: 
version: 1) from file ./onnx/defs/math/old.cc line 2729, but it is 
already registered from file ./onnx/defs/math/old.cc line 2729

each followed by an empty line (1134 lines). Later sessions in the same
process print nothing.

libonnx registers the ONNX schemas statically and onnxruntime registers 
them **again**.

Building onnxruntime against an onnx with 
ONNX_DISABLE_STATIC_REGISTRATION=ON should fix it.
Technical Details
Message-ID: <O0O3f-cHb9-7@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.corradoroberto.it!bofh.it!news.nic.it!robomod
References: <K4iQi-8rHX-7@gated-at.bofh.it>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.corradoroberto.it!bofh.it!news.nic.it!robomod
From: Christian Grothoff <grothoff@gnu.org>
Newsgroups: linux.debian.bugs.dist
Subject: Bug#1092898: onnxruntime: Schema error when creating session — still in 1.21.0+dfsg-1 (trixie), via the C API
Date: Wed, 18 Nov 2026 14:40:01 +0100
Message-ID: <O0O3f-cHb9-7@gated-at.bofh.it>
References: <K4iQi-8rHX-7@gated-at.bofh.it>
X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org  Wed Nov 18 13:37:06 2026
Old-Return-Path: <debbugs@buxtehude.debian.org>
X-Spam-Flag: NO
X-Spam-Score: -1.451
Reply-To: Christian Grothoff <grothoff@gnu.org>, 1092898@bugs.debian.org
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Cc: debian-ai@lists.debian.org
X-Debian-Pr-Message: followup 1092898
X-Debian-Pr-Package: python3-onnxruntime
X-Debian-Pr-Source: onnxruntime
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Content-Language: en-US
Organization: The GNU Project
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Debian-Message: from BTS
X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2003274
List-ID: <debian-bugs-dist.lists.debian.org>
List-URL: <https://lists.debian.org/debian-bugs-dist/>
Approved: robomod@news.nic.it
Lines: 24
Sender: robomod@news.nic.it
X-Original-Date: Wed, 18 Nov 2026 14:34:54 +0100
X-Original-Message-ID: <24031be0-db6f-4886-8b6a-e4a501f1f686@gnu.org>
X-Original-References: <5df5e053164150cde2dcb43c662a3a54576ba1e0.camel@debian.org>