[bug]:  What can cause lncli getinfo to be so slow to the point it hasn't return anything after 25 minutes of waiting?

There are no errors in the logs, other commands like walletbalance and getnetworkinfo return (they take a few seconds tho), but getinfo and listpeers and maybe others take forever to return... no error in the logs. I am using 0.17 RC3 on raspberry pi 4 8GB. The CPU is at 1% or less most of the time, with some spikes at 40-70% either from LND or Bitcoind...
Logs: https://pastebin.com/W10vaKgF

LND: lncli version 0.17.0-beta.rc3 commit=v0.17.0-beta.rc3-19-g9f4a8836d
OS: Linux raspberrypi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr  3 17:24:16 BST 2023 aarch64 GNU/Linux
Examples:
pi@raspberrypi:~ $ time ll walletbalance
{
    "total_balance": "33268",
    "confirmed_balance": "33268",
    "unconfirmed_balance": "0",
    "locked_balance": "0",
    "reserved_balance_anchor_chan": "0",
    "account_balance": {
        "default": {
            "confirmed_balance": "33268",
            "unconfirmed_balance": "0"
        }
    }
}

real	0m0.678s
user	0m0.102s
sys	0m0.073s

$ time ll getinfo
^C[lncli] rpc error: code = Canceled desc = context canceled

real	3m5.953s
user	0m0.087s
sys	0m0.095s

(I ctrl+c to make it stop)

$ time ll listchannels
^C[lncli] rpc error: code = Canceled desc = context canceled

real	3m28.391s
user	0m0.083s
sys	0m0.159s

(I ctrl+c to make it stop)

LND.CONF:
[Application Options]
debuglevel=info
maxpendingchannels=10
alias=*******************
color=#ffffff

rpclisten=<IP_ADDRESS>:10009
listen=<IP_ADDRESS>:9735
restlisten=<IP_ADDRESS>:8001

[Bitcoin]
bitcoin.active=1
bitcoin.testnet=0
bitcoin.mainnet=1
bitcoin.node=bitcoind

; The base fee in millisatoshi we will charge for forwarding payments on our
; channels.
bitcoin.basefee=5

; The fee rate used when forwarding payments on our channels. The total fee
; charged is basefee + (amount * feerate / 1000000), where amount is the
; forwarded amount.
bitcoin.feerate=1

[Bitcoind]
bitcoind.rpchost=bitcoind:8332
bitcoind.rpcuser=*****************************
bitcoind.rpcpass=***********************
bitcoind.zmqpubrawblock=tcp://bitcoind:28332
bitcoind.zmqpubrawtx=tcp://bitcoind:28333

; Fee estimate mode for bitcoind. It must be either "ECONOMICAL" or "CONSERVATIVE".
; If unset, the default value is "CONSERVATIVE".
bitcoind.estimatemode=CONSERVATIVE

[tor]
tor.active=true
tor.v3=true
tor.streamisolation=false
tor.skip-proxy-for-clearnet-targets=false
tor.socks=tor:9050
tor.control=tor:9051
tor.password=*********************
tor.targetipaddress=<IP_ADDRESS>

[wtclient]

; Activate Watchtower Client. To get more information or configure watchtowers
; run `lncli wtclient -h`.
wtclient.active=true

; Specify the fee rate with which justice transactions will be signed. This fee
; rate should be chosen as a maximum fee rate one is willing to pay in order to
; sweep funds if a breach occurs while being offline. The fee rate should be
; specified in sat/vbyte.
wtclient.sweep-fee-rate=30

[db]
db.backend=postgres

[postgres]
; Postgres connection string.
; Default:
;   db.postgres.dsn=
; Example:
db.postgres.dsn=postgres://postgres:********************************************@pgsql:5432/lnd?sslmode=disable

; Postgres connection timeout. Valid time units are {s, m, h}. Set to zero to
; disable.
db.postgres.timeout=3m

; Postgres maximum number of connections. Set to zero for unlimited. It is
; recommended to set a limit that is below the server connection limit.
; Otherwise errors may occur in lnd under high-load conditions.
; Default:
db.postgres.maxconnections=10

Bitcoind seems ok:
$ btc getblockchaininfo
{
  "chain": "main",
  "blocks": 808403,
  "headers": 808403,
  "bestblockhash": "0000000000000000000314d5ce9e52d2677c08d3dc8a617690a13897203f53fa",
  "difficulty":<PHONE_NUMBER>9480,
  "time":<PHONE_NUMBER>,
  "mediantime":<PHONE_NUMBER>,
  "verificationprogress": 0.9999999672514687,
  "initialblockdownload": false,
  "chainwork": "000000000000000000000000000000000000000056098a6c3da24d6620caa504",
  "size_on_disk":<PHONE_NUMBER>88,
  "pruned": false,
  "warnings": ""
}

It's hard to say, we've heard a similar report from someone else. So it would be really helpful if you could help us debug this.
Since you're already on commit 9f4a8836, can you please add the following to your config and restart:
profile=1234
blockingprofile=1
mutexprofile=1

And then while such a blocking request is going on (e.g. you're waiting for the response, but before aborting the command), please run the following three commands and upload the output (shouldn't contain any sensitive info, just some memory addresses):
curl http://localhost:1234/debug/pprof/goroutine?debug=2
curl http://localhost:1234/debug/pprof/block
curl http://localhost:1234/debug/pprof/mutex

Thanks!

Ok, I'll come back to you in a moment

Now when I restarted it (the 4th time this morning), started working perfectly... But so far even after restarting it wasn't responding.
It is just to mess with me.
It will eventually start to bug again, and by then I'll run those command and post here.

@FeatureSpitter thanks for the goroutine dump, that's very helpful indeed.
@Roasbeef I think we might have another mutext locking issue here, possibly amplified by the single write lock of Postgres.
What looks suspicious:
--> 8 peers seem to be stuck here:

goroutine 714932 [semacquire, 61 minutes]:
sync.runtime_Semacquire(0x4232f90)
	runtime/sema.go:62 +0x3c
sync.(*WaitGroup).Wait(0x4232f88)
	sync/waitgroup.go:116 +0x68
github.com/lightningnetwork/lnd/peer.(*Brontide).WaitForDisconnect(0x4232d80, 0x5122e80)
	github.com/lightningnetwork/lnd/peer/brontide.go:1102 +0xd8
github.com/lightningnetwork/lnd.(*server).peerTerminationWatcher(0x4372b60, 0x4232d80, 0x5122e80)
	github.com/lightningnetwork/lnd/server.go:4017 +0x74
created by github.com/lightningnetwork/lnd.(*server).peerInitializer in goroutine 714931
	github.com/lightningnetwork/lnd/server.go:3973 +0x114

--> 19 goroutines seem to be stuck here:

goroutine 2264025 [sync.RWMutex.RLock, 30 minutes]:
sync.runtime_SemacquireRWMutexR(0x4372bcc, 0x0, 0x0)
	runtime/sema.go:82 +0x3c
sync.(*RWMutex).RLock(0x4372bc0)
	sync/rwmutex.go:71 +0x58
github.com/lightningnetwork/lnd.(*server).BroadcastMessage(0x4372b60, 0x0, {0x1fe16f8, 0x0, 0x0})
	github.com/lightningnetwork/lnd/server.go:3287 +0x2c
github.com/lightningnetwork/lnd/discovery.(*AuthenticatedGossiper).sendLocalBatch(0xcf32310, {0x54e4000, 0x0, 0x6e})
	github.com/lightningnetwork/lnd/discovery/gossiper.go:1286 +0x70
github.com/lightningnetwork/lnd/discovery.(*AuthenticatedGossiper).splitAndSendAnnBatch.func2()
	github.com/lightningnetwork/lnd/discovery/gossiper.go:1260 +0x198
created by github.com/lightningnetwork/lnd/discovery.(*AuthenticatedGossiper).splitAndSendAnnBatch in goroutine 50911
	github.com/lightningnetwork/lnd/discovery/gossiper.go:1251 +0x200

--> Waiting for `p.startReady`:

goroutine 2262974 [select, 30 minutes]:
github.com/lightningnetwork/lnd/peer.(*Brontide).Disconnect(0xeeb6b40, {0x1575da0, 0xdb130c0})
	github.com/lightningnetwork/lnd/peer/brontide.go:1115 +0x94
github.com/lightningnetwork/lnd.(*server).removePeer(0x4372b60, 0xeeb6b40)
	github.com/lightningnetwork/lnd/server.go:4309 +0x100
github.com/lightningnetwork/lnd.(*server).InboundPeerConnected(0x4372b60, {0x1583294, 0x15632960})
	github.com/lightningnetwork/lnd/server.go:3586 +0x6f0
created by github.com/btcsuite/btcd/connmgr.(*ConnManager).listenHandler in goroutine 714406
	github.com/btcsuite/btcd@v0.23.5-0.20230905170901-80f5a0ffdf36/connmgr/connmanager.go:507 +0x250

Looking closer, I think this might actually be because goroutine 714108 is holding the unique Postgres write lock but is waiting for an answer:
goroutine 714108 [runnable]:
syscall.Syscall(0x4, 0x3b, 0x810e800, 0x43)
	syscall/syscall_linux.go:69 +0x8
syscall.write(0x3b, {0x810e800, 0x43, 0x400})
	syscall/zsyscall_linux_arm.go:949 +0x48
syscall.Write(...)
	syscall/syscall_unix.go:209
internal/poll.ignoringEINTRIO(...)
	internal/poll/fd_unix.go:736
internal/poll.(*FD).Write(0x11648780, {0x810e800, 0x43, 0x400})
	internal/poll/fd_unix.go:380 +0x304
net.(*netFD).Write(0x11648780, {0x810e800, 0x43, 0x400})
	net/fd_posix.go:96 +0x38
net.(*conn).Write(0x1eb5aa98, {0x810e800, 0x43, 0x400})
	net/net.go:191 +0x48
github.com/jackc/pgconn.(*PgConn).execExtendedSuffix(0x7bd0000, {0x810e800, 0x2d, 0x400}, 0x7bd0054)
	github.com/jackc/pgconn@v1.14.0/pgconn.go:1153 +0x138
github.com/jackc/pgconn.(*PgConn).ExecPrepared(0x7bd0000, {0x1580210, 0x12f3dea0}, {0x11a29240, 0xe}, {0x154a2840, 0x1, 0x4}, {0x115a11a0, 0x1, ...}, ...)
	github.com/jackc/pgconn@v1.14.0/pgconn.go:1108 +0x118
github.com/jackc/pgx/v4.(*Conn).Query(0x114e8580, {0x1580210, 0x12f3dea0}, {0x64218c0, 0x56}, {0x479fa70, 0x2, 0x2})
	github.com/jackc/pgx/v4@v4.18.1/conn.go:655 +0xc38
github.com/jackc/pgx/v4/stdlib.(*Conn).QueryContext(0xb19bcc0, {0x1580210, 0x12f3dea0}, {0x64218c0, 0x56}, {0x21152870, 0x1, 0x1})
	github.com/jackc/pgx/v4@v4.18.1/stdlib/sql.go:436 +0x330
database/sql.ctxDriverQuery({0x1580210, 0x12f3dea0}, {0xef3c0cb8, 0xb19bcc0}, {0x0, 0x0}, {0x64218c0, 0x56}, {0x21152870, 0x1, ...})
	database/sql/ctxutil.go:48 +0x94
database/sql.(*DB).queryDC.func1()
	database/sql/sql.go:1748 +0x178
database/sql.withLock({0x157ce68, 0x7d725a0}, 0x6db5a1c)
	database/sql/sql.go:3502 +0x84
database/sql.(*DB).queryDC(0x42b0bd0, {0x1580210, 0x12f3dea0}, {0x15801d0, 0x82d30b0}, 0x7d725a0, 0xaec03e0, {0x64218c0, 0x56}, {0x6db5b40, ...})
	database/sql/sql.go:1743 +0x174
database/sql.(*Tx).QueryContext(0xdba5bc0, {0x1580210, 0x12f3dea0}, {0x64218c0, 0x56}, {0x6db5b40, 0x1, 0x1})
	database/sql/sql.go:2497 +0xbc
database/sql.(*Tx).QueryRowContext(...)
	database/sql/sql.go:2515
github.com/lightningnetwork/lnd/kvdb/sqlbase.(*readWriteTx).QueryRow(0x15ace3a8, {0x64218c0, 0x56}, {0x6db5b40, 0x1, 0x1})
	github.com/lightningnetwork/lnd/kvdb@v1.4.4/sqlbase/readwrite_tx.go:180 +0x60
github.com/lightningnetwork/lnd/kvdb/sqlbase.(*readWriteCursor).Next(0x6db5b80)
	github.com/lightningnetwork/lnd/kvdb@v1.4.4/sqlbase/readwrite_cursor.go:93 +0x1f8
github.com/lightningnetwork/lnd/kvdb/sqlbase.(*readWriteBucket).ForEach(0x5130c10, 0x1fe64c60)
	github.com/lightningnetwork/lnd/kvdb@v1.4.4/sqlbase/readwrite_bucket.go:62 +0x7c
github.com/lightningnetwork/lnd/channeldb.(*ChannelGraph).pruneGraphNodes(0x448bf80, {0x158597c, 0x5130b20}, {0x158597c, 0x5130c10})
	github.com/lightningnetwork/lnd/channeldb/graph.go:1458 +0x194
github.com/lightningnetwork/lnd/channeldb.(*ChannelGraph).PruneGraphNodes.func1({0x15844f4, 0x15ace3a8})
	github.com/lightningnetwork/lnd/channeldb/graph.go:1410 +0x11c
github.com/lightningnetwork/lnd/kvdb/sqlbase.(*db).executeTransaction.func2()
	github.com/lightningnetwork/lnd/kvdb@v1.4.4/sqlbase/db.go:311 +0x30
github.com/lightningnetwork/lnd/kvdb/sqlbase.catchPanic(0x6db5cb0)
	github.com/lightningnetwork/lnd/kvdb@v1.4.4/sqlbase/db.go:196 +0x68
github.com/lightningnetwork/lnd/kvdb/sqlbase.(*db).executeTransaction(0x439a5c0, 0x14ce83e0, 0x13dcd34, 0x0)
	github.com/lightningnetwork/lnd/kvdb@v1.4.4/sqlbase/db.go:311 +0x144
github.com/lightningnetwork/lnd/kvdb/sqlbase.(*db).Update(0x439a5c0, 0x14ce83e0, 0x13dcd34)
	github.com/lightningnetwork/lnd/kvdb@v1.4.4/sqlbase/db.go:227 +0x34
github.com/lightningnetwork/lnd/kvdb.Update(...)
	github.com/lightningnetwork/lnd/kvdb@v1.4.4/interface.go:16
github.com/lightningnetwork/lnd/channeldb.(*ChannelGraph).PruneGraphNodes(0x448bf80)
	github.com/lightningnetwork/lnd/channeldb/graph.go:1396 +0x84
github.com/lightningnetwork/lnd/routing.(*ChannelRouter).pruneZombieChans(0x5622840)
	github.com/lightningnetwork/lnd/routing/router.go:990 +0x76c
github.com/lightningnetwork/lnd/routing.(*ChannelRouter).networkHandler(0x5622840)
	github.com/lightningnetwork/lnd/routing/router.go:1232 +0xbc4
created by github.com/lightningnetwork/lnd/routing.(*ChannelRouter).Start in goroutine 1
	github.com/lightningnetwork/lnd/routing/router.go:689 +0x944

So not sure if things being locked on the server's main mutex is a problem in itself or only really possible if there is only a single DB writer possible.
@FeatureSpitter can you please do the following:

Check the postgres log if you see anything suspicious that would explain why a single query is taking so long?
Try reducing the db.postgres.timeout=3m value to something smaller, e.g. 1m
Try increasing the db.postgres.maxconnections=10 value (but check the actually configured value in Postgres first, that must be at least as large as the number you're using in lnd)

I'll try that.
The next time it hangs (shouldn't be taking too much time) I'll fetch the curls again and the postgres logs.

@guggero here it goes.
I increased the postgres max connection limit to 200 (both in LND and postgres configs).
I reduced the timeout to 30s.
Here are the postgres logs since it started until the moment getinfo got stuck again:
pgsql       |
pgsql       | PostgreSQL Database directory appears to contain a database; Skipping initialization
pgsql       |
pgsql       | 2023-09-19 11:31:00.704 UTC [1] LOG:  starting PostgreSQL 15.4 (Debian 15.4-2.pgdg120+1) on arm-unknown-linux-gnueabihf, compiled by gcc (Debian 12.2.0-14) 12.2.0, 32-bit
pgsql       | 2023-09-19 11:31:00.705 UTC [1] LOG:  listening on IPv4 address "<IP_ADDRESS>", port 5432
pgsql       | 2023-09-19 11:31:00.705 UTC [1] LOG:  listening on IPv6 address "::", port 5432
pgsql       | 2023-09-19 11:31:00.857 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
pgsql       | 2023-09-19 11:31:00.877 UTC [30] LOG:  database system was shut down at 2023-09-19 11:28:58 UTC
pgsql       | 2023-09-19 11:31:00.907 UTC [1] LOG:  database system is ready to accept connections
pgsql       | 2023-09-19 11:36:00.979 UTC [28] LOG:  checkpoint starting: time
pgsql       | 2023-09-19 11:36:42.366 UTC [28] LOG:  checkpoint complete: wrote 414 buffers (2.5%); 0 WAL file(s) added, 0 removed, 0 recycled; write=41.286 s, sync=0.063 s, total=41.388 s; sync files=17, longest=0.005 s, average=0.004 s; distance=1623 kB, estimate=1623 kB
pgsql       | 2023-09-19 11:41:00.463 UTC [28] LOG:  checkpoint starting: time
pgsql       | 2023-09-19 11:41:06.929 UTC [28] LOG:  checkpoint complete: wrote 64 buffers (0.4%); 0 WAL file(s) added, 0 removed, 0 recycled; write=6.356 s, sync=0.053 s, total=6.467 s; sync files=11, longest=0.015 s, average=0.005 s; distance=366 kB, estimate=1497 kB
pgsql       | 2023-09-19 11:46:01.027 UTC [28] LOG:  checkpoint starting: time
pgsql       | 2023-09-19 11:47:15.293 UTC [28] LOG:  checkpoint complete: wrote 694 buffers (4.2%); 0 WAL file(s) added, 0 removed, 0 recycled; write=74.147 s, sync=0.073 s, total=74.266 s; sync files=18, longest=0.009 s, average=0.005 s; distance=5666 kB, estimate=5666 kB
pgsql       | 2023-09-19 11:51:01.391 UTC [28] LOG:  checkpoint starting: time
pgsql       | 2023-09-19 11:51:41.717 UTC [28] LOG:  checkpoint complete: wrote 397 buffers (2.4%); 0 WAL file(s) added, 0 removed, 1 recycled; write=40.183 s, sync=0.078 s, total=40.327 s; sync files=17, longest=0.020 s, average=0.005 s; distance=4033 kB, estimate=5502 kB
pgsql       | 2023-09-19 11:56:01.774 UTC [28] LOG:  checkpoint starting: time
pgsql       | 2023-09-19 11:59:04.401 UTC [28] LOG:  checkpoint complete: wrote 1810 buffers (11.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=182.531 s, sync=0.038 s, total=182.628 s; sync files=9, longest=0.010 s, average=0.005 s; distance=13725 kB, estimate=13725 kB
pgsql       | 2023-09-19 12:01:01.499 UTC [28] LOG:  checkpoint starting: time
pgsql       | 2023-09-19 12:02:55.945 UTC [28] LOG:  checkpoint complete: wrote 941 buffers (5.7%); 0 WAL file(s) added, 0 removed, 1 recycled; write=114.329 s, sync=0.050 s, total=114.447 s; sync files=15, longest=0.007 s, average=0.004 s; distance=11368 kB, estimate=13489 kB
pgsql       | 2023-09-19 12:11:02.129 UTC [28] LOG:  checkpoint starting: time
pgsql       | 2023-09-19 12:11:44.533 UTC [28] LOG:  checkpoint complete: wrote 423 buffers (2.6%); 0 WAL file(s) added, 0 removed, 0 recycled; write=42.321 s, sync=0.041 s, total=42.404 s; sync files=12, longest=0.007 s, average=0.004 s; distance=4030 kB, estimate=12543 kB

And here are the new debug files: https://www.dropbox.com/scl/fo/h9xfa3k2yt08xr2lwygd5/h?rlkey=bbd6f3fh70674v4kxazza9trs&dl=0

I just did another test:
After waiting for getinfo to return for 25 mins (it didn't return), I sigterm postgres and started it again.
While it was down, lnd complained, as expected, and as soon as postgres was up it stopped complaining and went back to the normal logs:
lnd         | 2023-09-19 12:30:00.003 [INF] WTCL: (legacy) Client stats: tasks(received=0 accepted=0 ineligible=0) sessions(acquired=0 exhausted=0)
lnd         | 2023-09-19 12:30:00.011 [INF] WTCL: (anchor) Client stats: tasks(received=0 accepted=0 ineligible=0) sessions(acquired=0 exhausted=0)
lnd         | 2023-09-19 12:31:00.003 [INF] WTCL: (legacy) Client stats: tasks(received=0 accepted=0 ineligible=0) sessions(acquired=0 exhausted=0)
lnd         | 2023-09-19 12:31:00.011 [INF] WTCL: (anchor) Client stats: tasks(received=0 accepted=0 ineligible=0) sessions(acquired=0 exhausted=0)
lnd         | 2023-09-19 12:31:41.042 [ERR] CRTR: Failed to update mission control store: unknown postgres error: FATAL: terminating connection due to administrator command (SQLSTATE 57P01)
lnd         | 2023-09-19 12:31:42.043 [ERR] CRTR: Failed to update mission control store: unknown postgres error: FATAL: terminating connection due to administrator command (SQLSTATE 57P01)
lnd         | 2023-09-19 12:31:43.046 [ERR] CRTR: Failed to update mission control store: failed to connect to `host=pgsql user=postgres database=lnd`: hostname resolving error (lookup pgsql on <IP_ADDRESS>:53: no such host)
lnd         | 2023-09-19 12:31:44.046 [ERR] CRTR: Failed to update mission control store: failed to connect to `host=pgsql user=postgres database=lnd`: hostname resolving error (lookup pgsql on <IP_ADDRESS>:53: no such host)
lnd         | 2023-09-19 12:31:45.046 [ERR] CRTR: Failed to update mission control store: failed to connect to `host=pgsql user=postgres database=lnd`: hostname resolving error (lookup pgsql on <IP_ADDRESS>:53: no such host)
lnd         | 2023-09-19 12:31:46.045 [ERR] CRTR: Failed to update mission control store: failed to connect to `host=pgsql user=postgres database=lnd`: hostname resolving error (lookup pgsql on <IP_ADDRESS>:53: no such host)
lnd         | 2023-09-19 12:31:47.045 [ERR] CRTR: Failed to update mission control store: failed to connect to `host=pgsql user=postgres database=lnd`: hostname resolving error (lookup pgsql on <IP_ADDRESS>:53: no such host)
lnd         | 2023-09-19 12:31:48.045 [ERR] CRTR: Failed to update mission control store: failed to connect to `host=pgsql user=postgres database=lnd`: hostname resolving error (lookup pgsql on <IP_ADDRESS>:53: no such host)
lnd         | 2023-09-19 12:31:49.045 [ERR] CRTR: Failed to update mission control store: failed to connect to `host=pgsql user=postgres database=lnd`: hostname resolving error (lookup pgsql on <IP_ADDRESS>:53: no such host)
lnd         | 2023-09-19 12:31:50.045 [ERR] CRTR: Failed to update mission control store: failed to connect to `host=pgsql user=postgres database=lnd`: hostname resolving error (lookup pgsql on <IP_ADDRESS>:53: no such host)
lnd         | 2023-09-19 12:31:51.045 [ERR] CRTR: Failed to update mission control store: failed to connect to `host=pgsql user=postgres database=lnd`: hostname resolving error (lookup pgsql on <IP_ADDRESS>:53: no such host)
lnd         | 2023-09-19 12:31:52.046 [ERR] CRTR: Failed to update mission control store: failed to connect to `host=pgsql user=postgres database=lnd`: hostname resolving error (lookup pgsql on <IP_ADDRESS>:53: no such host)
lnd         | 2023-09-19 12:31:53.045 [ERR] CRTR: Failed to update mission control store: failed to connect to `host=pgsql user=postgres database=lnd`: hostname resolving error (lookup pgsql on <IP_ADDRESS>:53: no such host)
lnd         | 2023-09-19 12:31:54.045 [ERR] CRTR: Failed to update mission control store: failed to connect to `host=pgsql user=postgres database=lnd`: hostname resolving error (lookup pgsql on <IP_ADDRESS>:53: no such host)
lnd         | 2023-09-19 12:31:55.045 [ERR] CRTR: Failed to update mission control store: failed to connect to `host=pgsql user=postgres database=lnd`: hostname resolving error (lookup pgsql on <IP_ADDRESS>:53: no such host)
lnd         | 2023-09-19 12:31:56.045 [ERR] CRTR: Failed to update mission control store: failed to connect to `host=pgsql user=postgres database=lnd`: hostname resolving error (lookup pgsql on <IP_ADDRESS>:53: no such host)
lnd         | 2023-09-19 12:32:00.003 [INF] WTCL: (legacy) Client stats: tasks(received=0 accepted=0 ineligible=0) sessions(acquired=0 exhausted=0)
lnd         | 2023-09-19 12:32:00.011 [INF] WTCL: (anchor) Client stats: tasks(received=0 accepted=0 ineligible=0) sessions(acquired=0 exhausted=0)
lnd         | 2023-09-19 12:32:13.037 [INF] DISC: GossipSyncer(02d419c9af624d0e7a7c90a60b9ffa35f4934973a9d7d3b4175cc3cc28b7ffcde1): applying gossipFilter(start=0001-01-01 00:00:00 +0000 UTC, end=0001-01-01 00:00:00 +0000 UTC)
lnd         | 2023-09-19 12:32:13.038 [INF] DISC: GossipSyncer(0390cc12f782259427bdc45a283705f4c20ccbdff064ed43f6b74fefcafe9eb1f7): applying gossipFilter(start=2023-09-19 12:32:13.038208524 +0000 UTC m=+3669.907464421, end=2159-10-26 19:00:28.038208524 +0000 UTC)
lnd         | 2023-09-19 12:33:00.002 [INF] WTCL: (legacy) Client stats: tasks(received=0 accepted=0 ineligible=0) sessions(acquired=0 exhausted=0)
lnd         | 2023-09-19 12:33:00.011 [INF] WTCL: (anchor) Client stats: tasks(received=0 accepted=0 ineligible=0) sessions(acquired=0 exhausted=0)

However, getinfo is still stuck.
With postgres being terminated gracefully, I would expect any "hanging" connection on postgres to be terminated, thus un-clogging my getinfo command (returning some error). But that was not the case, the command is still hanging, if I cancel and ask getinfo again, it still hangs.
So whatever is clogging this seems to be isolated to the lnd process only. Rebooting postgres didn't make any difference besides these log messages. Only rebooting lnd (without rebooting postgres) unclogs it, until it clogs again after like ~10-20 minutes of runtime.

Meanwhile I measure the query statistics on postgres while it is clogged and I learned this:

The commit is still going strong.

This does look like something's not properly working with Postgres... Why would a commit take that long? Is there a way to find out all queries of that transaction? So basically, what it is committing?

It now finished the commit and started a new one, but the other SHOW TRANSACTION ISOLATION LEVEL is still there:

I would guess that the SHOW TRANSACTION ISOLATION LEVEL query is probably from the SQL UI you're using in the screenshot itself, not from lnd.

I would guess that the SHOW TRANSACTION ISOLATION LEVEL query is probably from the SQL UI you're using in the screenshot itself, not from lnd.

I'm using DataGrip.
I don't see any query hanged in DataGrip, can be some background query.
I am trying to figure if there's a way to see the commit statements without having to go thru all the query history. Maybe it would be easier to log this on LND's side.

Lots of commits.
What's the most common or largest commit operation LND is performing?

These are the slowest write queries:

I'm logging all the statements now to see if I find a pattern, meanwhile it seems not all query arguments are going as prepared statements (parent_id):
SELECT value FROM channeldb_kv WHERE parent_id=23 AND key=$1

I'm not really that well versed in Postgres, but is there a way to find out what queries are in a transaction? If yes, then I'd try to inspect the transaction the next time a commit takes several minutes. Because all individual queries seem to be very quick.

There's not much to tell from the logs other than these SQL statements are constantly showing up:

There's a huge activity in walletdb. Look at the timestamps, it is a spam.

By the way, I am compiling LND with these tags:
&&  make release-install tags="signrpc walletrpc chainrpc invoicesrpc watchtowerrpc peersrpc autopilotrpc dev kvdb_postgres"

I am using this image: https://github.com/lightningnetwork/lnd/blob/master/Dockerfile
Which means I changed line 27 to add the tags to the make release-install command.
Probably not related to the issue but at this point I am out of ideas.

I just tried without line 27 modification, i.e., https://github.com/lightningnetwork/lnd/blob/master/Dockerfile as it is. And the same happens.
I have no more ideas.

@FeatureSpitter btw you should remove the blocking and mutex profile args you if you don't need to obtain a profile as it adds overhead in the background even when you aren't gathering a profile.

Can you increase the CHDB log level to debug, want to see if we have any of these logs: https://github.com/lightningnetwork/lnd/blob/master/kvdb/sqlbase/db.go#L277-L279

@FeatureSpitter did you see this behavior before updating? Which version did you update from?

I started using 0.17, I didn't update, so this behavior is all I ever known.

Can you increase the CHDB log level to debug, want to see if we have any of these logs: https://github.com/lightningnetwork/lnd/blob/master/kvdb/sqlbase/db.go#L277-L279

You mean debuglevel=debug?

Are you running postgres on the same machine? So on the pi? If so, then I recommend you move it to another machine, a big benefit of the postgres operating mode is that you can run it on a distinct machine and handle back ups, etc. The load of postgres on the pi may just be too much. The pi doesn't have very good I/O bandwidth, which can really choke things out. If you want to run on the same machine, the sqlite would make more sense, as it was made for the embedded environment.

Are you running postgres on the same machine? So on the pi? If so, then I recommend you move it to another machine, a big benefit of the postgres operating mode is that you can run it on a distinct machine and handle back ups, etc. The load of postgres on the pi may just be too much. The pi doesn't have very good I/O bandwidth, which can really choke things out. If you want to run on the same machine, the sqlite would make more sense, as it was made for the embedded environment.

Shouldn't the I/O be under stress if pi was overwhelmed by running postgres?
Pi's I/O is barely being used, as is the CPU, and the SSD can read at about 700MB/s.
I posted a screenshot above regarding the IO.

however, it doesnt seem to be the cause of the issue

I disagree. Multiple minutes for committing a transaction definitely hints at an issue with the Postgres server. How can that be lnd's fault, as it's literally just waiting for Postgres to respond. Did you look into the configuration options I mentioned on Telegram?

however, it doesnt seem to be the cause of the issue

I disagree. Multiple minutes for committing a transaction definitely hints at an issue with the Postgres server. How can that be lnd's fault, as it's literally just waiting for Postgres to respond. Did you look into the configuration options I mentioned on Telegram?

I got you. But there's another thing, LND is always making commits (as per its logs here: https://user-images.githubusercontent.com/39516190/269027830-ead05b11-6a60-453e-a961-150d029db32d.png) and doesn't seem to hang there. Also from postgres logs these commits seem to return instantly, which makes me wonder if the stats are counting all commits as just one (thus adding up all the times) or if commits are really clogging.
I'll try what you said when I get back, and next I can try with a remote juiced postgres server just to rule this for once.
Still, I would be concerned if for any reason LND is unstable in raspis, because for many users this is a selling point on how easy and friendly being a LN node is.

however, it doesnt seem to be the cause of the issue

I disagree. Multiple minutes for committing a transaction definitely hints at an issue with the Postgres server. How can that be lnd's fault, as it's literally just waiting for Postgres to respond. Did you look into the configuration options I mentioned on Telegram?

It made no difference at all.
getinfo still hangs.
Postgres logs while getinfo is hanging (notice the spam on the timestamps):

I will keep testing with option to see if I find any difference.

I'm also experiencing slow getinfo and I think this issue is related to the size of the mempool - when the mempool is large, it makes lots of RPC requests to bitcoind, which potentially blocks the getblockchaininfo RPC request, which is made when calling getinfo in lnd. There are multiple ways to address this issue, such as upgrading bitcoins. I'm also currently working on a PR to relax our mempool loading process so getinfo can be unblocked.

That's interestng and it might explain why there are a few hours where LND is fast as a lightning and others where it is slow as a bank.

If you constantly restart lnd, you are more likely to hit a slow getinfo as it will load the mempool during startup.

If you constantly restart lnd, you are more likely to hit a slow getinfo as it will load the mempool during startup.

And probably if i repeatedly ask for getinfo.
Enjoy the waiting times I'm getting lol:

Is this the same physical device that you had the issue on with Docker and bitcoind? Have you considered that it might actually be faulty hardware? Where either the USB controller or something in between the CPU and the SSD just locks up on certain I/O operations? That wouldn't necessarily be visible just by I/O usage but could explain why Postgres has such a hard time committing stuff.
By the way, is Postgres running within Docker? Maybe Docker is faulty (would kinda explain the bitcoind issue, if caches cannot be flushed efficiently, then they might start filling up, using more RAM).

Is this the same physical device that you had the issue on with Docker and bitcoind? Have you considered that it might actually be faulty hardware? Where either the USB controller or something in between the CPU and the SSD just locks up on certain I/O operations? That wouldn't necessarily be visible just by I/O usage but could explain why Postgres has such a hard time committing stuff. By the way, is Postgres running within Docker? Maybe Docker is faulty (would kinda explain the bitcoind issue, if caches cannot be flushed efficiently, then they might start filling up, using more RAM).

No, it isn't.
At that time I was using a DigitalOcean droplet.
Everything is running with Docker. But the thing is, I have run in raspi 3 and lower, more massive databases and queries than anything LND is throwing at postgres at the moment. I would be truly surprised if LND was hitting some sensitive spot in postgres, because it isn't the load itself that is making things slower. Also, if that were the case, then any query would perform slowly right? But that's not the case, postgres answer to any query smoothly, even when getinfo is stuck.

Here's my docker setup:
version: '3'
services:
  tor:
    image: btcpayserver/tor:<IP_ADDRESS>
    container_name: tor
    environment:
      TOR_PASSWORD: ************
    restart: always
    networks:
      lulz:
        ipv4_address: <IP_ADDRESS>
    volumes:
      - ./tor_data:/var/lib/tor

  lnd:
    build: ./docker/lnd
    container_name: lnd
    ports:
      - "9735:9735"
    #      - "10009:10009"
    volumes:
      - ./lnd_data:/root/.lnd
    restart: always
    networks:
      lulz:
        ipv4_address: <IP_ADDRESS>
    depends_on:
      - tor
      - bitcoind
      - pgsql

  pgsql:
    image: 'postgres:15'
    restart: always
    container_name: pgsql
    environment:
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=*************
      - POSTGRES_DB=lnd
    command: postgres -c 'max_connections=200' -c 'synchronous_commit=off'
    volumes:
      - ./pgsql_data/:/var/lib/postgresql/data
    networks:
      lulz:
        ipv4_address: <IP_ADDRESS>
    ports:
      - "5432:5432"

  bitcoind:
    image: lncm/bitcoind:v25.0
    container_name: bitcoind
    restart: always
    user: 1000:1000
    volumes:
      - ./bitcoind_data:/data/.bitcoin
    networks:
      lulz:
        ipv4_address: <IP_ADDRESS>

networks:
  lulz:
    driver: bridge
    ipam:
     config:
       - subnet: <IP_ADDRESS>/16

As for the LND image that is built, you can find it here:
https://github.com/lightningnetwork/lnd/blob/master/Dockerfile

Meanwhile, I will rent a postgres server, with no docker, and use it instead so we can rule out or confirm for once the postgres hypothesis. Who's with me?

Guys,
a dedicated, non-containerized, 2 CPU + 4 GB + 60 GB Disk, didn't make ANY difference to getinfo clogging issues...!

It is impossible only a handful of people are experiencing this.
This is a remote, non-managed by me postgres server, and still clogs at the commit.
Unfortunately I wasn't able to figure out a way to see what are the queries related to this commit.

FWIW I tried to repro this on similar hardware, a RockPro64 with aarch64. I was not able to repro it there, so I suspect the issue is possibly with bitcoind as @yyforyongyu mentioned. Here are some captured time for lncli getinfo that I did:
Setup:
Postgres on x86 machine as well as bitcoin core
ARM SBC setup with postgres backend
lncli create to init a new wallet
Bash script to run lncli getinfo with time at 3 minute intervals

Results:
[1]
time lncli getinfo > /dev/null
real    0m3.769s
user    0m0.120s
sys     0m0.060s

[2]
time lncli getinfo > /dev/null
real    0m3.429s
user    0m0.140s
sys     0m0.041s

[3]
time lncli getinfo > /dev/null
real    0m1.489s
user    0m0.098s
sys     0m0.073s

[4]
time lncli getinfo > /dev/null
real    0m6.491s
user    0m0.123s
sys     0m0.041s

[5]
time lncli getinfo > /dev/null
real    0m0.476s
user    0m0.139s
sys     0m0.064s

The second-to-last one seems to have been an outlier.

FWIW I tried to repro this on similar hardware, a RockPro64 with aarch64. I was not able to repro it there, so I suspect the issue is possibly with bitcoind as @yyforyongyu mentioned. Here are some captured time for lncli getinfo that I did:
Setup:
Postgres on x86 machine as well as bitcoin core
ARM SBC setup with postgres backend
lncli create to init a new wallet
Bash script to run lncli getinfo with time at 3 minute intervals

Results:
[1]
time lncli getinfo > /dev/null
real    0m3.769s
user    0m0.120s
sys     0m0.060s

[2]
time lncli getinfo > /dev/null
real    0m3.429s
user    0m0.140s
sys     0m0.041s

[3]
time lncli getinfo > /dev/null
real    0m1.489s
user    0m0.098s
sys     0m0.073s

[4]
time lncli getinfo > /dev/null
real    0m6.491s
user    0m0.123s
sys     0m0.041s

[5]
time lncli getinfo > /dev/null
real    0m0.476s
user    0m0.139s
sys     0m0.064s

The second-to-last one seems to have been an outlier.

Give it more time, in the beginning is always fast.

IIUC, the OP is also running Docker in 32 bit mode as well, which may contribute to some trashing that can slow things down.
Zooming out: you're seeing postgres hand on commit, this isn't related to lnd, as it needs to wait for a commit to finish before it can proceed. As is, we only have a single write commit going at any given time. https://github.com/lightningnetwork/lnd/pull/7992 will enable multiple write transactions to commit at a time.
You should also attempt to increase bitcoind.blockpollinginterval to something like bitcoind.blockpollinginterval=5m which will reduce load.

IIUC, the OP is also running Docker in 32 bit mode as well, which may contribute to some trashing that can slow things down. As mentioned above, if you're running everything on a single machine, without any replication at all, then sqlite is a better fit for you hardware configuration.
Zooming out: you're seeing postgres hand on commit, this isn't related to lnd, as it needs to wait for a commit to finish before it can proceed. As is, we only have a single write commit going at any given time. #7992 will enable multiple write transactions to commit at a time.
You should also attempt to increase bitcoind.blockpollinginterval to something like bitcoind.blockpollinginterval=5m which will reduce load.

But everything is pointing out to some strange issue in the way LND uses postgres. Sorry if I can't be of better help for now.

lnd just exports everything as a key-value store, which we know isn't optimal. Future PRs will be able to take better advantage server side query filtering. At this point, what we know is happening is that postgres is blocking on a long running operation, if postgres blocks, then lnd does due to the current application level transaction locking.

Just to add more details regarding the docker that I am using (which is the latest one in raspbian repos):
pi@raspberrypi:~ $ docker version
Client:
 Version:           20.10.5+dfsg1
 API version:       1.41
 Go version:        go1.15.15
 Git commit:        55c4c88
 Built:             Mon May 30 18:34:49 2022
 OS/Arch:           linux/arm
 Context:           default
 Experimental:      true

Server:
 Engine:
  Version:          20.10.5+dfsg1
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.15.15
  Git commit:       363e9a8
  Built:            Mon May 30 18:34:49 2022
  OS/Arch:          linux/arm
  Experimental:     false
 containerd:
  Version:          1.4.13~ds1
  GitCommit:        1.4.13~ds1-1~deb11u4
 runc:
  Version:          1.0.0~rc93+ds1
  GitCommit:        1.0.0~rc93+ds1-5+deb11u2
 docker-init:
  Version:          0.19.0
  GitCommit:

pi@raspberrypi:~ $ docker-compose version
docker-compose version 1.25.0, build unknown
docker-py version: 4.1.0
CPython version: 3.9.2
OpenSSL version: OpenSSL 1.1.1n  15 Mar 2022

Regarding sqlite, I wanted to extend my postgres with remote replication, which is why I am using it in the first place.
But keep in mind that even when I used an external postgres on a dedicated server with the specs I mentioned above, it had commit operations that went for minutes. So it is not an issue caused by having everything running on the same machine, since externalizing postgres made no difference in this case.
Tomorrow I'll try @yyforyongyu PR, and also figure out if I can get a better docker.

I changed the OS from my Raspi 4 from Raspian 64bit to Ubuntu Server 23 64bit.
It seems Raspbian 64bit uses the 32bit docker and armhf architecture when fetching and building apps, instead of arm64.
Changing to Ubuntu 23 64bit solved this issue, and so far, LND is no longer clogged.
So in sum, Raspberry 4 can't run LND in 32 bits with stability.

So in sum, Raspberry 4 can't run LND in 32 bits with stability.

Yeah, they'll also run into database size issues as well.
Closing this now as it was a OS issue.

So in sum, Raspberry 4 can't run LND in 32 bits with stability.

Yeah, they'll also run into database size issues as well.
Closing this now as it was a OS issue.

I wouldn't close this so fast with a reason like "it was a OS issue", the same way that if I implemented a very inefficient sorting algorithm that people couldn't run on a slower OS, I wouldn't blame it on that OS.
LND has an issue, which might, or might not be interesting to fix:
It can't run well on the currently latest Raspbian OS 64-bit version. Because this OS is using repositories for ARMHF instead of ARM64 architecture.
Is this an OS problem? Certainly not. But it is a problem when apps require better performance, or require 64-bit addressing capabilities to run more efficiently, which is the case of LND.
So, for anyone using LND with a Raspbian OS, be advised of these potential issues.
I am actually curious how raspblitz fixed this, they also use some version of Raspbian.

No, the issue here is that you rely on Docker, which because of the OS was only installed as 32bit and therefore could only run 32bit applications. RaspiBlitz has been using the 64bit version of lnd for a long time, as RaspiBlitz doesn't use Docker to run things.
There are other known issues with lnd running on 32bit architectures, even before Postgres. And we've been recommending to not use 32bit architectures anymore. Though maybe not explicitly enough.

Actually, I think the problem is back.
24h after the LND started, it is clogged again, this time in Ubuntu Server 23 64 bit:

Are you using the official lnd docker image? Can you post the image hash please?

I am starting to think that LND is just not compatible with Docker, no matter the bits.

I am starting to think that LND is just not compatible with Docker, no matter the bits.

I've been running lnd within docker for many years, never had any issue. I'm actually starting to believe that Docker on a Raspberry Pi has issues.

I am starting to think that LND is just not compatible with Docker, no matter the bits.

I've been running lnd within docker for many years, never had any issue. I'm actually starting to believe that Docker on a Raspberry Pi has issues.

REPOSITORY          TAG                DIGEST                                                                    IMAGE ID       CREATED         SIZE
postgres            15                 sha256:2fe3743ab3bfe0246c96b1cf397017b3e5477d161c9ddaeb0e1d4a8405d7abd1   ef13bf480f5b   44 hours ago    433MB
lightninglabs/lnd   v0.17.0-beta.rc4   sha256:263c226e0fb78b8bf4ec04e6dfe4f49fb4dfb321eea61ccb132369ad68efc7f1   3179976b7682   3 days ago      114MB
lncm/bitcoind       v25.0              sha256:fad11d4874f1c2dc4373f6fea913bf95e0f0491f377b9a0930f488565e6266f0   624e63a7e93d   3 months ago    35.7MB
btcpayserver/tor    <IP_ADDRESS>           sha256:583b9970b099f175d6a842816919c5828d5408116c5623e1abc186aa1570c9fe   f9f519447e06   10 months ago   97.3MB

Could you try this patch #8019 and see if it helps? On my machine it speeds up getinfo quite a lot.

I haven't had the opportunity to try this. Could it be the answer?

It depends. Do you still see the long-running commit in Postgres? Maybe you've gotten rid of that and are now running into the issue addressed by #8019.

It depends. Do you still see the long-running commit in Postgres? Maybe you've gotten rid of that and are now running into the issue addressed by #8019.

yes I still see long commits:

And as ruled out above, it doesn't matter if postgres is on docker, on a pi, or on a quantum computer.

4 mins and counting

I did some digging with the user on this issue and tried to repro the problem using his node plus my postgres server. Here's what I've analyzed. There is approx 100 ms network latency between his node and my postgres server.
First, let's look at an example of what appears to be a hanging commit:
   pid   |       query_age        |  usename   |                                                                                query
---------+------------------------+------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      32 |                        | postgres   |
      31 |                        |            |
      28 |                        |            |
      27 |                        |            |
      30 |                        |            |
 3494740 | 00:00:00.000558        | postgres   | SELECT                                                                                +
         |                        |            |     pid,                                                                                +
         |                        |            |     age(clock_timestamp(), query_start) AS query_age,                                                                                +
         |                        |            |     usename,                                                                                +
         |                        |            |     query                                                                                +
         |                        |            | FROM                                                                                +
         |                        |            |     pg_stat_activity                                                                                +
         |                        |            | ORDER BY                                                                                +
         |                        |            |     query_start DESC;
 3470432 | 00:00:00.060476        | quantumlnd | SELECT value FROM channeldb_kv WHERE parent_id=23 AND key=$1
 3466372 | 00:00:02.434555        | quantumlnd | commit
 3491954 | 00:00:14.600606        | postgres   | SELECT datname, pid, usename, application_name, backend_start, xact_start, query_start, state_change, wait_event_type, wait_event, state FROM pg_stat_activity WHERE wait_event != 'f' AND usename='quantumlnd';
 3471146 | 00:08:25.988444        | quantumlnd | commit
      33 | 4 days 22:16:28.146506 | replicator | START_REPLICATION SLOT "replication_slot_slave1" 1E/50000000 TIMELINE 1

Note PID 3471146.
SELECT datname, pid, usename, application_name, backend_start, xact_start, query_start, state_change, wait_event_type, wait_event, state FROM pg_stat_activity WHERE wait_event != 'f' AND usename='quantumlnd';
  datname   |   pid   |  usename   | application_name |         backend_start         |          xact_start           |          query_start          |         state_change          | wait_event_type | wait_event |        state
------------+---------+------------+------------------+-------------------------------+-------------------------------+-------------------------------+-------------------------------+-----------------+------------+---------------------
 quantumlnd | 3466372 | quantumlnd |                  | 2023-09-22 16:25:55.245563+00 |                               | 2023-09-22 16:51:37.315327+00 | 2023-09-22 16:51:37.315364+00 | Client          | ClientRead | idle
 quantumlnd | 3471146 | quantumlnd |                  | 2023-09-22 16:33:05.410526+00 |                               | 2023-09-22 16:43:05.677998+00 | 2023-09-22 16:43:05.678045+00 | Client          | ClientRead | idle
 quantumlnd | 3470432 | quantumlnd |                  | 2023-09-22 16:32:17.499777+00 | 2023-09-22 16:33:05.032095+00 | 2023-09-22 16:51:37.353961+00 | 2023-09-22 16:51:37.353981+00 | Client          | ClientRead | idle in transaction

The postgres lifecycle of a session:

Connection establishment
Command isssuance
Query execution
ClientRead: awaiting next command <-- we are here

If I understand correctly, this implies that the commit most likely did complete on postgres.
ClientRead wait event indicates that the session is now waiting for the next command from the client, so I think LND isn't "reacting" to the commit in a timely fashion.

Could you try running lnd outside of Docker? Maybe there's a weird (virtual) networking issue going on? Just to confirm it's not something "between" lnd and the DB that's causing the issue.

Yep, I think that's the next thing we're going to try if we can't figure out more from postgres state.

OK seeing wildly different performance between timeout 0 and 30s (0 is faster)


"My Wallets"

Perhaps I'm not properly understanding the distinction between 'wallet' and 'account'.
A wallet as I understand the term is an interface to manage one or more accounts.   An account is a set of keys to control funds on a blockchain.
An installation of MyEtherWallet is a wallet.  It lets me manage multiple accounts.  If I want to add an additional account to that wallet, I should see a command "Add account" not "Add wallet", and if I want to manage them the tab should say "My accounts" not "My wallets".
Or not?

Yeah I'm doing that next. This is one of the reasons for the
definitions post. Wanted to wrap my head around everything and circle back and update  😂

tx


Split framework in to individual nuget packages

At the moment the framework is this big monolithic package. I think it should be split up, still have a framework package to pull things together, but things like DI, MVC, etc could be packaged off.

Why?

OMG, I'm turning into @bleroy . So: what do you think, what advantages would it bring to split Orchard.Framework into multiple chunks, when everything there is indeed framework functionality? This would mean that we'd have a lot of small projects that you'd need to separately reference (and remember to reference, and remember which one you need to reference for which functionality; what is especially hard if you're looking for extension methods). I see no advantages but a lot of issues.

Splitting things up would allow projects outside of Orchard to opt in to specific parts of Orchard functionality. Yes Orchard.Framework is for Orchard, but when you take it, you take everything.
The framework has a lot of nice design components that other projects/cms's etc could benifit to use but in most cases they don't want to take everything. Remember the new asp.net model is an opt-in approach.
Orchard.Framework is kind of the our version of System.Web in my opinion (except nicer :))

Well, with Orchard App Host projects outside Orchard take on Orchard.Framework at it never caused any issues that "everything" is in there. The only problem was with LocalizedStrings (see: https://github.com/OrchardCMS/Orchard/issues/4752) but that only arises when you actually want to use localization (and wouldn't be solved by splitting Orchard.Framework).
I hate to say this as I frequently come up with ideas rooted in theoretical concerns, but I think a change like this would bring purely theoretical advantages, but only disadvantages in practice. (Again, think about having to add all the references.)
Can you give specific examples where this would be better? I don't mean probable cases but real-world examples where the current approach prevents use of Orchard's features and a divided design would enable adoption.

Not that matters, but imo Framework should be solid and not split. In other case, we need take care of what is dependent on and etc. Who needs that on this level?

Single responsibility, ability to include bits of Orchard (or all of it) in
applications. On the downside, more assemblies is generally not good, but
packaging and design are two different things. A more rational
factorization of the code, based on function rather than how fundamental it
is, would benefit us. That's, by the way, what I did in DecentCMS: there's
a small replaceable server.js that bootstraps the system, and everything
else is factored into small services with a single responsibility. You can
package services into modules, and a set of modules into one folder (I have
a core folder that is the equivalent of Orchard's Fx + Core), but
everything is neatly uncoupled, and factored exactly right. Orchard is a
little messier in that it has three different kinds of services in Fx,
Core, and regular modules. I think it's a good idea to question that
organization.
On Tue, May 5, 2015 at 10:27 AM, urbanit<EMAIL_ADDRESS>wrote:

Not that matters, but imo Framework should be solid and not split. In
other case, we need take care of what is dependent on and etc. Who needs
that on this level?
—
Reply to this email directly or view it on GitHub
https://github.com/OrchardCMS/Brochard/issues/17#issuecomment-99151203.

Yes, but Orchard.Framework is already designed with SRP in mind and there is no unnecessary coupling between its components (e.g. you don't need to do anything with MVC if you just want to use DI). Packaging it in the same way, however, would introduce a lot of complexity and practical downsides.
I don't think it's the same question just related on what to do with the different kind of modules, but I agree that having Core and standard modules, as well as Core modules in the Core project and in their own is confusing and we should do something about it.

I don't think anyone is suggesting packaging along the same lines as component boundaries. I certainly am not. What I am suggesting is actually the opposite: make packaging decisions completely orthogonal to component boundaries. I would have a small amount of code to bootstrap the engine, then have everything else in modules that can be packaged anywhere: it shouldn't matter what dll or folder a module is in, and we might even have different dll distributions depending on the target. For example, there could be benefits in having all of the core distribution under a very small number of dlls (one?) on deployed instances. We already do things differently in precompiled packages, maybe we can push that further. When developing locally, we could have a smarter dynamic compilation system, now that Roslyn is here, that splits things up in module dlls like today, but without the waste and duplication we currently have in our module bin folders. Things are far from perfect today, and investigating how to make them better looks like a good idea.

Ah, I see and I agree. This is similar to the idea of being able to basically build your own Orchard solution (which currently in the simplest case is removing modules that you don't need for example). However I don't think this is what @Jetski5822 is suggesting here.

I'll let him clarify what he meant.

I think this would provide a lot of benefit to the wider ASP.NET community if it was targeted as such. For years there have been efforts to make MVC support plugins and modularity E.g. Portable Areas. Having the ability to bootstrap not just an orchard site, but any MVC site with a very good plugin system, localization, logging, DI etc could see a lot of usage and garner uptake and contribution to Orchard itself.
Maybe we are talking about something like HTML5 initializr but for ASP.NET. Low-level ASP.NET 5 focused bootstrap projects that both Orchard and any other ASP.NET project could be built on.
When Orchard was originally released my company loved the architectural patterns and ability to create vertical slices of features with modules. The extensibility was important for us to be able to offer product customization to 100's of customers without ending up in code branching hell by duplicating the source.
The catch was that we didn't need any of the content management functionality or the database access or even the more advanced extension points such as shapes. We ended up just stripping out everything we didn't need and using just the modularity, localization, logging etc. Maybe others would see a lot of value in bootstrapping their project without rolling their own modularity or branching the Orchard framework.
The approach seems to be inline with vNext providing just a small core of fundamental building blocks and anything else optionally being provided via NuGet. I agree with the approach @bleroy took in DecentCMS.
Happy to help with this if it's a direction the Orchard team wants to go.

So the idea is to break up the Orchard.Framework project as an example in to its constituent parts, with specific vendor modules pushed in to their own namespaces. These would then be pushed and versioned to myget - which is the same workflow as the MVC team.
The core bundle will also contain a host, and probably a nuget package called OrchardVNext which will have reference to the abstracted out packages. The only thing I havent got my head around as of yet is how to turn on the default implementations....
However... the design is....
OrchardVNext.Web (Host)
OrchardVNext (Framework -  think this will need to be renames TBH)
OrchardVNext.DependencyInjection (Abstraction of the core DI)
OrchardVNext.DependencyInjection.Autofac (Vendor specific)
OrchardVNext.Routing (Abstracted out routing pattern)
OrchardVNext.Mvc (Abstracted out MVC pattern) - The idea here is that Orchard host shouldnt care about MVC
OrchardVNext.Mvc.Razor
There will probably be a shapes or templating one somewhere, but I have not got that far.
OrchardVNext.Data
OrchardVNext.Data.EF
OrchardVNext.Data.Dapper
Note: Only one will be bundled, however the concept is that you should be able to swap out the implementation of IContentStore and IContentQueryStore (nb: change to IQueryStore). I am also not saying we support both, more a PoC as I would prefer to use Dapper if anything.
The way I would like to head is that Orchard that you pull off the shelf has everything it needs opted in, just like today, however, if you want to build something else, and really like parts of orchard like the DI, well you can use that and not have to opt in to the routing system.
The other aspect I see is that the upgrade path for people will be much nicer. Today we have to do a big release of core and everyone gets everything. Going this route would allow us to say, hey, the dependency injection nuget package is upgraded so just update that and not the MVC package because at the moment I don't care about the MVC upgrade.
What's your thoughts?

I really like the idea to isolate Orchard modules into independent repositories. This would make our work a lot easier. I don't like the idea use nuget at all - I'd prefer to have the sources of the used modules merged and not just some binaries. So instead of nuget I'd suggest to use npm

No no no no no. I don't think we're talking about separate repos. We used to do that, and it was a nightmare to manage. We walked away from it for a reason. It's horrible for the core team, and it's worse for users. What we're talking about, if I'm not mistaken, is to split things into less coupled packages, but we would still deliver default packages as part of the core Orchard solution and repo.
Another thing: I vote against "OrchardVNext", because that's going to cause lots of headaches when it's no longer vnext, and becomes vcurrent. Just call it "Orchard".

I am totally for the idea of having decoupled packages which other ASP.NET applications could take advantage of. It seems to deliver what was promised when Orchard was just conceived: to create reusable components that other ASP.NET apps could consume. Even if not used as such, striving for this enforces proper decoupled design. In order for things to remain practical, we'd have default packages as Bertrand mentioned.
Please drop the OrchardVNext term in the actual code and simply call it Orchard.
Great stuff.

Separate repos = no, and never ever ever again! Like Taylor Swift said!
We are talking about decoupled packages.
The VNext tag was because I had it in the main repo at one point and didn't know if it was going to get traction. I will drop.

I love this idea.  Using aspects of Orchard like DI in other projects would be excellent, especially if modularized and installed via Nuget.  This could also help with upgrading current code because we could just update the Nuget package and be done with it.

Similar discussion is going on currently in the MVC project.
We seem to have similar goals if you replace MVC with Orchard :smile: E.g.

AddOrchardCore() is an advanced experience that gives an application developer fine-grained control over what features are provided by the Orchard Framework - you can mix and match dependencies with 3rd party frameworks, or avoid dependencies altogether that aren't needed.

https://github.com/aspnet/Mvc/issues/2872
Since we are brainstorming, I'll just put this here:
public void ConfigureServices(IServiceCollection services)
{
    services
        .AddOrchardCore()
        .AddRouting()
        .AddShapes()
        .AddCaching()
        .AddContentManagement();
}

Though maybe we want something more dynamic if we are to collapse the 3 types of modules (framework/core/modules) into one type.

Yes, much more dynamic: this won't scale as that interface would pretty much write the set of services in stone. It needs to be a dynamic discovery process that uses discovery providers that can discover services, and then configuration providers that can give them configuration. Pretty much like what we have today. I don't think that's the part that needs improving. What needs improving is decoupling of the services themselves.

Yes, the discovery process at the moment is actually quite nice, though your idea could be done using extension methods later on within the individual packages, i.e. reference the package, then you have access to AddContentManagement() for example.
At the moment, the discovery will stay as is, using markers and configuration providers. The hard part is decoupling the services. I have pushed some code to master with moves a few things out of the framework.
The three big areas that need moving out at the moment, at Data, DI, and Content Management. Once they are done, the rest will flow.

Extension methods? I really don't see the point. Seems to me like this is insisting on expressing configuration through code. While that sort of thing makes some sense in more expressive and dynamic languages such as Ruby, it seems like a mismatch for C# to me.

Again, why do we want this? The different framework-level features in Orchard.Framework (like logging, DI, data access, localization) are already suitably decoupled (if something is missing or suboptimal there, that can be directly fixed) and if you want to hand-pick what you want to use, you can. As mentioned above in several projects we do this with Orchard App Host (in desktop apps, cloud workers, Windows services and even non-Orchard web apps), in practice (and this is the only, slightly related issue: https://github.com/OrchardCMS/Orchard/issues/4748).
I can't see any practical disadvantage having all the pieces of the framework in the Orchard.Framework class library (if this is what we're mainly talking here) because it just doesn't bother you. A good framework is one where you have everything you need all the time but nothing is forced onto you: I think Orchard.Framework is mostly like this already.

It seems like we're running in circles. It's not practical today to include parts of Orchard into an existing application, for example. This will help with that sort of scenario. Generally speaking, decoupling is good, and there is a lot of coupling in Fx that is not obvious until you hit it. I don't think this is about where we draw package lines, but a lot more about sane development practices. I think the real question is why would we not want this? Would a round of nDepend on the current dll convince you?

"It's not practical today to include parts of Orchard into an existing application, for example." As mentioned, this is exactly what we do today in several projects of ours and it works without major issues. It would entertain me to see an nDepend diagram of the Framework but it just doesn't matter in my experience; in theory de-coupling is good and I like it, but I doubt it would bring any practical advantages here, but cause unnecessary complexity with the introduction of new abstractions, see below.
There are several places where Orchard is "opinionated" but I know only about a handful of cases (opened issues about all of them; can't recall all but one of them is that OrchardStarter does a lot of registrations that you not always need and thus it's most of the time just more feasible not to use it but to copy and modify it, which is less than ideal). I don't know about fundamental, structural issues but about very specific ones related to the framework developer only thinking about using Orchard.Framework in the context of Orchard.Web (which is an issue only slightly related to the packaging question here). However neither of these prevent you from utilizing parts of Orchard.Framework readily, without having to worry about its other parts, as my living, production, continuously developed, practical examples show. I don't worry about Orchard.Framework (and also sometimes non-Core modules or 3rd party modules) being usable in a selective manner in various projects they were never intended to be used in because I already do it :-). It would help if @jrestall could explain why exactly in their case they felt the need to strip out what they didn't need because this was never an issue for us.
I feel that we talk a lot of theory here and nobody really looks into the practical usability of somehow separating parts of the Framework more than how they are today. We shouldn't forget that Orchard.Framework is Orchard.Framework: most of it can't be made meaningful alone or more than a couple of helpers without running an Orchard shell. And once you run an Orchard shell there's nothing to my knowledge that you have to use if you don't want to. The code is there in Orchard.Framework for localization for example even if you don't use it in your app but does this have any meaningful impact?
Now what does have an impact on Orchard's usability as a generic framework is its dependency on System.Web. This is something very deep and scattered. However even this big and bad dependency (that I wholeheartedly would love to see go) only causes two issues: you can only run Orchard with the desktop CLR (though running Orchard as the core of a mobile app or on a Raspberry Pi is probably too far-fetched any way, but would be kind of cool) and you have to add a reference to System.Web (though you don't have to do anything more) if you make use of any type referencing any other type from System.Web (e.g. even if you want to use Localization you have to reference System.Web from your project since LocalizedString implements IHtmlString). I suppose with the move to ASP.NET 5 this is solvable in a way.
And a bonus question: isn't Framework features (like module features) that can be toggled on or off (regarding getting registered with Autofac and running on shell and other events) what you all really want? I can see a benefit in e.g. not loading the content management stuff on shell start if you don't want to use it. However this doesn't look like a big opportunity for performance gains (and I don't really see any other gains): just tried, and starting an Orchard framework and shell alone (with a single module loaded) is <2s and using <20MB of memory on my machine in Debug and from an HDD. Could be better of course, but maybe this is not something where efforts should be focused (though if anyone does it I'd be glad to test it).

The tie to the desktop CLR is unfortunate, not because of the Raspberry Pi (I really don't care about that at all), but because of Linux, OSX, and .NET Native. The latter in particular could bring very significant wins in terms of scalability, memory footprint, and raw perf. This is not for right now, but definitely something to think about and prepare for.
I think it's great that you've been able to implement lots of cool stuff on .Nest, but that doesn't mean that others are pulling stuff out of their arses. In particular, there are parts of the Decent core that I'm working on isolating, in order to enable their usage outside of the CMS. I have very good reasons for that, thank you for asking (people asking for it for their own very real apps). Those parts are the dependency injection library (done), the multi-tenancy (working on it), localization (not started), and the querying engine. It won't be too hard, because I had that in mind from the start.
In the end, I don't want to impose what anyone works on, we all get to choose what we find interesting. If Nick finds this interesting, he should go for it. You think it's not worth his time, I think it is. Well, he's the judge in the end: it's his time. The question of whether we should take that contribution once it exists is distinct, but I think we did already agree that less coupling is good, so it seems like this one is settled.
Peace.

The CoreCLR compliance is one of the key factors to moving to asp.net vnext. Allowing you to run on Linux, OSX, or whatever the CoreCLR platform supports is totally the way to go.
Orchard Framework in my opinion has turns in to a massive opt in modal. Which works for some people and not others. Some people dont want to use MVC, but like other aspects of Orchard but at the moment they would have to split the MVC stuff out, this is a headache as everything is kind of tied together making separating it out difficult - try it, I am trying it now, and it is a slow process.

This work is loosly done. It is an ongoing piece of work, but most is split out. There is still a sizable chunk of framework not ported over, but this task was for what was there not for what was in Framework currently.


terraform-providers.hydra: 0.1.0 -> 0.1.1

Motivation for this change
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Added a release notes entry if the change is major or breaking
[ ] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 124317 at ae05891c run on aarch64-linux 1

2 packages built successfully:

terraform-full
terraform-providers.hydra


[DATA]

Which Dataset
https://github.com/dsfsi/covid19za/blob/master/data/covid19za_provincial_cumulative_timeline_confirmed.csv
Error Description
cumulative cases for FS (1808972) is 10 times too large for 2nd last entry 30-12-2021
Suggested fixes

find the actual value (188972 ?)

Fixed this.   NICD revised number reported at https://www.nicd.ac.za/latest-confirmed-cases-of-covid-19-in-south-africa-31-december-2021/  typo.

Fixed this.   NICD revised number reported at https://www.nicd.ac.za/latest-confirmed-cases-of-covid-19-in-south-africa-31-december-2021/  typo.


Change All Spark Operations to accept Spark Session

Some spark based operations accept sparksessions, while some acceptJavaSparkContext's, this should be standardised so all operations accept sparksessions,
A better method of supplying the spark sessions to the operations is needed, currently a spark session is provided as a mandatory option on each operation, which has the side effect that spark operations can't be run over the rest service.
I propose we change this so that you create a gaffer "spark context" (inheriting from the gaffer context object)  in your store if you enable spark operations, which will then contain a spark session.which can be retrieved in the handler

#Migration Steps
The GraphHook interface has changed so it now takes a Context object instead of just the user object.

Merged into develop.


Handle errors from the Cloudant DB and send valid error response

Handle errors from the Cloudant DB and send a valid error response to the App

Can you provide me the nodejs backend repo?

Hi @sreevani916, we do not have a production ready NodeJS backend for the Liquid Prep project. We first have to determine where we can deploy a NodeJS backend in production, before creating one. Please let me know if you have any ideas. Thanks!


⚠ Samsung has degraded performance

In 1ae65fe, Samsung (https://samsung.com) experienced degraded performance:

HTTP code: 200
Response time: 2238 ms

Resolved: Samsung performance has improved in b14c549.


plugin: loading a copy of an already loaded plugin panics

Please answer these questions before submitting your issue. Thanks!
What did you do?
Given a simple plugin hello.go:
package main

import "fmt"

func Run() { fmt.Println("Hello") }

I build it into a .so file and create a copy of the resulting file.
$ go build -buildmode=plugin hello.go
$ cp hello.so bye.so

Then running this program panics:
_, err := plugin.Open("hello.so")
if err != nil {
	log.Fatal(err)
}
_, err = plugin.Open("bye.so")
if err != nil {
	log.Fatal(err)
}

The result of the execution is:
plugin: plugin plugin/unnamed-5e323bb7e1479d9f71342c85ad29e7552ca5f746 already loaded
fatal error: plugin: plugin already loaded

goroutine 1 [running]:
runtime.throw(0x534999, 0x1d)
	/usr/local/go/src/runtime/panic.go:596 +0x95 fp=0xc420045b80 sp=0xc420045b60
plugin.lastmoduleinit(0x1e5a400, 0xc42000fb18, 0x1e5ba70, 0xc, 0x7b52a0)
	/usr/local/go/src/runtime/plugin.go:25 +0xc1a fp=0xc420045cb0 sp=0xc420045b80
plugin.open(0x530dda, 0x6, 0x0, 0x0, 0x0)
	/usr/local/go/src/plugin/plugin_dlopen.go:72 +0x25d fp=0xc420045ef0 sp=0xc420045cb0
plugin.Open(0x530dda, 0x6, 0xc42000c160, 0x0, 0x0)
	/usr/local/go/src/plugin/plugin.go:30 +0x35 fp=0xc420045f28 sp=0xc420045ef0
main.main()
	/data/main.go:39 +0xae fp=0xc420045f88 sp=0xc420045f28
runtime.main()
	/usr/local/go/src/runtime/proc.go:185 +0x20a fp=0xc420045fe0 sp=0xc420045f88
runtime.goexit()
	/usr/local/go/src/runtime/asm_amd64.s:2197 +0x1 fp=0xc420045fe8 sp=0xc420045fe0

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
	/usr/local/go/src/runtime/asm_amd64.s:2197 +0x1
exit status 2

What did you expect to see?
Either the second call to Open is silently ignored and no code is loaded (as it happens if I call twice Open with the same path) or Open returns an error.
What did you see instead?
A panic.
Does this issue reproduce with the latest release (go1.7.5)?
Only on Go 1.8 (plugin is required)
System details
go version devel +9799622f09 Thu Feb 9 01:45:17 2017 +0000 darwin/amd64
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/campoy"
GORACE=""
GOROOT="/Users/campoy/src/golang.org/x/go"
GOTOOLDIR="/Users/campoy/src/golang.org/x/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/yt/3jw3ts594kd9w6t6dw7rp6y40043p6/T/go-build097698135=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
GOROOT/bin/go version: go version devel +9799622f09 Thu Feb 9 01:45:17 2017 +0000 darwin/amd64
GOROOT/bin/go tool compile -V: compile version devel +9799622f09 Thu Feb 9 01:45:17 2017 +0000 X:framepointer
uname -v: Darwin Kernel Version 16.4.0: Thu Dec 22 22:53:21 PST 2016; root:xnu-3789.41.3~3/RELEASE_X86_64
ProductName:	Mac OS X
ProductVersion:	10.12.3
BuildVersion:	16D32
lldb --version: lldb-360.1.70

cc @crawshaw

$ cp hello.go bye.go
should be
$ cp hello.so bye.so

Thanks @vimalk78, I fixed it

@campoy Are you still experiencing this issue? My workaround is to manually set the pluginpath LD flag in the build command:
go build -ldflags "-pluginpath=hello" -buildmode=plugin -o hello.so hello.go
go build -ldflags "-pluginpath=bye" -buildmode=plugin -o bye.so bye.go

@psykhi where can i find more info about this pluginpath flag

Note that -pluginpath is not part of go tool interface and could change between releases. The easier way to use it now is to put your plugins in $GOPATH/src/{hello, bye} and then go build -buildmode=plugin {hello, bye}. You can create a synthetic temporary GOPATH for the purpose if you are in a script.

@vimalk78 This isn't documented anywhere AFAIK, I just found that trick from reading the source code of plugin generation/opening.
@crawshaw Thanks for the tip! What will be the definitive "official" way of generating the plugins then? go build -buildmode=plugin -o hello.so hello.go ?
Will that be part of the 1.8 release?

@tudyzhb I didn't think about that one, nice! Thanks!


[Debug enhancement] IncorrectlySigned exception on AuthnRequest when MDQ server is down

When we use a SAML backend with metadata from mdq server and the mdq server is unavailable, SATOSA raises a UnkownError. In the debug log we can read the exception message "IncorrectlySigned". This means that the metadata was not retrieved correctly.
Code Version
master branch
Expected Behavior
Probably a detailed message like "MDQ server is unavailable" would be better.
Current Behavior
  File "Django-Identity.env/lib/python3.5/site-packages/saml2/server.py", line 231, in parse_authn_request
    "single_sign_on_service", binding)
  File "Django-Identity.env/lib/python3.5/site-packages/saml2/entity.py", line 860, in _parse_request
    must=must, only_valid_cert=only_valid_cert)
  File "Django-Identity.env/lib/python3.5/site-packages/saml2/request.py", line 96, in loads
    only_valid_cert=only_valid_cert)
  File "Django-Identity.env/lib/python3.5/site-packages/saml2/request.py", line 59, in _loads
    raise IncorrectlySigned()
saml2.response.IncorrectlySigned

This issue is related to pysaml2 mdstore and not directly to SATOSA but it could be handled in a better way instead of expose an error 500 if you agree


fix-dropdown-menu-component-modal-behaviour

Fixes : #183
Problem
Because default behavior of radix DropdownMenu is to work like a modal & due to this reason we face few minor issues in our ui , which are as follows

Dancing Scrollbar : as soon as component start appearing ..
Need to do double click for every interactions & until we click ui seems dead , no mouse pointers
Scrolling not working until we click.

https://github.com/code100x/cms/assets/73944177/6a9aa3a0-c30f-48c3-a068-bf0995c73046
https://github.com/code100x/cms/assets/73944177/364b1a2d-279f-455c-8d56-08840e806ae8
https://github.com/code100x/cms/assets/73944177/60ebb1d2-4551-4b6a-847b-e76e9f998c24

Fix
Please check this video to see the fix and compare the diff
https://github.com/code100x/cms/assets/73944177/da9ba1f7-d1fb-4bae-844b-fc456af47ac2

@hkirat , is the change useful? Let me know if you need further explanation ..


Allow Extending other Element Implementations

Summary
In the case where we want to build lots of similar components, it might be valuable to allow extending off of an existing Web Component class definition. This is the one interface we don't currently allow, but is possible with non-declarative interfaces for Web Components.
Example
<basic-button>
  <template shadowrootmode="open">
    <button>Alert</button>
  </template>
  <script td-method="connectedCallback">
    const button = this.shadowRoot.querySelector('button')
    button.addEventListener('click', () => { console.log('ACTION!') });
  </script>
</basic-button>

<fancy-button td-extends="basic-button">
  <template shadowrootmode="open">
    <style> button { font-size: 2em; color: red; } </style>
    <button>Alert</button>
  </template>
</fancy-button>

<loud-button td-extends="basic-button">
  <script td-method="connectedCallback">
    const button = this.shadowRoot.querySelector('button')
    button.addEventListener('click', () => { alert('ACTION!') });
  </script>
</loud-button>

This has been completed and released as part of v6.1.0


Created Reviews page

added a review page in html using the above code structure in mind

For a Merge


Route support for MAD db schema

This PR will allow people on MAD backend to display routes in RM
this PR needs to be tested by someone with a Golbat backend, to make sure it ain't breaking stuff there
it also needs to be tested by other MAD users
Fixes MAD support for event pokestops and also (I think) invasion filtering.
TLDR; MAD DB speaks datetime columns, and some of these are in UTC.
Also the model to get available events was out of order.
This should in theory work for any lost soul still running on legacy branch of MAD, but I only tested it on async.

Works on Mad Database, don't have any problems.

works for me too.

Closed my other PR and merged it into this, as the changes are "small" enough imo, and it makes it easier to work on


XMLHttpRequest upload (upload.onprogress) event is not supported

Hi, I noticed that #292 mentioned that interceptor has added support for the upload event of XMLHttpRequest, but I tried to use XHR to upload files in the latest version of msw, and the progress event was not triggered.
By the way, #292 mentions adding support for the progress event, but this only works in response.
I'm wondering if it's possible to add support for the progress event in upload?

Environment

msw: 2.3.0
nodejs: 2.3.0
pnpm: 9.0.6

To Reproduce
const xhr = new XMLHttpRequest()

// codes...
xhr.upload.onprogress =({ loaded, total }) => {
    console.log(loaded, total) // not triggered
};

xhr.send(someFormData)

I am experiencing the same issue.
I'm using axios within a node environment and onUploadProgress is not being called either.

Hi! Thanks for raising this.
I've opened a fix at #613, and the XMLHttpRequestInterceptor now correctly emits upload events for requests with body (tested on multipart/form-data file uploads).

[!IMPORTANT]
This will not be supported in JSDOM. JSDOM does not implement the upload events at all, and I always get a single progress event where both loaded and total are always 0. That is a different behavior from the browser, where the loaded and total are calculated correctly. We are going to use browser as the source of truth from now on and disregard any discrepancies JSOM may introduce. If you encounter any, please raise them with the JSDOM maintainers to provide proper implementation.

Released: v0.34.2 🎉
This has been released in v0.34.2!

📄 Release notes
📦 npm package

Make sure to always update to the latest version (npm i @mswjs/interceptors@latest) to get the newest features and bug fixes.

Predictable release automation by @ossjs/release.

thank you for explaining the behavior of jsom. it works now. that's amazing and very kind of you, many thanks @kettanaito


Compiler error when building on Windows

Hi,
I am trying to build mxnet under Windows. According to the docs, I used cmake-gui and no error was reported. The VS is 2013. And about the c++11 support, when I run the patch, it said that the patch was already installed. The OS is 64 bit Windows 10. The CUDA version is 7.5; cudnn version is v3, and the gpu is gtx 960. The compiler selected in cmake-gui is VS2013 win64.
The cmake screenshot:

The error is:
Error	13599	error C1001: An internal error has occurred in the compiler.	e:\projects\opensource\mxnet\src\ndarray\ndarray.cc	171	1	mxnet
Error	231	error C1001: An internal error has occurred in the compiler.	e:\projects\opensource\mxnet\src\operator\ndarray_op.cc	117	1	mxnet
Error	232	error C1001: An internal error has occurred in the compiler.	e:\projects\opensource\mxnet\src\operator\ndarray_op.cc	71	1	mxnet

Is there any hint about this error? Thanks.

@magic282 could you try the latest code? And also if possible, reinstall VS2013 and CUDA.


[Login] Minor UI tweaks

@dennisreimann I'll take care of these when I get a moment, just making an issue while I tinker around in the editor

[ ] Bump logo asset up to 6rem
[ ] Make the border-radius 16px or equivalent class on the logo asset (works for the circular assets, and make the the square assets look better)

completed in commit: https://github.com/btcpayserver/app/commit/63bf13ae8f9b338b011609db043bba214809cec7


Add capability to edit existing or enter timestamp of start time

The use case is a timer started the race too soon and needs to quickly change it on the fly, or they recorded a time stamp of the start from another source and need to manually set the time.
I think offering a way to tap the start time field that would open up a modal to allow you to enter the start time of day could accomplish this.

See case with Teague: Public Ticket URL: https://help.runsignup.com/support/tickets/public/3d2108b8719e1f47ecc1f72e20eaef9c7f2afaea743cfda7a5e181ec9dbf75c1


fix(cdc): fix postgres privilege check for AWS RDS

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
Check whether postgres user is granted as rds_superuser or rds_replication;
Checklist

[ ] I have written necessary rustdoc comments
[ ] I have added necessary unit tests and integration tests
[ ] I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features #7934).
[ ] My PR contains breaking changes. (If it deprecates some features, please create a tracking issue to remove them in the future).
[ ] All checks passed in ./risedev check (or alias, ./risedev c)
[ ] My PR changes performance-critical code. (Please run macro/micro-benchmarks and show the results.)

[ ] My PR contains critical fixes that are necessary to be merged into the latest release. (Please check out the details)

Documentation

[ ] My PR needs documentation updates. (Please use the Release note section below to summarize the impact on users)

Release note
If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.

Is it necessary to add an integration test with AWS RDS via Local Stack: https://docs.localstack.cloud/user-guide/aws/rds/

I think it is necessary to have integration test for RDS, right now we don't have such environment and @neverchanje is working on it. I am not sure whether the localstack could simulate an exact environment as AWS, do you have any experience with it?

We have kinesis test based on local stack: https://github.com/risingwavelabs/risingwave/blob/main/integration_tests/kinesis-s3-source/docker-compose.yml#L36-L61

Will we have the same issue in GCP?

Will we have the same issue in GCP?

We don't support RDS on GCP yet..


Fix data write on usb channel

Fixes #7094
@LordOfTheRats please check if this works for your device

Looks good :+1:


Pass concat::fragment target to function rather than getting from auditd::params

Hello!
We just came across an interesting bug in our environment.
We are running SLES 12 and we noticed first that rules weren't being picked up from /etc/auditd/rules.d/puppet.rules.
We changed the auditd::rules_file param to /etc/auditd/audit.rules and then encountered a bunch of warnings that said that /etc/auditd/rules.d/puppet.rules doesn't exist in the catalog!
This striked us as odd, and we think that the function is not correctly getting the hiera value that we provided to the module.
Please see my pull request, as I believe this fixes the issue, while retaining previous expected behaviors.
As an interesting side effect, I think that this would also allow people to specify a different target for different rules in hiera. Although I can't imagine why anyone would.

Should be fixed by #43 - pleas re-open if required.


phpdcd 1.0.2 - undefined index

Notice: Undefined index: line in phar://C:/bin/phpdcd.phar/src/Analyser.php on l
ine 274
Call Stack:
0.0063     369168   1. {main}() C:\bin\phpdcd.phar:0
0.0301    1516264   2. Symfony\Component\Console\Application->run() C:\bin\p
hpdcd.phar:323
0.0408    1903624   3. SebastianBergmann\PHPDCD\CLI\Application->doRun() pha
r://C:/bin/phpdcd.phar/symfony/console/Symfony/Component/Console/Application.php
:121
0.0413    1904928   4. Symfony\Component\Console\Application->doRun() phar:/
/C:/bin/phpdcd.phar/src/CLI/Application.php:136
0.0422    1905784   5. Symfony\Component\Console\Application->doRunCommand()
phar://C:/bin/phpdcd.phar/symfony/console/Symfony/Component/Console/Application
.php:191
0.0423    1906072   6. Symfony\Component\Console\Command\Command->run() phar
://C:/bin/phpdcd.phar/symfony/console/Symfony/Component/Console/Application.php:
892
0.0446    1909016   7. SebastianBergmann\PHPDCD\CLI\Command->execute() phar:
//C:/bin/phpdcd.phar/symfony/console/Symfony/Component/Console/Command/Command.p
hp:241
0.6098    2654096   8. SebastianBergmann\PHPDCD\Detector->detectDeadCode() p
har://C:/bin/phpdcd.phar/src/CLI/Command.php:137
0.8881    5101736   9. SebastianBergmann\PHPDCD\Analyser->analyseFile() phar
://C:/bin/phpdcd.phar/src/Detector.php:69
0.8886    5132168  10. SebastianBergmann\PHPDCD\Analyser->analyseSourceCode(
) phar://C:/bin/phpdcd.phar/src/Analyser.php:159

This issue appears again in 1.0.2.

+1

+1

+1

Version: 1.0.2
Notice: Undefined index: line in  sebastian\phpdcd\src\Analyser.php on line 238

I'm getting this too, but slightly different:
Notice: Undefined index:  in /home/vagrant/.composer/vendor/sebastian/phpdcd/src/Analyser.php on line 274

Running phpdcd 1.0.2 with PHP 5.5.30 on an Ubuntu 14.04 64-bit VM (host is a Macbook Pro running Virtualbox and Vagrant)

I lost interest in this project a long time ago, mostly due to the limitations of its implementation. Today I added a note that this project is no longer maintained to its documentation and closed all open tickets. Feel free to continue to work on this in a fork.


[Bug]: Tabs Hydration attribute mismatch

Environment
- Operating System: Linux && Windows
- Node Version:     v18.20.3
- Nuxt Version:     3.12.4
- CLI Version:      3.12.0
- Nitro Version:    2.9.7
- Package Manager<EMAIL_ADDRESS>- Builder:          -
- User Config:      compatibilityDate, devtools, modules
- Runtime Modules<EMAIL_ADDRESS><EMAIL_ADDRESS>- Build Modules:    -

Link to minimal reproduction
https://stackblitz.com/edit/nuxt-starter-gvthbq?file=package.json,app.vue
Steps to reproduce
Run stackblitz container and open dev console
Describe the bug
Hydration attribute mismatch using tabs component (maybe not only tabs)
Expected behavior
No response
Context & Screenshots (if applicable)
No response

@brokuka  please do the solution here https://github.com/radix-vue/radix-vue/issues/577#issuecomment-1980983686


map address problem

Hello ..
Is there a way to fix this on kubernetes v1.4.4  .. It maps to pods ip address instead of external? Is there way to provide external ip address for creating external table ?
2016-12-01 18:52:46.603 INFO 1 --- [io-8080-exec-10] o.a.kafka.common.utils.AppInfoParser : Kafka version : <IP_ADDRESS>
2016-12-01 18:52:46.603 INFO 1 --- [io-8080-exec-10] o.a.kafka.common.utils.AppInfoParser : Kafka commitId : 3402a74efb23d1d4
2016-12-01 18:52:46.749 INFO 1 --- [io-8080-exec-10] c.c.c.ConfigServicePropertySourceLocator : Fetching config from server at: http://localhost:8888
2016-12-01 18:52:46.758 WARN 1 --- [io-8080-exec-10] c.c.c.ConfigServicePropertySourceLocator : Could not locate PropertySource: I/O error on GET request for "http://localhost:8888/application/default": Connection refused; nested exception is java.net.ConnectException: Connection refused
2016-12-01 18:53:22.642 INFO 1 --- [TaskScheduler-1] o.s.b.f.xml.XmlBeanDefinitionReader : Loading XML bean definitions from class path resource [org/springframework/jdbc/support/sql-error-codes.xml]
2016-12-01 18:53:22.849 INFO 1 --- [TaskScheduler-1] o.s.jdbc.support.SQLErrorCodesFactory : SQLErrorCodes loaded: [DB2, Derby, H2, HSQL, Informix, MS-SQL, MySQL, Oracle, PostgreSQL, Sybase, Hana]
2016-12-01 18:53:22.949 ERROR 1 --- [TaskScheduler-1] o.s.c.s.a.g.sink.support.JdbcCommands : Error during run sql
org.springframework.dao.DataAccessResourceFailureException: StatementCallback; SQL [INSERT INTO httpdata SELECT * FROM httpdata_ext_90f5e4e4_d363_4ba2_aa01_2f55b73f7cf7]; ERROR: connection with gpfdist failed for gpfdist://<IP_ADDRESS>:8000/data. effective url: http://<IP_ADDRESS>:8000/data. error code = 110 (Connection timed out) (seg0 slice1 dbslave01:40000 pid=28847); nested exception is org.postgresql.util.PSQLException: ERROR: connection with gpfdist failed for gpfdist://<IP_ADDRESS>:8000/data. effective url: http://<IP_ADDRESS>:8000/data. error code = 110 (Connection timed out) (seg0 slice1 dbslave01:40000 pid=28847)
at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:105) ~[spring-jdbc-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:73) ~[spring-jdbc-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81) ~[spring-jdbc-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81) ~[spring-jdbc-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]

Unfortunately I think this is not possible at this moment. There's similar need for all apps which binds additional ports so most likely we get this sorted out at some point. Issue is more or less for apps to know their external address at a time of creation.


Align logic between JValidatorNew and JValidator

Codecov Report

Merging #13063 (61b62f8) into 3.2 (139a62e) will increase coverage by 0.00%.
The diff coverage is n/a.

@@            Coverage Diff            @@
##                3.2   #13063   +/-   ##
=========================================
  Coverage     69.43%   69.44%
  Complexity        2        2
=========================================
  Files          1649     1649
  Lines         68566    68567    +1
  Branches      10001    10001
=========================================
+ Hits          47607    47614    +7
+ Misses        16368    16354   -14
- Partials       4591     4599    +8

see 35 files with indirect coverage changes
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


No module named 'ibeam.src.handlers'

Describe the bug
Traceback (most recent call last):
File "./ibeam_starter.py", line 8, in
from ibeam.src.handlers.login_handler import LoginHandler
ModuleNotFoundError: No module named 'ibeam.src.handlers'
To Reproduce
Running standalone under Amazon Linux 2 on ARM architecture.
python3 ./ibeam_starter.py
Expected behavior
Not sure but not this
Environment
IBeam version: 0.5.0
standalone:
Python version (standalone users only): Python 3.7.16
OS:
Operating System: Amazon Linux 2
CPE OS Name: cpe:2.3:o:amazon:amazon_linux:2
Kernel: Linux 5.10.192-182.736.amzn2.aarch64
Architecture: arm64
Additional context
I doubt this can actually work in this setup--ibeam appears to need chrome or chromium and neither seems to be available for the ARM architecture.  All I have is an old Firefox.
Suggest a Fix
I'm not sure this is worth fixing from the developers' point of view.  I'd love to have it but I can live without it.

Hey @BillWeld thanks for reporting this issue. There indeed seem to be some import issues. I'll look into it when I find some time. A temporary fix would be to modify the PYTHONPATH I'd imagine.
Also, are you sure chrome/chromium is unavailable on ARM? Just a naive search, but I'm seeing this:
https://community.arm.com/arm-community-blogs/b/tools-software-ides-blog/posts/native-chromium-builds-windows-on-arm
https://chromium.googlesource.com/chromium/src/+/main/docs/mac_arm64.md

facing same issue

Thanks @Voyz.  I haven't been able to find a chrome/chromium for Linux ARM.  I'm sure it's possible to build it but I haven't found a recipe for that either.
I don't know much about web tech but is it really necessary to have a full browser to convince the Client Portal to let you log in?  I would have thought some fancy script using curl could have done it.

Hey @BillWeld @thunderwin thanks for bearing with me. The issue was due to rearranged imports in the ibeam_starter.py. There's a bit where we add currenet path to $PATH which ensures the imports work correctly:
_this_filedir = os.path.abspath(os.path.dirname(__file__))
sys.path.insert(0, str(Path(_this_filedir).parent))

However my IDE (Intellij IDEA) keeps on rearranging the imports which I sometimes don't notice. I tried to fix this by putting that code in a function. Hope it stays this way. Let me know if that helps 👍

@BillWeld unfortunately yes, full browser is how we authenticate now. If you find a better solution to do it without a browser definitely let us know.

I'm going to close this issue due to inactivity. Thanks for your contribution and please feel free to request a reopen if you'd like to continue the discussion 👍


FR: Add module descriptions to the admin dropdown

Hello,
In the past, I used https://host/report/index.php?/install/dump_modules/config to find the latest modules and add them to config.php. However, it only lists client-side modules. When combined with setting $conf['hide_inactive_modules'] = TRUE, MunkiReport ends up hiding views for server-only modules like filevault_escrow.
Bochoven suggests adding a page that shows the available modules and descriptions. It would help administrators discover new modules and configure as they like. I like that idea as well :)
Best,
Nathan

Maybe somehow have a link in the module's page that shows the ReadMe.md within module even.


Adding support for pub package manager

Adding support for pub (Flutter, Pub.Dev) package manager.
The code parsed the pubspec.yml file

@microsoft-github-policy-service agree

Hi @aviadkam, would you mind linking to some documentation on pub and its manifest format?

Hi @aviadkam, would you mind linking to some documentation on pub and its manifest format?

Sure. @annaowens .
Here are some links:
https://dart.dev/tools/pub/pubspec
ttps://dart.dev/tools/pub/dependencies


In Turkish, certain characters are bolded when the font weight is 300

We use this repo for our Class Engagement FRA, and when the page is displayed in Turkish we are finding that the characters ğ and ş don't seem to support a font-weight of 300.  The result looks like this:

For the search bar, we are using valence-ui-input.

Neat! Those glyphs appear to be missing from the Lato font specification, as using them on Google Fonts in the preview has the same results.

Update: seems like maybe Google is hosting an older version of the Lato font. Suggest we download and test out the latest version of the font from here:
http://www.latofonts.com/lato-free-fonts/#download


Task15

Concatinate the first Name, Middle Name, Last Name from the input excel and write the results into full Name column

@gowribolem
Task -4
Not available in destination folder please ensure task are in correct folder before raise PR.
Task -15
Code verified.


Is there a regression test mechanism for new developers to verify their changes ?

Is there a regression  test mechanism for new developers to verify their changes ?

Just saw the description on README.md


201.| Bitwise AND of Numbers Range | c++

Title -
What will change -
Type of Issue -
Please add/delete options that are not relevant.

[x] Adding New Code
[x] Improving Code
[x] Improving Documentation
[x] Bug Fix

Programming Language
Please add/delete options that are not relevant.

[x] Python
[x] C++
[x] Java
[x] SQL

Self Check

Ask for issue assignment and wait to get assigned to it before making Pull Request.
Add your file in the proper folder
Clean Code and Documentation for better readability
Add Title and Description of the program in the file

:star2: Star it :fork_and_knife:Fork it :handshake: Contribute to it!
Discord server ✉ - https://discord.gg/CXksGdn
Happy Coding,

I would like to work on it!!

I already solve this question :
https://github.com/SHY-Corp/LeetCode-Solutions/pull/1277/commits/792e8d2093229ddd4a0dfddba6c6221f993f870f