Skip to content

PostgreSQL rejects node creation when serialized content contains invalid Unicode escape sequences #1449

Closed

Description

@meshweaver-cloud

What is failing

Node creation in MeshWeaver.Mesh.CreateNode fails with a PostgreSQL 22P05: unsupported Unicode escape sequence exception when the PostgreSqlStorageAdapter.WriteAsyncCore serializes a node whose content or path produces an invalid \uXXXX sequence in JSON.

Probable cause

The failure occurred while persisting a node at path MeshWeaver/src/MeshWeaver.Markdown.Export/Html/DocumentAreaResolution. The JSON produced by System.Text.Json serialization (via JsonSerializerOptions) likely contains a string with a character that is being escaped as an invalid Unicode escape (e.g., a high surrogate without its pair, or a malformed escape from the node's content). PostgreSQL's standard_conforming_strings setting rejects \u sequences that don't represent valid Unicode code points. Confidence: Moderate — the stack trace and error code are clear, but the exact offending content within the node's data is not visible.

Impact

Low — a single occurrence on one pod (memex-portal-deployment-599884944c-29dkk) at one point in time. This prevented creation of a single node under the Markdown Export/Html/DocumentAreaResolution subtree. No cascading failure observed.

Where to look

  • PostgreSqlStorageAdapter.WriteAsyncCore at line 631 in MeshWeaver.Hosting.PostgreSql — where the Npgsql command is executed.
  • Investigate what data the DocumentAreaResolution node carried that would serialize to an invalid Unicode escape. Check the node's JSON content before it hits the NpgsqlCommand.ExecuteNonQuery call.
  • Verify whether the issue is reproducible by creating a node with a similar path or content containing surrogates or non-BMP characters.

Evidence

Fingerprint 3d329d5ef2237493
Category MeshWeaver.Mesh.CreateNode
Severity Error
Top frame MeshWeaver.Hosting.PostgreSql.PostgreSqlStorageAdapter.WriteAsyncCore(MeshNode node, JsonSerializerOptions options, CancellationToken ct, Nullable1 expectedVersion)`
Namespace memex-cloud
Pods memex-portal-deployment-599884944c-29dkk
Occurrences 1
First seen 2026-08-13 16:50:13Z
Last seen 2026-08-13 16:50:13Z
Recent log lines
2026-08-13 16:50:13Z memex-portal-deployment-599884944c-29dkk fail: MeshWeaver.Mesh.CreateNode[0]
      Unexpected error during node creation at MeshWeaver/src/MeshWeaver.Markdown.Export/Html/DocumentAreaResolution
      Npgsql.PostgresException (0x80004005): 22P05: unsupported Unicode escape sequence
      
      DETAIL: Detail redacted as it may contain sensitive data. Specify 'Include Error Detail' in the connection string to include this information.
         at Npgsql.Internal.NpgsqlConnector.ReadMessageLong(Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)
         at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)
         at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
         at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
         at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
         at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
         at Npgsql.NpgsqlDataSourceCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
         at Npgsql.NpgsqlDataSourceCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
         at Npgsql.NpgsqlCommand.ExecuteNonQuery(Boolean async, CancellationToken cancellationToken)
         at MeshWeaver.Hosting.PostgreSql.PostgreSqlStorageAdapter.WriteAsyncCore(MeshNode node, JsonSerializerOptions options, CancellationToken ct, Nullable`1 expectedVersion) in /home/runner/work/MeshWeaver/MeshWeaver/src/MeshWeaver.Hosting.PostgreSql/PostgreSqlStorageAdapter.cs:line 631
         at MeshWeaver.Hosting.PostgreSql.PostgreSqlStorageAdapter.WriteAsyncCore(MeshNode n…[truncated]

Opened automatically from Admin/_LogIncident/3d329d5ef2237493. Recurrences are folded into this issue rather than opening new ones.

Activity

  1. added a commit that references this issue on Aug 13, 2026
  2. systemorph-com commented on Sep 17, 2026

    @systemorph-com
    Contributor

    Reopened — this fault is happening again.

    Still occurring: 293 more since the last update (294 total).

    • Last seen: 2026-09-12 03:12:14Z
    • Pods: memex-portal-deployment-599884944c-29dkk, memex-portal-deployment-c46c94d87-fqfrm, memex-portal-deployment-5fc766ff6c-48djv, memex-portal-deployment-55d8df74f6-jm8ff, memex-portal-deployment-68bdfb97d6-h5sxf, memex-portal-deployment-69f7bbd6f8-fvd46, memex-portal-deployment-6db74b7759-8qdgc, memex-portal-deployment-5bbcf746b8-2q6gb, memex-portal-deployment-6cc847bd4d-lq2rh, memex-portal-deployment-fbbc4c684-jsg9j, memex-portal-deployment-797df55dfb-cn4p8, memex-portal-deployment-c6f9b9c4-lj85m, memex-portal-deployment-c6f9b9c4-gphss, memex-portal-deployment-59ccff47c5-rjs77, memex-portal-deployment-7db656d9d9-nbfzk, memex-portal-deployment-565b67998c-zzjl4, memex-portal-deployment-565b67998c-rbsd7, memex-portal-deployment-df7ddfdf4-dtp44, memex-portal-deployment-df7ddfdf4-xb9bk, memex-portal-deployment-569544576b-q6nvd, memex-portal-deployment-569544576b-89r5k, memex-portal-deployment-569544576b-9h52b, memex-portal-deployment-858f57dc6-ff5kn, memex-portal-deployment-558d86bb48-vl44h, memex-portal-deployment-58b5fbf775-fjbvn, memex-portal-deployment-5678bbc9c8-4rvjb, memex-portal-deployment-6c74bf4c66-5xvlt, memex-portal-deployment-767d8d6684-vrc78, memex-portal-deployment-76c67b6b45-v4hdf, memex-portal-deployment-66cfbf759-svxh9, memex-portal-deployment-9bf79b774-jwrng, memex-portal-deployment-c7f5ff965-vk9zq, memex-portal-deployment-58c88885f8-h5hfs, memex-portal-deployment-58c88885f8-lhgp7, memex-portal-deployment-77cfc55bfc-txpk7, memex-portal-deployment-84d46fdb95-sd7p4, memex-portal-deployment-584db8fc55-vtslp
    Recent log lines
    2026-09-03 17:14:07Z memex-portal-deployment-77cfc55bfc-txpk7 fail: MeshWeaver.Mesh.CreateNode[0]
          [CreateNode] STORE UNREACHABLE at OpenStreetMap/Examples/_Access/Anonymous_Access: NpgsqlException: Exception while reading from stream — the create was NOT attempted and nothing was written. The fault is the data store, not this create; the caller is answered Unavailable, so a retry with the same node id is meaningful.
          Npgsql.NpgsqlException (0x80004005): Exception while reading from stream
           ---> System.TimeoutException: Timeout during reading attempt
             at Npgsql.Internal.NpgsqlConnector.ReadMessageLong(Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)
             at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)
             at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
             at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
             at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
             at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
             at Npgsql.NpgsqlDataSourceCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
             at Npgsql.NpgsqlDataSourceCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
             at Npgsql.NpgsqlCommand.ExecuteNonQuery(Boolean async, CancellationToken cancellationToken)
             at MeshWeaver.Hosting.PostgreSql.PostgreSqlStorageAdapter.WriteAsyncCore(MeshNode node, JsonSerializerOptions options, CancellationToken ct, Nullable`1 expectedVersion) in /home/runner/work/MeshWeaver/MeshWeaver/plugins-repo/src/MeshWeaver.Hosting.PostgreSql/Po…[truncated]
    2026-09-10 18:15:07Z memex-portal-deployment-84d46fdb95-sd7p4 fail: MeshWeaver.Mesh.CreateNode[0]
          Unexpected error during node creation at WhatsNew/_Activity/c77a65a9: PostgresException: 42P01: relation "whatsnew.activities" does not exist
          
          POSITION: 13
          Npgsql.PostgresException (0x80004005): 42P01: relation "whatsnew.activities" does not exist
          
          POSITION: 13
             at Npgsql.Internal.NpgsqlConnector.ReadMessageLong(Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)
             at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)
             at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
             at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
             at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
             at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
             at Npgsql.NpgsqlDataSourceCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
             at Npgsql.NpgsqlDataSourceCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
             at Npgsql.NpgsqlCommand.ExecuteNonQuery(Boolean async, CancellationToken cancellationToken)
             at MeshWeaver.Hosting.PostgreSql.PostgreSqlStorageAdapter.WriteAsyncCore(MeshNode node, JsonSerializerOptions options, CancellationToken ct, Nullable`1 expectedVersion) in /home/runner/work/MeshWeaver/MeshWeaver/plugins-repo/src/MeshWeaver.Hosting.PostgreSql/PostgreSqlStorageAdapter.cs:line 640
             at MeshWeaver.Hosting.PostgreSql.PostgreSqlStorageAdapter.WriteAsyncCore(MeshNode node, JsonSerializerOptions options, CancellationTo…[truncated]
    2026-09-12 03:12:14Z memex-portal-deployment-584db8fc55-vtslp fail: MeshWeaver.Mesh.CreateNode[0]
          Unexpected error during node creation at WhatsNew/_Activity/2393a7a3: PostgresException: 42P01: relation "whatsnew.activities" does not exist
          
          POSITION: 13
          Npgsql.PostgresException (0x80004005): 42P01: relation "whatsnew.activities" does not exist
          
          POSITION: 13
             at Npgsql.Internal.NpgsqlConnector.ReadMessageLong(Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)
             at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)
             at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
             at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
             at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
             at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
             at Npgsql.NpgsqlDataSourceCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
             at Npgsql.NpgsqlDataSourceCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
             at Npgsql.NpgsqlCommand.ExecuteNonQuery(Boolean async, CancellationToken cancellationToken)
             at MeshWeaver.Hosting.PostgreSql.PostgreSqlStorageAdapter.WriteAsyncCore(MeshNode node, JsonSerializerOptions options, CancellationToken ct, Nullable`1 expectedVersion) in /home/runner/work/MeshWeaver/MeshWeaver/plugins-repo/src/MeshWeaver.Hosting.PostgreSql/PostgreSqlStorageAdapter.cs:line 640
             at MeshWeaver.Hosting.PostgreSql.PostgreSqlStorageAdapter.WriteAsyncCore(MeshNode node, JsonSerializerOptions options, CancellationTo…[truncated]
    
  3. rbuergi commented on Sep 18, 2026

    @rbuergi
    Contributor

    Closing — the defect this issue reports (22P05: unsupported Unicode escape sequence) is fixed in main, and the reopen is the fingerprint bucket firing on unrelated faults.

    Fixed in current origin/main. The root cause was a literal U+0000 (NUL) typed as a composite-key separator in MeshWeaver.Markdown.Export/Html/DocumentAreaResolution.cs — jsonb stores decoded text and cannot hold a NUL, so the write died with 22P05 and a DETAIL the connection policy redacts, naming neither the file nor the character. Closed by PR #1460 (fix/1449-nul-content-unstorable). In a read-only checkout at /Users/roland/code/MW-current-main:

    git ls-tree -r --name-only origin/main | grep -i NoLiteralNulInSourceGuard
    

    → test/MeshWeaver.Documentation.Test/NoLiteralNulInSourceGuard.cs — a standing governance guard in main that scans the working tree under src, test, samples, content, memex, clients and fails on any literal NUL, and whose own doc comment names this issue:

    a literal NUL in a source file is a latent production failure with an invisible cause (#1449) … Both offenders this guard was written against were the same mistake … MeshWeaver.Markdown.Export/Html/DocumentAreaResolution.cs (which is what actually failed in production) and clients/react/src/live/grpcSource.ts. Both now use U+001F UNIT SEPARATOR written as an escape.

    So the offending byte is gone and re-introducing one is a red test, not a silent production write failure.

    The reopen evidence is not this fault. The incident Admin/_LogIncident/3d329d5ef2237493 normalizes to "Unexpected error during node creation at {path}" — the path is templated away, so every MeshWeaver.Mesh.CreateNode error folds into this one bucket. Read read-only on memex.systemorph.com (get @Admin/_LogIncident/3d329d5ef2237493), all 10 stored samples (2026-09-02 → 2026-09-12) are two entirely different faults:

    • [CreateNode] STORE UNREACHABLE at …: NpgsqlException: The operation has timed out / Exception while reading from stream — a data-store availability fault, explicitly classified by the adapter as "the fault is the data store, not this create"; and
    • Unexpected error during node creation at WhatsNew/_Activity/…: PostgresException: 42P01: relation "whatsnew.activities" does not exist — an unprovisioned whatsnew activities partition table.

    Not one of the 294 counted occurrences in the sample window carries 22P05. The 42P01 is a real live fault and deserves its own issue against partition provisioning; it is not what this issue describes, and tracking it here would mean neither gets fixed.

    • Last seen: 2026-09-12 03:12:14Z — 6 days quiet as of 2026-09-18, and log ingest is live (incidents updated 2026-09-18T05:42Z), so the silence is measured, not an ingest gap.

    Closing a dormant incident is safe by design: the incident record stays live, and the recurrence bot reopens this issue automatically with fresh Last seen evidence the moment the fingerprint fires again. Nothing is lost by closing; what is lost by leaving it open is the meaning of "open".

    Read-only triage, 2026-09-18. Nothing was run, re-run or changed on any deployment.

  4. systemorph-com commented on Sep 18, 2026

    @systemorph-com
    Contributor

    Reopened — this fault is happening again.

    Still occurring: 1 more since the last update (295 total).

    • Last seen: 2026-09-18 15:35:29Z
    • Pods: memex-portal-deployment-599884944c-29dkk, memex-portal-deployment-c46c94d87-fqfrm, memex-portal-deployment-5fc766ff6c-48djv, memex-portal-deployment-55d8df74f6-jm8ff, memex-portal-deployment-68bdfb97d6-h5sxf, memex-portal-deployment-69f7bbd6f8-fvd46, memex-portal-deployment-6db74b7759-8qdgc, memex-portal-deployment-5bbcf746b8-2q6gb, memex-portal-deployment-6cc847bd4d-lq2rh, memex-portal-deployment-fbbc4c684-jsg9j, memex-portal-deployment-797df55dfb-cn4p8, memex-portal-deployment-c6f9b9c4-lj85m, memex-portal-deployment-c6f9b9c4-gphss, memex-portal-deployment-59ccff47c5-rjs77, memex-portal-deployment-7db656d9d9-nbfzk, memex-portal-deployment-565b67998c-zzjl4, memex-portal-deployment-565b67998c-rbsd7, memex-portal-deployment-df7ddfdf4-dtp44, memex-portal-deployment-df7ddfdf4-xb9bk, memex-portal-deployment-569544576b-q6nvd, memex-portal-deployment-569544576b-89r5k, memex-portal-deployment-569544576b-9h52b, memex-portal-deployment-858f57dc6-ff5kn, memex-portal-deployment-558d86bb48-vl44h, memex-portal-deployment-58b5fbf775-fjbvn, memex-portal-deployment-5678bbc9c8-4rvjb, memex-portal-deployment-6c74bf4c66-5xvlt, memex-portal-deployment-767d8d6684-vrc78, memex-portal-deployment-76c67b6b45-v4hdf, memex-portal-deployment-66cfbf759-svxh9, memex-portal-deployment-9bf79b774-jwrng, memex-portal-deployment-c7f5ff965-vk9zq, memex-portal-deployment-58c88885f8-h5hfs, memex-portal-deployment-58c88885f8-lhgp7, memex-portal-deployment-77cfc55bfc-txpk7, memex-portal-deployment-84d46fdb95-sd7p4, memex-portal-deployment-584db8fc55-vtslp, memex-portal-deployment-6b879996c7-lk6fd
    Recent log lines
    2026-09-10 18:15:07Z memex-portal-deployment-84d46fdb95-sd7p4 fail: MeshWeaver.Mesh.CreateNode[0]
          Unexpected error during node creation at WhatsNew/_Activity/c77a65a9: PostgresException: 42P01: relation "whatsnew.activities" does not exist
          
          POSITION: 13
          Npgsql.PostgresException (0x80004005): 42P01: relation "whatsnew.activities" does not exist
          
          POSITION: 13
             at Npgsql.Internal.NpgsqlConnector.ReadMessageLong(Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)
             at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)
             at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
             at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
             at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
             at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
             at Npgsql.NpgsqlDataSourceCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
             at Npgsql.NpgsqlDataSourceCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
             at Npgsql.NpgsqlCommand.ExecuteNonQuery(Boolean async, CancellationToken cancellationToken)
             at MeshWeaver.Hosting.PostgreSql.PostgreSqlStorageAdapter.WriteAsyncCore(MeshNode node, JsonSerializerOptions options, CancellationToken ct, Nullable`1 expectedVersion) in /home/runner/work/MeshWeaver/MeshWeaver/plugins-repo/src/MeshWeaver.Hosting.PostgreSql/PostgreSqlStorageAdapter.cs:line 640
             at MeshWeaver.Hosting.PostgreSql.PostgreSqlStorageAdapter.WriteAsyncCore(MeshNode node, JsonSerializerOptions options, CancellationTo…[truncated]
    2026-09-12 03:12:14Z memex-portal-deployment-584db8fc55-vtslp fail: MeshWeaver.Mesh.CreateNode[0]
          Unexpected error during node creation at WhatsNew/_Activity/2393a7a3: PostgresException: 42P01: relation "whatsnew.activities" does not exist
          
          POSITION: 13
          Npgsql.PostgresException (0x80004005): 42P01: relation "whatsnew.activities" does not exist
          
          POSITION: 13
             at Npgsql.Internal.NpgsqlConnector.ReadMessageLong(Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)
             at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)
             at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
             at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
             at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
             at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
             at Npgsql.NpgsqlDataSourceCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
             at Npgsql.NpgsqlDataSourceCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
             at Npgsql.NpgsqlCommand.ExecuteNonQuery(Boolean async, CancellationToken cancellationToken)
             at MeshWeaver.Hosting.PostgreSql.PostgreSqlStorageAdapter.WriteAsyncCore(MeshNode node, JsonSerializerOptions options, CancellationToken ct, Nullable`1 expectedVersion) in /home/runner/work/MeshWeaver/MeshWeaver/plugins-repo/src/MeshWeaver.Hosting.PostgreSql/PostgreSqlStorageAdapter.cs:line 640
             at MeshWeaver.Hosting.PostgreSql.PostgreSqlStorageAdapter.WriteAsyncCore(MeshNode node, JsonSerializerOptions options, CancellationTo…[truncated]
    2026-09-18 15:35:29Z memex-portal-deployment-6b879996c7-lk6fd fail: MeshWeaver.Mesh.CreateNode[0]
          Unexpected error during node creation at WhatsNew/_Activity/cc667f2e: PostgresException: 42P01: relation "whatsnew.activities" does not exist
          
          POSITION: 13
          Npgsql.PostgresException (0x80004005): 42P01: relation "whatsnew.activities" does not exist
          
          POSITION: 13
             at Npgsql.Internal.NpgsqlConnector.ReadMessageLong(Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)
             at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)
             at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
             at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
             at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
             at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
             at Npgsql.NpgsqlDataSourceCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
             at Npgsql.NpgsqlDataSourceCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
             at Npgsql.NpgsqlCommand.ExecuteNonQuery(Boolean async, CancellationToken cancellationToken)
             at MeshWeaver.Hosting.PostgreSql.PostgreSqlStorageAdapter.WriteAsyncCore(MeshNode node, JsonSerializerOptions options, CancellationToken ct, Nullable`1 expectedVersion) in /home/runner/work/MeshWeaver/MeshWeaver/plugins-repo/src/MeshWeaver.Hosting.PostgreSql/PostgreSqlStorageAdapter.cs:line 640
             at MeshWeaver.Hosting.PostgreSql.PostgreSqlStorageAdapter.WriteAsyncCore(MeshNode node, JsonSerializerOptions options, CancellationTo…[truncated]
    
  5. rbuergi commented on Sep 19, 2026

    @rbuergi
    Contributor

    Cross-reference: the close/reopen cycle on this issue is explained on #1540 — #1540 (comment)

    Short version: the reopen was correct. Its newest occurrence postdates the close, which is what Reopen has required since #4577. What went wrong is the close: these are teardown faults, and the dormancy they were closed on was measured across a period with no rolls. All five of #1422, #1449, #1540, #1547 and #1548 fired inside the 05:05–05:36Z window on 2026-09-19 — the roll storm. Fifteen quiet days meant fifteen days without a roll, not fifteen days of health.

    Closing again on quiet between rolls will reopen again on the next roll. What would settle it is a roll on an image provably carrying the fix, producing no occurrence.

  6. rbuergi commented on Sep 19, 2026

    @rbuergi
    Contributor

    🚨 This fingerprint is collecting four unrelated faults, and the one it is titled for has not fired since 2026-08-13

    Two corrections, both from reading Admin/_LogIncident/3d329d5ef2237493 directly.

    1. The 18:39Z comment characterises this as a teardown fault. It is not.

    That comment says: "these are teardown faults… All five of #1422, #1449, #1540, #1547 and #1548 fired inside the 05:05–05:36Z window on 2026-09-19 — the roll storm."

    This issue's lastSeen is 2026-09-18T15:35:29.421Z. It did not fire on 2026-09-19 at all, and no sample it retains is a teardown fault. This is the same over-claim that was caught and corrected on #4911, where the doc section was narrowed to rest on #1540/#1547/#1548 only — the three that really are teardown faults — precisely because #1449 sits at 09-18 15:35:29Z. It has now been restated here; it should not be relied on.

    2. The identity is too weak to be one issue

    The normalized message is "Unexpected error during node creation at {path}" — the path is masked, and the node carries no exceptionType field at all (compare 32768bfc4b1eeb3f, which carries "exceptionType": "System.OutOfMemoryException"). So the fingerprint is effectively "CreateNode failed somewhere", and its 295 occurrences are at least four different defects:

    when what actually fired
    2026-08-13 16:50 22P05: unsupported Unicode escape sequence ← the title of this issue
    2026-09-02 (×6) [CreateNode] STORE UNREACHABLE … NpgsqlException: The operation has timed out — connect timeouts
    2026-09-03 17:14 NpgsqlException: Exception while reading from stream
    2026-09-10, 09-12, 09-18 (= lastSeen) 42P01: relation "whatsnew.activities" does not exist

    Those are a serialization bug, a data-store outage, a read timeout, and a missing table. Nothing links them except the log site.

    What follows

    Recommendation: re-scope this issue to the 22P05 serialization fault it was filed for and stop reading its lastSeen/occurrence count as evidence about that fault — those numbers belong to three other defects. The fingerprint needs exceptionType in its identity, which is the same class of problem as Systemorph/MeshWeaver.Plugins#2164 (an identity that folds things it should not) rather than its mirror.

    Nothing closed. No labels, state or assignees changed.

    Read 2026-09-19 by Claude Opus 5 — incident node and live partition reads, both quoted above.

  7. added
    bugSomething isn't working
    area:storageCore subsystem: persistence - Postgres, blobs, satellites
    sev:LLow - cosmetic, rare edge case, or developer-only
    on Sep 20, 2026
  8. rbuergi commented on Sep 22, 2026

    @rbuergi
    Contributor

    The guard that holds this closed could pass having checked nothing — hardened in PR #5194

    Core's line of defence for the titled 22P05 is NoLiteralNulInSourceGuard (the adapter that dies on it now lives in MeshWeaver.Plugins — every trace above reads plugins-repo/src/MeshWeaver.Hosting.PostgreSql/…). Its predicate, "no scanned text file contains a NUL", was satisfiable by an empty universe, measured:

    • one of its six declared roots, content/, does not exist in this repository and was skipped silently via Where(Directory.Exists) since the guard was written;
    • no denominator — a filter that stopped matching would have examined nothing and answered green;
    • no control on the detector — neutering IndexOf(NUL) leaves the guard green over the whole tree.

    Files examined today: src=3319 test=1374 samples=676 memex=119 clients=51; never scanned: .github=146 tools=49 scripts=12 deploy=216 hand-authored text files (all clean, so widening reds nothing).

    PR #5194: an absent root is named, not skipped (content dropped; .github, tools, scripts, deploy added); per-root counts are asserted non-zero and printed with the verdict; and a planted-NUL test must report exactly sub/node.json:3 over two examined files beside a NUL in a .png and one under bin/. Controls: detector neutered → the planted-NUL test fails (Assert.Single() Failure: The collection was empty) while the main guard stays green; content re-declared → the main guard fails naming content.

    Not changed, and named so nobody reads this as closure of the whole thread: a NUL arriving from runtime content still dies with a redacted 22P05 — that diagnosis belongs to the adapter in Plugins; and the incident fingerprint still folds four unrelated faults into this bucket (the live 42P01 half is #4933), which is why the recurrence bot reopens this on faults that are not this fault. Re-scoping the issue to the 22P05 it was filed for, as the 19:39Z comment recommends, is the only thing that stops the churn.

  9. rbuergi commented on Sep 23, 2026

    @rbuergi
    Contributor

    Closing — the 22P05 this issue is titled for is fixed at the root and deployed, and the one class the title names that had not been measured (lone surrogates) cannot reach PostgreSQL at all

    The thread asked for this issue to be scoped to the 22P05 it was filed for. On that scope, every half is now settled with evidence:

    1. The production occurrence — fixed at the source. The one 22P05 ever recorded (2026-08-13 16:50:13Z, MeshWeaver/src/MeshWeaver.Markdown.Export/Html/DocumentAreaResolution) was a literal U+0000 typed as a key separator. PR #1460 replaced it. The file now lives in MeshWeaver.Plugins and reads private const char KeySeparator = '\u001F'; (src/MeshWeaver.Markdown.Export/Html/DocumentAreaResolution.cs:151 at Plugins e9d9283abe), and git grep -P "\x00" over that project finds nothing.

    2. Reintroduction — guarded in both repos. Core: NoLiteralNulInSourceGuard, hardened by #5194 (merge 3ad2db1496), is an ancestor of both deployed commits — memex.meshweaver.cloud 39f49494eb and memex.systemorph.com 3da3423c4b (git merge-base --is-ancestor exit 0 for each; both read from /api/version today). Plugins: scripts/check-no-nul-in-mesh-sources.py runs in ci.yml.

    3. A NUL arriving from runtime content — named, not redacted. The 2026-09-22 comment said such a NUL "still dies with a redacted 22P05". On current Plugins main it does not: PostgreSqlStorageAdapter checks the serialized content before the round-trip (lines 819–820) and throws UnstorableContentException, which carries the node path and the exact content property. It covers the single-write and batch paths (UnstorableContentTests: WriteRefusesNulContentAndNamesTheNodeAndProperty, NulNestedInAnArrayIsLocatedByIndexedPath, BatchWriteNamesThePoisonedNodeAndCommitsNothing, plus a storable-replacement and a clean-content control). The type came in with the storage move on 2026-08-27 (69a37b7ec), so every current image carries it.

    4. Lone surrogates, the other case the title names — measured today and they cannot produce 22P05. I ran System.Text.Json on .NET 10:

    lone high  "a\uD800b" -> {"s":"a\uFFFDb"}      (Serialize, SerializeToElement and JsonObject all agree)
    lone low   "a\uDC00b" -> {"s":"a\uFFFDb"}
    valid pair (U+1F600)  -> {"s":"a\uD83D\uDE00b"} (valid pair, jsonb accepts it)
    JsonElement parsed from a raw "\ud800" escape, re-serialized ->
        JsonException: Cannot read incomplete UTF-16 JSON text as string with missing low surrogate
    

    So a lone surrogate either becomes U+FFFD at serialization (storable) or throws a JsonException in-process, before any SQL. The only character that reaches jsonb and gets refused there is U+0000, and (3) handles that.

    Why this may be reopened anyway, and why that won't be this fault. Admin/_LogIncident/3d329d5ef2237493 keys on "Unexpected error during node creation at {path}" and has no exception type, so every CreateNode error lands in it. None of its occurrences since 2026-08-13 is a 22P05 (the thread lists them: STORE UNREACHABLE timeouts, a stream read fault, and 42P01 whatsnew.activities, which is #4933 and now closed). A recurrence reopen will need its sample checked for 22P05 before anyone reads it as this defect.

    What I did not establish: I did not read the incident node myself; the control instance (memex.systemorph.com MCP) answers 503. I did not run UnstorableContentTests against a live Postgres; I'm citing them from source.

  10. systemorph-com commented on Sep 23, 2026

    @systemorph-com
    Contributor

    Reopened — this fault is happening again.

    Still occurring: 1 more since the last update (296 total).

    • Last seen: 2026-09-23 12:08:41Z
    • Pods: memex-portal-deployment-5dd79dc746-45vzd, memex-portal-deployment-599884944c-29dkk, memex-portal-deployment-c46c94d87-fqfrm, memex-portal-deployment-5fc766ff6c-48djv, memex-portal-deployment-55d8df74f6-jm8ff, memex-portal-deployment-68bdfb97d6-h5sxf, memex-portal-deployment-69f7bbd6f8-fvd46, memex-portal-deployment-6db74b7759-8qdgc, memex-portal-deployment-5bbcf746b8-2q6gb, memex-portal-deployment-6cc847bd4d-lq2rh, memex-portal-deployment-fbbc4c684-jsg9j, memex-portal-deployment-797df55dfb-cn4p8, memex-portal-deployment-c6f9b9c4-lj85m, memex-portal-deployment-c6f9b9c4-gphss, memex-portal-deployment-59ccff47c5-rjs77, memex-portal-deployment-7db656d9d9-nbfzk, memex-portal-deployment-565b67998c-zzjl4, memex-portal-deployment-565b67998c-rbsd7, memex-portal-deployment-df7ddfdf4-dtp44, memex-portal-deployment-df7ddfdf4-xb9bk, memex-portal-deployment-569544576b-q6nvd, memex-portal-deployment-569544576b-89r5k, memex-portal-deployment-569544576b-9h52b, memex-portal-deployment-858f57dc6-ff5kn, memex-portal-deployment-558d86bb48-vl44h, memex-portal-deployment-58b5fbf775-fjbvn, memex-portal-deployment-5678bbc9c8-4rvjb, memex-portal-deployment-6c74bf4c66-5xvlt, memex-portal-deployment-767d8d6684-vrc78, memex-portal-deployment-76c67b6b45-v4hdf, memex-portal-deployment-66cfbf759-svxh9, memex-portal-deployment-9bf79b774-jwrng, memex-portal-deployment-c7f5ff965-vk9zq, memex-portal-deployment-58c88885f8-h5hfs, memex-portal-deployment-58c88885f8-lhgp7, memex-portal-deployment-77cfc55bfc-txpk7, memex-portal-deployment-84d46fdb95-sd7p4, memex-portal-deployment-584db8fc55-vtslp, memex-portal-deployment-6b879996c7-lk6fd
    Recent log lines
    2026-09-12 03:12:14Z memex-portal-deployment-584db8fc55-vtslp fail: MeshWeaver.Mesh.CreateNode[0]
          Unexpected error during node creation at WhatsNew/_Activity/2393a7a3: PostgresException: 42P01: relation "whatsnew.activities" does not exist
          
          POSITION: 13
          Npgsql.PostgresException (0x80004005): 42P01: relation "whatsnew.activities" does not exist
          
          POSITION: 13
             at Npgsql.Internal.NpgsqlConnector.ReadMessageLong(Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)
             at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)
             at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
             at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
             at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
             at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
             at Npgsql.NpgsqlDataSourceCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
             at Npgsql.NpgsqlDataSourceCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
             at Npgsql.NpgsqlCommand.ExecuteNonQuery(Boolean async, CancellationToken cancellationToken)
             at MeshWeaver.Hosting.PostgreSql.PostgreSqlStorageAdapter.WriteAsyncCore(MeshNode node, JsonSerializerOptions options, CancellationToken ct, Nullable`1 expectedVersion) in /home/runner/work/MeshWeaver/MeshWeaver/plugins-repo/src/MeshWeaver.Hosting.PostgreSql/PostgreSqlStorageAdapter.cs:line 640
             at MeshWeaver.Hosting.PostgreSql.PostgreSqlStorageAdapter.WriteAsyncCore(MeshNode node, JsonSerializerOptions options, CancellationTo…[truncated]
    2026-09-18 15:35:29Z memex-portal-deployment-6b879996c7-lk6fd fail: MeshWeaver.Mesh.CreateNode[0]
          Unexpected error during node creation at WhatsNew/_Activity/cc667f2e: PostgresException: 42P01: relation "whatsnew.activities" does not exist
          
          POSITION: 13
          Npgsql.PostgresException (0x80004005): 42P01: relation "whatsnew.activities" does not exist
          
          POSITION: 13
             at Npgsql.Internal.NpgsqlConnector.ReadMessageLong(Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)
             at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)
             at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
             at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
             at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
             at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
             at Npgsql.NpgsqlDataSourceCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
             at Npgsql.NpgsqlDataSourceCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
             at Npgsql.NpgsqlCommand.ExecuteNonQuery(Boolean async, CancellationToken cancellationToken)
             at MeshWeaver.Hosting.PostgreSql.PostgreSqlStorageAdapter.WriteAsyncCore(MeshNode node, JsonSerializerOptions options, CancellationToken ct, Nullable`1 expectedVersion) in /home/runner/work/MeshWeaver/MeshWeaver/plugins-repo/src/MeshWeaver.Hosting.PostgreSql/PostgreSqlStorageAdapter.cs:line 640
             at MeshWeaver.Hosting.PostgreSql.PostgreSqlStorageAdapter.WriteAsyncCore(MeshNode node, JsonSerializerOptions options, CancellationTo…[truncated]
    2026-09-23 12:08:41Z memex-portal-deployment-5dd79dc746-45vzd fail: MeshWeaver.Mesh.CreateNode[0]
          Unexpected error during node creation at Hosting/ATestFakeIsScopedToItsSubject/_Access/Anonymous_Access: PostgresException: 40P01: deadlock detected
          
          DETAIL: Detail redacted as it may contain sensitive data. Specify 'Include Error Detail' in the connection string to include this information.
          Npgsql.PostgresException (0x80004005): 40P01: deadlock detected
          
          DETAIL: Detail redacted as it may contain sensitive data. Specify 'Include Error Detail' in the connection string to include this information.
             at Npgsql.Internal.NpgsqlConnector.ReadMessageLong(Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)
             at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)
             at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
             at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
             at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
             at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
             at Npgsql.NpgsqlDataSourceCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
             at Npgsql.NpgsqlDataSourceCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
             at Npgsql.NpgsqlCommand.ExecuteNonQuery(Boolean async, CancellationToken cancellationToken)
             at MeshWeaver.Hosting.PostgreSql.PostgreSqlStorageAdapter.WriteAsyncCore(MeshNode node, JsonSerializerOptions options, CancellationToken ct, Nullable`1 expectedVersion) in /home/runner/work/MeshWeave…[truncated]
    

    Re-addressed by the current identity function: this incident inherited 3d329d5ef2237493 (Systemorph/MeshWeaver.Plugins#1796). Those nodes are superseded and will not fold, file or comment again.

  11. rbuergi commented on Sep 23, 2026

    @rbuergi
    Contributor

    The 12:08:41Z reopen is not this fault. The new sample reads:

    Unexpected error during node creation at Hosting/ATestFakeIsScopedToItsSubject/_Access/Anonymous_Access: PostgresException: 40P01: deadlock detected (pod 5dd79dc746-45vzd, PostgreSqlStorageAdapter.WriteAsyncCore)

    That is a deadlock on an _Access write. The fault this issue is titled for is 22P05 (a Unicode escape in content). As the 09-19 and 09-23 comments already explain, the fingerprint 3d329d5ef2237493 keys on "Unexpected error during node creation at {path}" with no exception type, so it folds every CreateNode failure into this issue.

    The 22P05 itself stays fixed, for the reasons in the 04:35Z comment:

    Closing again as completed on that scope.

    Open, and not filed by me: the 40P01 on …/_Access/Anonymous_Access. The path looks like an in-mesh test (ATestFakeIsScopedToItsSubject) creating an access assignment on memex. I did not investigate it. The control instance (memex.systemorph.com) was unreachable from this session, so I could not file it into triage. It needs its own ticket with the deadlock DETAIL, which is redacted here (Include Error Detail is off). The same incident-identity gap (no exceptionType in the fingerprint) will reopen this issue again on the next unrelated CreateNode failure.

  12. rbuergi commented on Sep 24, 2026

    @rbuergi
    Contributor

    The 40P01 on Hosting/ATestFakeIsScopedToItsSubject/_Access/Anonymous_Access that caused the 12:08:41Z reopen now has its own ticket: Systemorph/MeshWeaver.Plugins#2345. It is reproduced deterministically. public.ensure_partition_schema re-runs on a live partition and locks user_effective_permissions before access, while a grant write locks access and then user_effective_permissions. The fix is in Systemorph/MeshWeaver.Plugins#2346 (lock order, no retry). The incident fingerprint gap is unchanged: every CreateNode failure still folds into this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:storageCore subsystem: persistence - Postgres, blobs, satellitesbugSomething isn't workingfeature:node-persistenceFeature: node persistencesev:LLow - cosmetic, rare edge case, or developer-only

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions